aboutsummaryrefslogtreecommitdiffstats
path: root/lang/xotcl
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-03-01 18:10:39 +0800
committermiwi <miwi@FreeBSD.org>2007-03-01 18:10:39 +0800
commitae9347ec70e2efc68d562aebf43f0c9f183d6947 (patch)
tree27244e32cb7b772e15fe7ad85fc5a3092c58b524 /lang/xotcl
parentc0032b3f716bdb015795a3cc2854c3f9515982ec (diff)
downloadfreebsd-ports-gnome-ae9347ec70e2efc68d562aebf43f0c9f183d6947.tar.gz
freebsd-ports-gnome-ae9347ec70e2efc68d562aebf43f0c9f183d6947.tar.zst
freebsd-ports-gnome-ae9347ec70e2efc68d562aebf43f0c9f183d6947.zip
- Removed WITH_THREADS and WITH_AOLSERVER from OPTIONS
- Added support for threaded build (WITH_THREADS), prepared for xotcl-thread slave port - Added support for tcl85, removed tcl83 from CATEGORIES - Prepared for www/aolserver-xotcl slave module (AOLSERVER_XOTCL knob) PR: 109675 Submitted by: Martin Matuska <martin@matuska.org> (maintainer)
Diffstat (limited to 'lang/xotcl')
-rw-r--r--lang/xotcl/Makefile104
-rw-r--r--lang/xotcl/pkg-plist1
2 files changed, 73 insertions, 32 deletions
diff --git a/lang/xotcl/Makefile b/lang/xotcl/Makefile
index d66c7ed840b4..1f18c36d80dd 100644
--- a/lang/xotcl/Makefile
+++ b/lang/xotcl/Makefile
@@ -7,35 +7,49 @@
PORTNAME= xotcl
PORTVERSION= 1.5.3
-PORTREVISION= 1
-CATEGORIES= lang tcl83 tcl84
+PORTREVISION= 2
+CATEGORIES?= lang tcl84
MASTER_SITES= http://media.wu-wien.ac.at/download/
+PKGNAMESUFFIX?= ${THREADS_SUFFIX}
MAINTAINER= martin@matuska.org
COMMENT= Object-oriented scripting language based on Tcl
-GNU_CONFIGURE= yes
-USE_TCL= yes
-USE_TCL_BUILD= yes
-ALL_TARGET= all test-nohttp
+USE_TCL_VER?= 84
+
+.if ${USE_TCL_VER} != 84 && ${USE_TCL_VER} != 85
+IGNORE= supported values for USE_TCL_VER are only 84 and 85
+.endif
+
+USE_TCL= ${USE_TCL_VER}
+USE_TCL_BUILD= ${USE_TCL_VER}
INSTALL_TARGET= install
-USE_LDCONFIG= yes
+ALL_TARGET= all test-nohttp
USE_GMAKE= yes
PLIST_SUB+= PORTVERSION=${PORTVERSION}
+.if !defined(AOLSERVER_XOTCL)
+USE_LDCONFIG= ${PREFIX}/xotcl${PORTVERSION}
+GNU_CONFIGURE= yes
+
OPTIONS= ACTIWEB "Include actiweb" on \
- AOLSERVER "AOL server module" off \
- THREADS "Force threaded build" off \
TUTORIAL "Install XOTcl tutorial" off
-
-CONFIGURE_ARGS+= --exec-prefix=${PREFIX} \
- --libdir=${PREFIX}/lib \
- --with-tcl=${TCL_LIBDIR} \
- --with-tclinclude=${TCL_INCLUDEDIR}/generic/ \
- --with-xotclsh
+.else
+AOLSERVERBASE?= ${LOCALBASE}/aolserver
+.endif
.include <bsd.port.pre.mk>
+.if defined(AOLSERVER_XOTCL)
+RUN_DEPENDS+= ${LOCALBASE}/aolserver/bin/init.tcl:${PORTSDIR}/www/aolserver \
+ ${LOCALBASE}/lib/xotcl${PORTVERSION}/xotclConfig.sh:${PORTSDIR}/lang/xotcl-thread
+PLIST= ${WRKDIR}/pkg-plist.aolserver
+PLIST_FILES= ${AOLSERVERBASE:S/${LOCALBASE}\///}/modules/tcl/xotcl.tcl
+LATEST_LINK= aolserver-xotcl
+NO_BUILD= yes
+WITH_THREADS= yes
+.endif
+
.if defined(WITH_ACTIWEB)
CONFIGURE_ARGS+= --with-actiweb --with-gdbm=${LOCALBASE}/include,${LOCALBASE}/lib
LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm
@@ -44,34 +58,61 @@ PLIST_SUB+= ACTIWEB=""
PLIST_SUB+= ACTIWEB="@comment "
.endif
-.if defined(WITH_AOLSERVER)
-BUILD_DEPENDS+= ${LOCALBASE}/aolserver/bin/init.tcl:${PORTSDIR}/www/aolserver
-RUN_DEPENDS+= ${BUILD_DEPENDS}
-PLIST_SUB+= AOLSERVER=""
-INSTALL_TARGET+= install-aol
-.else
-PLIST_SUB+= AOLSERVER="@comment "
-.endif
-
.if defined(WITH_TUTORIAL)
PLIST_SUB+= TUTORIAL=""
.else
PLIST_SUB+= TUTORIAL="@comment "
.endif
-.if defined(WITH_THREADS)
-TCL_THREADED!= ${ECHO_CMD} 'puts [array names tcl_platform -exact threaded]' | ${TCLSH}
-.if empty(TCL_THREADED)
-IGNORE= WITH_THREADS option is selected. You need Tcl with threads to use this port. Please install Tcl with WITH_THREADS defined or from lang/tcl84-thread port and try again.
+INSTALL_TARGET+= install-shells
+
+.if !defined(AOLSERVER_XOTCL) && !defined(NO_INSTALL_MANPAGES)
+MAN1= xotclsh.1
.endif
+
+. if exists(${TCLSH})
+_TCL_IS_THREADED!= ${ECHO_CMD} 'puts [array names tcl_platform -exact threaded]' | ${TCLSH} || return 0
+. if !defined(TCL_WITH_THREADS) && !defined(WITH_THREADS) && !empty(_TCL_IS_THREADED)
+TCL_WITH_THREADS= yes
+. endif
+. endif
+
+.if defined(TCL_WITH_THREADS) || defined(WITH_THREADS)
+. if defined(_TCL_IS_THREADED) && empty(_TCL_IS_THREADED)
+IGNORE= Tcl with threads is required. Please install Tcl with WITH_THREADS defined or from lang/tcl${USE_TCL} port and try again
+. endif
CONFIGURE_ARGS+= --enable-threads
+. if !defined(AOLSERVER_XOTCL)
+THREADS_SUFFIX= -threads
+. endif
+USE_TCL= ${USE_TCL_VER}-thread
+USE_TCL_BUILD= ${USE_TCL_VER}-thread
+.include "${PORTSDIR}/Mk/bsd.tcl.mk"
+. else
+CONFIGURE_ARGS+= --disable-threads
.endif
-INSTALL_TARGET+= install-shells
-.if !defined(NO_INSTALL_MANPAGES)
-MAN1= xotclsh.1
+LATEST_LINK?= xotcl${THREADS_SUFFIX}
+
+CONFIGURE_ARGS+= --exec-prefix=${PREFIX} \
+ --libdir=${PREFIX}/lib \
+ --with-tcl=${TCL_LIBDIR} \
+ --with-tclinclude=${TCL_INCLUDEDIR}/generic/ \
+ --with-xotclsh
+
+.if !defined(AOLSERVER_XOTCL) # Install for aolserver module
+pre-configure:
+. if defined(TCL_WITH_THREADS) || defined(WITH_THREADS)
+ @${ECHO_CMD} "*************************************************"
+ @${ECHO_CMD} "NOTICE: XOTcl will be built with threads support."
+ @${ECHO_CMD} "*************************************************"
+. endif
+.else # installation for aolserver module
+do-install:
+ @${INSTALL_DATA} ${WRKSRC}/generic/aol-xotcl.tcl ${AOLSERVERBASE}/modules/tcl/xotcl.tcl
.endif
+.if !defined(AOLSERVER_XOTCL) # Aolserver module has no post-install
post-install:
.if defined(WITH_TUTORIAL)
${MKDIR} ${EXAMPLESDIR}/tutorial/html ${EXAMPLESDIR}/tutorial/pdf
@@ -92,4 +133,5 @@ post-install:
.if !defined(NO_INSTALL_MANPAGES)
${INSTALL_MAN} ${WRKSRC}/man/xotclsh.1 ${PREFIX}/man/man1/
.endif
+.endif
.include <bsd.port.post.mk>
diff --git a/lang/xotcl/pkg-plist b/lang/xotcl/pkg-plist
index adeb6e0bccc0..31285b44a1d4 100644
--- a/lang/xotcl/pkg-plist
+++ b/lang/xotcl/pkg-plist
@@ -72,7 +72,6 @@
%%ACTIWEB%%lib/xotclsdbm1.2/pkgIndex.tcl
%%ACTIWEB%%lib/xotclgdbm1.2/libxotclgdbm1.2.so
%%ACTIWEB%%lib/xotclgdbm1.2/pkgIndex.tcl
-%%AOLSERVER%%aolserver/modules/tcl/xotcl.tcl
bin/xotclsh
include/xotcl%%PORTVERSION%%/xotcl.h
include/xotcl%%PORTVERSION%%/xotclDecls.h