version bump (bug #558768)
authorMichael Sterrett <mr_bones_@gentoo.org>
Wed, 26 Aug 2015 19:15:54 +0000 (15:15 -0400)
committerMichael Sterrett <mr_bones_@gentoo.org>
Wed, 26 Aug 2015 19:16:38 +0000 (15:16 -0400)
Package-Manager: portage-2.2.20.1

games-strategy/lgeneral/Manifest
games-strategy/lgeneral/lgeneral-1.3.0.ebuild [new file with mode: 0644]

index 24598d8e2942f210eef441170644fba2a6465eaf..f8dcf71bf17464a4c4c210775efc6c19a4d12cdd 100644 (file)
@@ -1,2 +1,3 @@
 DIST lgeneral-1.2.4.tar.gz 1677195 SHA256 7207cba927f518b5962a4c5b709a8aca128fd0638c47984e9da0415ad2610c00 SHA512 c85cc6454b30d0ac84a2a4e0e35b9cca8b4ab3f8816f9bac607a439dde5eb667432596c09af3e5f1382572860eab4291dcbe045af7eef59cf879a4e9db9506cd WHIRLPOOL e25e7cb0ed6fabf408773a8aedb0e79ade10390f874d7c08a3624b273166a718630587afcde88ca0a9664e8634a0656c69e7aa5f9f708125cc1f381a12add7cd
+DIST lgeneral-1.3.0.tar.gz 1679182 SHA256 bd23962a8a98c1a3d3c176213c0b1845fd872ca68c141e2beff8d1a3792784ea SHA512 b958b4ee3fb6fa2b5e416cb30ddeca82cd17f0461a1afa6adc7d48d16f8e763e1610c3e05f561e442cc9460bdca64e2ac33cf616bd26f0ca8b2274c7e2b8bb41 WHIRLPOOL f00d2d0832727a1d90839bf6f1fd941a0c31e497a330dd991680146138f1dfb516e94e67a3ac8c20a1315e033313352a1d2f6a0e7f1153a7d365c2ef68581988
 DIST pg-data.tar.gz 410454 SHA256 f2f74022cf8c279451911dda0a57cffab26ebf11429d61a6596310340ed23f76 SHA512 b0df30dd9a9d0652acd8702d601c489e5d3a030854ceeb173d2daa656c00633a78a3f45814da9f4157b86544dec34eda02495742242653c7cdebba5ec9951516 WHIRLPOOL 69f22f28cf4639dab0e6cf90036c26178129d7f67decf8b95ca175bb224bb3b985cf80382e06e45db06ef21d9ab9819fc1821b3d633a67bbb06ba56a8b450022
diff --git a/games-strategy/lgeneral/lgeneral-1.3.0.ebuild b/games-strategy/lgeneral/lgeneral-1.3.0.ebuild
new file mode 100644 (file)
index 0000000..4a7d126
--- /dev/null
@@ -0,0 +1,100 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools gnome2-utils games
+
+MY_P="${P/_/}"
+MY_P="${MY_P/beta/beta-}"
+DESCRIPTION="A Panzer General clone written in SDL"
+HOMEPAGE="http://lgames.sourceforge.net/index.php?project=LGeneral"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz
+       mirror://sourceforge/${PN}/pg-data.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls"
+
+RDEPEND="media-libs/libsdl[sound,video]
+       media-libs/sdl-mixer
+       nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+       sys-devel/gettext"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+       sed -i \
+               -e '/desktop_DATA/d' \
+               -e '/icon_DATA/d' \
+               Makefile.am || die
+
+       cp /usr/share/gettext/config.rpath .
+       rm -f missing
+       mv configure.in configure.ac
+       eautoreconf
+
+       # Build a temporary lgc-pg that knows about ${WORKDIR}:
+       cp -pPR "${S}" "${WORKDIR}"/tmp-build || die
+       sed -i \
+               -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}:" \
+               -e "s:@D@::" \
+               {lgc-pg,src}/misc.c || die
+
+       cd "${WORKDIR}"/tmp-build || die
+       sed -i \
+               -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}:" \
+               -e "s:@D@:${D}:" \
+               {lgc-pg,src}/misc.c || die
+}
+
+src_configure() {
+       egamesconf \
+               $(use_enable nls)
+
+       # Build the temporary lgc-pg:
+       cd "${WORKDIR}"/tmp-build || die
+       egamesconf \
+               --disable-nls \
+               --datadir="${D}/${GAMES_DATADIR}"
+}
+
+src_compile() {
+       emake
+
+       # Build the temporary lgc-pg:
+       cd "${WORKDIR}"/tmp-build || die
+       emake
+}
+
+src_install() {
+       default
+       keepdir "${GAMES_DATADIR}"/${PN}/{ai_modules,music,terrain}
+
+       # Generate scenario data:
+       dodir "${GAMES_DATADIR}"/${PN}/gfx/{flags,units,terrain} #413901
+       SDL_VIDEODRIVER=dummy "${WORKDIR}"/tmp-build/lgc-pg/lgc-pg \
+               -s "${WORKDIR}"/pg-data \
+               -d "${D}/${GAMES_DATADIR}"/${PN} \
+               || die
+
+       doicon -s 48 lgeneral.png
+       make_desktop_entry ${PN} LGeneral
+       prepgamesdirs
+}
+
+pkg_preinst() {
+       games_pkg_preinst
+       gnome2_icon_savelist
+}
+
+pkg_postinst() {
+       games_pkg_postinst
+       gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+       gnome2_icon_cache_update
+}