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/conveysdl/files/, games-arcade/conveysdl/
Date: Thu, 11 Aug 2022 18:47:29
Message-Id: 1660243446.9dd4d3ff586d86bfa9aac3e92bd56718ff33e25e.ionen@gentoo
1 commit: 9dd4d3ff586d86bfa9aac3e92bd56718ff33e25e
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 11 15:22:03 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 11 18:44:06 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9dd4d3ff
7
8 games-arcade/conveysdl: EAPI6->8, misc changes
9
10 * use No_homepage/mirror wrt bug #680556 (no replacement known)
11 * add missing icon
12 * tidy patches and add bugref
13 * convert seds to patch
14 * use flag-o-matic and pkg-config to handle flags and add EPREFIX
15 * install the readme (ebuild went through the trouble to
16 modify it but didn't install it)
17
18 Closes: https://bugs.gentoo.org/680556
19 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
20
21 games-arcade/conveysdl/Manifest | 1 +
22 games-arcade/conveysdl/conveysdl-1.3-r1.ebuild | 55 ----------------------
23 games-arcade/conveysdl/conveysdl-1.3-r2.ebuild | 52 ++++++++++++++++++++
24 .../conveysdl/files/conveysdl-1.3-arrays.patch | 23 +++------
25 .../conveysdl/files/conveysdl-1.3-audio.patch | 15 ++++++
26 .../conveysdl/files/conveysdl-1.3-speed.patch | 39 ++++-----------
27 6 files changed, 83 insertions(+), 102 deletions(-)
28
29 diff --git a/games-arcade/conveysdl/Manifest b/games-arcade/conveysdl/Manifest
30 index f32988e47ccf..055890135264 100644
31 --- a/games-arcade/conveysdl/Manifest
32 +++ b/games-arcade/conveysdl/Manifest
33 @@ -1 +1,2 @@
34 DIST conveysdl.1.3.tar 429568 BLAKE2B 950952ad311bb51855bbd1cf3bf25b750d067db1cef8333f44ac3a96f30033f700efb9771d3050be6a3acc63c79b49fa8d64a1a11a088a777a13f21fb82a4c81 SHA512 fe6f91cdd63ae1019cb99613618e44ceeddb4080ad5e50bd8ce0abf27e057617d3658a29b2faf668cbc3b0887f1a4a05cadadb060f69d850c3d85c9e7190dd8a
35 +DIST conveysdl.png 328 BLAKE2B a62da06757da9e103e7156a5fbda7b9a7e0381aa6d203fe4ed7e46568073eef6287a955303a227975f9e073dbab3bad990a8033200da204059887bb8078203c8 SHA512 dcf99bc5112189a5d33a183a8a6ecad3b70456a75112a3caece1d87f967fcb14279f6a2f9a47dc67967806c09b5725cb2f239c29be9370336c0f76bed4db1867
36
37 diff --git a/games-arcade/conveysdl/conveysdl-1.3-r1.ebuild b/games-arcade/conveysdl/conveysdl-1.3-r1.ebuild
38 deleted file mode 100644
39 index 904ee87c07b4..000000000000
40 --- a/games-arcade/conveysdl/conveysdl-1.3-r1.ebuild
41 +++ /dev/null
42 @@ -1,55 +0,0 @@
43 -# Copyright 1999-2021 Gentoo Authors
44 -# Distributed under the terms of the GNU General Public License v2
45 -
46 -EAPI=6
47 -inherit desktop toolchain-funcs
48 -
49 -DESCRIPTION="Guide the blob along the conveyer belt collecting the red blobs"
50 -HOMEPAGE="http://www.cloudsprinter.com/software/conveysdl/"
51 -SRC_URI="http://www.cloudsprinter.com/software/conveysdl/${P/-/.}.tar"
52 -
53 -LICENSE="GPL-2"
54 -SLOT="0"
55 -KEYWORDS="~amd64 ~x86"
56 -IUSE=""
57 -
58 -DEPEND="media-libs/libsdl[sound,video]
59 - media-libs/sdl-mixer"
60 -RDEPEND="${DEPEND}"
61 -
62 -S="${WORKDIR}"
63 -
64 -src_prepare() {
65 - default
66 -
67 - # Incomplete readme
68 - sed -i \
69 - -e 's:I k:use -nosound to disable sound\n\nI k:' \
70 - readme || die
71 -
72 - sed -i \
73 - -e 's:SDL_Mi:SDL_mi:' \
74 - main.c || die
75 -
76 - eapply \
77 - "${FILESDIR}"/${P}-arrays.patch \
78 - "${FILESDIR}"/${P}-speed.patch
79 -}
80 -
81 -src_compile() {
82 - emake main \
83 - CC="$(tc-getCC)" \
84 - CFLAGS="${CFLAGS} $(sdl-config --cflags) \
85 - -DDATA_PREFIX=\\\"/usr/share/${PN}/\\\" \
86 - -DENABLE_SOUND" \
87 - LDLIBS="-lSDL_mixer $(sdl-config --libs)"
88 -}
89 -
90 -src_install() {
91 - newbin main ${PN}
92 - insinto /usr/share/${PN}
93 - doins -r gfx sounds levels
94 - newicon gfx/jblob.bmp ${PN}.bmp
95 - make_desktop_entry ${PN} Convey /usr/share/pixmaps/${PN}.bmp
96 - einstalldocs
97 -}
98
99 diff --git a/games-arcade/conveysdl/conveysdl-1.3-r2.ebuild b/games-arcade/conveysdl/conveysdl-1.3-r2.ebuild
100 new file mode 100644
101 index 000000000000..a45ec62f1a9e
102 --- /dev/null
103 +++ b/games-arcade/conveysdl/conveysdl-1.3-r2.ebuild
104 @@ -0,0 +1,52 @@
105 +# Copyright 1999-2022 Gentoo Authors
106 +# Distributed under the terms of the GNU General Public License v2
107 +
108 +EAPI=8
109 +
110 +inherit desktop flag-o-matic toolchain-funcs
111 +
112 +DESCRIPTION="Guide the blob along the conveyer belt collecting the red blobs"
113 +HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
114 +SRC_URI="
115 + mirror://gentoo/${P/-/.}.tar
116 + https://dev.gentoo.org/~ionen/distfiles/${PN}.png"
117 +S="${WORKDIR}"
118 +
119 +LICENSE="GPL-2"
120 +SLOT="0"
121 +KEYWORDS="~amd64 ~x86"
122 +
123 +RDEPEND="
124 + media-libs/libsdl[sound,video]
125 + media-libs/sdl-mixer"
126 +DEPEND="${RDEPEND}"
127 +BDEPEND="virtual/pkgconfig"
128 +
129 +PATCHES=(
130 + "${FILESDIR}"/${P}-arrays.patch
131 + "${FILESDIR}"/${P}-audio.patch
132 + "${FILESDIR}"/${P}-speed.patch
133 +)
134 +
135 +src_compile() {
136 + tc-export CC
137 +
138 + append-cppflags $($(tc-getPKG_CONFIG) --cflags sdl SDL_mixer || die) \
139 + -DDATA_PREFIX="'\"${EPREFIX}/usr/share/${PN}/\"'" \
140 + -DENABLE_SOUND
141 + append-libs $($(tc-getPKG_CONFIG) --libs sdl SDL_mixer || die)
142 +
143 + emake main LDLIBS="${LIBS}"
144 +}
145 +
146 +src_install() {
147 + newbin main ${PN}
148 +
149 + insinto /usr/share/${PN}
150 + doins -r gfx levels sounds
151 +
152 + doicon "${DISTDIR}"/${PN}.png
153 + make_desktop_entry ${PN} Convey
154 +
155 + dodoc readme
156 +}
157
158 diff --git a/games-arcade/conveysdl/files/conveysdl-1.3-arrays.patch b/games-arcade/conveysdl/files/conveysdl-1.3-arrays.patch
159 index a6286d96f145..b733159425e6 100644
160 --- a/games-arcade/conveysdl/files/conveysdl-1.3-arrays.patch
161 +++ b/games-arcade/conveysdl/files/conveysdl-1.3-arrays.patch
162 @@ -1,29 +1,18 @@
163 ---- a/main.c.org 2010-07-28 13:16:20.552161148 +0300
164 -+++ b/main.c 2010-07-29 20:43:14.714543259 +0300
165 -@@ -22,7 +22,7 @@
166 -
167 - SDL_Surface *bletters;
168 +https://bugs.gentoo.org/330161
169 +--- a/main.c
170 ++++ b/main.c
171 +@@ -24,3 +24,3 @@
172 SDL_Surface *letters[100];
173 -SDL_Surface *tiles[9];
174 +SDL_Surface *tiles[10];
175 SDL_Surface *btiles;
176 - SDL_Surface *blob;
177 - SDL_Surface *jblob;
178 -@@ -51,7 +51,7 @@
179 - FILE *file_ptr;
180 -
181 +@@ -53,3 +53,3 @@
182
183 -int bpointx,bpointy,pointx,pointy,jug,death,goose,jump,jumpf,blibs,spr[1000][8],leveldone,level,lives,totallevels,blobx[7],bloby[7],blobp[7],score,bak,bok,buk,bik,start,blibo,blibs,die,jumpoo=12,speed=4,arse,highscore;
184 +int bpointx,bpointy,pointx,pointy,jug,death,goose,jump,jumpf,blibs,spr[1000][8],leveldone,level,lives,totallevels,blobx[8],bloby[8],blobp[8],score,bak,bok,buk,bik,start,blibo,blibs,die,jumpoo=12,speed=4,arse,highscore;
185 /* Keys */
186 - int quit = 0;
187 - int spacebar = 0;
188 -@@ -452,7 +452,7 @@
189 - static void info(void)
190 - {
191 +@@ -454,3 +454,3 @@
192 int monkey=70,munk;
193 - char scoremonkey[10];
194 + char scoremonkey[16];
195 if (lives>1) {
196 - for (munk=1 ; munk<lives ; munk++ )
197 - {
198
199 diff --git a/games-arcade/conveysdl/files/conveysdl-1.3-audio.patch b/games-arcade/conveysdl/files/conveysdl-1.3-audio.patch
200 new file mode 100644
201 index 000000000000..9f76cb2dc0a9
202 --- /dev/null
203 +++ b/games-arcade/conveysdl/files/conveysdl-1.3-audio.patch
204 @@ -0,0 +1,15 @@
205 +Fix header and add lacking instructions to readme.
206 +--- a/main.c
207 ++++ b/main.c
208 +@@ -8,3 +8,3 @@
209 + #ifdef ENABLE_SOUND
210 +-#include <SDL_Mixer.h>
211 ++#include <SDL_mixer.h>
212 + static int soundv = 2;
213 +--- a/readme
214 ++++ b/readme
215 +@@ -6,2 +6,4 @@
216 +
217 ++use -nosound to disable sound
218 ++
219 + I knocked this game up over a couple of days, and can't be
220
221 diff --git a/games-arcade/conveysdl/files/conveysdl-1.3-speed.patch b/games-arcade/conveysdl/files/conveysdl-1.3-speed.patch
222 index 6d6d13eb11be..06d518597d94 100644
223 --- a/games-arcade/conveysdl/files/conveysdl-1.3-speed.patch
224 +++ b/games-arcade/conveysdl/files/conveysdl-1.3-speed.patch
225 @@ -1,31 +1,20 @@
226 ---- a/main.c 2010-07-30 10:41:21.392783010 +0300
227 -+++ b/main.c 2010-07-30 10:44:35.791690958 +0300
228 -@@ -52,6 +52,7 @@
229 -
230 -
231 +https://bugs.gentoo.org/330161
232 +--- a/main.c
233 ++++ b/main.c
234 +@@ -54,2 +54,3 @@
235 int bpointx,bpointy,pointx,pointy,jug,death,goose,jump,jumpf,blibs,spr[1000][8],leveldone,level,lives,totallevels,blobx[8],bloby[8],blobp[8],score,bak,bok,buk,bik,start,blibo,blibs,die,jumpoo=12,speed=4,arse,highscore;
236 +int realspeed;
237 /* Keys */
238 - int quit = 0;
239 - int spacebar = 0;
240 -@@ -140,6 +141,7 @@
241 - char path[256],jib[50];
242 - int lvspx,lvspy;
243 +@@ -142,2 +143,3 @@
244 bpointx=200;bpointy=400;pointx=200;pointy=400;jug=1;death=0;jump=0;jumpf=0;jug=0;blibs=0;blibo=0;die=0;speed=4;
245 + realspeed=speed;
246 strcpy(path, DATA_PREFIX);
247 - sprintf(jib,"levels/level%d",level);
248 - strcat(path, jib);
249 -@@ -212,15 +214,16 @@
250 - if (jumpf==jumpoo) { jump=0; }
251 - if (jumpf==jumpoo*2) { jumpf=0; }
252 +@@ -214,3 +216,3 @@
253 }
254 - score+=speed;
255 + score+=realspeed;
256 /*crap*/
257 - }
258 -
259 - static void plotfloor(void)
260 +@@ -220,5 +222,6 @@
261 {
262 + if (bpointy==400) realspeed=speed;
263 int nob,nx,nobx=48,ek,ej,el;
264 @@ -34,23 +23,13 @@
265 + bpointx-=realspeed*2;
266 + bpointy+=realspeed;
267 pointx=bpointx;
268 - pointy=bpointy;
269 - imageplot(bb, blobx[6], bloby[6] );
270 -@@ -542,7 +545,7 @@
271 - }
272 - while ( jump_down==0 );
273 +@@ -544,3 +547,3 @@
274 leveldone=3;
275 - speed=4;
276 + speed=4; realspeed=speed;
277 blankscreen();
278 - }
279 -
280 -@@ -563,7 +566,7 @@
281 - if (quit>0) break;
282 - }
283 +@@ -565,3 +568,3 @@
284 while ( jump_down==0 );
285 - speed=4;
286 + speed=4; realspeed=speed;
287 lives+=1;
288 - level+=1;
289 - getlevel();