[openwrt/openwrt] automake: use STAGING_DIR_HOST in relocatable patch

LEDE Commits lede-commits at lists.infradead.org
Mon Jan 9 12:33:25 PST 2023


ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3606fcce0ba2ede47c3fe47b0b62033df2d231dd

commit 3606fcce0ba2ede47c3fe47b0b62033df2d231dd
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Thu Nov 10 17:44:13 2022 +0100

    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 <ansuelsmth at gmail.com>
---
 tools/automake/Makefile                      |  2 +-
 tools/automake/patches/000-relocatable.patch | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

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 at -@APIVERSION@';
-+our $libdir = $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE at -@APIVERSION@' : '@datadir@/@PACKAGE at -@APIVERSION@';
++our $libdir = $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE at -@APIVERSION@' : '@datadir@/@PACKAGE at -@APIVERSION@';
  
  our $perl_threads = 0;
  # We need at least this version for CLONE support.
@@ -30,7 +30,7 @@
  BEGIN
  {
 -  @Aclocal::perl_libdirs = ('@datadir@/@PACKAGE at -@APIVERSION@')
-+  @Aclocal::perl_libdirs = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE at -@APIVERSION@' : '@datadir@/@PACKAGE at -@APIVERSION@')
++  @Aclocal::perl_libdirs = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE at -@APIVERSION@' : '@datadir@/@PACKAGE at -@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 at -@APIVERSION@')
-+  @Automake::perl_libdirs = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE at -@APIVERSION@' : '@datadir@/@PACKAGE at -@APIVERSION@')
++  @Automake::perl_libdirs = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE at -@APIVERSION@' : '@datadir@/@PACKAGE at -@APIVERSION@')
      unless @Automake::perl_libdirs;
    unshift @INC, @Automake::perl_libdirs;
  




More information about the lede-commits mailing list