freebsd-ports/games/linux-nwnclient/Makefile
Tijl Coosemans 6140d3c6aa - Autodetect the installed linux_base port and use LINUX_DEFAULT only as
a last resort.
- Construct a list of DISTFILES for every architecture (amd64, i386).
  Select one list for regular make and all lists for make makesum so linux
  ports can have one combined distinfo file.
- Set DIST_SUBDIR?=centos so there's only one copy of common distfiles.
- Use MASTER_SITES and DISTFILES groups so make fetch is a bit smarter.
- Regenerate all distinfo files.
- For linux_base-c6 (just like linux_base-c7 already does) turn bin, lib,
  lib64 and sbin into symbolic links to the same directory under usr.
  This fixes the problem where some programs/libraries exist under / on
  FreeBSD and /usr on Linux or vice versa and then depending on the order
  of search paths Linux programs may run/load FreeBSD programs/libraries
  and fail.
- Turn usr/share/icons into a symbolic link to LOCALBASE/share/icons so
  Linux programs can find desktop theme icons.  This eliminates the need
  for x11-themes/linux*-hicolor-icon-theme.
- Rename pkg-plist.x86_64 to pkg-plist.amd64.
- Regenerate all pkg-plist files.
- Add @preexec to linux_base pkg-plist that moves existing files in bin,
  lib, lib64, sbin and icons to the new destination before the directories
  are turned into symbolic links.
- Remove several empty directories from linux_base ports.
- Sweep over all linux ports: use consistent style, remove old CONFLICTS,
  remove unused pkg-descr files, add NLS option,...
- Remove old linux arts, esound and openssl-compat ports.
2017-01-31 16:54:21 +00:00

95 lines
3.1 KiB
Makefile

# Created by: Erik Olson <erikolson@olsonexpress.com>
# $FreeBSD$
PORTNAME= nwnclient
PORTVERSION= 1.69
PORTREVISION= 4
CATEGORIES= games linux
MASTER_SITES= http://na.llnet.bioware.cdn.ea.com/u/f/eagames/bioware/neverwinternights/updates/linux/${PORTVERSION:S/.//}/:CLIENT \
http://nwdownloads.bioware.com/neverwinternights/linux/129/:ORIG \
http://nwdownloads.bioware.com/neverwinternights/linux/gold/:GOLD \
http://nwdownloads.bioware.com/neverwinternights/linux/161/:HOTU \
http://home.roadrunner.com/~nwmovies/nwmovies/: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
BROKEN= does not fetch
RUN_DEPENDS= ${LOCALBASE}/share/nwndata/docs/readme.txt:games/nwndata
NO_BUILD= yes
RESTRICTED= Distribution not allowed
USES= linux
USE_LINUX= dri sdl12 xorglibs
NWNDATADIR= ${LOCALBASE}/share/nwndata
OPTIONS_DEFINE= NWMOVIES
NWMOVIES_DESC= Support for movies using BinkPlayer
.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.zip
CLIENT_NWMOVIES=${NWMOVIESFILE}:NWMOVIES \
${BINKPLAYERFILE}:BINK
USE_LINUX+= mikmod 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>