diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2007-03-16 20:40:00 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2007-03-16 20:40:00 +0000 |
commit | 421c9b098358a6862dd7b1b4cea5da6deb74cef5 (patch) | |
tree | 6894140acf81f811e65c420c85dad4d67fb80021 /x11-toolkits/tk86 | |
parent | ddae5b2437561920ab90ae088db8e344bc72eed9 (diff) | |
download | ports-421c9b098358a6862dd7b1b4cea5da6deb74cef5.tar.gz ports-421c9b098358a6862dd7b1b4cea5da6deb74cef5.zip |
Notes
Diffstat (limited to 'x11-toolkits/tk86')
-rw-r--r-- | x11-toolkits/tk86/Makefile | 81 | ||||
-rw-r--r-- | x11-toolkits/tk86/files/pkgIndex.tcl | 3 | ||||
-rw-r--r-- | x11-toolkits/tk86/files/pkgIndex.tcl.in | 3 | ||||
-rw-r--r-- | x11-toolkits/tk86/pkg-plist.threads | 9 |
4 files changed, 61 insertions, 35 deletions
diff --git a/x11-toolkits/tk86/Makefile b/x11-toolkits/tk86/Makefile index 6ecb0adadd7a..da1db5bf9001 100644 --- a/x11-toolkits/tk86/Makefile +++ b/x11-toolkits/tk86/Makefile @@ -7,7 +7,7 @@ PORTNAME= tk PORTVERSION= 8.5.a.5 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= x11-toolkits MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= tcl @@ -17,9 +17,6 @@ DISTNAME= ${PORTNAME}${PORTVERSION:S/.a./a/}-src MAINTAINER= martin@matuska.org COMMENT= Graphical toolkit for TCL -USE_TCL= 85 -USE_TCL_BUILD= 85 - LATEST_LINK?= tk85 USE_XLIB= yes USE_LDCONFIG= yes @@ -27,44 +24,40 @@ WRKSRC= ${WRKDIR}/${PORTNAME}${PORTVERSION:S/.a./a/}/unix GNU_CONFIGURE= yes TK_VER= 8.5 SHORT_TK_VER= 85 -CONFIGURE_ARGS= --enable-shared --with-tcl=${LOCALBASE}/lib/tcl${TK_VER} \ - --includedir=${PREFIX}/include/tk${TK_VER} +CONFIGURE_ARGS= --enable-shared --includedir=${PREFIX}/include/tk${TK_VER} CONFIGURE_ENV= PORTSDIR=${PORTSDIR} TK_LIB_FILE=libtk${SHORT_TK_VER}.so.1 MAKE_ENV= SHORT_TK_VER=${SHORT_TK_VER} PLIST_SUB= TK_VER=${TK_VER} SHORT_TK_VER=${SHORT_TK_VER} -PKGINSTALL= ${PKGDIR}/pkg-install.wish -PKGDEINSTALL= ${PKGDIR}/pkg-deinstall.wish NOPRECIOUSMAKEVARS= yes # Otherwise 'make readmes' is broken MANCOMPRESSED= no DATADIR= ${PREFIX}/share/${PORTNAME}${TK_VER} +SUB_FILES= pkgIndex.tcl + +.if !defined(BUILDING_TK_THREADS) +USE_TCL= ${SHORT_TK_VER} +USE_TCL_BUILD= ${SHORT_TK_VER} OPTIONS= TK85_MAN "Install tk 8.5 manpages" off \ WISH_WRAPPER "Require wish wrapper from ports" off +.else +USE_TK= ${SHORT_TK_VER} +PLIST= ${PKGDIR}/pkg-plist.threads +THREADS_SUFFIX= -threads +LIB_DEPENDS= tcl${SHORT_TK_VER}${THREADS_SUFFIX}:${PORTSDIR}/lang/tcl${SHORT_TK_VER}-thread +.endif -.include <bsd.port.pre.mk> +SUB_LIST+= THREADS_SUFFIX="${THREADS_SUFFIX}" -.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 +.include <bsd.port.pre.mk> -.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 -CONFIGURE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}" PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" -THREADS_SUFFIX= -threads -USE_TCL= 85-thread -USE_TCL_BUILD= 85-thread -CONFLICTS= tk-8.5* -.include "${PORTSDIR}/Mk/bsd.tcl.mk" +.if defined(BUILDING_TK_THREADS) +CONFIGURE_ARGS+= --enable-threads --with-tcl=${LOCALBASE}/lib/tcl${TK_VER}${THREADS_SUFFIX} +CONFIGURE_ENV+= PTHREAD_LIBS="${PTHREAD_LIBS}" PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \ + ac_cv_path_tclsh="${LOCALBASE}/bin/tclsh${TK_VER}${THREADS_SUFFIX}" +LATEST_LINK= tk85${THREADS_SUFFIX} .else -CONFIGURE_ARGS+= --disable-threads -CONFLICTS= tk-threads-8.5* -.endif +CONFIGURE_ARGS+= --disable-threads --with-tcl=${LOCALBASE}/lib/tcl${TK_VER} \ + ac_cv_path_tclsh="${TCLSH}" .if defined(WITH_WISH_WRAPPER) RUN_DEPENDS+= wish:${PORTSDIR}/lang/tcl-tk-wrapper @@ -389,23 +382,47 @@ MLINKS= 3DBorder.3 Tk_Alloc3DBorderFromObj.3 \ .endif +.endif # defined(BUILDING_TK_THREADS) + TKBASE?= ${PORTSDIR}/${PKGCATEGORY}/${LATEST_LINK} pre-everything:: @if ${TEST} -e "${NONEXISTENT}"; then ${ECHO_MSG} "=== Aborted, please remove ${NONEXISTENT}"; exit 1; fi -pre-configure: +post-patch: + @${REINPLACE_CMD} -e 's|@TK_SHARED_BUILD@|#@TK_SHARED_BUILD@|g' ${WRKSRC}/Makefile.in +.if defined(BUILDING_TK_THREADS) @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' \ + -e 's|$${TCL_TRIM_DOTS}|$${TCL_TRIM_DOTS}${THREADS_SUFFIX}|g' \ + -e 's|-ltk$${TK_VERSION}|-ltk$${TK_VERSION}${THREADS_SUFFIX}|g' \ + -e 's/-ltk`echo $${TK_VERSION} | tr -d .`/-ltk`echo $${TK_VERSION} | tr -d .`${THREADS_SUFFIX}/g' \ + -e 's|-ltkstub$${TK_VERSION}|-ltkstub$${TK_VERSION}${THREADS_SUFFIX}|g' \ + -e 's/-ltkstub`echo $${TK_VERSION} | tr -d .`/-ltkstub`echo $${TK_VERSION} | tr -d .`${THREADS_SUFFIX}/g' \ ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|libtk$${SHORT_TK_VER}|libtk$${SHORT_TK_VER}${THREADS_SUFFIX}|g' \ + -e 's|$$(BIN_INSTALL_DIR)/wish$$(VERSION)|$$(BIN_INSTALL_DIR)/wish$$(VERSION)${THREADS_SUFFIX}|g' \ + -e 's|tk$$(VERSION)/tkConfig.sh|tk$$(VERSION)/tkConfig${THREADS_SUFFIX}.sh|g' \ + -e 's|$$(LIB_INSTALL_DIR)$$(TK_PKG_DIR)|${WRKDIR}|g' \ + -e 's|$$(MINOR_VERSION)$$(TCLPATCHL)|$$(MINOR_VERSION)$$(TCLPATCHL)${THREADS_SUFFIX}|g' \ + ${WRKSRC}/Makefile.in +.endif post-configure: ${REINPLACE_CMD} \ -e 's|${WRKDIRPREFIX}${.CURDIR}|$${WRKDIRPREFIX}${TKBASE}|' \ ${WRKSRC}/tkConfig.sh +.if defined(BUILDING_TK_THREADS) +do-install: + @cd ${WRKSRC} && ${MAKE_ENV} ${MAKE} -f Makefile install-binaries + @${MKDIR} ${PREFIX}/lib/tk${TK_VER}${THREADS_SUFFIX} + @${LN} -s ${PREFIX}/lib/tk${TK_VER}/tkConfig${THREADS_SUFFIX}.sh \ + ${PREFIX}/lib/tk${TK_VER}${THREADS_SUFFIX}/tkConfig.sh +.endif + post-install: - ${INSTALL_DATA} ${FILESDIR}/pkgIndex.tcl ${PREFIX}/lib/tk${TK_VER}/ -.if !defined(NO_INSTALL_MANPAGES) && defined(WITH_TK85_MAN) + ${INSTALL_DATA} ${WRKDIR}/pkgIndex.tcl ${PREFIX}/lib/tk${TK_VER}${THREADS_SUFFIX}/ +.if !defined(BUILDING_TK_THREADS) && !defined(NO_INSTALL_MANPAGES) && defined(WITH_TK85_MAN) ${MKDIR} ${DATADIR} ${INSTALL_DATA} ${WRKSRC}/../doc/man.macros ${DATADIR} . for mp in ${MAN1} ${MAN3} ${MANN} diff --git a/x11-toolkits/tk86/files/pkgIndex.tcl b/x11-toolkits/tk86/files/pkgIndex.tcl deleted file mode 100644 index a83b5d916ba9..000000000000 --- a/x11-toolkits/tk86/files/pkgIndex.tcl +++ /dev/null @@ -1,3 +0,0 @@ -# Tcl package index file, version 1.0 - -package ifneeded Tk 8.5 [list load "[file join [file dirname $dir] libtk85.so.1]" Tk] diff --git a/x11-toolkits/tk86/files/pkgIndex.tcl.in b/x11-toolkits/tk86/files/pkgIndex.tcl.in new file mode 100644 index 000000000000..2be3641e0273 --- /dev/null +++ b/x11-toolkits/tk86/files/pkgIndex.tcl.in @@ -0,0 +1,3 @@ +# Tcl package index file, version 1.0 + +package ifneeded Tk%%THREADS_SUFFIX%% 8.5 [list load "[file join [file dirname $dir] libtk85%%THREADS_SUFFIX%%.so.1]" Tk] diff --git a/x11-toolkits/tk86/pkg-plist.threads b/x11-toolkits/tk86/pkg-plist.threads new file mode 100644 index 000000000000..e8dcd7da52be --- /dev/null +++ b/x11-toolkits/tk86/pkg-plist.threads @@ -0,0 +1,9 @@ +bin/wish%%TK_VER%%-threads +lib/libtk%%SHORT_TK_VER%%-threads.a +lib/libtk%%SHORT_TK_VER%%-threads.so +lib/libtk%%SHORT_TK_VER%%-threads.so.1 +lib/libtkstub%%SHORT_TK_VER%%-threads.a +lib/tk%%TK_VER%%/tkConfig-threads.sh +lib/tk%%TK_VER%%-threads/tkConfig.sh +lib/tk%%TK_VER%%-threads/pkgIndex.tcl +@dirrm lib/tk%%TK_VER%%-threads |