Subject: [patch] Fix for some packages, might break others
To: None <tech-pkg@netbsd.org>
From: Roland Illig <rillig@NetBSD.org>
List: tech-pkg
Date: 02/17/2006 18:51:54
This is a multi-part message in MIME format.
--------------090005000708010003040304
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I have tracked down a probable source of the various libtool errors on 
Solaris. On that system (any some others), EGREP is defined as follows 
in mk/tools/tools.SunOS.mk:

     TOOLS_PLATFORM.egrep?=          /usr/xpg4/bin/grep -E

Up to now, what ended up in the CONFIGURE_ARGS for GNU configure scripts 
was a plain EGREP=/usr/xpg4/bin/grep (without the -E).

I'd like to commit this patch, but before I'd like to know if any of you 
knows of packages that will break because of this change. A typical 
reason for breaking would be if a configure script uses the following 
code instead of AC_PATH_PROG or AC_CHECK_PROG.

     if [ -x "$EGREP" ]; then
         echo "yes";
     else
         echo "no";
     fi

(Or even worse, leaving out the "" around the $EGREP. :))

So if you know a package using autoconf and this idiom, please tell me.

Roland

--------------090005000708010003040304
Content-Type: text/plain;
 name="tools.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="tools.patch"

Index: replace.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/replace.mk,v
retrieving revision 1.157
diff -p -u -r1.157 replace.mk
--- replace.mk	11 Feb 2006 00:23:24 -0000	1.157
+++ replace.mk	17 Feb 2006 17:13:37 -0000
@@ -1085,13 +1085,13 @@ ${_TOOLS_VARNAME.${_t_}}=	${TOOLS_${_TOO
 # searched for in the PATH, which would find the ones in ${TOOLS_DIR}.
 #
 # The value passed via the shell environment is stored in
-# TOOLS_VALUE_GNU.<tool>, which defaults to just the path to the
-# tool.
+# TOOLS_VALUE_GNU.<tool>, which defaults to the full command line of
+# the tool.
 #
 .for _t_ in ${_USE_TOOLS}
 .  if defined(GNU_CONFIGURE)
 .    if defined(TOOLS_${_TOOLS_VARNAME.${_t_}})
-TOOLS_VALUE_GNU.${_t_}?=	${TOOLS_PATH.${_t_}}
+TOOLS_VALUE_GNU.${_t_}?=	${TOOLS_CMDLINE.${_t_}}
 .    endif
 .    if defined(TOOLS_VALUE_GNU.${_t_})
 .      for _v_ in ${_TOOLS_VARNAME_GNU.${_t_}}

--------------090005000708010003040304--