summaryrefslogtreecommitdiffstats
path: root/x11-toolkits/p5-Tk/Makefile
blob: 79783edf6bd408108323ac981c889f85b3f3f51f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Created by: James FitzGibbon <jfitz@FreeBSD.org>
# $FreeBSD$

PORTNAME=	Tk
PORTVERSION=	804.033
PORTREVISION=	1
CATEGORIES=	x11-toolkits tk perl5
MASTER_SITES=	CPAN
PKGNAMEPREFIX=	p5-

MAINTAINER=	pi@FreeBSD.org
COMMENT=	Re-port of a perl5 interface to Tk8.4

LIB_DEPENDS=	libpng.so:graphics/png \
		libfreetype.so:print/freetype2

OPTIONS_DEFINE=	XFT
OPTIONS_DEFAULT=	XFT
XFT_DESC=	Client-side fonts via libXft

CONFIGURE_ARGS=	X11INC=${LOCALBASE}/include X11LIB=${LOCALBASE}/lib
MAKE_JOBS_UNSAFE=	yes
USES=		jpeg perl5 shebangfix
SHEBANG_FILES=	pTk/Tcl-pTk \
		pTk/mkVFunc
USE_PERL5=	configure
USE_XORG=	x11

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MXFT}
CONFIGURE_ARGS=	XFT=1
USE_XORG+=	xft
.else
CONFIGURE_ARGS=	XFT=0
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
		${WRKSRC}/JPEG/Makefile.PL \
		${WRKSRC}/PNG/Makefile.PL \
		${WRKSRC}/pTk/Makefile.PL

post-configure:
	@${REINPLACE_CMD} \
		-e '/^CC = / s|.*|CC = ${CC}|' \
		-e '/^CCFLAGS = / s|.*|CCFLAGS = ${CFLAGS}|' \
		-e '/^LD = / s|.*|LD = ${CC} ${CFLAGS} ${LDFLAGS}|' \
		-e '/^FULL_AR = / s|.*|FULL_AR = ${AR}|' \
		`${FIND} ${WRKSRC} -name Makefile`

post-stage:
	@${RM} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Tk/pTk/extralibs.ld
	@${RMDIR} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Tk/pTk
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Tk/Tk.so
.for i in Canvas Compound Entry Event HList IO InputO JPEG Listbox Menubutton Mwm NBFrame PNG Pixmap Scale Scrollbar TList Text TixGrid WinPhoto X Xlib
		${STRIP_CMD} \
		    ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Tk/${i}/${i}.so
.endfor

.include <bsd.port.mk>
OpenPOWER on IntegriCloud