freebsd-ports/x11-toolkits/tk86/Makefile
Mathieu Arnold 60d1a83c2a MASTER_SITES cleanup.
- Replace ${MASTER_SITE_FOO} with FOO.
- Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9%
  of the time.)
- Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and
  no hint of what it should be was present.
- Fix some logic.
- And generally, make things more simple and easy to understand.

While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and
SAMBA macros.

Also, replace some EXTRACT_SUFX occurences with USES=tar:*.

Checked by:	make fetch-urlall-list
With hat:	portmgr
Sponsored by:	Absolight
2015-05-14 10:15:04 +00:00

90 lines
2.1 KiB
Makefile

# Created by: Martin Matuska <mm@FreeBSD.org>
# $FreeBSD$
PORTNAME= tk
PORTVERSION= 8.6.4
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
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}
USE_XORG= x11 xft xscrnsaver
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-shared \
--enable-xss \
--enable-xft \
--enable-man-suffix=.${MAN_SUFFIX} \
--with-tcl=${TCL_LIBDIR} \
--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= ${LATEST_LINK}
MAKE_ENV= SHORT_TK_VER=${SHORT_TK_VER}
PLIST_SUB= TK_VER=${TK_VER} \
SHORT_TK_VER=${SHORT_TK_VER}
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDEMOS}
INSTALL_TARGET+= install-demos
PLIST_SUB+= DEMOS=""
.else
PLIST_SUB+= DEMOS="@comment "
.endif
.if ${PORT_OPTIONS:MTKMAN}
INSTALL_TARGET+=install-doc
PLIST_SUB+= MAN=""
.else
PLIST_SUB+= MAN="@comment "
.endif
.if ${PORT_OPTIONS:MTHREADS}
CONFIGURE_ARGS+=--enable-threads
.else
CONFIGURE_ARGS+=--disable-threads
.endif
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>