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

99 lines
3.2 KiB
Makefile

PORTNAME= nwnclient
PORTVERSION= 1.69
PORTREVISION= 5
CATEGORIES= games linux
NWN_SITE_1= http://na.llnet.bioware.cdn.ea.com/u/f/eagames/bioware/neverwinternights/updates/linux/
NWN_SITE_2= http://lvlt.bioware.cdn.ea.com/bioware/u/f/eagames/bioware/neverwinternights/updates/linux/
MASTER_SITES= ${NWN_SITE_1}${PORTVERSION:S/.//}/:CLIENT \
${NWN_SITE_2}${PORTVERSION:S/.//}/:CLIENT \
${NWN_SITE_1}:ORIG,GOLD,HOTU \
${NWN_SITE_2}:ORIG,GOLD,HOTU \
https://github.com/nwnlinux/nwmovies/raw/master/:NWMOVIES \
http://www.radgametools.com/down/Bink/:BINK
PKGNAMEPREFIX= linux-
DISTFILES= ${CLIENT_FILES} \
${CLIENT_NWMOVIES}
DIST_SUBDIR= ${PKGNAMEPREFIX}${PORTNAME}
MAINTAINER= scf@FreeBSD.org
COMMENT= Neverwinter Nights Linux (x86) Client
WWW= http://www.neverwinternights.info/
# Converted from RESTRICTED
LICENSE= nwnclient
LICENSE_NAME= nwnclient
LICENSE_TEXT= Distribution not allowed
LICENSE_PERMS= auto-accept
RUN_DEPENDS= ${LOCALBASE}/share/nwndata/docs/readme.txt:games/nwndata
NO_BUILD= yes
USES= linux
USE_LINUX= dri sdl12 xorglibs
NWNDATADIR= ${LOCALBASE}/share/nwndata
OPTIONS_DEFINE= NWMOVIES
NWMOVIES_DESC= Support for movies using BinkPlayer (experimental!)
.include <bsd.port.options.mk>
# Client detection. Currently, detects only original and Diamond editions.
.if exists(${LOCALBASE}/share/nwndata/xp2.key)
CLIENT_FILES= nwclientgold.tar.gz:GOLD \
nwclienthotu.tar.gz:HOTU \
English_linuxclient169_xp2.tar.gz:CLIENT
.if ${PORT_OPTIONS:MNWMOVIES}
NWMOVIESFILE= nwmovies-v4-public.20090223.080954.tar.gz
BINKPLAYERFILE= BinkLinuxPlayer.7z
CLIENT_NWMOVIES=${NWMOVIESFILE}:NWMOVIES \
${BINKPLAYERFILE}:BINK
USE_LINUX+= sdlmixer
PLIST_SUB+= NWMOVIES=""
.else
PLIST_SUB+= NWMOVIES="@comment "
.endif
PLIST_SUB+= DIAMOND="" ORIGINAL="@comment "
.else
CLIENT_FILES= nwclient129.tar.gz:ORIG \
English_linuxclient${PORTVERSION:S/.//}_orig.tar.gz:CLIENT
PLIST_SUB+= NWMOVIES="@comment " DIAMOND="@comment " ORIGINAL=""
.endif
do-extract:
${MKDIR} ${WRKSRC}
.for _distfile in ${CLIENT_FILES:C/:.*$//g} ${BINKPLAYERFILE}
(cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
${_DISTDIR}/${_distfile} ${EXTRACT_AFTER_ARGS})
.endfor
.if defined(BINKPLAYERFILE)
(cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
${_DISTDIR}/${NWMOVIESFILE} ${EXTRACT_AFTER_ARGS} \
nwmovies/binklib.so nwmovies/libdis/libdisasm.so \
nwmovies/nwmovies.so)
(cd ${WRKSRC} && ${MV} BinkPlayer nwmovies)
.endif
${RM} ${WRKSRC}/lib/libSDL* ${WRKSRC}/fixinstall ${WRKSRC}/nwn
if [ -d ${WRKSRC}/SDL-1.2.5 ]; then \
${RM} ${WRKSRC}/SDL-1.2.5/*; \
${RMDIR} ${WRKSRC}/SDL-1.2.5; \
fi
@${FIND} ${WRKSRC} -type f -name ".*" -delete
do-configure:
${SED} -e 's|%%NWNDATADIR%%|${NWNDATADIR}|' \
-e 's|%%NWNCLIENTDIR%%|${DATADIR}|' \
<${FILESDIR}/nwn.sh >${WRKDIR}/nwn
do-install:
${MKDIR} ${STAGEDIR}${DATADIR}
(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
(cd ${STAGEDIR}${DATADIR} && ${CHMOD} 0755 dmclient nwmain nwserver)
.if defined(BINKPLAYERFILE)
(cd ${STAGEDIR}${DATADIR} && ${CHMOD} 0755 nwmovies/BinkPlayer)
(cd ${STAGEDIR}${DATADIR}/nwmovies && ${LN} -s /compat/linux/usr/lib/libX11.so.6 libX11.so)
${INSTALL_SCRIPT} ${FILESDIR}/nwmovies.pl ${STAGEDIR}${DATADIR}
.endif
${INSTALL_SCRIPT} ${WRKDIR}/nwn ${STAGEDIR}${PREFIX}/bin/
.include <bsd.port.mk>