Subject: and TOOLS_REPLACE logic
To: None <>
From: Klaus Heinz <>
List: tech-pkg
Date: 02/06/2005 00:40:44
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline


I am using pkgsrc on a fresh Solaris 10 system and again observed something
I asked some months ago (but forgot to followup):

Although PATCH is defined in mk/platform/ as /usr/bin/gpatch
and _TOOLS_REPLACE_OPSYS.patch includes SunOS-*-* (in mk/
pkgsrc still requires the package devel/patch.
The comments in tell me that systems listed in
_TOOLS_REPLACE_OPSYS.patch do _not_ need devel/patch but this does not
work for me on Solaris 10.

As I understand the logic in, for every tool in USE_GNU_TOOLS
which has _TOOLS_REPLACE.$tool=YES the variables _TOOLS_OVERRIDE.$tool and
_TOOLS_PROGNAME.$tool get set to some value but immediately after this,
_TOOLS_PROGNAME.$tool is set again to ${LOCALBASE}/bin/$tool and the
pkgsrc package for $tool is added to BUILD_DEPENDS.

Shouldn't _TOOLS_NEED_GNU.$tool be set to NO if _TOOLS_REPLACE.$tool is
YES? This is my understanding of "replacing a needed GNU tool with one
from the system that is similar to the GNU tool".

Using the attached patch let me build libtool-base without devel/patch.
If this is correct similar changes should be applied to the other tool


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

RCS file: /cvsroot/pkgsrc/mk/,v
retrieving revision 1.50
diff -u -r1.50
---	21 Jan 2005 02:23:34 -0000	1.50
+++	5 Feb 2005 23:37:48 -0000
@@ -304,6 +304,7 @@
 .if ${_TOOLS_REPLACE.patch} == "YES"
 .if (${_TOOLS_NEED_GNU.patch} == "YES") && empty(PKGPATH:Mdevel/patch)
 BUILD_DEPENDS+=		patch>=2.2:../../devel/patch