diff options
author | Julian Ospald <hasufell@gentoo.org> | 2013-03-14 01:00:40 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2013-03-14 01:00:40 +0000 |
commit | d6a696529307d1d2e0f051a4a6593402af186a61 (patch) | |
tree | cdc5e1edb0c8bc48c6b623a7b5eda1f9a7c54ac1 /games-rpg | |
parent | Fix build issues with _mm_crc32_u64, bug #459126 by Nuno. (diff) | |
download | gentoo-2-d6a696529307d1d2e0f051a4a6593402af186a61.tar.gz gentoo-2-d6a696529307d1d2e0f051a4a6593402af186a61.tar.bz2 gentoo-2-d6a696529307d1d2e0f051a4a6593402af186a61.zip |
revbump: bump EAPI, rework linguas logic, add gog useflag
(Portage version: 2.2.0_alpha166/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'games-rpg')
-rw-r--r-- | games-rpg/arx-fatalis-data/ChangeLog | 8 | ||||
-rw-r--r-- | games-rpg/arx-fatalis-data/arx-fatalis-data-1.21-r2.ebuild | 95 | ||||
-rw-r--r-- | games-rpg/arx-fatalis-data/metadata.xml | 3 |
3 files changed, 105 insertions, 1 deletions
diff --git a/games-rpg/arx-fatalis-data/ChangeLog b/games-rpg/arx-fatalis-data/ChangeLog index d07803e854cc..45c07d3ea867 100644 --- a/games-rpg/arx-fatalis-data/ChangeLog +++ b/games-rpg/arx-fatalis-data/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for games-rpg/arx-fatalis-data # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-rpg/arx-fatalis-data/ChangeLog,v 1.4 2013/01/30 19:08:34 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-rpg/arx-fatalis-data/ChangeLog,v 1.5 2013/03/14 01:00:40 hasufell Exp $ + +*arx-fatalis-data-1.21-r2 (14 Mar 2013) + + 14 Mar 2013; Julian Ospald <hasufell@gentoo.org> + +arx-fatalis-data-1.21-r2.ebuild: + revbump: bump EAPI, rework linguas logic, add gog useflag 30 Jan 2013; Agostino Sarubbo <ago@gentoo.org> arx-fatalis-data-1.21-r1.ebuild: diff --git a/games-rpg/arx-fatalis-data/arx-fatalis-data-1.21-r2.ebuild b/games-rpg/arx-fatalis-data/arx-fatalis-data-1.21-r2.ebuild new file mode 100644 index 000000000000..b040b914614f --- /dev/null +++ b/games-rpg/arx-fatalis-data/arx-fatalis-data-1.21-r2.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-rpg/arx-fatalis-data/arx-fatalis-data-1.21-r2.ebuild,v 1.1 2013/03/14 01:00:40 hasufell Exp $ + +EAPI=5 + +CDROM_OPTIONAL="yes" +inherit eutils cdrom check-reqs games + +DESCRIPTION="Arx Fatalis data files" +HOMEPAGE="http://www.arkane-studios.com/uk/arx.php" +SRC_URI="cdinstall? ( http://download.zenimax.com/arxfatalis/patches/1.21/ArxFatalis_1.21_MULTILANG.exe ) + gog? ( setup_arx_fatalis.exe )" + +LICENSE="cdinstall? ( ArxFatalis-EULA-JoWooD ) gog? ( ArxFatalis-EULA-GOG )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gog" +REQUIRED_USE="^^ ( cdinstall gog )" +RESTRICT="binchecks mirror gog? ( fetch )" + +RDEPEND="games-rpg/arx-libertatis" +DEPEND="app-arch/innoextract + cdinstall? ( app-arch/cabextract )" + +CHECKREQS_DISK_BUILD="621M" +CHECKREQS_DISK_USR="617M" + +S=${WORKDIR} + +detect_language() { + speech_checksum=$(find '.' -iname "speech.pak" \ + -exec md5sum -b '{}' \; | sed "s/ .*//g") + if [[ -z $speech_checksum ]] ; then + speech_checksum=$(find '.' -iname "speech_default.pak" \ + -exec md5sum -b '{}' \; | sed "s/ .*//g") + fi + + # check if the checksum is of a known localisation and set data_lang to + # the language string to be used with the 1.21 patch installer + case "$speech_checksum" in + '4c3fdb1f702700255924afde49081b6e') data_lang='german' ;; + # Bundled version of AF included with NVIDIA card + 'ab8a93161688d793a7c78fbefd7d133e') data_lang='german' ;; + '4e8f962d8204bcfd79ce6f3226d6d6de') data_lang='english' ;; + '2f88c67ae1537919e69386d27583125b') data_lang='spanish' ;; + '4edf9f8c799190590b4cd52cfa5f91b1') data_lang='french' ;; + '81f05dea47c52d43f01c9b44dd8fe962') data_lang='italian' ;; + '677163bc319cd1e9aa1b53b5fb3e9402') data_lang='russian' ;; + '') eerror "speech*.pak not found" + die "speech*.pak not found" ;; + *) eerror "unsupported data language - speech*.pak checksum:" \ + "$speech_checksum" \ + "please file a gentoo bug" + die "unsupported data language, file a gentoo bug" ;; + esac +} + +pkg_nofetch() { + einfo "Please download ${A} from your GOG.com account after buying Arx Fatalis" + einfo "and put it into ${DISTDIR}." +} + +src_unpack() { + local data_lang + + if use cdinstall ; then + cdrom_get_cds bin/Arx.ttf + find "${CDROM_ROOT}" -iname "setup*.cab" -exec cabextract '{}' \; + detect_language + else + # gog only offers english + data_lang="english" + fi + + einfo "Data language: $data_lang" + innoextract --lowercase --language=${data_lang} \ + "${DISTDIR}"/${A} || die +} + +src_install() { + insinto "${GAMES_DATADIR}"/arx + doins -r app/{graph,misc} + find . -iname "*.pak" -exec doins '{}' \; + + dodoc app/{manual,map}.pdf + + # convert to lowercase + cd "${D}" + find . -type f -exec sh -c 'echo "${1}" + lower="`echo "${1}" | tr [:upper:] [:lower:]`" + [ "${1}" = "${lower}" ] || mv "${1}" "${lower}"' - {} \; + + prepgamesdirs +} diff --git a/games-rpg/arx-fatalis-data/metadata.xml b/games-rpg/arx-fatalis-data/metadata.xml index 8a647a27a253..630de1476666 100644 --- a/games-rpg/arx-fatalis-data/metadata.xml +++ b/games-rpg/arx-fatalis-data/metadata.xml @@ -12,5 +12,8 @@ <name>Daniel Scharrer</name> <description>Proxy maintainer. CC him on bugs</description> </maintainer> + <use> + <flag name='gog'>Extract the data from the GOG.com installer.</flag> + </use> </pkgmetadata> |