Skip to content

Commit e03676a

Browse files
hnymanrobimarko
authored andcommitted
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: e0f5ce9 ("tools/autoconf: bump to 2.72") Signed-off-by: Hannu Nyman <[email protected]> Link: openwrt/openwrt#18073 Signed-off-by: Robert Marko <[email protected]>
1 parent 15c27ce commit e03676a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tools/autoconf/patches/000-relocatable.patch

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
--- a/bin/autoconf.in
2+
+++ b/bin/autoconf.in
3+
@@ -29,7 +29,10 @@ use warnings FATAL => 'all';
4+
5+
BEGIN
6+
{
7+
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
8+
+ my $pkgdatadir = $ENV{'autom4te_perllibdir'} ||
9+
+ ($ENV{'STAGING_DIR_HOST'} ?
10+
+ $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' :
11+
+ '@pkgdatadir@');
12+
unshift @INC, $pkgdatadir;
13+
14+
# Override SHELL. On DJGPP SHELL may not be set to a shell
15+
@@ -44,8 +47,14 @@ use Autom4te::Channels qw(msg);
16+
use Autom4te::General;
17+
18+
# Lib files.
19+
-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
20+
-my $trailer_m4 = $ENV{'trailer_m4'} || '@pkgdatadir@/autoconf/trailer.m4';
21+
+my $autom4te = $ENV{'AUTOM4TE'} ||
22+
+ ($ENV{'STAGING_DIR_HOST'} ?
23+
+ $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' :
24+
+ '@bindir@/@autom4te-name@');
25+
+my $trailer_m4 = $ENV{'trailer_m4'} ||
26+
+ ($ENV{'STAGING_DIR_HOST'} ?
27+
+ $ENV{'STAGING_DIR_HOST'} . '/share/autoconf/autoconf/trailer.m4' :
28+
+ '@pkgdatadir@/autoconf/trailer.m4');
29+
30+
# $HELP
31+
# -----
132
--- a/bin/autoheader.in
233
+++ b/bin/autoheader.in
334
@@ -30,9 +30,12 @@ use 5.006;

0 commit comments

Comments
 (0)