[125362] trunk/base

cal at macports.org cal at macports.org
Sun Sep 14 12:27:18 PDT 2014


Revision: 125362
          https://trac.macports.org/changeset/125362
Author:   cal at macports.org
Date:     2014-09-14 12:27:18 -0700 (Sun, 14 Sep 2014)
Log Message:
-----------
base: Avoid using $GZIP and $BZIP2, since those might be interpreted as flags and cause the build to fail, e.g. #43245

Modified Paths:
--------------
    trunk/base/Mk/macports.autoconf.mk.in
    trunk/base/aclocal.m4
    trunk/base/configure.ac
    trunk/base/src/macports1.0/macports_autoconf.tcl.in
    trunk/base/src/port1.0/port_autoconf.tcl.in
    trunk/base/src/registry2.0/registry_autoconf.tcl.in

Modified: trunk/base/Mk/macports.autoconf.mk.in
===================================================================
--- trunk/base/Mk/macports.autoconf.mk.in	2014-09-14 18:48:52 UTC (rev 125361)
+++ trunk/base/Mk/macports.autoconf.mk.in	2014-09-14 19:27:18 UTC (rev 125362)
@@ -44,7 +44,6 @@
 MTREE			= @MTREE@
 LN_S			= @LN_S@
 XCODEBUILD		= @XCODEBUILD@
-BZIP2			= @BZIP2@
 
 INTREE_TCLSH		= @INTREE_TCLSH@
 TCLSH			= @TCLSH@

Modified: trunk/base/aclocal.m4
===================================================================
--- trunk/base/aclocal.m4	2014-09-14 18:48:52 UTC (rev 125361)
+++ trunk/base/aclocal.m4	2014-09-14 19:27:18 UTC (rev 125362)
@@ -118,8 +118,10 @@
 dnl
 dnl MP_CONFIG_TARBALL([path-to-tarball], [dir-extracted-from-tarball-with-configure], [configure-parameters])
 AC_DEFUN([MP_CONFIG_TARBALL], [
-	AC_PATH_PROG(GZIP, [gzip], [])
-	AC_PATH_PROG(BZIP2, [bzip2], [])
+	dnl Warning: Don't use $GZIP and $BZIP2 here, both tools interpret these
+	dnl env variables as additional parameters.
+	AC_PATH_PROG(GZIP_BIN, [gzip], [])
+	AC_PATH_PROG(BZIP2_BIN, [bzip2], [])
 
 	mp_tarball="$1"
 	ac_dir=$2
@@ -132,16 +134,16 @@
 		mp_tarball_extract_cmd=
 		case "$mp_tarball" in
 			*.tar.gz | *.tgz)
-				if test "x$GZIP" = "x"; then
+				if test "x$GZIP_BIN" = "x"; then
 					AC_MSG_ERROR([gzip not found])
 				fi
-				mp_tarball_extract_cmd="$GZIP"
+				mp_tarball_extract_cmd="$GZIP_BIN"
 				;;
 			*.tar.bz2 | *.tbz2)
-				if test "x$BZIP2" = "x"; then
+				if test "x$BZIP2_BIN" = "x"; then
 					AC_MSG_ERROR([bzip2 not found])
 				fi
