Subject: USE_GNU_TOOLS broken for GNU tools
To: None <>
From: Jonathan Perkin <>
List: tech-pkg
Date: 12/01/2003 11:11:02
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

I ran into this when rebuilding my box @ work with fresh pkgsrc.


	USE_GMAKE=              # defined

but currently disables USE_GNU_TOOLS for all GNU tools
supported by it, losing the gawk build (probably not noticed before
because people are likely to have gmake already installed).

	+ cd /tmp/pkgsrc/lang/gawk/work.desk06/gawk-3.1.3
	+ ... /home/jonp/pkg/bin/gmake -f Makefile all
	/usr/bin/env: No such file or directory
	*** Error code 127

	/home/jonp/pkg/bin/gmake: No such file or directory

The attached patch fixes the problem, but I'd like some comments
in case I missed something obvious.


Jonathan Perkin                         <>
BBC Internet Services

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=""

RCS file: /cvsroot/pkgsrc/mk/,v
retrieving revision 1.15
diff -u -r1.15
---	2003/09/21 17:40:40	1.15
+++	2003/12/01 10:58:22
@@ -115,10 +115,13 @@
 _TOOLS=		awk grep m4 make sed
-.if defined(_IGNORE_USE_GNU_TOOLS)
-USE_GNU_TOOLS:=		# empty
-USE_GNU_TOOLS?=		# empty
+.if defined(_IGNORE_GNU_TOOL) && defined(USE_GNU_TOOLS)
+.  for _tool_ in ${USE_GNU_TOOLS}
+.    if empty(_IGNORE_GNU_TOOL:M${_tool_})
+_tools+=	${_tool_}
+.    endif
+.  endfor
+USE_GNU_TOOLS=	${_tools}
 # These platforms already have GNU versions of the tools in the base
@@ -204,7 +207,7 @@
 .if !empty(PKGPATH:Mlang/gawk)
 .if ${_TOOLS_REPLACE.grep} == "YES"
@@ -221,7 +224,7 @@
 .if !empty(PKGPATH:Mtextproc/grep)
 .if ${_TOOLS_REPLACE.m4} == "YES"
@@ -238,7 +241,7 @@
 .if !empty(PKGPATH:Mdevel/m4)
 .if ${_TOOLS_REPLACE.make} == "YES"
@@ -255,7 +258,7 @@
 .if !empty(PKGPATH:Mdevel/gmake)
 .if ${_TOOLS_REPLACE.sed} == "YES"
@@ -272,7 +275,7 @@
 .if !empty(PKGPATH:Mtextproc/gsed)
 # If _TOOLS_OVERRIDE.<tool> is actually set to "YES", then we override