1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Convert my ports to target option helpers

This commit is contained in:
Jan Beich 2015-07-19 07:42:21 +00:00
parent 3c26cddf47
commit aa96a521bc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=392488
6 changed files with 34 additions and 48 deletions

View File

@ -38,27 +38,25 @@ PDA_DESC= Fit window size to screen on small PDA devices
PDA_CFLAGS?= -DPDA_AUTOSIZE
UTF8_CFLAGS?= -DUTF8_CAPTION -DUTF8_FILESYSTEM
.include <bsd.port.options.mk>
post-patch:
.if ! ${PORT_OPTIONS:MLUA}
@${REINPLACE_CMD} '/optional: lua/,/^$$/d' ${WRKSRC}/${MAKEFILE}
.endif
@${REINPLACE_CMD} -e 's/$$(LIBS)/$$(LDFLAGS) &/' \
${WRKSRC}/Makefile.onscripter
@${REINPLACE_CMD} -e 's/luaL_checkint/(int)&eger/' \
${WRKSRC}/LUAHandler.cpp
post-patch-LUA-off:
@${REINPLACE_CMD} '/optional: lua/,/^$$/d' ${WRKSRC}/${MAKEFILE}
.if !target(do-install)
do-install:
.for f in ${PLIST_FILES:T}
${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin
.endfor
.if ${PORT_OPTIONS:MDOCS}
post-install-DOCS-on:
(cd ${WRKSRC}/www && ${COPYTREE_SHARE} \
. ${STAGEDIR}${DOCSDIR} \
"! -name *.orig ! -name *.bak")
.endif
.endif # do-install
.include <bsd.port.mk>

View File

@ -45,34 +45,30 @@ MANPAGES_PLIST_FILES=\
man/man7/ponscr-syntax.7.gz \
man/man7/ponscripter.7.gz
.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e '/^ifdef DEBUG/,/^$$/d' \
-e 's/$$STRIPFLAG/${STRIP}/' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's/$$(LIBS)/$$(LDFLAGS) &/' \
${WRKSRC}/src/Makefile.ponscripter
.if ! ${PORT_OPTIONS:MMANPAGES}
post-patch-MANPAGES-off:
@${REINPLACE_CMD} -i .manpages.bak \
-e '/install-man/d' \
-e 's/xmlto/${FALSE}/' \
${WRKSRC}/configure
.endif
post-build:
.if ${PORT_OPTIONS:MMANPAGES}
post-build-MANPAGES-on:
# Remove extraneous whitespace to unbreak manpage syntax
${REINPLACE_CMD} -e 's/^[[:space:]]*//; /^$$/d' \
${WRKSRC}/doc/*.[0-9]
.endif
post-install:
${INSTALL_DATA} ${WRKSRC}/misc/ponscripter-mode.el \
${STAGEDIR}${PREFIX}/share/emacs/site-lisp
.if ${PORT_OPTIONS:MDOCS}
post-install-DOCS-on:
(cd ${WRKSRC} && ${COPYTREE_SHARE} \
"${PORTDOCS}" ${STAGEDIR}${DOCSDIR})
.endif
.include <bsd.port.mk>

View File

@ -95,10 +95,10 @@ post-install:
! -name saves ! -name log.txt")
${CHMOD} +x ${STAGEDIR}${DATADIR}/renpy.py
${CHMOD} -R u+w ${STAGEDIR}${DATADIR}/templates
.if ${PORT_OPTIONS:MDOCS}
post-install-DOCS-on:
(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \
. ${STAGEDIR}${DOCSDIR} \
"! -name *.orig ! -name *.bak")
.endif
.include <bsd.port.mk>

View File

@ -57,8 +57,6 @@ TEST_BUILD_DEPENDS=googletest>=1.7.0:${PORTSDIR}/devel/googletest \
luabind>0:${PORTSDIR}/devel/luabind
TEST_EXTRA_PATCHES_OFF=${FILESDIR}/extra-patch-disable-test
.include <bsd.port.options.mk>
post-patch:
@${GREP} -Flr 'utf8cpp/' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \
-i .bak.utf8cpp -e 's,utf8cpp/,,'
@ -70,10 +68,8 @@ post-patch:
-e 's,truetype/mona,TrueType,' \
-e 's,truetype/[^/"]*,TTF,'
pre-install:
.if ${PORT_OPTIONS:MTEST}
pre-install-TEST-on:
(cd ${WRKSRC} && build/${PORTNAME}_unittests)
.endif
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/build/${PORTNAME} \
@ -87,15 +83,15 @@ do-install:
${INSTALL_DATA} -v $$f \
${STAGEDIR}${PREFIX}/share/icons/hicolor/$${f%/*}x$${f%/*}/apps; \
done)
.if ${PORT_OPTIONS:MNLS}
post-install-NLS-on:
(cd ${WRKSRC}/build/locale && ${COPYTREE_SHARE} \
. ${STAGEDIR}${PREFIX}/share/locale)
.endif
.if ${PORT_OPTIONS:MDOCS}
post-install-DOCS-on:
(cd ${WRKSRC} && ${COPYTREE_SHARE} \
"${PORTDOCS:Nnotes}" ${STAGEDIR}${DOCSDIR})
(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} \
notes ${STAGEDIR}${DOCSDIR})
.endif
.include <bsd.port.mk>

View File

@ -70,19 +70,7 @@ post-patch:
${WRKSRC}/Qt/Settings.pri
do-install:
.if ! ${PORT_OPTIONS:MQT*}
# cmake doesn't pack assets into the app unlike qmake
# XXX Convert to ${PORTDATA:N${PORTNAME}} once fmake is EOL
(cd ${INSTALL_WRKSRC} && ${COPYTREE_SHARE} \
"${PORTDATA:Nppsspp}" ${STAGEDIR}${DATADIR})
# Install the app alongside assets to avoid warnings with GetExeDirectory()
${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME:tu}* \
${STAGEDIR}${DATADIR}/${PORTNAME}
${LN} -sf ${DATADIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
.else
${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \
${STAGEDIR}${PREFIX}/bin
.endif
# XXX Vendor install is incomplete
${INSTALL_DATA} ${WRKSRC}/debian/${PORTNAME}.desktop \
${STAGEDIR}${DESKTOPDIR}
${INSTALL_MAN} ${WRKSRC}/debian/${PORTNAME}.1 \
@ -93,4 +81,18 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/assets/unix-icons/icon-512.svg \
${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${PORTNAME}.svg
post-install-SDL-on:
# cmake doesn't pack assets into the app unlike qmake
# XXX Convert to ${PORTDATA:N${PORTNAME}} once fmake is EOL
(cd ${INSTALL_WRKSRC} && ${COPYTREE_SHARE} \
"${PORTDATA:Nppsspp}" ${STAGEDIR}${DATADIR})
# Install the app alongside assets to avoid warnings with GetExeDirectory()
${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME:tu}* \
${STAGEDIR}${DATADIR}/${PORTNAME}
${LN} -sf ${DATADIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
post-install-SDL-off:
${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \
${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>

View File

@ -71,8 +71,6 @@ ZENITY_RUN_DEPENDS=xdg-open:${PORTSDIR}/devel/xdg-utils \
zenity:${PORTSDIR}/x11/zenity
ZENITY_DESC= Use native crash dialog
.include <bsd.port.options.mk>
post-extract:
@${MKDIR} ${WRKSRC}/thirdparty/download
@${CP} -v ${DISTFILES:C/:.*//:N*.tar*:N*.zip:S,^,${_DISTDIR}/,} \
@ -102,19 +100,15 @@ post-patch:
${REINPLACE_CMD} -e 's/"BSD"/"${OPSYS}"/' \
${WRKSRC}/OpenRA.Game/Platform.cs
post-build:
.if ${PORT_OPTIONS:MDOCS}
post-build-DOCS-on:
@${ECHO_MSG} Generating HTML documentation...
@for f in ${WRKSRC}/*.md; do \
${ECHO_MSG} markdown $$f -\> $${f%.md}.html; \
markdown $$f >$${f%.md}.html; \
done
.endif
post-install:
.if ${PORT_OPTIONS:MDOCS}
post-install-DOCS-on:
(cd ${WRKSRC} && ${COPYTREE_SHARE} \
"${PORTDOCS}" ${STAGEDIR}${DOCSDIR})
.endif
.include <bsd.port.mk>