From: Christian Marangi Date: Thu, 10 Nov 2022 16:44:13 +0000 (+0100) Subject: automake: use STAGING_DIR_HOST in relocatable patch X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3606fcce0ba2ede47c3fe47b0b62033df2d231dd;p=openwrt%2Fstaging%2Fmans0n.git automake: use STAGING_DIR_HOST in relocatable patch Instead of using STAGING_DIR and then go up one dir with '../' use directly STAGING_DIR_HOST env variable. This should produce cleaner symbolic links. Signed-off-by: Christian Marangi --- diff --git a/tools/automake/Makefile b/tools/automake/Makefile index a1121f1378..85ccc0ded4 100644 --- a/tools/automake/Makefile +++ b/tools/automake/Makefile @@ -25,7 +25,7 @@ HOST_CONFIGURE_VARS += \ am_cv_prog_PERL_ithreads=no define Host/Configure - (cd $(HOST_BUILD_DIR); $(AM_TOOL_PATHS) STAGING_DIR="" ./bootstrap) + (cd $(HOST_BUILD_DIR); $(AM_TOOL_PATHS) STAGING_DIR_HOST="" ./bootstrap) $(call Host/Configure/Default) endef diff --git a/tools/automake/patches/000-relocatable.patch b/tools/automake/patches/000-relocatable.patch index d05b25e61c..02382ba8c8 100644 --- a/tools/automake/patches/000-relocatable.patch +++ b/tools/automake/patches/000-relocatable.patch @@ -5,7 +5,7 @@ our $VERSION = '@VERSION@'; our $RELEASE_YEAR = '@RELEASE_YEAR@'; -our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@'; -+our $libdir = $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@'; ++our $libdir = $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@'; our $perl_threads = 0; # We need at least this version for CLONE support. @@ -30,7 +30,7 @@ BEGIN { - @Aclocal::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@') -+ @Aclocal::perl_libdirs = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@') ++ @Aclocal::perl_libdirs = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@') unless @Aclocal::perl_libdirs; unshift @INC, @Aclocal::perl_libdirs; } @@ -40,8 +40,8 @@ my @user_includes = (); -my @automake_includes = ("@datadir@/aclocal-$APIVERSION"); -my @system_includes = ('@datadir@/aclocal'); -+my @automake_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . "/../host/share/aclocal-$APIVERSION" : "@datadir@/aclocal-$APIVERSION"); -+my @system_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/aclocal' : '@datadir@/aclocal'); ++my @automake_includes = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . "/share/aclocal-$APIVERSION" : "@datadir@/aclocal-$APIVERSION"); ++my @system_includes = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/aclocal' : '@datadir@/aclocal'); # Whether we should copy M4 file in $user_includes[0]. my $install = 0; @@ -66,7 +66,7 @@ BEGIN { - @Automake::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@') -+ @Automake::perl_libdirs = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@') ++ @Automake::perl_libdirs = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@') unless @Automake::perl_libdirs; unshift @INC, @Automake::perl_libdirs;