summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-rpg/nwn/nwn-1.68-r6.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'games-rpg/nwn/nwn-1.68-r6.ebuild')
-rw-r--r--games-rpg/nwn/nwn-1.68-r6.ebuild236
1 files changed, 236 insertions, 0 deletions
diff --git a/games-rpg/nwn/nwn-1.68-r6.ebuild b/games-rpg/nwn/nwn-1.68-r6.ebuild
new file mode 100644
index 000000000000..8232df43ee3a
--- /dev/null
+++ b/games-rpg/nwn/nwn-1.68-r6.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+LANGUAGES="linguas_fr linguas_it linguas_es linguas_de linguas_en"
+
+MY_PV=${PV//.}
+PATCH_URL_BASE=http://files.bioware.com/neverwinternights/updates/linux/${MY_PV}
+PACKAGE_NAME=_linuxclient${MY_PV}_orig.tar.gz
+SOU_NAME=_linuxclient${MY_PV}_xp1.tar.gz
+HOU_NAME=_linuxclient${MY_PV}_xp2.tar.gz
+
+DESCRIPTION="Epic role-playing game set in a huge medieval fantasy world of Dungeons and Dragons"
+HOMEPAGE="http://nwn.bioware.com/downloads/linuxclient.html"
+SRC_URI="http://dev.gentoo.org/~calchan/distfiles/nwn-libs-1.tar.bz2
+ linguas_fr? (
+ !sou? ( !hou? ( ${PATCH_URL_BASE}/French${PACKAGE_NAME} ) )
+ sou? ( ${PATCH_URL_BASE}/French${SOU_NAME} )
+ hou? ( ${PATCH_URL_BASE}/French${HOU_NAME} ) )
+ linguas_it? (
+ !sou? ( !hou? ( ${PATCH_URL_BASE}/Italian${PACKAGE_NAME} ) )
+ sou? ( ${PATCH_URL_BASE}/Italian${SOU_NAME} )
+ hou? ( ${PATCH_URL_BASE}/Italian${HOU_NAME} ) )
+ linguas_en? (
+ !sou? ( !hou? ( ${PATCH_URL_BASE}/English${PACKAGE_NAME} ) )
+ sou? ( ${PATCH_URL_BASE}/English${SOU_NAME} )
+ hou? ( ${PATCH_URL_BASE}/English${HOU_NAME} ) )
+ linguas_es? (
+ !sou? ( !hou? ( ${PATCH_URL_BASE}/Spanish${PACKAGE_NAME} ) )
+ sou? ( ${PATCH_URL_BASE}/Spanish${SOU_NAME} )
+ hou? ( ${PATCH_URL_BASE}/Spanish${HOU_NAME} ) )
+ linguas_de? (
+ !sou? ( !hou? ( ${PATCH_URL_BASE}/German${PACKAGE_NAME} ) )
+ sou? ( ${PATCH_URL_BASE}/German${SOU_NAME} )
+ hou? ( ${PATCH_URL_BASE}/German${HOU_NAME} ) )
+ !linguas_en? (
+ !linguas_es? (
+ !linguas_de? (
+ !linguas_fr? (
+ !linguas_it? (
+ !sou? ( !hou? ( ${PATCH_URL_BASE}/English${PACKAGE_NAME} ) )
+ sou? ( ${PATCH_URL_BASE}/English${SOU_NAME} )
+ hou? ( ${PATCH_URL_BASE}/English${HOU_NAME} ) ) ) ) ) )"
+
+LICENSE="NWN-EULA"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+IUSE="sou hou ${LANGUAGES}"
+RESTRICT="mirror strip"
+
+RDEPEND="
+ >=games-rpg/nwn-data-1.29-r3
+ !<games-rpg/nwmouse-0.1-r1
+ x11-libs/libXext[abi_x86_32(-)]
+ x11-libs/libX11[abi_x86_32(-)]
+ >=media-libs/libsdl-1.2.15-r5[abi_x86_32(-)]
+ virtual/opengl[abi_x86_32(-)]
+"
+DEPEND="app-arch/unzip"
+
+S=${WORKDIR}/nwn
+
+dir=${GAMES_PREFIX_OPT}/${PN}
+Ddir=${D}/${dir}
+
+die_from_busted_nwn-data() {
+ local use=$*
+ ewarn "You must emerge games-rpg/nwn-data with USE=$use. You can fix this"
+ ewarn "by doing the following:"
+ echo
+ elog "mkdir -p /etc/portage"
+ elog "echo 'games-rpg/nwn-data $use' >> /etc/portage/package.use"
+ elog "emerge --oneshot games-rpg/nwn-data"
+ die "nwn-data requires USE=$use"
+}
+
+pkg_setup() {
+ games_pkg_setup
+ if use sou
+ then
+ has_version "games-rpg/nwn-data[sou]" || die_from_busted_nwn-data sou
+ fi
+ if use hou
+ then
+ has_version "games-rpg/nwn-data[hou]" || die_from_busted_nwn-data hou
+ fi
+
+ strip-linguas de en es fr it
+}
+
+src_unpack() {
+ mkdir -p "${S}"
+ cd "${S}"
+ mkdir -p .metadata
+ for a in ${A}
+ do
+ if [ -z "${a/*libs*}" ]
+ then
+ unpack "${a}"
+ fi
+
+ if [ -z "${a/*orig*}" ]
+ then
+ currentlocale=""
+ if [ -z "${a/*German*/}" ]
+ then
+ currentlocale=de
+ elif [ -z "${a/*English*/}" ]
+ then
+ currentlocale=en
+ 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
+ mkdir -p "${currentlocale}"
+ cd "${currentlocale}"
+ unpack "${a}"
+ cd ..
+ fi
+ fi
+ done
+ use sou && (
+ for a in ${A}
+ do
+ if [ -z "${a/*$SOU_NAME}" ]
+ then
+ currentlocale=""
+ if [ -z "${a/*German*/}" ]
+ then
+ currentlocale=de
+ elif [ -z "${a/*English*/}" ]
+ then
+ currentlocale=en
+ 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
+ mkdir -p "${currentlocale}"
+ cd "${currentlocale}"
+ rm -f data/patch.bif patch.key
+ unpack "${a}"
+ cd ..
+ fi
+ fi
+ done )
+ use hou && (
+ for a in ${A}
+ do
+ if [ -z "${a/*$HOU_NAME}" ]
+ then
+ currentlocale=""
+ if [ -z "${a/*German*/}" ]
+ then
+ currentlocale=de
+ elif [ -z "${a/*English*/}" ]
+ then
+ currentlocale=en
+ 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
+ mkdir -p "${currentlocale}"
+ cd "${currentlocale}"
+ rm -f data/patch.bif patch.key data/xp1patch.bif xp1patch.key override/*
+ unpack "${a}"
+ cd ..
+ fi
+ fi
+ done )
+}
+
+src_install() {
+ dodir "${dir}"
+ exeinto "${dir}"
+ doexe "${FILESDIR}"/fixinstall
+ sed -i \
+ -e "s:GENTOO_USER:${GAMES_USER}:" \
+ -e "s:GENTOO_GROUP:${GAMES_GROUP}:" \
+ -e "s:GENTOO_DIR:${GAMES_PREFIX_OPT}:" \
+ -e "s:override miles nwm:miles:" \
+ -e "s:chitin.key dialog.tlk nwmain:chitin.key:" \
+ -e "s:^chmod a-x:#chmod a-x:" \
+ "${Ddir}"/fixinstall || die
+ if use hou || use sou
+ then
+ sed -i \
+ -e "s:chitin.key patch.key:chitin.key:" \
+ "${Ddir}"/fixinstall || die
+ fi
+ fperms ug+x "${dir}"/fixinstall || die
+ mv "${S}"/* "${Ddir}"
+ mv "${S}"/.metadata "${Ddir}"
+ games_make_wrapper nwn ./nwn "${dir}" "${dir}"
+ make_desktop_entry nwn "Neverwinter Nights"
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "The included custom libSDL is patched to enable the following key sequences:"
+ elog " * Left-Alt & Enter - Iconify Window"
+ elog " * Right-Alt & Enter - Toggle between FullScreen/Windowed"
+ elog " * Left-Control & G - Disable the mouse grab that keeps the cursor inside the NWN window"
+ elog " * Right-Control & G - Re-enable the mouse grab to keep the cursor inside the NWN window"
+ elog
+ elog "The NWN linux client is now installed."
+ elog "Proceed with the following step in order to get it working:"
+ elog "Run ${dir}/fixinstall as root"
+}