2012-12-09 20:05:14 +01:00
|
|
|
# Created by: Martin Matuska <mm@FreeBSD.org>
|
2007-02-05 14:48:38 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= tk
|
2013-09-18 23:01:43 +02:00
|
|
|
DISTVERSION= 8.5.15
|
2007-02-05 14:48:38 +01:00
|
|
|
CATEGORIES= x11-toolkits
|
2013-09-18 23:01:43 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_TCLTK} \
|
|
|
|
SF/tcl/Tcl/${PORTVERSION}
|
|
|
|
MASTER_SITE_SUBDIR=tcl8_5
|
|
|
|
DISTNAME= ${PORTNAME}${DISTVERSION}-src
|
2007-02-05 14:48:38 +01:00
|
|
|
|
2012-12-09 20:05:14 +01:00
|
|
|
MAINTAINER= tcltk@FreeBSD.org
|
2013-02-06 16:25:57 +01:00
|
|
|
COMMENT= Graphical toolkit for Tcl
|
2007-02-05 14:48:38 +01:00
|
|
|
|
2011-03-23 12:37:49 +01:00
|
|
|
LICENSE= BSD
|
2013-02-06 16:25:57 +01:00
|
|
|
|
2011-03-23 12:37:49 +01:00
|
|
|
LICENSE_TERMS= ${WRKSRC}/../license.terms
|
|
|
|
|
2013-02-06 16:25:57 +01:00
|
|
|
LATEST_LINK= tk85
|
2013-09-18 23:01:43 +02:00
|
|
|
USE_XORG= x11 xft xscrnsaver
|
2007-02-05 14:48:38 +01:00
|
|
|
USE_LDCONFIG= yes
|
2007-09-28 07:14:15 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME:S/-src//}/unix
|
2007-02-05 14:48:38 +01:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
TK_VER= 8.5
|
|
|
|
SHORT_TK_VER= 85
|
2013-09-18 23:01:43 +02:00
|
|
|
CONFIGURE_ARGS= --enable-shared \
|
|
|
|
--enable-xss \
|
|
|
|
--enable-xft \
|
|
|
|
--enable-man-suffix=.${MAN_SUFFIX} \
|
|
|
|
--with-tcl=${TCL_LIBDIR} \
|
|
|
|
--includedir=${PREFIX}/include/tk${TK_VER}
|
|
|
|
|
2013-02-06 16:25:57 +01:00
|
|
|
CONFIGURE_ENV= PORTSDIR=${PORTSDIR} TK_LIB_FILE=libtk${SHORT_TK_VER}.so.1 \
|
|
|
|
ac_cv_path_tclsh="${LOCALBASE}/bin/tclsh${TK_VER}"
|
|
|
|
LATEST_LINK= ${PORTNAME}${SHORT_TK_VER}
|
|
|
|
MAN_SUFFIX= ${LATEST_LINK}
|
|
|
|
|
|
|
|
INSTALL_TARGET= install
|
|
|
|
|
2007-02-05 14:48:38 +01:00
|
|
|
MAKE_ENV= SHORT_TK_VER=${SHORT_TK_VER}
|
|
|
|
PLIST_SUB= TK_VER=${TK_VER} SHORT_TK_VER=${SHORT_TK_VER}
|
|
|
|
NOPRECIOUSMAKEVARS= yes # Otherwise 'make readmes' is broken
|
|
|
|
MANCOMPRESSED= no
|
|
|
|
DATADIR= ${PREFIX}/share/${PORTNAME}${TK_VER}
|
2007-03-16 21:40:00 +01:00
|
|
|
SUB_FILES= pkgIndex.tcl
|
|
|
|
|
|
|
|
USE_TCL= ${SHORT_TK_VER}
|
2007-02-05 14:48:38 +01:00
|
|
|
|
2013-09-18 23:01:43 +02:00
|
|
|
OPTIONS_DEFINE= TK85_MAN DEMOS THREADS
|
|
|
|
OPTIONS_DEFAULT=THREADS
|
2012-08-03 11:17:41 +02:00
|
|
|
TK85_MAN_DESC= Install tk 8.5 function manpages
|
|
|
|
DEMOS_DESC= Install demos
|
|
|
|
|
2013-02-06 16:25:57 +01:00
|
|
|
SUB_LIST+= TCLPATCHLEVEL="${PORTVERSION}"
|
2007-03-09 10:49:12 +01:00
|
|
|
|
2007-03-16 21:40:00 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
2007-03-09 10:49:12 +01:00
|
|
|
|
2009-02-26 15:19:53 +01:00
|
|
|
DATADIR= ${PREFIX}/share/${PORTNAME}${TCL_VER}
|
|
|
|
|
2013-02-06 16:25:57 +01:00
|
|
|
.if ${PORT_OPTIONS:MTHREADS}
|
|
|
|
CONFIGURE_ARGS+= --enable-threads
|
2007-02-05 14:48:38 +01:00
|
|
|
.else
|
2013-02-06 16:25:57 +01:00
|
|
|
CONFIGURE_ARGS+= --disable-threads
|
|
|
|
.endif
|
2007-03-09 10:49:12 +01:00
|
|
|
|
2012-08-03 11:20:39 +02:00
|
|
|
.if ${PORT_OPTIONS:MDEMOS}
|
2007-12-29 22:39:48 +01:00
|
|
|
INSTALL_TARGET+= install install-demos
|
|
|
|
PLIST_SUB+= DEMOS=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= DEMOS="@comment "
|
|
|
|
.endif
|
|
|
|
|
2012-08-04 00:34:53 +02:00
|
|
|
.if ${PORT_OPTIONS:MTK85_MAN}
|
2013-02-06 16:25:57 +01:00
|
|
|
INSTALL_TARGET+=install-doc
|
|
|
|
.include "${.CURDIR}/Makefile.man"
|
|
|
|
.endif
|
2007-03-16 21:40:00 +01:00
|
|
|
|
2007-02-05 14:48:38 +01:00
|
|
|
TKBASE?= ${PORTSDIR}/${PKGCATEGORY}/${LATEST_LINK}
|
|
|
|
|
2007-03-16 21:40:00 +01:00
|
|
|
post-patch:
|
2013-04-18 10:20:59 +02:00
|
|
|
${REINPLACE_CMD} -e \
|
|
|
|
's|@TK_BUILD_LIB_SPEC@|@TK_LIB_SPEC@|; \
|
|
|
|
s|@TK_BUILD_STUB_LIB_SPEC@|@TK_STUB_LIB_SPEC@|; \
|
|
|
|
s|@TK_BUILD_STUB_LIB_PATH@|@TK_STUB_LIB_PATH@|; \
|
|
|
|
s|@TK_SRC_DIR@|${PREFIX}/include/tk${TK_VER}|' \
|
|
|
|
${WRKSRC}/tkConfig.sh.in
|
2007-07-29 15:11:16 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|X11/Intrinsic.h|X11/Xlib.h|g' ${WRKSRC}/configure
|
2012-12-03 09:49:58 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|@TK_SHARED_BUILD@|#@TK_SHARED_BUILD@|g; s|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/Makefile.in
|
2007-02-05 14:48:38 +01:00
|
|
|
|
|
|
|
post-configure:
|
|
|
|
${REINPLACE_CMD} \
|
|
|
|
-e 's|${WRKDIRPREFIX}${.CURDIR}|$${WRKDIRPREFIX}${TKBASE}|' \
|
|
|
|
${WRKSRC}/tkConfig.sh
|
2007-04-30 14:54:50 +02:00
|
|
|
${REINPLACE_CMD} -e 's|-Wl,--rpath -Wl,/usr/local/lib||g' ${WRKSRC}/Makefile
|
2007-02-05 14:48:38 +01:00
|
|
|
|
|
|
|
post-install:
|
2013-02-06 16:25:57 +01:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/pkgIndex.tcl ${PREFIX}/lib/tk${TK_VER}/
|
2009-02-26 15:19:53 +01:00
|
|
|
|
2007-02-05 14:48:38 +01:00
|
|
|
regression-test: build
|
|
|
|
cd ${WRKSRC}; ${MAKE} test
|
|
|
|
${ECHO_CMD} "package require Tk" | tclsh${TK_VER}
|
|
|
|
${ECHO_CMD} "load libtk${SHORT_TK_VER}.so" | tclsh${TK_VER}
|
|
|
|
|
2007-03-09 10:49:12 +01:00
|
|
|
.include <bsd.port.post.mk>
|