pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/tools For packages that use GNU configure scripts, ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5cdd83f64aed
branches:  trunk
changeset: 494249:5cdd83f64aed
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat May 21 23:09:36 2005 +0000

description:
For packages that use GNU configure scripts, pass the real command
paths for the tools that the package uses through the shell environment.
We do this since these paths may be hardcoded into package scripts,
and if they're not pre-specified, then they'll be searched for in the
PATH, which would find the ones in ${TOOLS_DIR}.

The variable names that GNU configure scripts expect are named in
_TOOLS_VARNAME_GNU.* for the various tools.

diffstat:

 mk/tools/defaults.mk |  33 ++++++++++++++++++++++++++++++++-
 mk/tools/replace.mk  |  20 +++++++++++++++++++-
 2 files changed, 51 insertions(+), 2 deletions(-)

diffs (86 lines):

diff -r c0d4b4a9c650 -r 5cdd83f64aed mk/tools/defaults.mk
--- a/mk/tools/defaults.mk      Sat May 21 22:35:46 2005 +0000
+++ b/mk/tools/defaults.mk      Sat May 21 23:09:36 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defaults.mk,v 1.18 2005/05/21 04:53:17 jlam Exp $
+# $NetBSD: defaults.mk,v 1.19 2005/05/21 23:09:36 jlam Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -48,7 +48,10 @@
 .  include "${_PKGSRC_TOPDIR}/mk/tools/tools.${OPSYS}.mk"
 .endif
 
+######################################################################
+
 # "TOOL" variable names associated with each of the tools
+
 _TOOLS_VARNAME.awk=            AWK
 _TOOLS_VARNAME.basename=       BASENAME
 _TOOLS_VARNAME.bison-yacc=     YACC
@@ -124,6 +127,34 @@
 
 ######################################################################
 
+# "TOOL" variable names associated with each of the tools that are
+# expected by GNU configure script.
+
+_TOOLS_VARNAME_GNU.awk=                AWK
+_TOOLS_VARNAME_GNU.bison-yacc= YACC
+_TOOLS_VARNAME_GNU.chmod=      CHMOD
+_TOOLS_VARNAME_GNU.cmp=                CMP
+_TOOLS_VARNAME_GNU.cp=         CP
+_TOOLS_VARNAME_GNU.echo=       ECHO
+_TOOLS_VARNAME_GNU.egrep=      EGREP
+_TOOLS_VARNAME_GNU.gawk=       AWK
+_TOOLS_VARNAME_GNU.gm4=                M4
+_TOOLS_VARNAME_GNU.gsed=       SED
+_TOOLS_VARNAME_GNU.gtar=       TAR
+_TOOLS_VARNAME_GNU.hostname=   HOSTNAME
+_TOOLS_VARNAME_GNU.install=    INSTALL
+_TOOLS_VARNAME_GNU.lex=                LEX
+_TOOLS_VARNAME_GNU.ln=         LN
+_TOOLS_VARNAME_GNU.m4=         M4
+_TOOLS_VARNAME_GNU.mv=         MV
+_TOOLS_VARNAME_GNU.perl=       PERL
+_TOOLS_VARNAME_GNU.rm=         RM
+_TOOLS_VARNAME_GNU.sed=                SED
+_TOOLS_VARNAME_GNU.tar=                TAR
+_TOOLS_VARNAME_GNU.yacc=       YACC
+
+######################################################################
+
 # Set a default value for the TOOL names for each of the tools we claim
 # we'll use in PKGSRC_USE_TOOLS to point to the platform command, e.g.,
 # TBL, YACC, etc.  These tools are used in the top-level make(1), not
diff -r c0d4b4a9c650 -r 5cdd83f64aed mk/tools/replace.mk
--- a/mk/tools/replace.mk       Sat May 21 22:35:46 2005 +0000
+++ b/mk/tools/replace.mk       Sat May 21 23:09:36 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.89 2005/05/21 04:53:17 jlam Exp $
+# $NetBSD: replace.mk,v 1.90 2005/05/21 23:09:36 jlam Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1180,3 +1180,21 @@
 .  endif
 .endfor
 .undef _t_
+
+######################################################################
+
+# For packages that use GNU configure scripts, pass the real command
+# paths for the tools that the package uses through the shell environment.
+# We do this since these paths may be hardcoded into package scripts,
+# and if they're not pre-specified, then they'll be searched for in the
+# PATH, which would find the ones in ${TOOLS_DIR}.
+#
+.if defined(GNU_CONFIGURE)
+.  for _t_ in ${_USE_TOOLS}
+.    if defined(_TOOLS_VARNAME_GNU.${_t_}) && \
+        defined(TOOLS_${_TOOLS_VARNAME.${_t_}})
+CONFIGURE_ENV+=        \
+       ${_TOOLS_VARNAME_GNU.${_t_}}=${TOOLS_${_TOOLS_VARNAME.${_t_}}:Q}
+.    endif
+.  endfor
+.endif



Home | Main Index | Thread Index | Old Index