summaryrefslogtreecommitdiff
path: root/Mk/bsd.tcl.mk
diff options
context:
space:
mode:
authorClement Laforet <clement@FreeBSD.org>2005-11-08 09:02:51 +0000
committerClement Laforet <clement@FreeBSD.org>2005-11-08 09:02:51 +0000
commita4b366df6a9c6adc61947efdc82cdef5bd17e5ae (patch)
tree64e924e8edbb3574c980bea76ec32b8928c68027 /Mk/bsd.tcl.mk
parent* update to version 0.9 (diff)
* Add bsd.database.mk [1]
- move out from bsd.port.mk USE_MYSQL and USE_PGSQL. - add support for Berkley DB and SQLite (via USE_BDB and USE_SQLITE knobs). * Espace '+' in make search [2] * Add "makepatch" target to simplify creation of patches during porting [3] * Replace deprecated MACHINE_ARCH with ARCH [4] * Remove support of OpenLDAP 2.1 [5] * Add bsd.tcl.mk [6] It introduces USE_TCL/USE_TCL_BUILD knobs to support various version of tcl (8.0 -> 8.4) * Fix cosmetic bugs in security-check target [7] * Add support for INDEX-7 and above (up to INDEX-9 actually) [8] * Add "package-recursive" to bsd.port.subdir.mk [9] * Remove check for FreeBSD version < 460101 [10] * New category: net-im [11] * Add .desktop file facilities It introduces DESKTOPDIR and DESKTOP_ENTRIES knobs [12] * Add SHA256 support to "*checksum" targets [13] * Fix USE_PYTHON with OPTIONS [14] * Force NO_LINT to MAKE_ENV to avoid library breaks [15] * Fix typo: s/RC_ORDER/USE_RCORDER/g [16] * Add support for PostgreSQL 8.1 [17] * Add bsd.apache.mk USE_APACHE knob enhancements [18] PR: ports/85695 [1], ports/85669 [2], ports/85488 [3], ports/84489 [4], ports/83835 [5], ports/83718 [6], ports/83716 [7], ports/83710 [8], ports/82753 [9], ports/82138 [10], ports/81206 [11], ports/79509 [12], ports/79123 [13], ports/74866 [14], ports/85490 [15], ports/83514 [16], ports/88466 [17] Submitted by: vsevolod [1] [6], Ricardo Alves dos Reis <ricardo_bsd@yahoo.com.br> [2], markm [3] [15], obrien [4], krion [5] [8] , Petr Rehor <prehor@gmail.com> [7], clement [8] [18], jhs@berklix.org [9], edwin [10] [13], pav [11], jylefort [12], mnag [14], leeym [16], girgen [17]
Notes
Notes: svn path=/head/; revision=147554
Diffstat (limited to 'Mk/bsd.tcl.mk')
-rw-r--r--Mk/bsd.tcl.mk145
1 files changed, 145 insertions, 0 deletions
diff --git a/Mk/bsd.tcl.mk b/Mk/bsd.tcl.mk
new file mode 100644
index 000000000000..c0bfed148156
--- /dev/null
+++ b/Mk/bsd.tcl.mk
@@ -0,0 +1,145 @@
+# -*- mode: Makefile; tab-width: 4; -*-
+# ex: ts=4
+#
+# $FreeBSD$
+#
+
+.if !defined(_POSTMKINCLUDED) && !defined(Tcl_Pre_Include)
+
+Tcl_Pre_Include= bsd.tcl.mk
+Tcl_Include_MAINTAINER= vsevolod@FreeBSD.org
+
+# USE_TCL: Depend on tcl to run. In case of incompatible APIs of 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.
+#
+# 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.
+##
+# TCL_LIBDIR: Path where tcl libraries can be found
+#
+# TCL_INCLUDEDIR: Path where tcl C headers can be found
+##
+# TK_LIBDIR: Path where tk libraries can be found
+#
+# TK_INCLUDEDIR: Path where tk C headers can be found
+##
+# TCLSH: Path to tclsh executable respecting tcl version
+#
+# WISH: Path to wish executable respecting tk version
+##
+# PATCH_TCL_SCRIPTS: List of tcl scripts that need to be patched to replace tclsh
+# calls to tclsh${TK_VER} calls. Note that this implies USE_REINPLACE
+# as REINPLACE_CMD is used for patching. Also note that post-patch
+# target is used.
+#
+# PATCH_TK_SCRIPTS: List of tcl scripts that need to be patched to replace wish
+# calls to wish${TK_VER} calls. Note that this implies USE_REINPLACE
+# as REINPLACE_CMD is used for patching. Also note that post-patch
+# target is used.
+
+.if defined(USE_TCL) || defined(USE_TCL_BUILD)
+
+_TCL_VERSIONS= 84 83 82 81 80
+
+.if defined(USE_TCL_BUILD)
+USE_TCL= ${USE_TCL_BUILD}
+_BUILD= yes
+.endif
+
+.if ${USE_TCL} == "yes"
+USE_TCL= 84
+.endif
+
+TCL_VER:= ${USE_TCL:S/8/8./}
+
+# Special case
+.if ${USE_TCL} == "81"
+USE_TCL= tcl81-thread
+.endif
+
+_FOUND= no
+.for ver in ${_TCL_VERSIONS}
+. if ${USE_TCL} == ${ver}
+_FOUND= yes
+. if defined(_BUILD)
+BUILD_DEPENDS+= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${USE_TCL}
+. else
+RUN_DEPENDS+= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${USE_TCL}
+. endif
+TCL_INCLUDEDIR= ${LOCALBASE}/include/tcl${TCL_VER}
+TCL_LIBDIR= ${LOCALBASE}/lib/tcl${TCL_VER}
+TCLSH= ${LOCALBASE}/bin/tclsh${TCL_VER}
+. endif
+.endfor
+
+.if ${_FOUND} == "no"
+IGNORE= "Unknown TCL version specified: ${USE_TCL}"
+.endif
+.endif # defined(USE_TCL)
+
+.if defined(USE_TK)
+
+_TK_VERSIONS= 84 83 82 81 80
+
+.if ${USE_TK} == "yes"
+USE_TK= 84
+.endif
+
+TK_VER:= ${USE_TK:S/8/8./}
+
+.if defined(USE_TCL) && ${TCL_VER} != ${TK_VER}
+IGNORE= "TCL and TK versions must be equal (${TCL_VER} vs ${TK_VER})"
+.endif
+
+_FOUND= no
+.for ver in ${_TK_VERSIONS}
+. if ${USE_TK} == ${ver}
+_FOUND= yes
+RUN_DEPENDS+= wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${USE_TK}
+TCL_INCLUDEDIR= ${LOCALBASE}/include/tcl${TK_VER}
+TCL_LIBDIR= ${LOCALBASE}/lib/tcl${TK_VER}
+TK_INCLUDEDIR= ${LOCALBASE}/include/tk${TK_VER}
+TK_LIBDIR= ${LOCALBASE}/lib/tk${TK_VER}
+TCLSH= ${LOCALBASE}/bin/tclsh${TK_VER}
+WISH= ${LOCALBASE}/bin/wish${TK_VER}
+. endif
+.endfor
+
+.if ${_FOUND} == "no"
+IGNORE= "Unknown TK version specified: ${USE_TK}"
+.endif
+.endif # defined(USE_TK)
+
+.if defined(PATCH_TCL_SCRIPTS) || defined (PATCH_TK_SCRIPTS)
+USE_REINPLACE= yes
+.endif
+
+.endif # !defined(_POSTMKINCLUDED) && !defined(Tcl_Pre_Include)
+
+.if defined(_POSTMKINCLUDED) && !defined(Tcl_Post_Include)
+
+Tcl_Post_Include= bsd.tcl.mk
+
+.if defined(PATCH_TCL_SCRIPTS) || defined (PATCH_TK_SCRIPTS)
+.if !target(post-patch)
+post-patch:
+.if defined(PATCH_TCL_SCRIPTS) && defined(TCLSH)
+. for tcl_script in ${PATCH_TCL_SCRIPTS}
+ @${REINPLACE_CMD} -e 's,tclsh,${TCLSH},' ${WRKSRC}/${tcl_script}
+. endfor
+.endif
+.if defined(PATCH_TK_SCRIPTS) && defined(WISH)
+. for tk_script in ${PATCH_TK_SCRIPTS}
+ @${REINPLACE_CMD} -e 's,wish,${WISH},' ${WRKSRC}/${tk_script}
+. endfor
+.endif
+.endif # !target(post-patch)
+.endif # defined(PATCH_TCL_SCRIPTS) || defined (PATCH_TK_SCRIPTS)
+
+.endif # defined(_POSTMKINCLUDED) && !defined(Tcl_Post_Include)