1 |
commit: 851b2c3c1af187d6b3621dacb7fa0fcf54e3c780 |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 15 02:22:36 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 15 02:42:00 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=851b2c3c |
7 |
|
8 |
games-action/spacearyarya-kxl: EAPI6->8, use gamestat, add font dep |
9 |
|
10 |
Removed paths patch that was mostly for /usr/games, and instead |
11 |
require use install-data target and remove .score (replaced by |
12 |
a score file in /var/games that can now be written to). |
13 |
|
14 |
Add media-fonts/font-bitstream-100dpi as it'd crash (later) without. |
15 |
|
16 |
Also fix .desktop icon, bmp is not valid for XDG icons. |
17 |
|
18 |
This brings the ebuild/patch layout more identical to geki2/3 |
19 |
given this game is actually geki4. |
20 |
|
21 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
22 |
|
23 |
games-action/spacearyarya-kxl/Manifest | 1 + |
24 |
...s.patch => spacearyarya-kxl-1.0.2-cflags.patch} | 10 ++- |
25 |
.../files/spacearyarya-kxl-1.0.2-clang.patch | 22 +++++-- |
26 |
.../spacearyarya-kxl-1.0.2-gentoo-paths.patch | 74 ---------------------- |
27 |
.../spacearyarya-kxl-1.0.2-r2.ebuild | 43 ------------- |
28 |
.../spacearyarya-kxl-1.0.2-r3.ebuild | 56 ++++++++++++++++ |
29 |
6 files changed, 76 insertions(+), 130 deletions(-) |
30 |
|
31 |
diff --git a/games-action/spacearyarya-kxl/Manifest b/games-action/spacearyarya-kxl/Manifest |
32 |
index 8ad31c7ac1a..7486f9d6158 100644 |
33 |
--- a/games-action/spacearyarya-kxl/Manifest |
34 |
+++ b/games-action/spacearyarya-kxl/Manifest |
35 |
@@ -1 +1,2 @@ |
36 |
DIST SpaceAryarya-KXL-1.0.2.tar.gz 279894 BLAKE2B 1e7d24107d21396d4463924c7e5665271c14c6ba84f600f126128195ac9d6a08bd112cb6730b1931cf113700d7cae18367359639c8c8a10073a2395bcdc87948 SHA512 1109606741bab6c290395cdfd8d19cf12e68cfef41f50164586c316fc425a32232e0f8dd822207d969c27c3f7a8478d1a65f36fe5468f3cfa8932c99ab3cb125 |
37 |
+DIST spacearyarya-kxl.png 4853 BLAKE2B e8dcaf2e75f18900d67c68f75939ba030dc8207d4a2df1b465ce516527d846c4b44d105f85afcb0750dbfc6b33c9030da34c863b6e8f09f120d855d7361cce67 SHA512 f47c497f28c4cb22a518c8bc593a443aa0f52a600db04b6a3d33006b40aa57c11bdedd97a272587d6751bee04a593965c4f348ad5e7dff4deb276b7d89243e2e |
38 |
|
39 |
diff --git a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-flags.patch b/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-cflags.patch |
40 |
similarity index 50% |
41 |
rename from games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-flags.patch |
42 |
rename to games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-cflags.patch |
43 |
index 2239858be99..66cd0b7fe1b 100644 |
44 |
--- a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-flags.patch |
45 |
+++ b/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-cflags.patch |
46 |
@@ -1,11 +1,9 @@ |
47 |
-respect CFLAGS |
48 |
- |
49 |
+https://bugs.gentoo.org/429422 |
50 |
--- a/src/Makefile.am |
51 |
+++ b/src/Makefile.am |
52 |
-@@ -5,5 +5,5 @@ spacearyarya_SOURCES = extern.h \ |
53 |
- your.c your.h ranking.c ranking.h \ |
54 |
- boss.c boss.h |
55 |
- |
56 |
+@@ -6,4 +6,4 @@ |
57 |
+ boss.c boss.h |
58 |
+ |
59 |
-CFLAGS = @X_CFLAGS@ @KXL_CFLAGS@ |
60 |
+AM_CFLAGS = @X_CFLAGS@ @KXL_CFLAGS@ |
61 |
LIBS = @X_LIBS@ -lX11 @KXL_LIBS@ -lKXL |
62 |
|
63 |
diff --git a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-clang.patch b/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-clang.patch |
64 |
index 3b9b68b745c..7115b4a2382 100644 |
65 |
--- a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-clang.patch |
66 |
+++ b/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-clang.patch |
67 |
@@ -1,11 +1,19 @@ |
68 |
---- a/src/ranking.c.bak 2016-07-27 16:42:34.367945713 -0500 |
69 |
-+++ b/src/ranking.c 2016-07-27 16:43:34.679949783 -0500 |
70 |
-@@ -5,7 +5,7 @@ |
71 |
- /********************** |
72 |
- ¥¹¥³¥¢¥é¥ó¥¥ó¥° |
73 |
+Use void so that clang does not complain about missing (unused) |
74 |
+return value, and also add missing string.h. |
75 |
+--- a/src/ranking.c |
76 |
++++ b/src/ranking.c |
77 |
+@@ -1,2 +1,3 @@ |
78 |
+ #include <pwd.h> |
79 |
++#include <string.h> |
80 |
+ #include "geki4.h" |
81 |
+@@ -7,3 +8,3 @@ |
82 |
**********************/ |
83 |
-int ScoreRanking(void) |
84 |
+void ScoreRanking(void) |
85 |
{ |
86 |
- Uint16 i, j, k; |
87 |
- struct passwd *pw; |
88 |
+--- a/src/ranking.h |
89 |
++++ b/src/ranking.h |
90 |
+@@ -3,2 +3,3 @@ |
91 |
+ |
92 |
++void ScoreRanking(void); |
93 |
+ void RankingScore(void); |
94 |
|
95 |
diff --git a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-gentoo-paths.patch b/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-gentoo-paths.patch |
96 |
deleted file mode 100644 |
97 |
index 81321b76857..00000000000 |
98 |
--- a/games-action/spacearyarya-kxl/files/spacearyarya-kxl-1.0.2-gentoo-paths.patch |
99 |
+++ /dev/null |
100 |
@@ -1,74 +0,0 @@ |
101 |
---- a/bmp/Makefile.am |
102 |
-+++ b/bmp/Makefile.am |
103 |
-@@ -1,4 +1,4 @@ |
104 |
--bmpdir = $(prefix)/share/SpaceAryarya/bmp |
105 |
-+bmpdir = $(BMP_PATH) |
106 |
- bmp_DATA = my.bmp enemy1.bmp shot.bmp bomb.bmp\ |
107 |
- enemy2.bmp kage.bmp wall.bmp wall2.bmp eshot.bmp\ |
108 |
- boss1_b.bmp boss1_do.bmp boss1_f.bmp\ |
109 |
---- a/configure.in |
110 |
-+++ b/configure.in |
111 |
-@@ -25,17 +25,20 @@ |
112 |
- BMP_PATH=/usr/local/share/SpaceAryarya/bmp |
113 |
- WAV_PATH=/usr/local/share/SpaceAryarya/wav |
114 |
- else |
115 |
-- DATA_PATH=$prefix/share/SpaceAryarya/data |
116 |
-- BMP_PATH=$prefix/share/SpaceAryarya/bmp |
117 |
-- WAV_PATH=$prefix/share/SpaceAryarya/wav |
118 |
-+ DATA_PATH=$datadir/SpaceAryarya/data |
119 |
-+ BMP_PATH=$datadir/SpaceAryarya/bmp |
120 |
-+ WAV_PATH=$datadir/SpaceAryarya/wav |
121 |
-+ SCORE_PATH=$localstatedir/SpaceAryarya |
122 |
- fi |
123 |
- AC_DEFINE_UNQUOTED(DATA_PATH,"$DATA_PATH") |
124 |
- AC_DEFINE_UNQUOTED(BMP_PATH,"$BMP_PATH") |
125 |
- AC_DEFINE_UNQUOTED(WAV_PATH,"$WAV_PATH") |
126 |
-+AC_DEFINE_UNQUOTED(SCORE_PATH,"$SCORE_PATH") |
127 |
- AC_DEFINE_UNQUOTED(TITLE,"$PACKAGE $VERSION") |
128 |
- AC_SUBST(DATA_PATH) |
129 |
- AC_SUBST(BMP_PATH) |
130 |
- AC_SUBST(WAV_PATH) |
131 |
-+AC_SUBST(SCORE_PATH) |
132 |
- |
133 |
- AC_OUTPUT([data/Makefile wav/Makefile bmp/Makefile src/Makefile |
134 |
- spacearyarya.spec Makefile]) |
135 |
---- a/data/Makefile.am |
136 |
-+++ b/data/Makefile.am |
137 |
-@@ -1,6 +1,7 @@ |
138 |
--datadir = $(prefix)/share/SpaceAryarya/data |
139 |
-+datadir = $(DATA_PATH) |
140 |
- data_DATA = stage1.dat stage2.dat |
141 |
- EXTRA_DIST = stage1.dat stage2.dat .score |
142 |
- |
143 |
--install: |
144 |
-- $(INSTALL) -c -m 666 ./.score $(DESTDIR)$(DATA_PATH) |
145 |
-+install-data-local: |
146 |
-+ $(mkinstalldirs) $(DESTDIR)$(SCORE_PATH) |
147 |
-+ $(INSTALL) -m 660 .score $(DESTDIR)$(SCORE_PATH) |
148 |
---- a/src/ranking.c |
149 |
-+++ b/src/ranking.c |
150 |
-@@ -36,7 +36,7 @@ |
151 |
- FILE *fp; |
152 |
- Uint16 i; |
153 |
- |
154 |
-- if ((fp = fopen(DATA_PATH "/.score", "r"))) { |
155 |
-+ if ((fp = fopen(SCORE_PATH "/.score", "r"))) { |
156 |
- fscanf(fp, "%d", &(Root->HiScore)); |
157 |
- for (i = 0; i < 5; i ++) |
158 |
- fscanf(fp, "%d %d %s", |
159 |
-@@ -65,7 +65,7 @@ |
160 |
- FILE *fp; |
161 |
- Uint16 i; |
162 |
- |
163 |
-- if ((fp = fopen(DATA_PATH "/.score", "w"))) { |
164 |
-+ if ((fp = fopen(SCORE_PATH "/.score", "w"))) { |
165 |
- fprintf(fp, "%d\n", Root->HiScore); |
166 |
- for (i = 0; i < 5; i ++) |
167 |
- fprintf(fp, "%d %d %s\n", |
168 |
---- a/wav/Makefile.am |
169 |
-+++ b/wav/Makefile.am |
170 |
-@@ -1,3 +1,3 @@ |
171 |
--wavdir = $(prefix)/share/SpaceAryarya/wav |
172 |
-+wavdir = $(WAV_PATH) |
173 |
- wav_DATA = bgm1.wav bomb.wav hit.wav fire.wav die.wav boss.wav |
174 |
- EXTRA_DIST = bgm1.wav bomb.wav hit.wav fire.wav die.wav boss.wav |
175 |
|
176 |
diff --git a/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r2.ebuild b/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r2.ebuild |
177 |
deleted file mode 100644 |
178 |
index 5e97b2431a5..00000000000 |
179 |
--- a/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r2.ebuild |
180 |
+++ /dev/null |
181 |
@@ -1,43 +0,0 @@ |
182 |
-# Copyright 1999-2018 Gentoo Foundation |
183 |
-# Distributed under the terms of the GNU General Public License v2 |
184 |
- |
185 |
-EAPI=6 |
186 |
- |
187 |
-inherit autotools desktop |
188 |
- |
189 |
-MY_P=SpaceAryarya-KXL-${PV} |
190 |
-DESCRIPTION="A 2D/3D shooting game" |
191 |
-HOMEPAGE="http://triring.net/ps2linux/games/kxl/kxlgames.html" |
192 |
-SRC_URI="mirror://gentoo/${MY_P}.tar.gz" |
193 |
- |
194 |
-LICENSE="GPL-2" |
195 |
-SLOT="0" |
196 |
-KEYWORDS="~amd64 ~x86" |
197 |
-IUSE="" |
198 |
- |
199 |
-DEPEND="dev-games/KXL" |
200 |
-RDEPEND="${DEPEND} |
201 |
- media-fonts/font-adobe-100dpi |
202 |
- media-fonts/font-bitstream-100dpi" |
203 |
- |
204 |
-S=${WORKDIR}/${MY_P} |
205 |
- |
206 |
-PATCHES=( |
207 |
- "${FILESDIR}"/${P}-gentoo-paths.patch |
208 |
- "${FILESDIR}"/${P}-flags.patch |
209 |
- "${FILESDIR}"/${P}-clang.patch |
210 |
-) |
211 |
- |
212 |
-src_prepare() { |
213 |
- default |
214 |
- |
215 |
- mv configure.{in,ac} |
216 |
- rm aclocal.m4 |
217 |
- eautoreconf |
218 |
-} |
219 |
- |
220 |
-src_install() { |
221 |
- default |
222 |
- newicon bmp/enemy1.bmp ${PN}.bmp |
223 |
- make_desktop_entry spacearyarya SpaceAryarya /usr/share/pixmaps/${PN}.bmp |
224 |
-} |
225 |
|
226 |
diff --git a/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r3.ebuild b/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r3.ebuild |
227 |
new file mode 100644 |
228 |
index 00000000000..935cf953f9f |
229 |
--- /dev/null |
230 |
+++ b/games-action/spacearyarya-kxl/spacearyarya-kxl-1.0.2-r3.ebuild |
231 |
@@ -0,0 +1,56 @@ |
232 |
+# Copyright 1999-2021 Gentoo Authors |
233 |
+# Distributed under the terms of the GNU General Public License v2 |
234 |
+ |
235 |
+EAPI=8 |
236 |
+ |
237 |
+inherit autotools desktop |
238 |
+ |
239 |
+MY_P="SpaceAryarya-KXL-${PV}" |
240 |
+ |
241 |
+DESCRIPTION="2D/3D shooting game" |
242 |
+HOMEPAGE="http://triring.net/ps2linux/games/kxl/kxlgames.html" |
243 |
+SRC_URI=" |
244 |
+ mirror://gentoo/${MY_P}.tar.gz |
245 |
+ https://dev.gentoo.org/~ionen/distfiles/${PN}.png" |
246 |
+S="${WORKDIR}/${MY_P}" |
247 |
+ |
248 |
+LICENSE="GPL-2" |
249 |
+SLOT="0" |
250 |
+KEYWORDS="~amd64 ~x86" |
251 |
+ |
252 |
+DEPEND=" |
253 |
+ acct-group/gamestat |
254 |
+ dev-games/KXL" |
255 |
+RDEPEND=" |
256 |
+ ${DEPEND} |
257 |
+ media-fonts/font-adobe-100dpi |
258 |
+ media-fonts/font-bitstream-100dpi" |
259 |
+ |
260 |
+PATCHES=( |
261 |
+ "${FILESDIR}"/${P}-cflags.patch |
262 |
+ "${FILESDIR}"/${P}-clang.patch |
263 |
+) |
264 |
+ |
265 |
+src_prepare() { |
266 |
+ default |
267 |
+ |
268 |
+ sed -i "s|DATA_PATH \"/.score\"|\"${EPREFIX}/var/games/${PN}.hs\"|" src/ranking.c || die |
269 |
+ |
270 |
+ eautoreconf |
271 |
+} |
272 |
+ |
273 |
+src_install() { |
274 |
+ emake -C data DESTDIR="${D}" install-dataDATA |
275 |
+ default |
276 |
+ |
277 |
+ rm "${ED}"/usr/share/SpaceAryarya/data/.score |
278 |
+ insinto /var/games |
279 |
+ newins data/.score ${PN}.hs |
280 |
+ |
281 |
+ fowners :gamestat /var/games/${PN}.hs /usr/bin/spacearyarya |
282 |
+ fperms g+s /usr/bin/spacearyarya |
283 |
+ fperms 660 /var/games/${PN}.hs |
284 |
+ |
285 |
+ doicon "${DISTDIR}"/${PN}.png |
286 |
+ make_desktop_entry spacearyarya SpaceAryarya |
287 |
+} |