freebsd-ports/games/assaultcube/Makefile
Stefan Eßer b7f05445c0 Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.

Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.

There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.

This commit implements such a proposal and moves one of the WWW: entries
of each pkg-descr file into the respective port's Makefile. A heuristic
attempts to identify the most relevant URL in case there is more than
one WWW: entry in some pkg-descr file. URLs that are not moved into the
Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr
files in order to preserve them.

There are 1256 ports that had no WWW: entries in pkg-descr files. These
ports will not be touched in this commit.

The portlint port has been adjusted to expect a WWW entry in each port
Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as
deprecated.

Approved by:		portmgr (tcberner)
2022-09-07 23:10:59 +02:00

95 lines
3.3 KiB
Makefile

PORTNAME= assaultcube
PORTVERSION= 1.2.0.2
PORTREVISION= 7
CATEGORIES= games
MASTER_SITES= SF/actiongame/AssaultCube%20Version%20${PORTVERSION}
DISTNAME= AssaultCube_v${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= Total conversion of the FPS game called Cube
WWW= https://assault.cubers.net/
LICENSE= ACUBE CUBE MIT OTHER
LICENSE_COMB= multi
LICENSE_NAME_ACUBE= AssaultCube ZLIB-like license with additions
LICENSE_NAME_CUBE= Cube game engine ZLIB-like license with additions
LICENSE_NAME_OTHER= various package licences
LICENSE_FILE_ACUBE= ${WRKSRC}/source/README.txt
LICENSE_FILE_CUBE= ${WRKSRC}/source/README_CUBEENGINE.txt
LICENSE_FILE_OTHER= ${WRKSRC}/docs/package_copyrights.txt
LICENSE_PERMS_ACUBE= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
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
LDFLAGS_i386= -Wl,-znotext
WRKSRC= ${WRKDIR}/AssaultCube_v${PORTVERSION}
BUILD_WRKSRC= ${WRKSRC}/source/src
SUB_FILES= ${PLIST_FILES:Mbin/*:T}
PORTDATA= config packages scripts
PORTDOCS= *
PLIST_DIRS= ${DATADIR}/packages/maps/servermaps/incoming
OPTIONS_DEFINE= DOCS PORT_ENET
OPTIONS_MULTI= BUILD
OPTIONS_MULTI_BUILD= CLIENT DEDICATED MASTER
OPTIONS_DEFAULT= CLIENT DEDICATED
CLIENT_DESC= Build client
CLIENT_USES= compiler:c++11-lang gettext-runtime gl openal:al sdl \
xorg
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
DEDICATED_ALL_TARGET= server
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
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 ; \
/^INCLUDES=/s|$$| -I$$(LOCALBASE)/include| ; \
s|-I/usr/include || ; \
s|sdl-config|$$(SDL_CONFIG)| ; \
s|$$(USRLIB)|$$(LOCALBASE)/lib| ; \
/^CLIENT_LIBS=/s|$$| $$(LDFLAGS) -lintl| ; \
/^SERVER_LIBS=/s|$$| $$(LDFLAGS) -L$$(LOCALBASE)/lib|' \
${BUILD_WRKSRC}/Makefile
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
do-install:
(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>