1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-20 04:02:27 +00:00
freebsd-ports/x11-toolkits/tk86/Makefile

71 lines
1.8 KiB
Makefile

# Created by: Martin Matuska <mm@FreeBSD.org>
# $FreeBSD$
PORTNAME= tk
PORTVERSION= 8.6.6
CATEGORIES= x11-toolkits
MASTER_SITES= SF/tcl/Tcl/${PORTVERSION} TCLTK/tcl8_6
PKGNAMESUFFIX= ${PORTVERSION:R:S/.//}
DISTNAME= ${PORTNAME}${PORTVERSION}-src
MAINTAINER= tcltk@FreeBSD.org
COMMENT= Graphical toolkit for Tcl
LICENSE= TclTk
LICENSE_NAME= Tcl/Tk License
LICENSE_FILE= ${WRKSRC}/../license.terms
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
OPTIONS_DEFINE= TKMAN DEMOS THREADS
OPTIONS_DEFAULT=THREADS
OPTIONS_SUB= yes
TKMAN_DESC= Install Tk function manpages
DEMOS_DESC= Install demos
XSS_DESC= XScrnSaver support
WRKSRC= ${WRKDIR}/${PORTNAME}${PORTVERSION}/unix
ALL_TARGET= all
INSTALL_TARGET= install-strip
USE_LDCONFIG= yes
USES+= tcl:${SHORT_TK_VER},tea
USE_XORG= x11 xft xscrnsaver
CONFIGURE_ARGS= --enable-xss \
--enable-xft \
--enable-man-suffix=.${MAN_SUFFIX} \
--includedir=${PREFIX}/include/tk${TK_VER}
CONFIGURE_ENV= PORTSDIR=${PORTSDIR}
CFLAGS+= -I${TCL_INCLUDEDIR} \
-I${LOCALBASE}/include
TK_VER= ${PORTVERSION:R}
SHORT_TK_VER= ${TK_VER:S/.//}
MAN_SUFFIX= ${PKGBASE}
MAKE_ENV= SHORT_TK_VER=${SHORT_TK_VER}
PLIST_SUB= TK_VER=${TK_VER} \
SHORT_TK_VER=${SHORT_TK_VER}
DEMOS_INSTALL_TARGET= install-demos
TKMAN_INSTALL_TARGET= install-doc
THREADS_CONFIGURE_ENABLE= threads
post-patch:
${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
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}
.include <bsd.port.mk>