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

140 lines
3.2 KiB
Makefile

PORTNAME= q2pro
PORTVERSION= ${SVN_REV}
PORTREVISION= 13
CATEGORIES= games
MASTER_SITES= LOCAL/alepulver
MAINTAINER= danfe@FreeBSD.org
COMMENT= Quake II engine modification compatible with R1Q2
WWW= http://q2pro.sourceforge.net/
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/gnu.txt
USES= dos2unix gmake tar:bzip2
WRKSRC= ${WRKDIR}/${PORTNAME}
ALL_TARGET= #
SVN_REV= 142
MAKE_ENV= LIBDIR="${LIBDIR}"
PLIST_SUB= LIBDIR="${LIBDIR:S|${PREFIX}/||}"
LIBDIR= ${PREFIX}/lib/${PORTNAME}
LDFLAGS_i386= -Wl,-znotext
OPTIONS_DEFINE= CLIENT DEDICATED GAME GL SOFT UI
OPTIONS_DEFINE_i386= ASM
OPTIONS_DEFAULT= CLIENT DEDICATED GL SOFT UI
OPTIONS_DEFAULT_i386= ASM
CLIENT_DESC= Build client
DEDICATED_DESC= Build dedicated server
GAME_DESC= Build main game (default mod)
GL_DESC= Build OpenGL renderer
SOFT_DESC= Build software renderer
UI_DESC= Build user interface (for client menus)
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCLIENT}
USES+= sdl
USE_SDL+= sdl
ALL_TARGET+= client
PLIST_SUB+= CLIENT=""
.else
PLIST_SUB+= CLIENT="@comment "
.endif
.if ${PORT_OPTIONS:MDEDICATED}
ALL_TARGET+= server
PLIST_SUB+= DEDICATED=""
.else
PLIST_SUB+= DEDICATED="@comment "
.endif
.if ${PORT_OPTIONS:MGAME}
ALL_TARGET+= game
PLIST_SUB+= GAME=""
.else
PLIST_SUB+= GAME="@comment "
.endif
.if ${PORT_OPTIONS:MGL}
LIB_DEPENDS+= libpng.so:graphics/png
USES+= gl jpeg
USE_GL= gl
ALL_TARGET+= ref_newgl
PLIST_SUB+= GL=""
.else
PLIST_SUB+= GL="@comment "
.endif
.if ${PORT_OPTIONS:MSOFT}
ALL_TARGET+= ref_soft
PLIST_SUB+= SOFT=""
.else
PLIST_SUB+= SOFT="@comment "
.endif
.if ${PORT_OPTIONS:MUI}
ALL_TARGET+= ui
PLIST_SUB+= UI=""
.else
PLIST_SUB+= UI="@comment "
.endif
.if ${PORT_OPTIONS:MASM}
MAKE_ENV+= USE_X86_ASM=yes
.endif
post-patch:
@${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
-e '/png_set_gray_1_2_4_to_8/s|png_set|&_expand|' \
${WRKSRC}/ref_shared/r_images.c
@${REINPLACE_CMD} -E 's|[[:digit:]]+|${SVN_REV}|' \
${WRKSRC}/include/version.h
# Fix the build with -fno-common (for Clang 11 and GCC 10)
@${REINPLACE_CMD} -e '/^unsigned[[:blank:]]*d_8to24table/,+1d' \
${WRKSRC}/ref_soft/sw_main.c
@${REINPLACE_CMD} -e '/\*cl_paused/,+1d' \
${WRKSRC}/source/cl_null.c
do-install:
@${MKDIR} ${STAGEDIR}${LIBDIR}/baseq2
.if ${PORT_OPTIONS:MCLIENT}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/q2pro \
${STAGEDIR}${PREFIX}/bin
.endif
.if ${PORT_OPTIONS:MDEDICATED}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/q2proded \
${STAGEDIR}${PREFIX}/bin
.endif
.if ${PORT_OPTIONS:MGAME}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/game.so \
${STAGEDIR}${LIBDIR}/baseq2
.endif
.if ${PORT_OPTIONS:MGL}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/ref_newgl.so \
${STAGEDIR}${LIBDIR}
.endif
.if ${PORT_OPTIONS:MSOFT}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/ref_soft.so \
${STAGEDIR}${LIBDIR}
.endif
.if ${PORT_OPTIONS:MUI}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/ui.so \
${STAGEDIR}${LIBDIR}
.endif
generate-distfile:
@if [ -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
${ECHO_CMD} "ERROR: the distfile already exists."; \
${FALSE}; \
fi
svn export -r${SVN_REV} \
https://svn.sourceforge.net/svnroot/q2pro/q2pro q2pro
${TAR} jcf ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} q2pro
${RM} -r q2pro
.include "${.CURDIR}/../quake2-data/Makefile.include"
.include <bsd.port.mk>