[113475] trunk/base/aclocal.m4

raimue at macports.org raimue at macports.org
Sun Nov 17 03:48:00 PST 2013


Revision: 113475
          https://trac.macports.org/changeset/113475
Author:   raimue at macports.org
Date:     2013-11-17 03:48:00 -0800 (Sun, 17 Nov 2013)
Log Message:
-----------
Strip all prefix paths from PATH

Not only $prefix/bin and $prefix/sbin could lead to linking base to the
existing MacPorts installation. Paths such as $prefix/libexec/gnubin also could
provide some of the tools we look for during building. Therefore, remove all
paths pointing to the prefix from PATH.

Modified Paths:
--------------
    trunk/base/aclocal.m4

Modified: trunk/base/aclocal.m4
===================================================================
--- trunk/base/aclocal.m4	2013-11-17 04:16:54 UTC (rev 113474)
+++ trunk/base/aclocal.m4	2013-11-17 11:48:00 UTC (rev 113475)
@@ -892,7 +892,7 @@
 	
 ])
 
-dnl This macro ensures MP installation prefix bin/sbin paths are NOT in PATH
+dnl This macro ensures MP installation prefix paths are NOT in PATH
 dnl for configure to prevent potential problems when base/ code is updated
 dnl and ports are installed that would match needed items.
 AC_DEFUN([MP_PATH_SCAN],[
@@ -906,14 +906,17 @@
 	for as_dir in $oldPATH
 	do
 		IFS=$as_save_IFS
-		if test "x$as_dir" != "x$prefix/bin" &&
-			test "x$as_dir" != "x$prefix/sbin"; then
-			if test -z "$newPATH"; then
-				newPATH=$as_dir
-			else
-				newPATH=$newPATH$PATH_SEPARATOR$as_dir
-			fi
-		fi
+		case "$as_dir" in
+			$prefix/*)
+				;;
+			*)
+				if test -z "$newPATH"; then
+					newPATH=$as_dir
+				else
+					newPATH=$newPATH$PATH_SEPARATOR$as_dir
+				fi
+				;;
+		esac
 	done
 	PATH=$newPATH; export PATH
 	AC_SUBST(PATH_CLEANED,$newPATH)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131117/8b42b1a8/attachment.html>


More information about the macports-changes mailing list