diff options
author | des <des@FreeBSD.org> | 2004-03-01 23:20:02 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2004-03-01 23:20:02 +0000 |
commit | 5992813b846ade2ca8b32cf4fafbee90b97d7ff7 (patch) | |
tree | 783511b0f0f25b4c379972ad2098fd53f200ee25 /games/linux-nwnclient | |
parent | c5649eff522b8a6d7a421c0267a01b1ffe68b1fe (diff) | |
download | FreeBSD-ports-5992813b846ade2ca8b32cf4fafbee90b97d7ff7.zip FreeBSD-ports-5992813b846ade2ca8b32cf4fafbee90b97d7ff7.tar.gz |
Take over maintainership, and upgrade to 1.62.
Add a wrapper script that creates a client directory with symlinks to
the data files so users don't need any privileges to play the game.
Use the linux-sdl port instead of the SDL library that comes with the
client.
Diffstat (limited to 'games/linux-nwnclient')
-rw-r--r-- | games/linux-nwnclient/Makefile | 83 | ||||
-rw-r--r-- | games/linux-nwnclient/distinfo | 4 | ||||
-rw-r--r-- | games/linux-nwnclient/files/nwn.sh | 82 | ||||
-rw-r--r-- | games/linux-nwnclient/files/patch-aa | 14 | ||||
-rw-r--r-- | games/linux-nwnclient/pkg-install | 16 | ||||
-rw-r--r-- | games/linux-nwnclient/pkg-plist | 76 |
6 files changed, 151 insertions, 124 deletions
diff --git a/games/linux-nwnclient/Makefile b/games/linux-nwnclient/Makefile index f7ec89d..ff331e1 100644 --- a/games/linux-nwnclient/Makefile +++ b/games/linux-nwnclient/Makefile @@ -5,71 +5,46 @@ # $FreeBSD$ # -PORTNAME= linux_nwnclient -PORTVERSION= 1.30 +PORTNAME= nwnclient +PKGNAMEPREFIX= linux- +PORTVERSION= 1.62 CATEGORIES= games linux MASTER_SITES= http://nwdownloads.bioware.com/neverwinternights/linux/${PORTVERSION:S/.//}/ \ http://nwdownloads.bioware.com/neverwinternights/linux/129/ -DISTFILES= nwclient129.tar.gz linuxclientupdate129to${PORTVERSION:S/.//}.tar.gz +DISTFILES= nwclient129.tar.gz \ + linuxclientupdate129to${PORTVERSION:S/.//}eng.tar.gz -MAINTAINER= ports@FreeBSD.org +MAINTAINER= des@FreeBSD.org COMMENT= Neverwinter Nights Linux (x86) Client -RUN_DEPENDS= /compat/linux/usr/games/nwn/nwm:${PORTSDIR}/games/linux_nwndata \ - /compat/linux/usr/X11R6/lib/libGL.so.1.2:${PORTSDIR}/graphics/linux_dri +RUN_DEPENDS= ${LOCALBASE}/share/nwndata/NWNv129.txt:${PORTSDIR}/games/nwndata \ + /compat/linux/usr/X11R6/lib/libGL.so.1.2:${PORTSDIR}/graphics/linux_dri \ + /compat/linux/usr/lib/libSDL-1.2.so.0:${PORTSDIR}/devel/linux-sdl12 USE_LINUX= yes -USE_LINUX_PREFIX= yes NO_BUILD= yes ONLY_FOR_ARCHS= i386 -NWNDIR= usr/games/nwn -WRKSRC= ${WRKDIR} -INSTALL_DIR= ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 -PLIST_SUB+= NWNDIR="${NWNDIR}" -# Linux binary should not be stripped by INSTALL_PROGRAM -# because as a side effect it brands the binary as FreeBSD. -STRIP= +NWNDATADIR= ${LOCALBASE}/share/nwndata -do-install: - ${INSTALL_DIR} ${PREFIX}/${NWNDIR} - ${INSTALL_DIR} ${PREFIX}/${NWNDIR}/miles - ${INSTALL_DIR} ${PREFIX}/${NWNDIR}/override - ${INSTALL_DIR} ${PREFIX}/${NWNDIR}/lib - ${INSTALL_DIR} ${PREFIX}/${NWNDIR}/nwm - ${INSTALL_DIR} ${PREFIX}/${NWNDIR}/data -.for f in nwmain nwserver - ${INSTALL_PROGRAM} ${WRKDIR}/${f} ${PREFIX}/${NWNDIR} -.endfor -.for f in dmclient fixinstall nwn - ${INSTALL_SCRIPT} ${WRKDIR}/${f} ${PREFIX}/${NWNDIR} -.endfor -.for f in nwn.ini movies-OC.txt dialog.tlk patch.key - ${INSTALL_DATA} ${WRKDIR}/${f} ${PREFIX}/${NWNDIR} -.endfor -.for f in miles/mssdsp.flt miles/mssmp3.asi miles/msssoft.m3d miles/libmss.so.6.5.2 miles/libmss.so.6 miles/libmss.so - ${INSTALL_DATA} ${WRKDIR}/${f} ${PREFIX}/${NWNDIR}/miles -.endfor -.for f in data/patch.bif - ${INSTALL_DATA} ${WRKDIR}/${f} ${PREFIX}/${NWNDIR}/data -.endfor -.for f in nwm/Chapter1.nwm nwm/Chapter1E.nwm nwm/Chapter2.nwm nwm/Chapter3.nwm nwm/Prelude.nwm - ${INSTALL_DATA} ${WRKDIR}/${f} ${PREFIX}/${NWNDIR}/nwm +do-extract: + ${MKDIR} ${WRKSRC} +.for _distfile in ${DISTFILES} + (cd ${WRKSRC} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \ + ${DISTDIR}/${_distfile} ${EXTRACT_AFTER_ARGS}) .endfor -.for f in override/soundprovider.2da override/load_legal2.tga override/load_legal.tga - # Removed - override/gui_srv_lst_pnl.tga - ${INSTALL_DATA} ${WRKDIR}/${f} ${PREFIX}/${NWNDIR}/override -.endfor -.for f in lib/libSDL-1.2.so.0 lib/libSDL-1.2.so.0.0.5 - ${INSTALL_PROGRAM} ${WRKDIR}/${f} ${PREFIX}/${NWNDIR}/lib -.endfor -.ifndef (NOPORTDOCS) - @${MKDIR} ${DOCSDIR} -.for f in readme.txt readme-SDL.txt EULA.txt NWNv130.txt readme.linuxserver.txt - ${INSTALL_DATA} ${WRKDIR}/${f} ${DOCSDIR} -.endfor -.endif -# cd ${PREFIX}/${NWNDIR}/ ; /compat/linux/bin/bash ./fixinstall - ${CHOWN} -R root:games ${PREFIX}/${NWNDIR}/ - ${CHMOD} -R 775 ${PREFIX}/${NWNDIR}/ + ${RM} ${WRKSRC}/lib/libSDL* ${WRKSRC}/fixinstall ${WRKSRC}/nwn + +do-configure: + ${SED} -e 's|%%NWNDATADIR%%|${NWNDATADIR}|' \ + -e 's|%%NWNCLIENTDIR%%|${DATADIR}|' \ + <${FILESDIR}/nwn.sh >${WRKDIR}/nwn + +do-install: + ${MKDIR} ${DATADIR} + (cd ${WRKSRC} && ${FIND} . -print | \ + ${CPIO} -pdmuv -R${SHAREOWN}:${SHAREGRP} ${DATADIR}) + ${LN} -s ${LINUXBASE}/usr/lib/libstdc++-2-libc6.1-1-2.9.0.so \ + ${DATADIR}/lib/libstdc++-libc6.1-2.so.3 + ${INSTALL_PROGRAM} ${WRKDIR}/nwn ${PREFIX}/bin/ .include <bsd.port.mk> diff --git a/games/linux-nwnclient/distinfo b/games/linux-nwnclient/distinfo index 9d03ebd..c7197e8 100644 --- a/games/linux-nwnclient/distinfo +++ b/games/linux-nwnclient/distinfo @@ -1,4 +1,4 @@ MD5 (nwclient129.tar.gz) = 73c6515fd6aa5f860802098a55000ae8 SIZE (nwclient129.tar.gz) = 5504342 -MD5 (linuxclientupdate129to130.tar.gz) = 658bd6a2865eeb599c6730b743a852c8 -SIZE (linuxclientupdate129to130.tar.gz) = 40640188 +MD5 (linuxclientupdate129to162eng.tar.gz) = 89f373e0a5e0042912a3a214ebf4436b +SIZE (linuxclientupdate129to162eng.tar.gz) = 71917130 diff --git a/games/linux-nwnclient/files/nwn.sh b/games/linux-nwnclient/files/nwn.sh new file mode 100644 index 0000000..f48bdab --- /dev/null +++ b/games/linux-nwnclient/files/nwn.sh @@ -0,0 +1,82 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +NWNDATADIR="%%NWNDATADIR%%" +NWNCLIENTDIR="%%NWNCLIENTDIR%%" +NWNUSERDIR="${HOME}/.nwn" +LCDIRS="ambient data dmvault hak localvault music override portraits" + +set -e + +# Copy a directory structure and symlink its contents +copydir() { + set -e + cd "$1" + find . -type d | cut -c 3- | while read dir ; do + [ -d "${NWNUSERDIR}/${dir}" ] || + mkdir "${NWNUSERDIR}/${dir}" + done + find . -type l | cut -c 3- | while read file ; do + [ -L "${NWNUSERDIR}/${file}" ] || + cp -R "${file}" "${NWNUSERDIR}/${file}" + done + find . -type f | cut -c 3- | while read file ; do + [ -e "${NWNUSERDIR}/${file}" ] || + ln -s "${1}/${file}" "${NWNUSERDIR}/${file}" + done +} + +# Print arguments in lowercase +tolower() { + set -e + echo "$@" | tr '[:upper:]' '[:lower:]' +} + +# Rename all files in a directory to lowercase +lowerdir() { + set -e + find "${@}" -name '*[A-Z]*' | while read name ; do + mv -v "${name}" "$(tolower ${name})" + done +} + +if [ ! -d "${NWNUSERDIR}" ] ; then + echo "Creating user directory" + mkdir "${NWNUSERDIR}" + + # Copy the ini file so the user can tweak it + cp "${NWNCLIENTDIR}/nwn.ini" "${NWNUSERDIR}" + + # Create a non-empty CD key file to work around a bug in the + # client: it will ask for the key twice if the file is + # initally empty or missing + echo '[CDKEY]' >"${NWNUSERDIR}/nwncdkey.ini" + + # Copy ${NWNCLIENTDIR} first since it may contain files which + # override parts of ${NWNDATADIR} + copydir "${NWNCLIENTDIR}" + copydir "${NWNDATADIR}" + + # Some files need to have their names converted to lowercase + lowerdir "${LCDIRS}" + + echo "Your Neverwinter Nights directory (~/.nwn) has now been" + echo "created and populated. Press ENTER to start the game." + read dummy +fi + +echo "Saved games will be stored in ${NWNUSERDIR}/.nwn/saves/" + +cd "${NWNUSERDIR}" + +# SDL settings +export SDL_MOUSE_RELATIVE=0 +export SDL_VIDEO_X11_DGAMOUSE=0 + +# Library locations +export LD_LIBRARY_PATH="${NWNUSERDIR}/lib:${NWNUSERDIR}/miles" + +echo "Starting Neverwinter Nights..." +exec ./nwmain diff --git a/games/linux-nwnclient/files/patch-aa b/games/linux-nwnclient/files/patch-aa deleted file mode 100644 index 629b593..0000000 --- a/games/linux-nwnclient/files/patch-aa +++ /dev/null @@ -1,14 +0,0 @@ ---- nwn.orig Sun Jun 15 00:36:06 2003 -+++ nwn Sun Jun 15 00:38:15 2003 -@@ -9,4 +9,11 @@ - # ./lib from LD_LIBRARY_PATH - export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH - -+## -+# FreeBSD Additions -+export R200_NO_TCL=1 -+cd /usr/compat/linux/usr/games/nwn -+# -+### -+ - ./nwmain $@ diff --git a/games/linux-nwnclient/pkg-install b/games/linux-nwnclient/pkg-install deleted file mode 100644 index b05f3c6..0000000 --- a/games/linux-nwnclient/pkg-install +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if [ "$2" = "POST-INSTALL" -o -n "${BATCH}" -o -n "${PACKAGE_BUILDING}" -]; then - exit 0 -fi - -/usr/bin/dialog --msgbox "In order to play Neverwinter Nights, you will -need the data files from the game. This can be accomplished in a few -different ways. You can copy them manually into the -/usr/compat/linux/games/nwn directory, or you use the -games/linux-nwndata port. The files will be automatically checked for. - If they are not available, then the games/linux-nwndata port will -automatically be installed. NOTE: This port is installed so that you -will need to be a member of the games group in order to play." 12 70 || -/usr/bin/false diff --git a/games/linux-nwnclient/pkg-plist b/games/linux-nwnclient/pkg-plist index 77ccd12..2cd383e 100644 --- a/games/linux-nwnclient/pkg-plist +++ b/games/linux-nwnclient/pkg-plist @@ -1,38 +1,38 @@ -%%NWNDIR%%/dmclient -%%DOCSDIR%%/EULA.txt -%%NWNDIR%%/fixinstall -%%NWNDIR%%/lib/libSDL-1.2.so.0.0.5 -%%NWNDIR%%/lib/libSDL-1.2.so.0 -%%NWNDIR%%/miles/mssdsp.flt -%%NWNDIR%%/miles/mssmp3.asi -%%NWNDIR%%/miles/msssoft.m3d -%%NWNDIR%%/miles/libmss.so.6.5.2 -%%NWNDIR%%/miles/libmss.so.6 -%%NWNDIR%%/miles/libmss.so -%%NWNDIR%%/movies-OC.txt -%%NWNDIR%%/nwmain -%%NWNDIR%%/nwn -%%NWNDIR%%/nwn.ini -%%NWNDIR%%/nwserver -%%NWNDIR%%/override/soundprovider.2da -%%NWNDIR%%/override/load_legal2.tga -%%NWNDIR%%/override/load_legal.tga -%%DOCSDIR%%/readme.linuxserver.txt -%%DOCSDIR%%/readme-SDL.txt -%%DOCSDIR%%/readme.txt -%%NWNDIR%%/data/patch.bif -%%NWNDIR%%/dialog.tlk -%%NWNDIR%%/nwm/Chapter1.nwm -%%NWNDIR%%/nwm/Chapter1E.nwm -%%NWNDIR%%/nwm/Chapter2.nwm -%%NWNDIR%%/nwm/Chapter3.nwm -%%NWNDIR%%/nwm/Prelude.nwm -%%DOCSDIR%%/NWNv130.txt -%%NWNDIR%%/patch.key -@unexec rmdir %D/%%NWNDIR%%/lib 2>/dev/null || true -@unexec rmdir %D/%%NWNDIR%%/miles 2>/dev/null || true -@unexec rmdir %D/%%NWNDIR%%/override 2>/dev/null || true -@unexec rmdir %D/%%NWNDIR%%/data 2>/dev/null || true -@unexec rmdir %D/%%NWNDIR%%/nwm 2>/dev/null || true -@unexec rmdir %D/%%NWNDIR%% 2>/dev/null || true -@unexec rmdir %D/%%DOCSDIR%% 2>/dev/null || true +%%DATADIR%%/EULA.txt +%%DATADIR%%/NWNv162.txt +%%DATADIR%%/data/patch.bif +%%DATADIR%%/dialog.tlk +%%DATADIR%%/dmclient +%%DATADIR%%/lib/libstdc++-libc6.1-2.so.3 +%%DATADIR%%/miles/libmss.so +%%DATADIR%%/miles/libmss.so.6 +%%DATADIR%%/miles/libmss.so.6.5.2 +%%DATADIR%%/miles/mssdsp.flt +%%DATADIR%%/miles/mssmp3.asi +%%DATADIR%%/miles/msssoft.m3d +%%DATADIR%%/movies-OC.txt +%%DATADIR%%/nwm/Chapter1.nwm +%%DATADIR%%/nwm/Chapter1E.nwm +%%DATADIR%%/nwm/Chapter2.nwm +%%DATADIR%%/nwm/Chapter2E.nwm +%%DATADIR%%/nwm/Chapter3.nwm +%%DATADIR%%/nwm/Chapter4.nwm +%%DATADIR%%/nwm/Prelude.nwm +%%DATADIR%%/nwmain +%%DATADIR%%/nwn.ini +%%DATADIR%%/nwserver +%%DATADIR%%/override/iit_medkit_001.tga +%%DATADIR%%/override/load_legal.tga +%%DATADIR%%/override/load_legal2.tga +%%DATADIR%%/override/soundprovider.2da +%%DATADIR%%/patch.key +%%DATADIR%%/readme-SDL.txt +%%DATADIR%%/readme.linuxclientupdate.txt +%%DATADIR%%/readme.linuxserver.txt +%%DATADIR%%/readme.txt +@dirrm %%DATADIR%%/override +@dirrm %%DATADIR%%/nwm +@dirrm %%DATADIR%%/miles +@dirrm %%DATADIR%%/lib +@dirrm %%DATADIR%%/data +@dirrm %%DATADIR%% |