Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-arcade/missile/
Date: Mon, 28 Jun 2021 16:49:29
Message-Id: 1624898557.49328b8b0cd28198e81c606e8f68119373611cc2.ionen@gentoo
1 commit: 49328b8b0cd28198e81c606e8f68119373611cc2
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 28 03:04:04 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 28 16:42:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49328b8b
7
8 games-arcade/missile: replace workarounds, EAPI 6->8, misc fixes
9
10 Previously would call cc directly, didn't use pkg-config, needs
11 patches and sed to respect flags, etc.. Considering it's a single C
12 file that likely won't get new versions, just compile it directly.
13
14 Also no longer install unused zaurus graphics data, fix prefix,
15 and make sound optional.
16
17 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
18
19 games-arcade/missile/missile-1.0.1-r2.ebuild | 49 ++++++++++++++++++++++++++++
20 1 file changed, 49 insertions(+)
21
22 diff --git a/games-arcade/missile/missile-1.0.1-r2.ebuild b/games-arcade/missile/missile-1.0.1-r2.ebuild
23 new file mode 100644
24 index 00000000000..1c473e3b58e
25 --- /dev/null
26 +++ b/games-arcade/missile/missile-1.0.1-r2.ebuild
27 @@ -0,0 +1,49 @@
28 +# Copyright 1999-2021 Gentoo Authors
29 +# Distributed under the terms of the GNU General Public License v2
30 +
31 +EAPI=8
32 +
33 +inherit desktop flag-o-matic toolchain-funcs
34 +
35 +DESCRIPTION="Port of the Atari Missile Command game for Linux"
36 +HOMEPAGE="http://missile.sourceforge.net/"
37 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
38 +
39 +LICENSE="GPL-2+"
40 +SLOT="0"
41 +KEYWORDS="~alpha ~amd64 ~x86"
42 +IUSE="+sound"
43 +
44 +RDEPEND="
45 + media-libs/libsdl[sound?,video]
46 + media-libs/sdl-image[png]
47 + sound? ( media-libs/sdl-mixer )"
48 +DEPEND="${RDEPEND}"
49 +BDEPEND="virtual/pkgconfig"
50 +
51 +src_compile() {
52 + tc-export CC
53 +
54 + local cppargs=(
55 + -DDATA="'\"${EPREFIX}/usr/share/${PN}\"'"
56 + -DVERSION=\\\"${PV}\\\"
57 + $(usev sound -DUSE_SOUND)
58 + $($(tc-getPKG_CONFIG) --cflags sdl SDL_image $(usev sound SDL_mixer))
59 + )
60 + append-cppflags "${cppargs[@]}"
61 +
62 + LDLIBS="$($(tc-getPKG_CONFIG) --libs sdl SDL_image $(usev sound SDL_mixer)) -lm" \
63 + emake -f /dev/null ${PN}
64 +}
65 +
66 +src_install() {
67 + dobin ${PN}
68 +
69 + insinto /usr/share/${PN}
70 + doins -r data/{graphics,missile_icon.png,sound}
71 +
72 + einstalldocs
73 +
74 + newicon icons/${PN}_icon_red.png ${PN}.png
75 + make_desktop_entry ${PN} "Missile Command"
76 +}