[openwrt/openwrt] tools/autoconf: Fix relocatable patch
LEDE Commits
lede-commits at lists.infradead.org
Mon Feb 24 05:12:52 PST 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e03676a9ba3a7bb82a0a5d27d7bdb974ce3633e1
commit e03676a9ba3a7bb82a0a5d27d7bdb974ce3633e1
Author: Hannu Nyman <hannu.nyman at iki.fi>
AuthorDate: Sat Feb 22 18:47:52 2025 +0200
tools/autoconf: Fix relocatable patch
Fix the 000-relocatable.patch broken by e0f5ce9. The patch segment about
detecting STAGING_DIR_HOST was erroneously removed, as upstream had
deleted the previous bin/autoconf.as and had implemented it in perl
in bin/autoconf.in. Re-create the previous functionality in that.
Fixes: #18059
Fixes: e0f5ce974 ("tools/autoconf: bump to 2.72")
Signed-off-by: Hannu Nyman <hannu.nyman at iki.fi>
Link: https://github.com/openwrt/openwrt/pull/18073
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
tools/autoconf/patches/000-relocatable.patch | 31 ++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/tools/autoconf/patches/000-relocatable.patch b/tools/autoconf/patches/000-relocatable.patch
index bc8a2d1b7c..21b7f14f7f 100644
--- a/tools/autoconf/patches/000-relocatable.patch
+++ b/tools/autoconf/patches/000-relocatable.patch
@@ -1,3 +1,34 @@
+--- a/bin/autoconf.in
++++ b/bin/autoconf.in
+@@ -29,7 +29,10 @@ use warnings FATAL => 'all';
+
+ BEGIN
+ {
+- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
++ my $pkgdatadir = $ENV{'autom4te_perllibdir'} ||
++ ($ENV{'STAGING_DIR_HOST'} ?
++ $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' :
++ '@pkgdatadir@');
+ unshift @INC, $pkgdatadir;
+
+ # Override SHELL. On DJGPP SHELL may not be set to a shell
+@@ -44,8 +47,14 @@ use Autom4te::Channels qw(msg);
+ use Autom4te::General;
+
+ # Lib files.
+-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
+-my $trailer_m4 = $ENV{'trailer_m4'} || '@pkgdatadir@/autoconf/trailer.m4';
++my $autom4te = $ENV{'AUTOM4TE'} ||
++ ($ENV{'STAGING_DIR_HOST'} ?
++ $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' :
++ '@bindir@/@autom4te-name@');
++my $trailer_m4 = $ENV{'trailer_m4'} ||
++ ($ENV{'STAGING_DIR_HOST'} ?
++ $ENV{'STAGING_DIR_HOST'} . '/share/autoconf/autoconf/trailer.m4' :
++ '@pkgdatadir@/autoconf/trailer.m4');
+
+ # $HELP
+ # -----
--- a/bin/autoheader.in
+++ b/bin/autoheader.in
@@ -30,9 +30,12 @@ use 5.006;
More information about the lede-commits
mailing list