diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2015-05-09 12:43:56 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2015-05-09 12:43:56 +0000 |
commit | a8ea12c062bc95b8cc9beb98839eed0f98f06117 (patch) | |
tree | 71ba68e3ad2a65a6054bfdec4c68715d30a72113 /games | |
parent | - Add CPE info (diff) |
- Add optional support for using newer libenet from ports
PR: 197605
Submitted by: lightside@gmx.com (maintainer)
Notes
Notes:
svn path=/head/; revision=385887
Diffstat (limited to 'games')
-rw-r--r-- | games/assaultcube/Makefile | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/games/assaultcube/Makefile b/games/assaultcube/Makefile index fafd27359f8f..fc079c9ea3c9 100644 --- a/games/assaultcube/Makefile +++ b/games/assaultcube/Makefile @@ -3,7 +3,7 @@ PORTNAME= assaultcube PORTVERSION= 1.2.0.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= games MASTER_SITES= SF/actiongame/AssaultCube%20Version%20${PORTVERSION} DISTNAME= AssaultCube_v${PORTVERSION} @@ -24,11 +24,8 @@ 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 -GNU_CONFIGURE= yes -ALL_TARGET= libenet +ALL_TARGET= # empty WRKSRC= ${WRKDIR}/AssaultCube_v${PORTVERSION} -CONFIGURE_ARGS= --enable-shared=no --enable-static=yes -CONFIGURE_WRKSRC= ${WRKSRC}/source/enet BUILD_WRKSRC= ${WRKSRC}/source/src SUB_FILES= ${PLIST_FILES:Mbin/*:T} @@ -36,7 +33,7 @@ PORTDATA= config packages scripts PORTDOCS= * PLIST_DIRS= %%DATADIR%%/packages/maps/servermaps/incoming -OPTIONS_DEFINE= DOCS +OPTIONS_DEFINE= DOCS PORT_ENET OPTIONS_MULTI= BUILD OPTIONS_MULTI_BUILD= CLIENT DEDICATED MASTER OPTIONS_DEFAULT= CLIENT DEDICATED @@ -55,6 +52,7 @@ DEDICATED_PLIST_FILES= bin/${PORTNAME}_server libexec/${PORTNAME}_server 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> @@ -64,6 +62,15 @@ DESKTOP_ENTRIES="AssaultCube" "${COMMENT}" \ "Game;" false .endif +.if ${PORT_OPTIONS:MPORT_ENET} +LIB_DEPENDS+= libenet.so:${PORTSDIR}/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| ; \ @@ -73,6 +80,12 @@ post-patch: .SILENT /^CLIENT_LIBS=/s|$$| -lintl| ; \ /^SERVER_LIBS=/s|$$| -L$$(LOCALBASE)/lib|' \ ${BUILD_WRKSRC}/Makefile +.if ${PORT_OPTIONS:MPORT_ENET} + ${SED} -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/*} |