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
|
2016-02-16 10:06:55 +01:00
|
|
|
PORTVERSION= 8.5.19
|
2018-01-04 09:54:45 +01:00
|
|
|
PORTREVISION= 1
|
2007-02-05 14:48:38 +01:00
|
|
|
CATEGORIES= x11-toolkits
|
2015-05-14 12:15:04 +02:00
|
|
|
MASTER_SITES= TCLTK/tcl8_5 SF/tcl/Tcl/${PORTVERSION}
|
2016-02-16 10:06:55 +01:00
|
|
|
PKGNAMESUFFIX= ${SHORT_TK_VER}
|
2013-09-20 09:43:51 +02:00
|
|
|
DISTNAME= ${PORTNAME}${PORTVERSION}-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
|
|
|
|
2014-02-03 11:50:30 +01:00
|
|
|
LICENSE= TclTk
|
|
|
|
LICENSE_NAME= Tcl/Tk License
|
|
|
|
LICENSE_FILE= ${WRKSRC}/../license.terms
|
2014-08-22 09:20:30 +02:00
|
|
|
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
2011-03-23 12:37:49 +01:00
|
|
|
|
2016-04-21 18:48:50 +02:00
|
|
|
USES+= tcl:${SHORT_TK_VER},tea
|
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
|
2016-02-16 10:06:55 +01:00
|
|
|
TK_VER= ${PORTVERSION:R}
|
|
|
|
SHORT_TK_VER= ${TK_VER:S/.//}
|
2016-04-21 18:48:50 +02:00
|
|
|
CONFIGURE_ARGS= --enable-xss \
|
2013-09-18 23:01:43 +02:00
|
|
|
--enable-xft \
|
|
|
|
--enable-man-suffix=.${MAN_SUFFIX} \
|
|
|
|
--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}"
|
2015-08-17 16:20:40 +02:00
|
|
|
MAN_SUFFIX= ${PKGBASE}
|
2013-02-06 16:25:57 +01:00
|
|
|
|
|
|
|
INSTALL_TARGET= install
|
2016-02-16 10:06:55 +01:00
|
|
|
TEST_TARGET= do-test
|
2013-02-06 16:25:57 +01:00
|
|
|
|
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
|
|
|
|
DATADIR= ${PREFIX}/share/${PORTNAME}${TK_VER}
|
2007-03-16 21:40:00 +01:00
|
|
|
SUB_FILES= pkgIndex.tcl
|
|
|
|
|
2013-09-18 23:01:43 +02:00
|
|
|
OPTIONS_DEFINE= TK85_MAN DEMOS THREADS
|
|
|
|
OPTIONS_DEFAULT=THREADS
|
2016-02-16 10:06:55 +01:00
|
|
|
OPTIONS_SUB= yes
|
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
|
|
|
|
2009-02-26 15:19:53 +01:00
|
|
|
DATADIR= ${PREFIX}/share/${PORTNAME}${TCL_VER}
|
|
|
|
|
2016-02-16 10:06:55 +01:00
|
|
|
THREADS_CONFIGURE_ENABLE= threads
|
|
|
|
TK85_MAN_VARS= INSTALL_TARGET+=install-doc
|
|
|
|
DEMOS_VARS= INSTALL_TARGET+=install-demos
|
2007-03-16 21:40:00 +01:00
|
|
|
|
2015-08-17 16:20:40 +02:00
|
|
|
TKBASE?= ${PORTSDIR}/${PKGCATEGORY}/${PKGBASE}
|
2007-02-05 14:48:38 +01:00
|
|
|
|
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
|
2018-01-04 09:54:45 +01:00
|
|
|
${REINPLACE_CMD} -e '/^Requires/s|tcl|tcl${SHORT_TK_VER}|' \
|
|
|
|
${WRKSRC}/tk.pc.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:
|
2014-02-03 11:50:30 +01:00
|
|
|
${INSTALL_DATA} ${WRKDIR}/pkgIndex.tcl ${STAGEDIR}${PREFIX}/lib/tk${TK_VER}/
|
2014-08-27 09:54:49 +02:00
|
|
|
${LN} -fs libtk${SHORT_TK_VER}.so.1.0 \
|
|
|
|
${STAGEDIR}${PREFIX}/lib/libtk${SHORT_TK_VER}.so.1
|
2009-02-26 15:19:53 +01:00
|
|
|
|
2016-02-16 10:06:55 +01:00
|
|
|
do-test:
|
|
|
|
cd ${WRKSRC} && ${MAKE} test
|
2007-02-05 14:48:38 +01:00
|
|
|
${ECHO_CMD} "package require Tk" | tclsh${TK_VER}
|
|
|
|
${ECHO_CMD} "load libtk${SHORT_TK_VER}.so" | tclsh${TK_VER}
|
|
|
|
|
2016-02-16 10:06:55 +01:00
|
|
|
.include <bsd.port.mk>
|