From: Chris Gianelloni Date: Fri, 17 Nov 2006 19:24:30 +0000 (+0000) Subject: This is the initial import of my new all-encompassing nwn-data ebuild. This shoudl... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=128234c29b0cd9dfa8009577af7cbc9bd35f37b3;p=gentoo.git This is the initial import of my new all-encompassing nwn-data ebuild. This shoudl support Platinum, Diamond, and the Original sets. It may work with Gold, but that hasn't been tested. This is currently masked, as I am planning on adding more support, such as support for NWMovies and having player data in ~/.nwn, instead of a writeable global NWN directory. This should take care of bug #88521, bug #118446, and bug #148791. Package-Manager: portage-2.1.2_rc1-r6 --- diff --git a/games-rpg/nwn-data/ChangeLog b/games-rpg/nwn-data/ChangeLog index 5f6750a57821..370f3287b3a5 100644 --- a/games-rpg/nwn-data/ChangeLog +++ b/games-rpg/nwn-data/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for games-rpg/nwn-data # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-rpg/nwn-data/ChangeLog,v 1.19 2006/09/27 20:25:56 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-rpg/nwn-data/ChangeLog,v 1.20 2006/11/17 19:24:30 wolf31o2 Exp $ + +*nwn-data-1.29-r1 (17 Nov 2006) + + 17 Nov 2006; Chris Gianelloni + +nwn-data-1.29-r1.ebuild: + This is the initial import of my new all-encompassing nwn-data ebuild. This + shoudl support Platinum, Diamond, and the Original sets. It may work with + Gold, but that hasn't been tested. This is currently masked, as I am + planning on adding more support, such as support for NWMovies and having + player data in ~/.nwn, instead of a writeable global NWN directory. This + should take care of bug #88521, bug #118446, and bug #148791. 27 Sep 2006; Chris Gianelloni nwn-data-1.29.ebuild: Change the instructions at the end of the ebuild from einfo to elog. diff --git a/games-rpg/nwn-data/Manifest b/games-rpg/nwn-data/Manifest index b4f7c03c8f8e..e6661c509dae 100644 --- a/games-rpg/nwn-data/Manifest +++ b/games-rpg/nwn-data/Manifest @@ -8,14 +8,18 @@ DIST nwitalian129.tar.gz 3926804 RMD160 62d6e3219a88636df60db2c8339337fa277c8467 DIST nwn.png 4296 RMD160 958ed2051e91b0ab5f7ae8892c8ed3012cfe3900 SHA1 a4de1822df20ffaa18ff14060d00ea75eee56939 SHA256 9703cb47b32d6bf0202198ab490395046d2ef4ffdde22dca91748a966134e139 DIST nwresources129.tar.gz 1212356127 RMD160 1a986d12bc3153ff7646053e60d610155944b5ac SHA1 6f399dbf876f357a57096996447d4b9fa68bcb58 SHA256 40e7bb8aebae931c2ce05f199ed15714845b403c4a6d9fab88092e784214bee2 DIST nwspanish129.tar.gz 3912516 RMD160 8fd2592cfc92246c64be2930a5a4032fe8c07ed1 SHA1 6d60d168a232f845913b3bb41e91362faf29bcbe SHA256 100833e91e3f729a473de3372019e1086aac444f3c90c799af43d16833b7a1ed +EBUILD nwn-data-1.29-r1.ebuild 15351 RMD160 4dc5ad121b1e4205c336cdf70637cbfd6aaf47a0 SHA1 fb2b3e189fbeee2dc52877533796a4f5ab9f2378 SHA256 692b85601e69336d601e5edc9f82fbdd795227bbc12d1c9b785f0f3f09855755 +MD5 808dc4bbed6fa533b07c5c78e5bac9a1 nwn-data-1.29-r1.ebuild 15351 +RMD160 4dc5ad121b1e4205c336cdf70637cbfd6aaf47a0 nwn-data-1.29-r1.ebuild 15351 +SHA256 692b85601e69336d601e5edc9f82fbdd795227bbc12d1c9b785f0f3f09855755 nwn-data-1.29-r1.ebuild 15351 EBUILD nwn-data-1.29.ebuild 6787 RMD160 8877e148c36136d3575ef167ca18561e9662fede SHA1 e6b036c2b6685ebb91bb3fcbc825df84677ddb68 SHA256 5a99b4755e8c1e14cc28d84dddf18536d45ad4eea9166111cd72eafd33f290b5 MD5 729cd2162fe8daf038caf120da5e0878 nwn-data-1.29.ebuild 6787 RMD160 8877e148c36136d3575ef167ca18561e9662fede nwn-data-1.29.ebuild 6787 SHA256 5a99b4755e8c1e14cc28d84dddf18536d45ad4eea9166111cd72eafd33f290b5 nwn-data-1.29.ebuild 6787 -MISC ChangeLog 3070 RMD160 a118dce505976bc65b0c0c4cabf3fb94065a0af6 SHA1 1202e0c8d15ca08f3e0236d061fb2f04dd0ccdb3 SHA256 4f3481023faa24cada546a3ea3a1d98946b0d769bb390d6665ce7b601ff5e4b1 -MD5 c38cee60936f4bde2996b821fdf2f961 ChangeLog 3070 -RMD160 a118dce505976bc65b0c0c4cabf3fb94065a0af6 ChangeLog 3070 -SHA256 4f3481023faa24cada546a3ea3a1d98946b0d769bb390d6665ce7b601ff5e4b1 ChangeLog 3070 +MISC ChangeLog 3625 RMD160 bb7b36407833617b5d96dc9960c49bef7322c92f SHA1 e20a28b05b0a361ab05bcb5350dc5ab69b1ce3eb SHA256 81a623d0ca3070da2428566c27ee108c419f6d6031d4303d1bb6801878629b31 +MD5 19bce224023ff6bad7a7e7c17ad843a2 ChangeLog 3625 +RMD160 bb7b36407833617b5d96dc9960c49bef7322c92f ChangeLog 3625 +SHA256 81a623d0ca3070da2428566c27ee108c419f6d6031d4303d1bb6801878629b31 ChangeLog 3625 MISC metadata.xml 254 RMD160 877a1dc36df2be58926bc51041093feafdefe429 SHA1 45f0334cd127c4a1b4ece41f7098ab70046e378a SHA256 2916aab684ec3908fffb515065eeb2c481cde563380b682646add582bed5f535 MD5 11a7e1491b1ac042ac7216b26b4ad1fb metadata.xml 254 RMD160 877a1dc36df2be58926bc51041093feafdefe429 metadata.xml 254 @@ -23,10 +27,13 @@ SHA256 2916aab684ec3908fffb515065eeb2c481cde563380b682646add582bed5f535 metadata MD5 897a21d522d5ad2f4ebf1f515b525733 files/digest-nwn-data-1.29 1660 RMD160 23a3ffbb3b4e708030b0bee0520d7e3c41f52687 files/digest-nwn-data-1.29 1660 SHA256 20aa5cd74dc16059279869c6299ecc66397bde28c0d315c913431d514a696ca2 files/digest-nwn-data-1.29 1660 +MD5 897a21d522d5ad2f4ebf1f515b525733 files/digest-nwn-data-1.29-r1 1660 +RMD160 23a3ffbb3b4e708030b0bee0520d7e3c41f52687 files/digest-nwn-data-1.29-r1 1660 +SHA256 20aa5cd74dc16059279869c6299ecc66397bde28c0d315c913431d514a696ca2 files/digest-nwn-data-1.29-r1 1660 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) -iD8DBQFFGt9PkT4lNIS36YERAjywAKCXlhLIINgvYZ8b0jof/9U7sM7FkwCguiNd -EWVGsWH8G0JB8AUQfOhpPBo= -=9STR +iD8DBQFFXg73kT4lNIS36YERAicFAKCga8aNHTKIrlNgdM2ZFXSnd2wfAQCdH+ZL +z4awKkzatK9wMH5xzQ+jhAs= +=LhzI -----END PGP SIGNATURE----- diff --git a/games-rpg/nwn-data/files/digest-nwn-data-1.29-r1 b/games-rpg/nwn-data/files/digest-nwn-data-1.29-r1 new file mode 100644 index 000000000000..9ce40b83369b --- /dev/null +++ b/games-rpg/nwn-data/files/digest-nwn-data-1.29-r1 @@ -0,0 +1,21 @@ +MD5 73c6515fd6aa5f860802098a55000ae8 nwclient129.tar.gz 5504342 +RMD160 3cffcec613ec8fdd8241d6f6b47fe891434d5024 nwclient129.tar.gz 5504342 +SHA256 3d75e07f4d44fde789481240d02c07a7a7e0599bc2300d8a73f98f4c752da80e nwclient129.tar.gz 5504342 +MD5 d1e72a42a20c247332de6c6adcbcade5 nwfrench129.tar.gz 357777520 +RMD160 d64a2e52691e9d7897fedb9faae038b1c88699f5 nwfrench129.tar.gz 357777520 +SHA256 9a5ddcbc8ca443cb5bbcacb76587b171d37441906a1319155bba35f1bfffa9e0 nwfrench129.tar.gz 357777520 +MD5 7ff8aeea91a59f8c54a5263ca8ea2261 nwgerman129.tar.gz 381832822 +RMD160 02d5d76e9a59f07d5baea1bf7e29e3ed65466936 nwgerman129.tar.gz 381832822 +SHA256 950f730121a90fef2fd5a0810c329a04d1697a7b5f859e240e3307d31050e6e0 nwgerman129.tar.gz 381832822 +MD5 efa3fb10bdaced373d21d9809a176968 nwitalian129.tar.gz 3926804 +RMD160 62d6e3219a88636df60db2c8339337fa277c8467 nwitalian129.tar.gz 3926804 +SHA256 7a57c45ce2d0a712198dba40ddc2ab4788c817b79c20a6e99733ea842a13f974 nwitalian129.tar.gz 3926804 +MD5 d05b3b73edd2b4beadbce95837e2ab20 nwn.png 4296 +RMD160 958ed2051e91b0ab5f7ae8892c8ed3012cfe3900 nwn.png 4296 +SHA256 9703cb47b32d6bf0202198ab490395046d2ef4ffdde22dca91748a966134e139 nwn.png 4296 +MD5 8222401efe25235b56d01b38ae880b5b nwresources129.tar.gz 1212356127 +RMD160 1a986d12bc3153ff7646053e60d610155944b5ac nwresources129.tar.gz 1212356127 +SHA256 40e7bb8aebae931c2ce05f199ed15714845b403c4a6d9fab88092e784214bee2 nwresources129.tar.gz 1212356127 +MD5 920d4fdcf5d8d0ff583f236ae7f3f6d4 nwspanish129.tar.gz 3912516 +RMD160 8fd2592cfc92246c64be2930a5a4032fe8c07ed1 nwspanish129.tar.gz 3912516 +SHA256 100833e91e3f729a473de3372019e1086aac444f3c90c799af43d16833b7a1ed nwspanish129.tar.gz 3912516 diff --git a/games-rpg/nwn-data/nwn-data-1.29-r1.ebuild b/games-rpg/nwn-data/nwn-data-1.29-r1.ebuild new file mode 100644 index 000000000000..fbdac1b19081 --- /dev/null +++ b/games-rpg/nwn-data/nwn-data-1.29-r1.ebuild @@ -0,0 +1,509 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-rpg/nwn-data/nwn-data-1.29-r1.ebuild,v 1.1 2006/11/17 19:24:30 wolf31o2 Exp $ + +inherit eutils games + +# Diamond DVD - NWN, SoU, HotU (1 disk) +# Platinum CD/DVD - NWN, SoU (4 disks/1 disk) +# Deluxe CD - NWN, SoU, HotU (5 disks) +# Gold CD - NWN, SoU +# Original CD - NWN (1 disk) + +LANGUAGES="linguas_fr linguas_it linguas_es linguas_de linguas_en" + +MY_PV=${PV//.} +CLIENT_BASEURL="http://nwdownloads.bioware.com/neverwinternights/linux" +UPDATE_BASEURL="http://files.bioware.com/neverwinternights/updates/linux" + +NOWIN_SRC_URI="${UPDATE_BASEURL}/nwresources${MY_PV}.tar.gz + http://bsd.mikulas.com/nwresources${MY_PV}.tar.gz + http://163.22.12.40/FreeBSD/distfiles/nwresources${MY_PV}.tar.gz" + +LINGUAS_SRC_URI="linguas_fr? ( + ${UPDATE_BASEURL}/${MY_PV}/nwfrench${MY_PV}.tar.gz ) + linguas_it? ( + ${UPDATE_BASEURL}/${MY_PV}/nwitalian${MY_PV}.tar.gz ) + linguas_es? ( + ${UPDATE_BASEURL}/${MY_PV}/nwspanish${MY_PV}.tar.gz ) + linguas_de? ( + ${UPDATE_BASEURL}/${MY_PV}/nwgerman${MY_PV}.tar.gz )" + +DESCRIPTION="Neverwinter Nights Data Files" +HOMEPAGE="http://nwn.bioware.com/downloads/linuxclient.html" +SRC_URI="${CLIENT_BASEURL}/${MY_PV}/nwclient${MY_PV}.tar.gz + cdinstall? ( ${LINGUAS_SRC_URI} ) + nowin? ( ${NOWIN_SRC_URI} ${LINGUAS_SRC_URI} ) + mirror://gentoo/nwn.png" + +LICENSE="NWN-EULA" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cdinstall hou nowin sou ${LANGUAGES}" +RESTRICT="strip mirror" + +RDEPEND="virtual/opengl + >=media-libs/libsdl-1.2.5 + amd64? ( + app-emulation/emul-linux-x86-baselibs )" +DEPEND="${RDEPEND} + games-util/biounzip + app-arch/unshield + amd64? ( ~app-arch/unshield-0.2 ) + app-arch/unzip" + +QA_TEXTRELS="${GAMES_PREFIX_OPT:1}/nwn/lib/libSDL-1.2.so.0.0.5 + ${GAMES_PREFIX_OPT:1}/nwn/miles/msssoft.m3d + ${GAMES_PREFIX_OPT:1}/nwn/miles/libmss.so.6.5.2 + ${GAMES_PREFIX_OPT:1}/nwn/miles/mssmp3.asi + ${GAMES_PREFIX_OPT:1}/nwn/miles/mssdsp.flt" + +S=${WORKDIR}/nwn + +GAMES_LICENSE_CHECK=yes +dir=${GAMES_PREFIX_OPT}/nwn +Ddir=${D}/${dir} + +NWN_SET= + +# This is my fun section where I try to determine which CD/DVD set we have. +# Expect this to be very messy and ugly, and hopefully it all works as we want +# it to on all of the various media. +get_nwn_set() { + # First we check to see if we have CD_ROOT defined already. If we do, + # this will make our lives so much easier. + if [ -n "${CD_ROOT}" ] + then + if [ -f "${CD_ROOT}"/KingmakerSetup.exe ] + then + NWN_SET="diamond_dvd" + einfo "Neverwinter Nights Diamond DVD found..." + elif [ -f "${CD_ROOT}"/ArcadeInstallNWNXP213f.EXE ] + then + NWN_SET="platinum_cd" + einfo "Neverwinter Nights Platinum DVD/CD set found..." + elif [ -f "${CD_ROOT}"/ArcadeInstallNWN109.exe ] + then + NWN_SET="original_cd" + einfo "Neverwinter Nights Original/Deluxe CD set found..." + fi + # Now we check to see if we have CD_ROOT_1 set, which means we have a CD + # set, or even a DVD set. + elif [ -n "${CD_ROOT_1}" ] + then + if [ -f "${CD_ROOT_1}"/KingmakerSetup.exe ] + then + NWN_SET="diamond_dvd" + einfo "Neverwinter Nights Diamond DVD found..." + elif [ -f "${CD_ROOT_1}"/ArcadeInstallNWNXP213f.EXE ] + then + NWN_SET="platinum_cd" + einfo "Neverwinter Nights Platinum DVD/CD set found..." + elif [ -f "${CD_ROOT_1}"/ArcadeInstallNWN109.exe ] + then + NWN_SET="original_cd" + einfo "Neverwinter Nights Original/Deluxe CD set found..." + fi + # OK. Neither were set, so now we're going to start our detection and try + # to figure out what we have to work from. + else + local mline= + for mline in $(mount | egrep -e '(iso|cdrom)' | awk '{print $3}') + do + if [ -f "${mline}"/KingmakerSetup.exe ] + then + NWN_SET="diamond_dvd" + einfo "Neverwinter Nights Diamond DVD found..." + elif [ -f "${mline}"/ArcadeInstallNWNXP213f.EXE ] + then + NWN_SET="platinum_cd" + einfo "Neverwinter Nights Platinum DVD/CD set found..." + elif [ -f "${mline}"/ArcadeInstallNWN109.exe ] + then + NWN_SET="original_cd" + einfo "Neverwinter Nights Original/Original CD set found..." + fi + done + fi +} + +get_cd_set() { + while `[ -z "${NWN_SET}" ]` + do + echo "Please insert your Neverwinter Nights CD/DVD into your drive and" + echo "press any key to continue" + read -n + get_nwn_set + done + # Here is where we start our CD/DVD detection for changing disks. + case "${NWN_SET}" in + diamond_dvd) + einfo "Both Shadows of Undrentide and Hordes of the Underdark will" + einfo "be installed from your DVD along with Neverwinter Nights." + touch .metadata/sou || die "touch sou" + touch .metadata/hou || die "touch hou" + touch .metadata/orig || die "touch orig" + cdrom_get_cds KingmakerSetup.exe + ;; + platinum_cd) + einfo "Shadows of the Undentride will be installed along with" + einfo "Neverwinter Nights. If you also have Hordes of the" + einfo "Underdark, it will be installed afterwards." + touch .metadata/orig || die "touch orig" + touch .metadata/sou || die "touch sou" + if use hou + then + einfo "You will also need the HoU CD for this installation." + cdrom_get_cds ArcadeInstallNWNXP213f.EXE \ + disk2.zip disk3.zip disk4.zip \ + ArcadeInstallNWNXP213f.EXE + else + cdrom_get_cds ArcadeInstallNWNXP213f.EXE \ + disk2.zip disk3.zip disk4.zip + fi + ;; + original_cd) + einfo "We will be installing the original Neverwinter Nights. If" + einfo "you also have the Shadows of Undrentide or Hordes of the" + einfo "Underdark expansions, they will be installed afterwards." + touch .metadata/orig || die "touch orig" + if use sou && use hou + then + einfo "You will also need the SoU and HoU CDs for this installation." + cdrom_get_cds ArcadeInstallNWN109.exe disk2.bzf \ + movies/NWNintro.bik NWNSoUInstallGuide.rtf \ + ArcadeInstallNWNXP213f.EXE + elif use sou + then + einfo "You will also need the SoU CD for this installation." + cdrom_get_cds ArcadeInstallNWN109.exe disk2.bzf \ + movies/NWNintro.bik NWNSoUInstallGuide.rtf + elif use hou + then + einfo "You will also need the HoU CD for this installation." + cdrom_get_cds ArcadeInstallNWN109.exe disk2.bzf \ + movies/NWNintro.bik ArcadeInstallNWNXP213f.EXE + else + cdrom_get_cds ArcadeInstallNWN109.exe disk2.bzf \ + movies/NWNintro.bik + fi + ;; + esac +} + +src_unpack() { + mkdir -p "${S}" + cd "${S}" + # We create this .metadata directory so we can keep track of what we have + # installed without needing to keep all of these multiple USE flags in all + # of the ebuilds. + mkdir -p .metadata || die "Creating .metadata" + # Since we don't *always* want to do this, we check for USE=cdinstall + if use cdinstall + then + # Here, we determine which CD/DVD set that we have. This will seem a + # bit odd, since we'll be doing the detection a few times. + get_nwn_set + # Now that we know what we're looking for, let's look for the media. + get_cd_set + + case ${NWN_SET} in + diamond_dvd) + # This is probably the simplest NWN to install. + mkdir -p "${S}" + cd "${S}" + einfo "Unpacking files..." + unzip -qo "${CDROM_ROOT}"/Data_Shared.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Language_data.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Language_update.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Data_Linux.zip || die "unpacking" + # We don't give the user the option to install SoU/HotU. While some + # people might complain about this, most newer NWN stuff requires + # them both anyway, so it makes no sense not to install them. + unzip -qo "${CDROM_ROOT}"/data/XP1.zip + unzip -qo "${CDROM_ROOT}"/data/XP2.zip + ;; + platinum_cd) + # This one isn't too bad, either. Luckily, everything in in a ZIP. + mkdir -p "${S}" + cd "${S}" + einfo "Unpacking files..." + unzip -qo "${CDROM_ROOT}"/Data_Shared.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Language_data.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Language_update.zip || die "unpacking" + einfo "Please insert disk 2" + cdrom_load_next_cd + einfo "Unpacking files..." + unzip -qo "${CDROM_ROOT}"/disk2.zip || die "unpacking" + einfo "Please insert disk 3" + cdrom_load_next_cd + einfo "Unpacking files..." + unzip -qo "${CDROM_ROOT}"/disk3.zip || die "unpacking" + einfo "Please inert disk 4" + cdrom_load_next_cd + einfo "Unpacking files..." + unzip -qo "${CDROM_ROOT}"/disk4.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/xp1.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/xp1_data.zip || die "unpacking" + if use hou + then + einfo "Please insert the HoU disk" + cdrom_load_next_cd + rm -f xp1patch.key data/xp1patch.bif override/* + einfo "Unpacking files..." + unzip -qo "${CDROM_ROOT}"/Data_Shared.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Language_data.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Language_update.zip || die "unpacking" + touch .metadata/hou || die "touching hou" + fi + ;; + original_cd) + # Now, we need to create our directories, since we know we'll end up + # needing them for our install. + mkdir -p ambient data dmvault docs lib localvault miles modules \ + music nwm override texturepacks scripttemplates movies + + # Handle NWN CD1 + mkdir "${S}"/disc1_tmp + cd "${S}"/disc1_tmp + einfo "Unpacking files..." + unshield x ${CDROM_ROOT}/data1.cab || die "unpacking files" + rm -f miles/Mss32.dll + mv -f */* . + cd "${S}" + + mv -f disc1_tmp/*.bif data + mv -f disc1_tmp/dungeonmaster.bic dmvault + mv -f disc1_tmp/*.bic localvault + mv -f disc1_tmp/*.{pdf,txt} docs + mv -f disc1_tmp/*.erf texturepacks + rm -rf disc1_tmp + + # NWN CD2 + einfo "Please insert disk 2" + cdrom_load_next_cd + biounzip ${CDROM_ROOT}/disk2.bzf . || die "unpacking files" + + # NWN CD3 + einfo "Please insert disk 3" + cdrom_load_next_cd + einfo "Copying files from cd..." + for i in ambient data movies music + do + cp ${CDROM_ROOT}/${i}/* "${S}"/${i} || die "error copying data" + done + + # Now, we install HoU and SoU, if necessary + if use sou + then + einfo "Please insert the SoU disk" + cdrom_load_next_cd + einfo "Unpacking files..." + unzip -qo "${CDROM_ROOT}"/Data_Shared.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Language_data.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Language_update.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Data_Linux.zip || die "unpacking" + touch .metadata/sou || die "touching sou" + fi + if use hou + then + einfo "Please insert the HoU disk" + cdrom_load_next_cd + if use sou && use hou + then + rm -f xp1patch.key data/xp1patch.bif override/* + fi + einfo "Unpacking files..." + unzip -qo "${CDROM_ROOT}"/Data_Shared.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Language_data.zip || die "unpacking" + unzip -qo "${CDROM_ROOT}"/Language_update.zip || die "unpacking" + touch .metadata/hou || die "touching hou" + fi + unpack nwclient${MY_PV}.tar.gz + cd "${WORKDIR}" + unpack nwresources${MY_PV}.tar.gz \ + || die "unpacking nwresources${MY_PV}.tar.gz" + cd "${S}" + ;; + esac + elif use nowin + then + cd "${WORKDIR}" + unpack nwresources${MY_PV}.tar.gz \ + || die "unpacking nwresources${MY_PV}.tar.gz" + cd "${S}" + fi + + rm -rf override/* + for a in ${A} + do + currentlocale="" + if [ -z ${a/*german*/} ] + then + currentlocale=de + elif [ -z ${a/*spanish*/} ] + then + currentlocale=es + elif [ -z ${a/*italian*/} ] + then + currentlocale=it + elif [ -z ${a/*french*/} ] + then + currentlocale=fr + fi + if [ -n "$currentlocale" ] + then + touch ".metadata/linugas_$currentlocale" + mkdir -p $currentlocale + cd ${currentlocale} + unpack ${a} || die "unpacking ${a}" + fi + done + if use linguas_en + then + touch ".metadata/linugas_en" + fi + # These files aren't needed and come from the patches (games-rpg/nwn) + rm -f data/patch.bif patch.key + sed -i -e 's,/bin/sh,/bin/bash,g' -e '\:^./nwmain .*:i \ +'"dir='${dir}';LINGUAS='${LINGUAS}'"' \ +die() { \ + echo "$*" 1>&2 \ + exit 1 \ +} \ +cd "${dir}" || die "cd ${dir}" \ +if [[ -d "$LANG" ]] \ +then \ + p=${HOME}/.nwn/${LANG} \ +elif [[ -d "en" ]] \ +then \ + LANG=en \ + p=${HOME}/.nwn/${LANG} \ +else \ + LANG="" \ + p=${HOME}/.nwn \ + for i in ${LINGUAS} \ + do \ + if [ -z "${LANG}" -a -r ".metadata/linguas_$i" -a -d "$i" ] \ + then \ + LANG=$i \ + p=${HOME}/.nwn \ + fi \ + done \ +fi \ +mkdir -p "${p}" \ +find "${p}" -type l -delete \ +for i in * ; do \ + if [[ ! -f ".metadata/linguas_${i}" ]] \ + then \ + cp -rfs ${dir}/${i} ${p}/. || die "copy ${i}" \ + fi \ +done \ +if [[ -n "$LANG" ]] \ +then \ + cd "${LANG}" || die "cd ${LANG}" \ + for i in * ; do \ + cp -rfs ${dir}/${LANG}/${i} ${p}/. || die "copy ${LANG}/${i}" \ + done \ +fi \ +cd "${p}" || die "cd ${p}" \ +if [[ -r ./nwmouse.so ]]; then \ + export XCURSOR_PATH="$(pwd)" \ + export XCURSOR_THEME=nwmouse \ + export LD_PRELOAD=./nwmouse.so:$LD_PRELOAD \ +fi \ + ' "${S}"/nwn || die "sed nwn" +} + +src_install() { + dodir "${dir}" + mkdir -p "${S}"/dmvault "${S}"/hak "${S}"/portraits "${S}"/localvault + rm -rf "${S}"/dialog.tlk "${S}"/dialog.TLK "${S}"/dialogf.tlk \ + "${S}"/dmclient "${S}"/nwmain "${S}"/nwserver "${S}"/nwm/* \ + "${S}"/SDL-1.2.5 "${S}"/fixinstall + mv "${S}"/* "${Ddir}" + mv "${S}"/.metadata "${Ddir}" + keepdir "${dir}"/servervault + keepdir "${dir}"/scripttemplates + keepdir "${dir}"/saves + keepdir "${dir}"/portraits + keepdir "${dir}"/hak + cd "${Ddir}" + for d in ambient data dmvault hak localvault music override portraits + do + if [ -d ${d} ] + then + ( cd ${d} + for f in $(find . -name '*.*') ; do + lcf=$(echo ${f} | tr [:upper:] [:lower:]) + if [ ${f} != ${lcf} ] && [ -f ${f} ] + then + mv ${f} ${lcf} + fi + done ) + fi + done + if ! use sou && ! use hou && use nowin + then + if [ -f data/patch.bif ] + then + chmod a-x data/patch.bif + fi + if [ -f patch.key ] + then + chmod a-x patch.key + fi + fi + doicon "${DISTDIR}"/nwn.png + + prepgamesdirs + chmod -R g+rwX ${Ddir}/saves ${Ddir}/localvault ${Ddir}/dmvault \ + 2>&1 > /dev/null || die "could not chmod" + chmod g+rwX ${Ddir} || die "could not chmod" +} + +pkg_postinst() { + games_pkg_postinst + if ! use cdinstall || ! use nowin ; then + elog "The NWN linux client data is now installed." + elog "Proceed with the following steps in order to get it working:" + elog "1) Copy the following directories/files from your installed and" + elog " patched (1.68) Neverwinter Nights to ${dir}:" + elog " ambient/" + elog " data/" + elog " dmvault/" + elog " hak/" + elog " localvault/" + elog " modules/" + elog " music/" + elog " portraits/" + elgo " saves/" + elog " servervault/" + elog " texturepacks/" + elog " chitin.key" + elog "2) Remove some files to make way for the patch" + elog " rm ${dir}/music/mus_dd_{kingmaker,shadowgua,witchwake}.bmu" + elog " rm ${dir}/override/iit_medkit_001.tga" + elog " rm ${dir}/data/patch.bif" + if use sou + then + elog " rm ${dir}/xp1patch.key ${dir}/data/xp1patch.bif" + fi + if use hou + then + elog " rm ${dir}/xp2patch.key ${dir}/data/xp2patch.bif" + fi + elog "3) Chown and chmod the files with the following commands" + elog " chown -R ${GAMES_USER}:${GAMES_GROUP} ${dir}" + elog " chmod -R g+rwX ${dir}" + echo + elog "Or try emerging with USE=nowin" + echo + else + einfo "The NWN linux client data is now installed." + echo + fi + elog "This is only the data portion, you will also need games-rpg/nwn to" + elog "play Neverwinter Nights." + echo +}