summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-11-08 23:06:38 +0000
committerjlam <jlam@pkgsrc.org>2005-11-08 23:06:38 +0000
commitb49397bb19031b5c58c8e4ab41f996005948adea (patch)
tree87f0f9acd047e9bd5f0918429ff1da2779a811b7
parent20e8563c6a0f5299948132c01b1a2a0b343cc52c (diff)
downloadpkgsrc-b49397bb19031b5c58c8e4ab41f996005948adea.tar.gz
Teach the tools framework about wish and tclsh, and set WISH and TCLSH
accordingly for packages that need it.
-rw-r--r--mk/tools/defaults.mk6
-rw-r--r--mk/tools/replace.mk24
2 files changed, 28 insertions, 2 deletions
diff --git a/mk/tools/defaults.mk b/mk/tools/defaults.mk
index 1feea9b5b94..f65d17f2276 100644
--- a/mk/tools/defaults.mk
+++ b/mk/tools/defaults.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defaults.mk,v 1.41 2005/11/08 03:36:13 tv Exp $
+# $NetBSD: defaults.mk,v 1.42 2005/11/08 23:06:38 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -120,6 +120,7 @@ _TOOLS_VARNAME.sort= SORT
_TOOLS_VARNAME.tail= TAIL
_TOOLS_VARNAME.tar= TAR
_TOOLS_VARNAME.tbl= TBL
+_TOOLS_VARNAME.tclsh= TCLSH
_TOOLS_VARNAME.tee= TEE
_TOOLS_VARNAME.test= TEST
_TOOLS_VARNAME.touch= TOUCH
@@ -130,6 +131,7 @@ _TOOLS_VARNAME.unrar= UNRAR
_TOOLS_VARNAME.unzip= UNZIP
_TOOLS_VARNAME.unzoo= UNZOO
_TOOLS_VARNAME.wc= WC
+_TOOLS_VARNAME.wish= WISH
_TOOLS_VARNAME.xargs= XARGS
_TOOLS_VARNAME.xmkmf= XMKMF_CMD
_TOOLS_VARNAME.yacc= YACC
@@ -169,10 +171,12 @@ _TOOLS_VARNAME_GNU.rmdir= RMDIR
_TOOLS_VARNAME_GNU.sed= SED
_TOOLS_VARNAME_GNU.sort= SORT
_TOOLS_VARNAME_GNU.tar= TAR
+_TOOLS_VARNAME_GNU.tclsh= TCLSH
_TOOLS_VARNAME_GNU.test= TEST ac_cv_path_TEST
_TOOLS_VARNAME_GNU.touch= TOUCH
_TOOLS_VARNAME_GNU.tr= TR
_TOOLS_VARNAME_GNU.true= TRUE ac_cv_path_TRUE
+_TOOLS_VARNAME_GNU.wish= WISH
_TOOLS_VARNAME_GNU.xmkmf= XMKMF
_TOOLS_VARNAME_GNU.yacc= YACC
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk
index b7d5910b14a..55633670820 100644
--- a/mk/tools/replace.mk
+++ b/mk/tools/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.134 2005/11/08 17:41:26 jlam Exp $
+# $NetBSD: replace.mk,v 1.135 2005/11/08 23:06:38 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -659,6 +659,17 @@ TOOLS_PATH.tbl= ${TOOLS_PREFIX.tbl}/bin/tbl
. endif
.endif
+.if !defined(TOOLS_IGNORE.tclsh) && !empty(_USE_TOOLS:Mtclsh)
+. if !empty(PKGPATH:Mlang/tcl)
+MAKEFLAGS+= TOOLS_IGNORE.tclsh=
+. elif !empty(_TOOLS_USE_PKGSRC.tclsh:M[yY][eE][sS])
+TOOLS_DEPENDS.tclsh?= tcl>=8.4:../../lang/tcl
+TOOLS_CREATE+= tclsh
+TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tclsh=tcl
+TOOLS_PATH.tclsh= ${TOOLS_PREFIX.tclsh}/bin/tclsh
+. endif
+.endif
+
.if !defined(TOOLS_IGNORE.unrar) && !empty(_USE_TOOLS:Munrar)
. if !empty(PKGPATH:Marchivers/unrar)
MAKEFLAGS+= TOOLS_IGNORE.unrar=
@@ -692,6 +703,17 @@ TOOLS_PATH.unzoo= ${TOOLS_PREFIX.unzoo}/bin/unzoo
. endif
.endif
+.if !defined(TOOLS_IGNORE.wish) && !empty(_USE_TOOLS:Mwish)
+. if !empty(PKGPATH:Mx11/tk)
+MAKEFLAGS+= TOOLS_IGNORE.wish=
+. elif !empty(_TOOLS_USE_PKGSRC.wish:M[yY][eE][sS])
+TOOLS_DEPENDS.wish?= tk>=8.4:../../x11/tk
+TOOLS_CREATE+= wish
+TOOLS_FIND_PREFIX+= TOOLS_PREFIX.wish=tk
+TOOLS_PATH.wish= ${TOOLS_PREFIX.wish}/bin/wish
+. endif
+.endif
+
.if !defined(TOOLS_IGNORE.xargs) && !empty(_USE_TOOLS:Mxargs)
. if !empty(PKGPATH:Msysutils/findutils)
MAKEFLAGS+= TOOLS_IGNORE.xargs=