summaryrefslogtreecommitdiff
path: root/www/tdom
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-03-01 11:55:01 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-03-01 11:55:01 +0000
commite6a4a29238ed7ea12f3cb4e1c81ec32513f39d9e (patch)
treed10a36736280b6bf69038e74d64fcb05164a8a4a /www/tdom
parent- update to 0.8.5 (diff)
- Added support for non-threaded tcl (if installed)
- Added support for tcl85 via USE_TCL_VER=85 - Added tcl84 to CATEGORIES list - Added readme and html documentation - Bump PORTREVISION - Pass maintainership to submitter PR: 109690 Submitted by: Martin Matuska <martin@matuska.org> Approved by: A. Nooitgedagt <a.nooit@gmail.com> (old maintainer)
Notes
Notes: svn path=/head/; revision=186286
Diffstat (limited to 'www/tdom')
-rw-r--r--www/tdom/Makefile80
-rw-r--r--www/tdom/pkg-plist16
2 files changed, 71 insertions, 25 deletions
diff --git a/www/tdom/Makefile b/www/tdom/Makefile
index 18e681837b68..f0b6cf03ea50 100644
--- a/www/tdom/Makefile
+++ b/www/tdom/Makefile
@@ -7,8 +7,10 @@
PORTNAME= tDOM
PORTVERSION= 0.8.0
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://www.tdom.org/files/
+PKGNAMESUFFIX?= -threads
MAINTAINER= aldert@nooitgedagt.net
COMMENT= High performance XML data processing with Tcl (ARGS for OpenACS)
@@ -16,39 +18,67 @@ COMMENT= High performance XML data processing with Tcl (ARGS for OpenACS)
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/unix
TDOMBASE= ${PREFIX}/lib/tdom${PORTVERSION}
-LIB_DEPENDS+= tcl84.1:${PORTSDIR}/lang/tcl84-thread
+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
+
+# by default we want a threaded build
+USE_TCL= ${USE_TCL_VER}-thread
+USE_TCL_BUILD= ${USE_TCL_VER}-thread
USE_GMAKE= yes
HAS_CONFIGURE= yes
CONFIGURE_SCRIPT= ../configure
-CONFIGURE_ARGS= --enable-threads --disable-tdomalloc --with-tcl=${LOCALBASE}/lib/tcl8.4 \
- --with-tclinclude=${LOCALBASE}/include/tcl8.4 --prefix=${PREFIX}
-INSTALLS_SHLIB= YES
-LDCONFIG_DIRS+= ${TDOMBASE}
+USE_LDCONFIG= ${TDOMBASE}
PLIST_SUB+= PORTVERSION=${PORTVERSION}
-pre-configure:
- @${ECHO_CMD}
- @${ECHO_CMD} "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- @${ECHO_CMD} " Please make sure that you either have lang/tcl84-thread or "
- @${ECHO_CMD} " no tcl84 installed before you add this port "
- @${ECHO_CMD} "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
- @${ECHO_CMD}
-
-post-configure:
- @if ${GREP} -qs 'enable-threads requested, but attempting building against' ${WRKSRC}/config.log ; then \
- ${ECHO_CMD} "" && \
- ${ECHO_CMD} " =====================================================" && \
- ${ECHO_CMD} " You need ${PORTSDIR}/lang/tcl84-thread but you appear " && \
- ${ECHO_CMD} " to have the non-threaded TCL version installed." && \
- ${ECHO_CMD} " =====================================================" && \
- ${ECHO_CMD} "" && \
- ${FALSE}; \
- fi
-
MANN= dom.n domDoc.n domNode.n expat.n expatapi.n tdomcmd.n tnc.n
MANCOMPRESSED= no
-.include <bsd.port.mk>
+DOCS= CHANGES LICENSE README README.AOL
+HTMLDOCS= category-index.html dom.html domDoc.html domNode.html \
+ expat.html expatapi.html index.html keyword-index.html \
+ tdomcmd.html tnc.html
+
+.include <bsd.port.pre.mk>
+
+.if exists(${TCLSH})
+_TCL_IS_THREADED!= ${ECHO_CMD} 'puts [array names tcl_platform -exact threaded]' | ${TCLSH} || return 0
+. if empty(_TCL_IS_THREADED)
+# Check if a threaded build is forced
+. if defined(TCL_WITH_THREADS) || defined(WITH_THREADS)
+IGNORE= tcl with threads is required. Please install tcl with WITH_THREADS defined or from lang/tcl${USE_TCL} port and try again
+. else
+# Installed tcl is not threaded, so set correct dependencies
+CONFIGURE_ARGS+= --disable-threads
+PKGNAMESUFFIX=
+USE_TCL=${USE_TCL_VER}
+USE_TCL_BUILD=${USE_TCL_VER}
+.include "${PORTSDIR}/Mk/bsd.tcl.mk"
+. endif
+. else
+CONFIGURE_ARGS+= --enable-threads
+. endif
+.else
+CONFIGURE_ARGS+= --enable-threads
+.endif
+
+CONFIGURE_ARGS+= -disable-tdomalloc --with-tcl=${TCL_LIBDIR} \
+ --with-tclinclude=${TCL_INCLUDEDIR} --prefix=${PREFIX}
+
+post-install:
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}/html
+. for FILE in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/../${FILE} ${DOCSDIR}/${FILE}
+. endfor
+. for FILE in ${HTMLDOCS}
+ @${INSTALL_DATA} ${WRKSRC}/../doc/${FILE} ${DOCSDIR}/html/${FILE}
+. endfor
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/www/tdom/pkg-plist b/www/tdom/pkg-plist
index 410bfbb4b48b..e78d317bfb50 100644
--- a/www/tdom/pkg-plist
+++ b/www/tdom/pkg-plist
@@ -3,4 +3,20 @@ lib/tdom%%PORTVERSION%%/libtdomstub%%PORTVERSION%%.a
lib/tdom%%PORTVERSION%%/pkgIndex.tcl
lib/tdom%%PORTVERSION%%/tdom.tcl
lib/tdomConfig.sh
+%%PORTDOCS%%%%DOCSDIR%%/html/category-index.html
+%%PORTDOCS%%%%DOCSDIR%%/html/dom.html
+%%PORTDOCS%%%%DOCSDIR%%/html/domDoc.html
+%%PORTDOCS%%%%DOCSDIR%%/html/domNode.html
+%%PORTDOCS%%%%DOCSDIR%%/html/expat.html
+%%PORTDOCS%%%%DOCSDIR%%/html/expatapi.html
+%%PORTDOCS%%%%DOCSDIR%%/html/index.html
+%%PORTDOCS%%%%DOCSDIR%%/html/keyword-index.html
+%%PORTDOCS%%%%DOCSDIR%%/html/tdomcmd.html
+%%PORTDOCS%%%%DOCSDIR%%/html/tnc.html
+%%PORTDOCS%%%%DOCSDIR%%/CHANGES
+%%PORTDOCS%%%%DOCSDIR%%/LICENSE
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.AOL
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm lib/tdom%%PORTVERSION%%