Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-strategy/lgeneral/
Date: Wed, 02 May 2018 19:28:35
Message-Id: 1525289269.130df10797ad09c619b1346a324643f509f4d910.pacho@gentoo
1 commit: 130df10797ad09c619b1346a324643f509f4d910
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 2 18:00:06 2018 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Wed May 2 19:27:49 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=130df107
7
8 games-strategy/lgeneral: Stop using games.eclass
9
10 Package-Manager: Portage-2.3.31, Repoman-2.3.9
11
12 games-strategy/lgeneral/lgeneral-1.3.1-r2.ebuild | 98 ++++++++++++++++++++++++
13 1 file changed, 98 insertions(+)
14
15 diff --git a/games-strategy/lgeneral/lgeneral-1.3.1-r2.ebuild b/games-strategy/lgeneral/lgeneral-1.3.1-r2.ebuild
16 new file mode 100644
17 index 00000000000..bc431e1c293
18 --- /dev/null
19 +++ b/games-strategy/lgeneral/lgeneral-1.3.1-r2.ebuild
20 @@ -0,0 +1,98 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +inherit autotools desktop gnome2-utils
26 +
27 +MY_P="${P/_/}"
28 +MY_P="${MY_P/beta/beta-}"
29 +DESCRIPTION="A Panzer General clone written in SDL"
30 +HOMEPAGE="http://lgames.sourceforge.net/LGeneral/"
31 +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz
32 + mirror://sourceforge/${PN}/pg-data.tar.gz"
33 +
34 +LICENSE="GPL-2+"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~x86"
37 +IUSE="nls"
38 +
39 +RDEPEND="
40 + media-libs/libsdl[sound,video]
41 + media-libs/sdl-mixer
42 + nls? ( virtual/libintl )
43 +"
44 +DEPEND="${RDEPEND}
45 + sys-devel/gettext
46 +"
47 +
48 +S="${WORKDIR}/${MY_P}"
49 +
50 +src_prepare() {
51 + default
52 + sed -i \
53 + -e '/desktop_DATA/d' \
54 + -e '/icon_DATA/d' \
55 + Makefile.am || die
56 +
57 + cp /usr/share/gettext/config.rpath .
58 + rm -f missing
59 + mv configure.in configure.ac
60 + eautoreconf
61 +
62 + # Build a temporary lgc-pg that knows about ${WORKDIR}:
63 + cp -pPR "${S}" "${WORKDIR}"/tmp-build || die
64 + sed -i \
65 + -e "s:@GENTOO_DATADIR@:/usr/share:" \
66 + -e "s:@D@::" \
67 + {lgc-pg,src}/misc.c || die
68 +
69 + cd "${WORKDIR}"/tmp-build || die
70 + sed -i \
71 + -e "s:@GENTOO_DATADIR@:/usr/share:" \
72 + -e "s:@D@:${D}:" \
73 + {lgc-pg,src}/misc.c || die
74 +}
75 +
76 +src_configure() {
77 + econf $(use_enable nls)
78 +
79 + # Build the temporary lgc-pg:
80 + cd "${WORKDIR}"/tmp-build || die
81 + econf \
82 + --disable-nls \
83 + --datadir="${D}/usr/share"
84 +}
85 +
86 +src_compile() {
87 + emake
88 +
89 + # Build the temporary lgc-pg:
90 + cd "${WORKDIR}"/tmp-build || die
91 + emake
92 +}
93 +
94 +src_install() {
95 + default
96 + keepdir /usr/share/${PN}/{ai_modules,music,terrain}
97 +
98 + # Generate scenario data:
99 + dodir /usr/share/${PN}/gfx/{flags,units,terrain} #413901
100 + SDL_VIDEODRIVER=dummy "${WORKDIR}"/tmp-build/lgc-pg/lgc-pg --separate-bridges \
101 + -s "${WORKDIR}"/pg-data \
102 + -d "${D}"/usr/share/${PN} || die
103 +
104 + doicon -s 48 lgeneral.png
105 + make_desktop_entry ${PN} LGeneral
106 +}
107 +
108 +pkg_preinst() {
109 + gnome2_icon_savelist
110 +}
111 +
112 +pkg_postinst() {
113 + gnome2_icon_cache_update
114 +}
115 +
116 +pkg_postrm() {
117 + gnome2_icon_cache_update
118 +}