diff options
author | sunpoet <sunpoet@FreeBSD.org> | 2012-01-30 12:48:57 +0800 |
---|---|---|
committer | sunpoet <sunpoet@FreeBSD.org> | 2012-01-30 12:48:57 +0800 |
commit | 49e1c280037a6e78b0167ae039f9a9a04419fd98 (patch) | |
tree | db1be3b24a7678cf5035dfb299ecd69030670bdd /x11-toolkits | |
parent | 392968e52e472c073117fcc085cb52cebf78b04b (diff) | |
download | freebsd-ports-gnome-49e1c280037a6e78b0167ae039f9a9a04419fd98.tar.gz freebsd-ports-gnome-49e1c280037a6e78b0167ae039f9a9a04419fd98.tar.zst freebsd-ports-gnome-49e1c280037a6e78b0167ae039f9a9a04419fd98.zip |
- Use OPTIONS
- Use REINPLACE_CMD to modify makefiles (Makefile and Makefile.PL)
Diffstat (limited to 'x11-toolkits')
-rw-r--r-- | x11-toolkits/p5-Tk/Makefile | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/x11-toolkits/p5-Tk/Makefile b/x11-toolkits/p5-Tk/Makefile index b53c5f23ffc5..e2cde1e32ec0 100644 --- a/x11-toolkits/p5-Tk/Makefile +++ b/x11-toolkits/p5-Tk/Makefile @@ -17,6 +17,8 @@ COMMENT= A re-port of a perl5 interface to Tk8.4 LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \ png.6:${PORTSDIR}/graphics/png +OPTIONS= XFT "Client-side fonts via libXft (experimental)" off + CONFIGURE_ARGS= X11INC=${LOCALBASE}/include X11LIB=${LOCALBASE}/lib MAKE_JOBS_UNSAFE= yes PERL_CONFIGURE= yes @@ -142,34 +144,25 @@ MAN3= Tie::Watch.3 \ Tk::tkvars.3 \ Tk::widgets.3 -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> .if defined(WITH_XFT) CONFIGURE_ARGS= XFT=1 USE_XORG+= xft .endif -.if !defined(WITH_XFT) -pre-everything:: - @${ECHO_MSG} "===>" - @${ECHO_MSG} "===> An experimental implementation of client side fonts" - @${ECHO_MSG} "===> and anti-aliased fonts via Xft" - @${ECHO_MSG} "===> can be enabled by defining WITH_XFT" - @${ECHO_MSG} "===>" -.endif - post-patch: - @${PERL} -i -p -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ - ${WRKSRC}/pTk/Makefile.PL \ + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/JPEG/Makefile.PL \ - ${WRKSRC}/PNG/Makefile.PL + ${WRKSRC}/PNG/Makefile.PL \ + ${WRKSRC}/pTk/Makefile.PL post-configure: - @${PERL} -i -p \ - -e 's|^(CC = ).*|$$1 ${CC}|;' \ - -e 's|^(CCFLAGS = ).*|$$1 ${CFLAGS}|;' \ - -e 's|^(LD = ).*|$$1 ${CC} ${CFLAGS} ${LDFLAGS}|;' \ - -e 's|^(FULL_AR = ).*|$$1 ${AR}|' \ + @${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` -.include <bsd.port.post.mk> +.include <bsd.port.mk> |