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-puzzle/neverball/
Date: Tue, 13 Jul 2021 16:11:31
Message-Id: 1626192464.87fee83623eb2ab6af08e3fff96681082a8c136f.ionen@gentoo
1 commit: 87fee83623eb2ab6af08e3fff96681082a8c136f
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 13 14:56:21 2021 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 13 16:07:44 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87fee836
7
8 games-puzzle/neverball: EAPI 6->7, fix prefix and AbsoluteSymlink
9
10 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
11
12 games-puzzle/neverball/neverball-1.6.0-r1.ebuild | 118 ++++++++++-------------
13 1 file changed, 52 insertions(+), 66 deletions(-)
14
15 diff --git a/games-puzzle/neverball/neverball-1.6.0-r1.ebuild b/games-puzzle/neverball/neverball-1.6.0-r1.ebuild
16 index de40b601028..abb40a2d14c 100644
17 --- a/games-puzzle/neverball/neverball-1.6.0-r1.ebuild
18 +++ b/games-puzzle/neverball/neverball-1.6.0-r1.ebuild
19 @@ -1,8 +1,9 @@
20 -# Copyright 1999-2020 Gentoo Authors
21 +# Copyright 1999-2021 Gentoo Authors
22 # Distributed under the terms of the GNU General Public License v2
23
24 -EAPI=6
25 -inherit desktop gnome2-utils
26 +EAPI=7
27 +
28 +inherit desktop eapi8-dosym toolchain-funcs xdg
29
30 DESCRIPTION="Clone of Super Monkey Ball using SDL/OpenGL"
31 HOMEPAGE="https://neverball.org"
32 @@ -12,87 +13,72 @@ LICENSE="GPL-2+ IJG"
33 SLOT="0"
34 KEYWORDS="~amd64 ~x86"
35 IUSE="nls"
36 -RESTRICT="test"
37 +RESTRICT="test" # not a test suite, only starts ./neverball
38
39 -RDEPEND="
40 - media-libs/libsdl2[sound,joystick,opengl,video]
41 - media-libs/sdl2-ttf
42 - media-libs/libpng:0=
43 - virtual/jpeg:0
44 +DEPEND="
45 + dev-games/physfs
46 + media-libs/libpng:=
47 + media-libs/libsdl2[joystick,opengl,sound,video]
48 media-libs/libvorbis
49 + media-libs/sdl2-ttf
50 + virtual/jpeg
51 virtual/opengl
52 - dev-games/physfs
53 + nls? ( virtual/libintl )"
54 +RDEPEND="
55 + ${DEPEND}
56 media-fonts/dejavu
57 - media-fonts/wqy-microhei
58 - nls? ( virtual/libintl )
59 -"
60 -DEPEND="${RDEPEND}
61 - sys-devel/gettext
62 -"
63 + media-fonts/wqy-microhei"
64 +BDEPEND="nls? ( sys-devel/gettext )"
65
66 -PATCHES=("${FILESDIR}"/${P}-gcc-10.patch)
67 +PATCHES=(
68 + "${FILESDIR}"/${P}-gcc-10.patch
69 +)
70
71 src_prepare() {
72 default
73 - sed -i \
74 - -e 's:mapc:neverball-mapc:g' \
75 - -e 's:MAPC:NEVERBALL-MAPC:g' \
76 - -e '1 s/ 1 / 6 /' \
77 - dist/mapc.1 || die
78 - sed -i \
79 - -e '/CFLAGS.*O2/s:-O2:$(E_CFLAGS):' \
80 - -e '/CXXFLAGS.*O2/s:-O2:$(E_CXXFLAGS):' \
81 - -e "/^MAPC_TARG/s/mapc/${PN}-mapc/" \
82 - Makefile || die
83 +
84 + # adjust man page for namespaced mapc executable (bug #50538)
85 + sed -i "s/mapc/${PN}-mapc/;s/MAPC/${PN^^}-MAPC/;1s/1/6/" dist/mapc.1 || die
86 }
87
88 src_compile() {
89 - emake \
90 - ENABLE_NLS=$(use nls && echo 1 || echo 0) \
91 - E_CFLAGS="${CFLAGS}" \
92 - E_CXXFLAGS="${CXXFLAGS}" \
93 - LOCALEDIR=/usr/share/locale \
94 - DATADIR="/usr/share/${PN}"
95 + tc-export CC CXX
96 +
97 + local emakeargs=(
98 + DATADIR="${EPREFIX}"/usr/share/${PN}
99 + LOCALEDIR="${EPREFIX}"/usr/share/locale
100 + ENABLE_NLS=$(usex nls 1 0)
101 + CFLAGS="${CFLAGS}"
102 + CPPFLAGS="${CPPFLAGS}"
103 + CXXFLAGS="${CXXFLAGS}"
104 + )
105 + emake "${emakeargs[@]}"
106 }
107
108 src_install() {
109 - local font
110 -
111 - dobin ${PN}-mapc neverball neverputt
112 - insinto "/usr/share/${PN}"
113 - doins -r data/*
114 - for font in DejaVuSans-Bold.ttf wqy-microhei.ttc; do
115 - rm -f "${ED}/usr/share/${PN}"/ttf/${font}
116 - dosym /usr/share/fonts/*/${font} \
117 - "/usr/share/${PN}"/ttf/${font}
118 - done
119 - if [[ -d locale ]] ; then
120 - insinto /usr/share
121 - doins -r locale
122 - fi
123 - dodoc doc/{authors.txt,manual.txt,release-notes.md} README.md
124 + dobin neverball neverputt
125 + newbin mapc ${PN}-mapc
126 +
127 + doman dist/{neverball,neverputt}.6
128 + newman dist/mapc.1 neverball-mapc.6
129
130 - local res name
131 + insinto /usr/share/${PN}
132 + doins -r data/.
133 +
134 + # unbundle fonts
135 + dosym8 -r /usr/share/{fonts/dejavu,${PN}/ttf}/DejaVuSans-Bold.ttf
136 + dosym8 -r /usr/share/{fonts/wqy-microhei,${PN}/ttf}/wqy-microhei.ttc
137 +
138 + insinto /usr/share
139 + [[ -d locale ]] && doins -r locale
140 +
141 + dodoc README.md doc/{authors.txt,manual.txt,release-notes.md}
142 +
143 + local name res
144 for name in ball putt; do
145 for res in 16 32 64 128 256; do
146 newicon -s ${res} dist/never${name}_${res}.png never${name}.png
147 done
148 done
149 -
150 - doman dist/*.6
151 - newman dist/mapc.1 neverball-mapc.6
152 - make_desktop_entry neverball Neverball
153 - make_desktop_entry neverputt Neverputt neverputt
154 -}
155 -
156 -pkg_postinst() {
157 - gnome2_icon_cache_update
158 -}
159 -
160 -pkg_preinst() {
161 - gnome2_icon_savelist
162 -}
163 -
164 -pkg_postrm() {
165 - gnome2_icon_cache_update
166 + domenu dist/{neverball,neverputt}.desktop
167 }