automake: update to 1.11.6
[openwrt/openwrt.git] / tools / automake / patches / 000-relocatable.patch
1 --- a/aclocal.in
2 +++ b/aclocal.in
3 @@ -27,7 +27,8 @@
4
5 BEGIN
6 {
7 - my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
8 + my $perllibdir = $ENV{'perllibdir'} ||
9 + ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@');
10 unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
11 }
12
13 @@ -58,8 +59,8 @@
14 # ACLOCAL_PATH environment variable, and reset with the `--system-acdir'
15 # option.
16 my @user_includes = ();
17 -my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
18 -my @system_includes = ('@datadir@/aclocal');
19 +my @automake_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . "/../host/share/aclocal-$APIVERSION" : "@datadir@/aclocal-$APIVERSION");
20 +my @system_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/aclocal' : '@datadir@/aclocal');
21
22 # Whether we should copy M4 file in $user_includes[0].
23 my $install = 0;
24 --- a/automake.in
25 +++ b/automake.in
26 @@ -31,7 +31,8 @@
27
28 BEGIN
29 {
30 - my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
31 + my $perllibdir = $ENV{'perllibdir'} ||
32 + ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@');
33 unshift @INC, (split '@PATH_SEPARATOR@', $perllibdir);
34
35 # Override SHELL. This is required on DJGPP so that system() uses
36 --- a/lib/Automake/Config.in
37 +++ b/lib/Automake/Config.in
38 @@ -31,7 +31,7 @@
39 our $PACKAGE = '@PACKAGE@';
40 our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@';
41 our $VERSION = '@VERSION@';
42 -our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
43 +our $libdir = $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@';
44 our $perl_threads = @PERL_THREADS@;
45
46 1;