freebsd-ports/games/uhexen2/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

126 lines
4 KiB
Makefile

PORTNAME= uhexen2
PORTVERSION= 1.5.9
PORTREVISION= 4
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/Hammer%20of%20Thyrion/${PORTVERSION}/Source \
SF/${PORTNAME}/Hexen2%20GameData/gamedata-1.29b:data \
SF/${PORTNAME}/Hexen2%20GameData/hexenworld-pakfiles:hw
DISTNAME= hexen2source-${PORTVERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
gamedata-all-1.29b${EXTRACT_SUFX}:data
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= obscenum999@gmail.com
COMMENT= Hexen II source port supporting Linux/FreeBSD/Unix/Windows
WWW= http://uhexen2.sourceforge.net/
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
USES= gl gmake pkgconfig sdl tar:tgz
USE_GL= gl
USE_SDL= sdl
MAKE_ARGS= X11BASE="${LOCALBASE}"
MAKE_JOBS_UNSAFE= yes
SUB_FILES= pkg-message
OPTIONS_DEFINE= DOCS FLAC MIKMOD OGG OPUS
OPTIONS_DEFINE_i386= ASM
OPTIONS_DEFAULT= HEXEN2 HW MAD OGG VORBIS
OPTIONS_DEFAULT_i386= ASM
OPTIONS_MULTI= BIN
OPTIONS_MULTI_BIN= HEXEN2 HW H2PATCH
OPTIONS_RADIO= MP3LIB VORBISLIB
OPTIONS_RADIO_MP3LIB= MAD MPG123
OPTIONS_RADIO_VORBISLIB= TREMOR VORBIS
OPTIONS_SUB= yes
H2PATCH_DESC= Build game data patching tool
HEXEN2_DESC= Build Hexen II clients and servers
HW_DESC= Build HexenWorld clients and servers
MP3LIB_DESC= MP3 audio codec
VORBISLIB_DESC= Vorbis audio codec
ASM_BUILD_DEPENDS= nasm:devel/nasm
ASM_MAKE_ARGS_OFF= USE_X86_ASM=no
FLAC_LIB_DEPENDS= libFLAC.so:audio/flac
FLAC_MAKE_ARGS= USE_CODEC_FLAC=yes
H2PATCH_MAKE_ARGS= BUILD_H2PATCH=yes
HEXEN2_MAKE_ARGS= BUILD_HEXEN2=yes
HW_DISTFILES= hexenworld-pakfiles-0.15${EXTRACT_SUFX}:hw
HW_MAKE_ARGS= BUILD_HW=yes
MAD_LIB_DEPENDS= libmad.so:audio/libmad
MAD_MAKE_ARGS= MP3LIB=mad
MIKMOD_LIB_DEPENDS= libmikmod.so:audio/libmikmod
MIKMOD_MAKE_ARGS= USE_CODEC_MIKMOD=yes
MPG123_LIB_DEPENDS= libmpg123.so:audio/mpg123
MPG123_MAKE_ARGS= MP3LIB=mpg123
OGG_LIB_DEPENDS= libogg.so:audio/libogg
OGG_MAKE_ARGS_OFF= USE_CODEC_OGG=no
OPUS_IMPLIES= OGG
OPUS_LIB_DEPENDS= libopusfile.so:audio/opusfile
OPUS_MAKE_ARGS= USE_CODEC_OPUS=yes
TREMOR_IMPLIES= OGG
TREMOR_LIB_DEPENDS= libvorbisidec.so:audio/libtremor
TREMOR_MAKE_ARGS= VORBISLIB=tremor
VORBIS_IMPLIES= OGG
VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis
VORBIS_MAKE_ARGS= VORBISLIB=vorbis
.include <bsd.port.options.mk>
.if !${PORT_OPTIONS:MMAD} && !${PORT_OPTIONS:MMPG123}
MAKE_ARGS+= USE_CODEC_MP3=no
.endif
.if !${PORT_OPTIONS:MTREMOR} && !${PORT_OPTIONS:MVORBIS}
MAKE_ARGS+= USE_CODEC_VORBIS=no
.endif
post-extract:
@${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC}
post-patch:
.for f in engine/hexen2/Makefile engine/hexenworld/client/Makefile \
engine/hexenworld/server/Makefile hw_utils/hwmaster/Makefile \
libs/timidity/Makefile h2patch/Makefile
@${REINPLACE_CMD} -e \
'/^CPU_X86/s|=.*|=| ; \
/^CFLAGS/s| -g | | ; \
/^CFLAGS/s| -O2 | | ;' ${WRKSRC}/${f}
.endfor
.for f in engine/h2shared/cd_bsd.c
@${REINPLACE_CMD} -e \
's|"acd0"|"cd0"|' ${WRKSRC}/${f}
.endfor
.for f in engine/hexen2/sys_unix.c engine/hexenworld/client/sys_unix.c
@${REINPLACE_CMD} -e \
'/parms.basedir/s|= cwd;|= "${DATADIR}";|' ${WRKSRC}/${f}
.endfor
do-install:
cd ${WRKDIR} && \
${COPYTREE_SHARE} data1 ${STAGEDIR}${DATADIR} && \
${COPYTREE_SHARE} portals ${STAGEDIR}${DATADIR}
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
post-install-H2PATCH-on:
${INSTALL_PROGRAM} ${WRKSRC}/h2patch/h2patch ${STAGEDIR}${PREFIX}/bin
cd ${WRKDIR} && ${COPYTREE_SHARE} patchdat ${STAGEDIR}${DATADIR}
post-install-HEXEN2-on:
${INSTALL_PROGRAM} ${WRKSRC}/engine/hexen2/glhexen2 ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/engine/hexen2/hexen2 ${STAGEDIR}${PREFIX}/bin
post-install-HW-on:
${INSTALL_PROGRAM} ${WRKSRC}/engine/hexenworld/client/glhwcl ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/engine/hexenworld/client/hwcl ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/engine/hexenworld/server/hwsv ${STAGEDIR}${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/hw_utils/hwmaster/hwmaster ${STAGEDIR}${PREFIX}/bin
cd ${WRKDIR} && ${COPYTREE_SHARE} hw ${STAGEDIR}${DATADIR}
.include <bsd.port.mk>