summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2016-04-19 14:20:01 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2016-04-19 14:20:01 +0000
commit4e23c21fc178f53926a6fdce031c92cf22ece907 (patch)
tree14fe99943d56267ca815906c549d8a671245db05 /Mk
parentFix the handling of type-apple.xml under @sample. PORTREVISION (diff)
Add "tea" argument to USES=tcl to facilitate porting of TEA-based extensions.
Quoting https://tcl.tk/doc/tea: "The Tcl Extension Architecture, or TEA, by John Ousterhout and others, is a set of guidelines and techniques for the distribution, configuration, compilation, and installation of Tcl extensions. TEA also provides a set of utilities that operate accordingly. Many Tcl extensions leverage the TEA utilities, which are designed to be easily customizable." To facilitate the porting of TEA-based extensions, I have added the new "tea" argument to USES=tcl. This argument prepares the autoconf environment by setting GNU_CONFIGURE and sets some commonly used CONFIGURE_ARGS. Also, it tries to figure out the correct extension name, sets TCL_PKG accordingly, and adds it to PLIST_SUB. I have modified a few ports to take advantage of this. More will come.
Notes
Notes: svn path=/head/; revision=413646
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/tcl.mk18
1 files changed, 17 insertions, 1 deletions
diff --git a/Mk/Uses/tcl.mk b/Mk/Uses/tcl.mk
index 27e14e9d48fd..d279b4715618 100644
--- a/Mk/Uses/tcl.mk
+++ b/Mk/Uses/tcl.mk
@@ -27,7 +27,7 @@
#
# Usage:
#
-# USES+= PORT[:(VERSION|wrapper),build,run]
+# USES+= PORT[:(VERSION|wrapper),build,run,tea]
#
# where PORT is one of:
#
@@ -53,6 +53,9 @@
#
# Build-time / Run-time only dependencies can be specified with build or run.
#
+# Tea can be used for Tcl/Tk extensions that use the Tcl Extension Architecture
+# [http://www.tcl.tk/doc/tea] and allows to set common autoconf parameters.
+#
# MAINTAINER: tcltk@FreeBSD.org
.if ${USES:Mtk} || ${USES:Mtk\:*}
@@ -200,6 +203,19 @@ RUN_DEPENDS+= ${_TCLTK_WRAPPER_PORT}
LIB_DEPENDS+= ${_TCLTK_LIB_LINE}
.endif
+# Setup TEA stuff
+.if ${tcl_ARGS:Mtea}
+GNU_CONFIGURE= yes
+TCL_PKG?= ${PORTNAME:C/^tcl(-?)//:C/(-?)tcl\$//}${PORTVERSION}
+PLIST_SUB+= TCL_PKG=${TCL_PKG}
+CONFIGURE_ARGS+=--exec-prefix=${PREFIX} \
+ --with-tcl=${TCL_LIBDIR} \
+ --with-tcl-includes=${TCL_INCLUDEDIR}
+. if ${_TCLTK_PORT} == "tk"
+CONFIGURE_ARGS+=--with-tk=${TK_LIBDIR}
+. endif
+.endif
+
.endif # defined(_INCLUDE_USES_TCL_MK)
.undef _TCLTK_IGNORE