1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION="A port of Jagged Alliance 2 to SDL"
10 HOMEPAGE="http://tron.homeunix.org/ja2/"
11 SRC_URI="https://dev.gentoo.org/~hasufell/distfiles/${P}.tar.xz
12 http://tron.homeunix.org/ja2/editor.slf.gz"
17 IUSE="cdinstall editor zlib"
19 RDEPEND="media-libs/libsdl[X,sound,video]
20 cdinstall? ( games-strategy/ja2-stracciatella-data )
21 zlib? ( sys-libs/zlib )"
23 LANGS="linguas_de +linguas_en linguas_fr linguas_it linguas_nl linguas_pl linguas_ru linguas_ru_gold"
25 REQUIRED_USE="^^ ( ${LANGS//+/} )"
28 epatch "${FILESDIR}"/${P}-makefile.patch
31 -e "s:/some/place/where/the/data/is:${GAMES_DATADIR}/ja2:" \
32 -i sgp/FileMan.cc || die
35 -e "s:@GAMES_DATADIR@:${GAMES_DATADIR}/ja2/data:" \
36 "${FILESDIR}"/ja2-convert.sh > "${T}"/ja2-convert || die
43 de) myconf="LNG=GERMAN" ;;
44 nl) myconf="LNG=DUTCH" ;;
45 fr) myconf="LNG=FRENCH" ;;
46 it) myconf="LNG=ITALIAN" ;;
47 pl) myconf="LNG=POLISH" ;;
48 ru) myconf="LNG=RUSSIAN" ;;
49 ru_gold) myconf="LNG=RUSSIAN_GOLD" ;;
50 en) myconf="LNG=ENGLISH" ;;
53 elog "Chosen language is ${myconf#LNG=}"
55 use editor && myconf+=" JA2EDITOR=yes JA2BETAVERSION=yes"
56 use zlib && myconf+=" WITH_ZLIB=yes"
62 dogamesbin ja2 "${T}"/ja2-convert
65 insinto "${GAMES_DATADIR}"/ja2/data
66 doins "${WORKDIR}"/editor.slf
69 make_desktop_entry ja2 ${PN}
78 elog "You need ja2 in the chosen language, otherwise set it in package.use!"
80 if ! use cdinstall ; then
81 elog "You need to copy all files from the Data directory of"
82 elog "Jagged Alliance 2 installation to"
83 elog "${GAMES_DATADIR}/ja2/data "
84 elog "Make sure the filenames are lowercase. You may want to run the"
86 elog "${GAMES_BINDIR}/ja2-convert"