aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2007-01-08 08:00:33 +0800
committerpav <pav@FreeBSD.org>2007-01-08 08:00:33 +0800
commit0fd8de27d0ccf12f5fbb0467f91a4032234e0ffb (patch)
tree0c724bb66a1c03a2145adfe4b48c6d74092881ae
parentfed1aa23fb8296d6e367a9376f680693ba90bd55 (diff)
downloadfreebsd-ports-gnome-0fd8de27d0ccf12f5fbb0467f91a4032234e0ffb.tar.gz
freebsd-ports-gnome-0fd8de27d0ccf12f5fbb0467f91a4032234e0ffb.tar.zst
freebsd-ports-gnome-0fd8de27d0ccf12f5fbb0467f91a4032234e0ffb.zip
- Fix USE_TCL_BUILD to not disable runtime dependency on tcl from USE_TCL
- Add a new knob: USE_TK_BUILD - Support a new tcl version: 84-thread PR: ports/103897, ports/107372 (based on)
-rw-r--r--Mk/bsd.port.mk4
-rw-r--r--Mk/bsd.tcl.mk37
2 files changed, 31 insertions, 10 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index e2c18c77cf23..35051165c86b 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1497,7 +1497,7 @@ PERL= ${LOCALBASE}/bin/perl
.include "${PORTSDIR}/Mk/bsd.ruby.mk"
.endif
-.if defined(USE_TCL) || defined(USE_TCL_BUILD) || defined(USE_TK)
+.if defined(USE_TCL) || defined(USE_TCL_BUILD) || defined(USE_TK) || defined(USE_TK_BUILD)
.include "${PORTSDIR}/Mk/bsd.tcl.mk"
.endif
@@ -2011,7 +2011,7 @@ RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.include "${PORTSDIR}/Mk/bsd.python.mk"
.endif
-.if defined(USE_TCL) || defined(USE_TCL_BUILD) || defined(USE_TK)
+.if defined(USE_TCL) || defined(USE_TCL_BUILD) || defined(USE_TK) || defined(USE_TK_BUILD)
.include "${PORTSDIR}/Mk/bsd.tcl.mk"
.endif
diff --git a/Mk/bsd.tcl.mk b/Mk/bsd.tcl.mk
index bbb498ee731e..c3ff5376f035 100644
--- a/Mk/bsd.tcl.mk
+++ b/Mk/bsd.tcl.mk
@@ -13,13 +13,15 @@ Tcl_Include_MAINTAINER= ports@FreeBSD.org
# different TCL versions the version can be specified directly.
# If version is not specified (USE_TCL=yes) then the latest
# version is used (8.4 currently).
-# Available values are: 84, 83, 82, 81 and 80.
+# Available values are: 84, 84-thread, 83, 82, 81 and 80.
+# USE_TCL_BUILD - Build time dependency on tcl. Same semantics as USE_TCL.
#
# USE_TK - Depend on tk to run. In case of incompatible APIs of different
# TK versions the version can be specified directly. If version
# is not specified (USE_TK=yes) then the latest version is
# used (8.4 currently).
# Available values are: 84, 83, 82, 81 and 80.
+# USE_TK_BUILD - Build time dependency on tk. Same semantics as USE_TK.
##
# TCL_LIBDIR - Path where tcl libraries can be found
#
@@ -46,7 +48,11 @@ Tcl_Include_MAINTAINER= ports@FreeBSD.org
.if defined(USE_TCL) || defined(USE_TCL_BUILD)
-_TCL_VERSIONS= 84 83 82 81 80
+_TCL_VERSIONS= 84 84-thread 83 82 81 80
+
+.if defined(USE_TCL)
+_RUN= yes
+.endif
.if defined(USE_TCL_BUILD)
USE_TCL= ${USE_TCL_BUILD}
@@ -57,7 +63,7 @@ _BUILD= yes
USE_TCL= 84
.endif
-TCL_VER:= ${USE_TCL:S/8/8./}
+TCL_VER:= ${USE_TCL:S/8/8./:S/-thread//}
# Special case
.if ${USE_TCL} == "81"
@@ -66,11 +72,12 @@ USE_TCL= tcl81-thread
_FOUND= no
.for ver in ${_TCL_VERSIONS}
-. if ${USE_TCL} == ${ver}
+. if ${USE_TCL} == "${ver}"
_FOUND= yes
. if defined(_BUILD)
BUILD_DEPENDS+= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${USE_TCL}
-. else
+. endif
+. if defined(_RUN)
RUN_DEPENDS+= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${USE_TCL}
. endif
TCL_INCLUDEDIR= ${LOCALBASE}/include/tcl${TCL_VER}
@@ -82,12 +89,21 @@ TCLSH= ${LOCALBASE}/bin/tclsh${TCL_VER}
.if ${_FOUND} == "no"
IGNORE= Unknown TCL version specified: ${USE_TCL}
.endif
-.endif # defined(USE_TCL)
+.endif # defined(USE_TCL) || defined(USE_TCL_BUILD)
-.if defined(USE_TK)
+.if defined(USE_TK) || defined(USE_TK_BUILD)
_TK_VERSIONS= 84 83 82 81 80
+.if defined(USE_TK)
+_TK_RUN= yes
+.endif
+
+.if defined(USE_TK_BUILD)
+USE_TK= ${USE_TK_BUILD}
+_TK_BUILD= yes
+.endif
+
.if ${USE_TK} == "yes"
USE_TK= 84
.endif
@@ -102,7 +118,12 @@ _FOUND= no
.for ver in ${_TK_VERSIONS}
. if ${USE_TK} == ${ver}
_FOUND= yes
+. if defined(_TK_BUILD)
+BUILD_DEPENDS+= wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${USE_TK}
+.endif
+. if defined(_TK_RUN)
RUN_DEPENDS+= wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${USE_TK}
+.endif
TCL_INCLUDEDIR= ${LOCALBASE}/include/tcl${TK_VER}
TCL_LIBDIR= ${LOCALBASE}/lib/tcl${TK_VER}
TK_INCLUDEDIR= ${LOCALBASE}/include/tk${TK_VER}
@@ -115,7 +136,7 @@ WISH= ${LOCALBASE}/bin/wish${TK_VER}
.if ${_FOUND} == "no"
IGNORE= Unknown TK version specified: ${USE_TK}
.endif
-.endif # defined(USE_TK)
+.endif # defined(USE_TK) || defined(USE_TK_BUILD)
.endif # !defined(_POSTMKINCLUDED) && !defined(Tcl_Pre_Include)