-				mp_tarball_extract_cmd="$BZIP2"
+				mp_tarball_extract_cmd="$BZIP2_BIN"
 				;;
 			*)
 				AC_MSG_ERROR([Don't know how to extract tarball $mp_tarball])

Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac	2014-09-14 18:48:52 UTC (rev 125361)
+++ trunk/base/configure.ac	2014-09-14 19:27:18 UTC (rev 125362)
@@ -102,8 +102,14 @@
 AC_PROG_OBJC([clang cc gcc])
 
 # Check for user-supplied paths before searching
+
+dnl Beware of conflicts between the variables you set and any tools executed in
+dnl the configure context. Some tools interpret an environment variable with
+dnl their own name as default flags and will fail if it is set to a path. For
+dnl example, these include BZIP2 and GZIP, which is the reason why they are
+dnl named with a _BIN suffix here.
 MP_TOOL_PATH(BSDMAKE, [bsdmake/pmake])
-MP_TOOL_PATH(BZIP2, [bzip2])
+MP_TOOL_PATH(BZIP2_BIN, [bzip2])
 MP_TOOL_PATH(CVS, [cvs])
 MP_TOOL_PATH(GNUMAKE, [gnumake])
 MP_TOOL_PATH(GNUTAR, [gnutar])
@@ -122,7 +128,7 @@
 
 # Search for tool paths. Any set above (via --with-pkg=PATH) will be retained
 AC_PATH_PROGS(BSDMAKE, [bsdmake pmake], [])
-AC_PATH_PROG(BZIP2, [bzip2], [])
+AC_PATH_PROG(BZIP2_BIN, [bzip2], [])
 AC_PATH_PROG(BZR, [bzr], [])
 AC_PATH_PROG(CHOWN, [chown], [], [$PATH:/usr/sbin])
 AC_PATH_PROG(CP, [cp], [])
@@ -137,7 +143,7 @@
 AC_PATH_PROGS(GNUMAKE, [gnumake gmake], [])
 AC_PATH_PROGS(GNUPATCH, [gnupatch gpatch], [])
 AC_PATH_PROGS(GNUTAR, [gnutar gtar], [])
-AC_PATH_PROG(GZIP, [gzip], [])
+AC_PATH_PROG(GZIP_BIN, [gzip], [])
 AC_PATH_PROG(HDIUTIL, [hdiutil], [])
 AC_PATH_PROG(HG, [hg], [])
 AC_PATH_PROG(LAUNCHCTL, [launchctl], [])

Modified: trunk/base/src/macports1.0/macports_autoconf.tcl.in
===================================================================
--- trunk/base/src/macports1.0/macports_autoconf.tcl.in	2014-09-14 18:48:52 UTC (rev 125361)
+++ trunk/base/src/macports1.0/macports_autoconf.tcl.in	2014-09-14 19:27:18 UTC (rev 125362)
@@ -33,9 +33,9 @@
 package provide macports 1.0
 
 namespace eval macports::autoconf {
-    variable bzip2_path "@BZIP2@"
+    variable bzip2_path "@BZIP2_BIN@"
     variable chown_path "@CHOWN@"
-    variable gzip_path "@GZIP@"
+    variable gzip_path "@GZIP_BIN@"
     variable macports_conf_path "@MPCONFIGDIR_EXPANDED@"
     variable macports_version "@MACPORTS_VERSION@"
     variable macports_user_dir "~/.macports"

Modified: trunk/base/src/port1.0/port_autoconf.tcl.in
===================================================================
--- trunk/base/src/port1.0/port_autoconf.tcl.in	2014-09-14 18:48:52 UTC (rev 125361)
+++ trunk/base/src/port1.0/port_autoconf.tcl.in	2014-09-14 19:27:18 UTC (rev 125362)
@@ -32,7 +32,7 @@
 package provide port 1.0
 
 namespace eval portutil::autoconf {
-	variable bzip2_path "@BZIP2@"
+	variable bzip2_path "@BZIP2_BIN@"
 	variable lzma_path "@LZMA@"
 	variable xz_path "@XZ@"
 	variable cp_path "@CP@"
@@ -46,7 +46,7 @@
 	variable svn_path "@SVN@"
 	variable git_path "@GIT@"
 	variable hg_path "@HG@"
-	variable gzip_path "@GZIP@"
+	variable gzip_path "@GZIP_BIN@"
 	variable lipo_path "@LIPO@"
 	variable openssl_path "@OPENSSL@"
 	variable patch_path "@PATCH@"

Modified: trunk/base/src/registry2.0/registry_autoconf.tcl.in
===================================================================
--- trunk/base/src/registry2.0/registry_autoconf.tcl.in	2014-09-14 18:48:52 UTC (rev 125361)
+++ trunk/base/src/registry2.0/registry_autoconf.tcl.in	2014-09-14 19:27:18 UTC (rev 125362)
@@ -31,5 +31,5 @@
 package provide registry 1.0
 
 namespace eval registry::autoconf {
-    variable bzip2_path "@BZIP2@"
+    variable bzip2_path "@BZIP2_BIN@"
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140914/374af8ec/attachment.html>


More information about the macports-changes mailing list