1 |
commit: b72fe89da02876fcaa8387754553b717c894e0ae |
2 |
Author: Samuel Bauer <samuel.bauer <AT> yahoo <DOT> fr> |
3 |
AuthorDate: Thu Jun 10 19:09:09 2021 +0000 |
4 |
Commit: Haelwenn Monnier <contact <AT> hacktivis <DOT> me> |
5 |
CommitDate: Thu Jun 10 19:09:09 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b72fe89d |
7 |
|
8 |
games-puzzle/atris: new ebuild for old game |
9 |
|
10 |
Signed-off-by: Samuel Bauer <samuel.bauer <AT> yahoo.fr> |
11 |
|
12 |
games-puzzle/atris/Manifest | 2 + |
13 |
games-puzzle/atris/atris-1.0.7.ebuild | 59 +++++++++ |
14 |
.../atris/files/atris-1.0.7-fno-common.patch | 147 +++++++++++++++++++++ |
15 |
.../files/atris-1.0.7-path-and-fullscreen.patch | 63 +++++++++ |
16 |
games-puzzle/atris/metadata.xml | 11 ++ |
17 |
5 files changed, 282 insertions(+) |
18 |
|
19 |
diff --git a/games-puzzle/atris/Manifest b/games-puzzle/atris/Manifest |
20 |
new file mode 100644 |
21 |
index 000000000..dc64febe4 |
22 |
--- /dev/null |
23 |
+++ b/games-puzzle/atris/Manifest |
24 |
@@ -0,0 +1,2 @@ |
25 |
+DIST atris-1.0.7.tar.gz 441642 BLAKE2B 1ab97d88ad768568b8b2a2f3d4d5229b05c4f934ab48afee1a45ccba970b72b4fcbcbbae6d05b39854a63af309a4bc186f5b90fbaec926d525a3bef31bc0bd42 SHA512 501632d51e5c86a13805f7501ccf2c2f6bb3e840421ac5879453a3bd2f7f9188a1a25598db0ddbad4e4ce6d747df57c1904fa84812362d5cc6597b74aadacf48 |
26 |
+DIST atris-sounds-1.0.1.tar.gz 653737 BLAKE2B 1de104f86490b0fc292275ab3140e60c26e46f577fa21d45f4c50d43d3f7fa55cd99b9b54340e7aaffd35edb19f31aa3e4ac93b3204eb076679c06d57250c7b3 SHA512 50f056309401a1e71cebc198e44219fca39694e031400988becb08dcfb41f91916b1f22f7a2f67d332384bb77333678cb6c00e2819ee3144e8f9fd0361f8b704 |
27 |
|
28 |
diff --git a/games-puzzle/atris/atris-1.0.7.ebuild b/games-puzzle/atris/atris-1.0.7.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000..dc61f8b20 |
31 |
--- /dev/null |
32 |
+++ b/games-puzzle/atris/atris-1.0.7.ebuild |
33 |
@@ -0,0 +1,59 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+inherit desktop |
40 |
+ |
41 |
+DESCRIPTION="Alizarin tetris" |
42 |
+HOMEPAGE="https://www.wkiri.com/projects/atris/" |
43 |
+SRC_URI="http://www.gnu-darwin.org/distfiles/${P}.tar.gz |
44 |
+ http://www.gnu-darwin.org/distfiles/${PN}-sounds-1.0.1.tar.gz" |
45 |
+ |
46 |
+LICENSE="GPL-2" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64" |
49 |
+ |
50 |
+IUSE="doc +sound" |
51 |
+DEPEND=" |
52 |
+ acct-group/gamestat |
53 |
+ media-libs/freetype |
54 |
+ media-libs/libsdl |
55 |
+ media-libs/sdl-ttf |
56 |
+" |
57 |
+RDEPEND="${DEPEND}" |
58 |
+ |
59 |
+PATCHES=( |
60 |
+ "${FILESDIR}"/${P}-fno-common.patch |
61 |
+ "${FILESDIR}"/${P}-path-and-fullscreen.patch |
62 |
+) |
63 |
+ |
64 |
+src_install() { |
65 |
+ dobin atris |
66 |
+ insinto /usr/share/${PN} |
67 |
+ doins -r styles graphics |
68 |
+ |
69 |
+ if use sound; then |
70 |
+ cd "${WORKDIR}"/${PN}-sounds-1.0.1 |
71 |
+ doins -r sounds |
72 |
+ cd "${S}" |
73 |
+ fi |
74 |
+ |
75 |
+ if use doc; then |
76 |
+ dodoc -a html,jpg Docs |
77 |
+ fi |
78 |
+ dodoc AUTHORS NEWS README |
79 |
+ |
80 |
+ newicon icon.xpm ${PN}.xpm |
81 |
+ make_desktop_entry ${PN} Atris ${PN} BlocksGame |
82 |
+ |
83 |
+ echo "CONFIG_PROTECT=/var/games/${PN}/" > 99${PN} |
84 |
+ doenvd 99${PN} |
85 |
+ |
86 |
+ keepdir /var/games/${PN} |
87 |
+ insinto /var/games/${PN} |
88 |
+ doins Atris.* |
89 |
+ |
90 |
+ fowners :gamestat /var/games/${PN}/Atris.{Players,Scores} |
91 |
+ fperms 664 /var/games/${PN}/Atris.{Players,Scores} |
92 |
+} |
93 |
|
94 |
diff --git a/games-puzzle/atris/files/atris-1.0.7-fno-common.patch b/games-puzzle/atris/files/atris-1.0.7-fno-common.patch |
95 |
new file mode 100644 |
96 |
index 000000000..397bffc1a |
97 |
--- /dev/null |
98 |
+++ b/games-puzzle/atris/files/atris-1.0.7-fno-common.patch |
99 |
@@ -0,0 +1,147 @@ |
100 |
+diff --git a/atris.c b/atris.c |
101 |
+index dbdc258..61ed4b9 100644 |
102 |
+--- a/atris.c |
103 |
++++ b/atris.c |
104 |
+@@ -48,6 +48,8 @@ static sound_style *event_ss[2]; |
105 |
+ static AI_Player *event_ai[2]; |
106 |
+ static char *event_name[2]; |
107 |
+ extern int Score[2]; |
108 |
++GT gametype; |
109 |
++struct option_struct Options; |
110 |
+ |
111 |
+ /*************************************************************************** |
112 |
+ * Panic() |
113 |
+diff --git a/atris.h b/atris.h |
114 |
+index 4dc4d5b..19cc456 100644 |
115 |
+--- a/atris.h |
116 |
++++ b/atris.h |
117 |
+@@ -67,7 +67,7 @@ typedef enum { |
118 |
+ QUIT =6, |
119 |
+ DEMO =7 |
120 |
+ } GT; |
121 |
+-GT gametype; |
122 |
++extern GT gametype; |
123 |
+ |
124 |
+ #ifndef min |
125 |
+ #define min(a,b) ((a)<(b)?(a):(b)) |
126 |
+diff --git a/display.c b/display.c |
127 |
+index cbbca0d..f63f5cf 100644 |
128 |
+--- a/display.c |
129 |
++++ b/display.c |
130 |
+@@ -14,6 +14,25 @@ |
131 |
+ |
132 |
+ #include "xflame.pro" |
133 |
+ |
134 |
++SDL_Color color_white; |
135 |
++SDL_Color color_black; |
136 |
++SDL_Color color_red; |
137 |
++SDL_Color color_blue; |
138 |
++SDL_Color color_purple; |
139 |
++ |
140 |
++Uint32 int_black; |
141 |
++Uint32 int_white; |
142 |
++Uint32 int_grey; |
143 |
++Uint32 int_blue; |
144 |
++Uint32 int_med_blue; |
145 |
++Uint32 int_dark_blue; |
146 |
++Uint32 int_purple; |
147 |
++Uint32 int_dark_purple; |
148 |
++Uint32 int_solid_black; |
149 |
++ |
150 |
++SDL_Surface *screen, *widget_layer, *flame_layer; |
151 |
++TTF_Font *font, *sfont, *lfont, *hfont; /* normal, small , large, huge font */ |
152 |
++ |
153 |
+ struct layout_struct { |
154 |
+ /* the whole board layout */ |
155 |
+ SDL_Rect grid_border[2]; |
156 |
+diff --git a/display.h b/display.h |
157 |
+index db4d68a..6d71b9d 100644 |
158 |
+--- a/display.h |
159 |
++++ b/display.h |
160 |
+@@ -9,24 +9,24 @@ |
161 |
+ |
162 |
+ #include "SDL/SDL_ttf.h" |
163 |
+ |
164 |
+-SDL_Color color_white; |
165 |
+-SDL_Color color_black; |
166 |
+-SDL_Color color_red; |
167 |
+-SDL_Color color_blue; |
168 |
+-SDL_Color color_purple; |
169 |
++extern SDL_Color color_white; |
170 |
++extern SDL_Color color_black; |
171 |
++extern SDL_Color color_red; |
172 |
++extern SDL_Color color_blue; |
173 |
++extern SDL_Color color_purple; |
174 |
+ |
175 |
+-Uint32 int_black; |
176 |
+-Uint32 int_white; |
177 |
+-Uint32 int_grey; |
178 |
+-Uint32 int_blue; |
179 |
+-Uint32 int_med_blue; |
180 |
+-Uint32 int_dark_blue; |
181 |
+-Uint32 int_purple; |
182 |
+-Uint32 int_dark_purple; |
183 |
+-Uint32 int_solid_black; |
184 |
++extern Uint32 int_black; |
185 |
++extern Uint32 int_white; |
186 |
++extern Uint32 int_grey; |
187 |
++extern Uint32 int_blue; |
188 |
++extern Uint32 int_med_blue; |
189 |
++extern Uint32 int_dark_blue; |
190 |
++extern Uint32 int_purple; |
191 |
++extern Uint32 int_dark_purple; |
192 |
++extern Uint32 int_solid_black; |
193 |
+ |
194 |
+-SDL_Surface *screen, *widget_layer, *flame_layer; |
195 |
+-TTF_Font *font, *sfont, *lfont, *hfont; /* normal, small , large, huge font */ |
196 |
++extern SDL_Surface *screen, *widget_layer, *flame_layer; |
197 |
++extern TTF_Font *font, *sfont, *lfont, *hfont; /* normal, small , large, huge font */ |
198 |
+ |
199 |
+ #define int_border_color int_grey |
200 |
+ #define int_button_face1 int_dark_blue |
201 |
+diff --git a/options.h b/options.h |
202 |
+index 575fc1a..cf38b40 100644 |
203 |
+--- a/options.h |
204 |
++++ b/options.h |
205 |
+@@ -25,6 +25,7 @@ struct option_struct { |
206 |
+ int named_sound; |
207 |
+ int named_piece; |
208 |
+ int named_game; |
209 |
+-} Options; |
210 |
++}; |
211 |
++extern struct option_struct Options; |
212 |
+ |
213 |
+ #endif |
214 |
+diff --git a/piece.c b/piece.c |
215 |
+index 4c08eaf..6944165 100644 |
216 |
+--- a/piece.c |
217 |
++++ b/piece.c |
218 |
+@@ -33,6 +33,9 @@ |
219 |
+ #include "piece.h" |
220 |
+ #include "options.h" |
221 |
+ |
222 |
++color_style special_style; |
223 |
++SDL_Surface *edge[4]; /* hikari to kage */ |
224 |
++ |
225 |
+ /*************************************************************************** |
226 |
+ * load_piece_style() |
227 |
+ * Load a piece style from the given file. |
228 |
+diff --git a/piece.h b/piece.h |
229 |
+index bc4226c..a47abbe 100644 |
230 |
+--- a/piece.h |
231 |
++++ b/piece.h |
232 |
+@@ -67,13 +67,11 @@ typedef struct color_style_struct { |
233 |
+ int h; /* height of each color block */ |
234 |
+ } color_style; |
235 |
+ |
236 |
+-color_style special_style; |
237 |
+- |
238 |
+ #define HORIZ_LIGHT 0 |
239 |
+ #define VERT_LIGHT 1 |
240 |
+ #define HORIZ_DARK 2 |
241 |
+ #define VERT_DARK 3 |
242 |
+-SDL_Surface *edge[4]; /* hikari to kage */ |
243 |
++extern SDL_Surface *edge[4]; /* hikari to kage */ |
244 |
+ |
245 |
+ /* this structure holds all of the color styles we have been able to load |
246 |
+ * for this game */ |
247 |
|
248 |
diff --git a/games-puzzle/atris/files/atris-1.0.7-path-and-fullscreen.patch b/games-puzzle/atris/files/atris-1.0.7-path-and-fullscreen.patch |
249 |
new file mode 100644 |
250 |
index 000000000..b5fabe6d1 |
251 |
--- /dev/null |
252 |
+++ b/games-puzzle/atris/files/atris-1.0.7-path-and-fullscreen.patch |
253 |
@@ -0,0 +1,63 @@ |
254 |
+diff --git a/atris.c b/atris.c |
255 |
+index a621e22..234b05f 100644 |
256 |
+--- a/atris.c |
257 |
++++ b/atris.c |
258 |
+@@ -947,7 +947,6 @@ main(int argc, char *argv[]) |
259 |
+ /* Initialize the display in a 640x480 native-depth mode */ |
260 |
+ flags = // SDL_HWSURFACE | |
261 |
+ SDL_SWSURFACE | |
262 |
+- SDL_FULLSCREEN | |
263 |
+ // SDL_SRCCOLORKEY | |
264 |
+ // SDL_ANYFORMAT | |
265 |
+ 0; |
266 |
+diff --git a/configure b/configure |
267 |
+index 9411dd5..7d3af0c 100755 |
268 |
+--- a/configure |
269 |
++++ b/configure |
270 |
+@@ -6044,7 +6044,7 @@ case "$target" in |
271 |
+ CFLAGS="$CFLAGS -s" |
272 |
+ ;; |
273 |
+ *) |
274 |
+- GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE" |
275 |
++ GAME_INSTALLDIR="/usr/share/atris" |
276 |
+ ;; |
277 |
+ esac |
278 |
+ |
279 |
+diff --git a/highscore.c b/highscore.c |
280 |
+index 003e8f4..28c069d 100644 |
281 |
+--- a/highscore.c |
282 |
++++ b/highscore.c |
283 |
+@@ -59,9 +59,9 @@ save_high_scores() |
284 |
+ if (!loaded) |
285 |
+ return; |
286 |
+ |
287 |
+- fout = fopen("Atris.Scores","wt"); |
288 |
++ fout = fopen("/var/games/atris/Atris.Scores","wt"); |
289 |
+ if (!fout) { |
290 |
+- Debug("Unable to write High Score file [Atris.Scores]: %s\n", strerror(errno)); |
291 |
++ Debug("Unable to write High Score file [/var/games/atris/Atris.Scores]: %s\n", strerror(errno)); |
292 |
+ return; |
293 |
+ } |
294 |
+ |
295 |
+@@ -94,7 +94,7 @@ load_high_scores() |
296 |
+ loaded = TRUE; |
297 |
+ } |
298 |
+ |
299 |
+- fin = fopen("Atris.Scores", "r"); |
300 |
++ fin = fopen("/var/games/atris/Atris.Scores", "r"); |
301 |
+ if (fin) { |
302 |
+ |
303 |
+ for (i=0; !feof(fin) && i < NUM_HIGH_SCORES; i++) { |
304 |
+diff --git a/identity.c b/identity.c |
305 |
+index 941ab57..f3dc160 100644 |
306 |
+--- a/identity.c |
307 |
++++ b/identity.c |
308 |
+@@ -17,7 +17,7 @@ |
309 |
+ #include "xflame.pro" |
310 |
+ #include "display.pro" |
311 |
+ |
312 |
+-#define ID_FILENAME "Atris.Players" |
313 |
++#define ID_FILENAME "/var/games/atris/Atris.Players" |
314 |
+ |
315 |
+ /*************************************************************************** |
316 |
+ * input_string() |
317 |
|
318 |
diff --git a/games-puzzle/atris/metadata.xml b/games-puzzle/atris/metadata.xml |
319 |
new file mode 100644 |
320 |
index 000000000..68c4ef50a |
321 |
--- /dev/null |
322 |
+++ b/games-puzzle/atris/metadata.xml |
323 |
@@ -0,0 +1,11 @@ |
324 |
+<?xml version="1.0" encoding="UTF-8"?> |
325 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
326 |
+<pkgmetadata> |
327 |
+<maintainer type="person"> |
328 |
+ <name>mazes-80</name> |
329 |
+ <email>mazes-80@××××.org</email> |
330 |
+</maintainer> |
331 |
+<use> |
332 |
+ <flag name="sound">Enable atris sound pack</flag> |
333 |
+</use> |
334 |
+</pkgmetadata> |