svn commit: r474365 - head/games/assaultcube
Steve Wills
swills at FreeBSD.org
Tue Jul 10 13:08:38 UTC 2018
Author: swills
Date: Tue Jul 10 13:08:37 2018
New Revision: 474365
URL: https://svnweb.freebsd.org/changeset/ports/474365
Log:
games/assaultcube: modernize port
PR: 227190
Submitted by: lightside <lightside at gmx.com> (maintainer)
Modified:
head/games/assaultcube/Makefile (contents, props changed)
Modified: head/games/assaultcube/Makefile
==============================================================================
--- head/games/assaultcube/Makefile Tue Jul 10 13:05:09 2018 (r474364)
+++ head/games/assaultcube/Makefile Tue Jul 10 13:08:37 2018 (r474365)
@@ -24,7 +24,6 @@ LICENSE_PERMS_CUBE= dist-mirror dist-sell pkg-mirror p
LICENSE_PERMS_OTHER= dist-mirror pkg-mirror auto-accept
USES= gmake tar:bzip2
-ALL_TARGET= # empty
LLD_UNSAFE= yes
WRKSRC= ${WRKDIR}/AssaultCube_v${PORTVERSION}
BUILD_WRKSRC= ${WRKSRC}/source/src
@@ -32,7 +31,7 @@ SUB_FILES= ${PLIST_FILES:Mbin/*:T}
PORTDATA= config packages scripts
PORTDOCS= *
-PLIST_DIRS= %%DATADIR%%/packages/maps/servermaps/incoming
+PLIST_DIRS= ${DATADIR}/packages/maps/servermaps/incoming
OPTIONS_DEFINE= DOCS PORT_ENET
OPTIONS_MULTI= BUILD
@@ -45,6 +44,9 @@ CLIENT_USE= GL=gl SDL=image,sdl XORG=x11
CLIENT_LIB_DEPENDS= libvorbisfile.so:audio/libvorbis \
libcurl.so:ftp/curl
CLIENT_ALL_TARGET= client
+CLIENT_DESKTOP_ENTRIES= "AssaultCube" "${COMMENT}" \
+ "${PREFIX}/share/pixmaps/${PORTNAME}.png" "${PORTNAME}_client" \
+ "Game;" false
CLIENT_PLIST_FILES= bin/${PORTNAME}_client libexec/${PORTNAME}_client \
share/pixmaps/${PORTNAME}.png
DEDICATED_DESC= Build dedicated server
@@ -54,24 +56,10 @@ MASTER_DESC= Build master server
MASTER_ALL_TARGET= master
MASTER_PLIST_FILES= bin/${PORTNAME}_master libexec/${PORTNAME}_master
PORT_ENET_DESC= Use libenet from net/enet
+PORT_ENET_CONFIGURE_OFF= --enable-shared=no --enable-static=yes
+PORT_ENET_LIB_DEPENDS= libenet.so:net/enet
+PORT_ENET_VARS_OFF= GNU_CONFIGURE=yes CONFIGURE_WRKSRC="${WRKSRC}/source/enet"
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MCLIENT}
-DESKTOP_ENTRIES="AssaultCube" "${COMMENT}" \
- "${PREFIX}/share/pixmaps/${PORTNAME}.png" "${PORTNAME}_client" \
- "Game;" false
-.endif
-
-.if ${PORT_OPTIONS:MPORT_ENET}
-LIB_DEPENDS+= libenet.so:net/enet
-.else
-ALL_TARGET+= libenet
-GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --enable-shared=no --enable-static=yes
-CONFIGURE_WRKSRC= ${WRKSRC}/source/enet
-.endif
-
post-patch: .SILENT
${REINPLACE_CMD} -e '/^CXXFLAGS=/d ; /^CXX=/d ; /^CLIENT_PCH/d ; \
/^INCLUDES=/s|$$| -I$$(LOCALBASE)/include| ; \
@@ -81,26 +69,28 @@ post-patch: .SILENT
/^CLIENT_LIBS=/s|$$| $$(LDFLAGS) -lintl| ; \
/^SERVER_LIBS=/s|$$| $$(LDFLAGS) -L$$(LOCALBASE)/lib|' \
${BUILD_WRKSRC}/Makefile
-.if ${PORT_OPTIONS:MPORT_ENET}
- ${SED} -i '.port_enet.bak' -e 's/libenet // ; \
+
+post-patch-PORT_ENET-on:
+ @${REINPLACE_CMD} -i '.port_enet.bak' -e 's/libenet // ; \
s|-I\.\./enet/include|| ; \
s|-L\.\./enet/\.libs||' \
${BUILD_WRKSRC}/Makefile
-.endif
do-install:
-.for f in ${PLIST_FILES:Mbin/*}
- ${INSTALL_SCRIPT} ${WRKDIR}/${f:T} ${STAGEDIR}${PREFIX}/${f}
-.endfor
-.for f in ${PLIST_FILES:Mlibexec/*}
- ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${f:T:S/${PORTNAME}/ac/} \
- ${STAGEDIR}${PREFIX}/${f}
-.endfor
-.if ${PORT_OPTIONS:MCLIENT}
- ${INSTALL_DATA} ${WRKSRC}/docs/images/icon.png \
- ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
-.endif
(cd ${WRKSRC} && ${COPYTREE_SHARE} "${PORTDATA}" ${STAGEDIR}${DATADIR})
+
+do-install-DOCS-on:
(cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
+
+do-install-CLIENT-on:
+ ${INSTALL_DATA} ${WRKSRC}/docs/images/icon.png \
+ ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
+
+.for f in client master server
+post-install-${f:S|server|DEDICATED|:tu}-on:
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}_${f} ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ac_${f} \
+ ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}_${f}
+.endfor
.include <bsd.port.mk>
More information about the svn-ports-all
mailing list