1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00
freebsd-ports/games/quake2-data/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

87 lines
2.2 KiB
Makefile

PORTNAME= data
PORTVERSION= 3.20
PORTREVISION= 3
CATEGORIES= games
MASTER_SITES= IDSOFTWARE/quake2/:data IDSOFTWARE/quake2/source/:src
PKGNAMEPREFIX= ${Q2PKGNAMEPREFIX}
DISTFILES= ${Q2_UPDATE}:data ${Q2_SRC}:src
MAINTAINER= danfe@FreeBSD.org
COMMENT= Quake II data files
WWW= http://www.idsoftware.com/games/quake/quake2/
# XXX we need info-unzip for q2-314-demo-x86.exe
USES= zip:infozip
NO_WRKSUBDIR= yes
DATADIR= ${Q2DIR}
DOCSDIR= ${PREFIX}/share/doc/${PKGBASE}
Q2_DEMO= q2-314-demo-x86.exe
Q2_SRC= q2src${PORTVERSION:S|.||}.shar.Z
Q2_UPDATE= q2-${PORTVERSION}-x86-full.exe
OPTIONS_DEFINE= MANUAL OPTIMIZED_CFLAGS SHAREWARE
OPTIONS_DEFAULT= OPTIMIZED_CFLAGS
MANUAL_DESC= Install the game HTML manual
SHAREWARE_DESC= Install demo version of the game data
.include "Makefile.include" # must be included before bsd.port.options.mk
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MMANUAL} || ${PORT_OPTIONS:MSHAREWARE}
DISTFILES+= ${Q2_DEMO}:data
.endif
.if ${PORT_OPTIONS:MMANUAL}
PLIST_SUB+= MANUAL=""
.else
PLIST_SUB+= MANUAL="@comment "
.endif
.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
CFLAGS+= -ffast-math -funroll-loops -fomit-frame-pointer \
-fexpensive-optimizations
.endif
.if ${PORT_OPTIONS:MSHAREWARE}
PLIST_SUB+= FULL="@comment " SHAREWARE=""
.else
PLIST_SUB+= FULL="" SHAREWARE="@comment "
SUB_FILES= pkg-message
.endif
do-extract:
@${MKDIR} ${WRKSRC}
@cd ${WRKSRC} && uncompress -c ${DISTDIR}/${Q2_SRC} | \
${TAIL} +434 | ${SH}
@${UNZIP_CMD} -q -d ${WRKSRC} \
${DISTDIR}/${Q2_UPDATE} baseq2/* -x *.dll
.if ${PORT_OPTIONS:MMANUAL}
@${UNZIP_CMD} -ajq -d ${WRKSRC}/DOCS \
${DISTDIR}/${Q2_DEMO} Install/Data/DOCS/*
.endif
.if ${PORT_OPTIONS:MSHAREWARE}
@${RM} ${WRKSRC}/baseq2/pak[^0].pak
@${UNZIP_CMD} -jq -d ${WRKSRC}/baseq2 \
${DISTDIR}/${Q2_DEMO} Install/Data/baseq2/pak0.pak
.endif
post-extract:
@${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC}
post-patch:
@${REINPLACE_CMD} -e 's/__linux__/__unix__/' ${WRKSRC}/q_shared.[ch]
do-install:
@${MKDIR} ${STAGEDIR}${DATADIR}/baseq2
${INSTALL_PROGRAM} ${WRKSRC}/game.so ${STAGEDIR}${DATADIR}/baseq2
${CP} -a ${WRKSRC}/baseq2/* ${STAGEDIR}${DATADIR}/baseq2
.if ${PORT_OPTIONS:MMANUAL}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${CP} -a ${WRKSRC}/DOCS ${STAGEDIR}${DOCSDIR}/manual
.endif
.include <bsd.port.mk>