diff options
author | swills <swills@FreeBSD.org> | 2018-07-10 21:08:37 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2018-07-10 21:08:37 +0800 |
commit | deb989b23cab0a42b30cbe624d8723dc47709859 (patch) | |
tree | c34fa0edcf338470b2c692dd4f0c6e91d064b0a1 /games/assaultcube/Makefile | |
parent | ee7419b64c308812da23a9091e67e12481758a52 (diff) | |
download | freebsd-ports-gnome-deb989b23cab0a42b30cbe624d8723dc47709859.tar.gz freebsd-ports-gnome-deb989b23cab0a42b30cbe624d8723dc47709859.tar.zst freebsd-ports-gnome-deb989b23cab0a42b30cbe624d8723dc47709859.zip |
games/assaultcube: modernize port
PR: 227190
Submitted by: lightside <lightside@gmx.com> (maintainer)
Diffstat (limited to 'games/assaultcube/Makefile')
-rw-r--r-- | games/assaultcube/Makefile | 56 |
1 files changed, 23 insertions, 33 deletions
diff --git a/games/assaultcube/Makefile b/games/assaultcube/Makefile index c59c330cf9c5..33eb034d2ff6 100644 --- a/games/assaultcube/Makefile +++ b/games/assaultcube/Makefile @@ -24,7 +24,6 @@ LICENSE_PERMS_CUBE= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept 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,23 +56,9 @@ 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 - -.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 +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" post-patch: .SILENT ${REINPLACE_CMD} -e '/^CXXFLAGS=/d ; /^CXX=/d ; /^CLIENT_PCH/d ; \ @@ -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> |