1 |
commit: 34f929fa2a9bba8d1029c1b407a2ee65660abfdd |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 14 13:24:03 2019 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 14 13:26:07 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34f929fa |
7 |
|
8 |
games-arcade/commandergenius: Version bump to 2.3.3 |
9 |
|
10 |
The path handling still seems a bit buggy but it more or less works |
11 |
with the included patch. |
12 |
|
13 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
14 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
15 |
|
16 |
games-arcade/commandergenius/Manifest | 1 + |
17 |
.../commandergenius/commandergenius-2.3.3.ebuild | 91 +++++++++++++++++++++ |
18 |
.../files/commandergenius-2.3.1-build.patch | 12 +++ |
19 |
.../files/commandergenius-2.3.1-desktop.patch | 52 ++++++++++++ |
20 |
.../files/commandergenius-2.3.1-minizip.patch | 93 ++++++++++++++++++++++ |
21 |
.../files/commandergenius-2.3.1-paths.patch | 11 +++ |
22 |
games-arcade/commandergenius/metadata.xml | 3 +- |
23 |
7 files changed, 262 insertions(+), 1 deletion(-) |
24 |
|
25 |
diff --git a/games-arcade/commandergenius/Manifest b/games-arcade/commandergenius/Manifest |
26 |
index 77859bf4c17..dcd67035647 100644 |
27 |
--- a/games-arcade/commandergenius/Manifest |
28 |
+++ b/games-arcade/commandergenius/Manifest |
29 |
@@ -1 +1,2 @@ |
30 |
+DIST Commander-Genius-v2.3.3.tar.bz2 63885924 BLAKE2B a072f922bac6f76e615bbb602c1b5ac4fca634a90bdead461d666da0d70ad5ddd6865504c84a09905bb313728b840df973ae006d120ae01d8c8f8a7bd4a10abe SHA512 f64f24b01cd0921570f633913c8a3b1b50537596b2c46377862a913e36c74934521c1c55fca676b78674c669d475d9c2c2c09ac4a22ebdad1826508e6b9598b6 |
31 |
DIST commandergenius-1.8.3.tar.gz 71446309 BLAKE2B 01f54e3deb4189e103d9ae23efadfe82363893b48e31d4b5b505f961191b5afe36440b67f0da55d59b6fceeadb15659503d3326975cb131f131b9a630ac35ae8 SHA512 821a356751629b7f3b122f52a31588f2174580fa6450699f8a03bcd78e305c649c7b36bb21dd2d222411c648b78c3bb02c11e9691e8cb2459380e6a70c2dbe2a |
32 |
|
33 |
diff --git a/games-arcade/commandergenius/commandergenius-2.3.3.ebuild b/games-arcade/commandergenius/commandergenius-2.3.3.ebuild |
34 |
new file mode 100644 |
35 |
index 00000000000..4c3fc02b572 |
36 |
--- /dev/null |
37 |
+++ b/games-arcade/commandergenius/commandergenius-2.3.3.ebuild |
38 |
@@ -0,0 +1,91 @@ |
39 |
+# Copyright 1999-2019 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=7 |
43 |
+ |
44 |
+PYTHON_COMPAT=( python3_{5,6,7} ) |
45 |
+ |
46 |
+inherit cmake-utils desktop python-single-r1 xdg-utils |
47 |
+ |
48 |
+MY_PN="Commander-Genius" |
49 |
+MY_P="${MY_PN}-v${PV}" |
50 |
+DESCRIPTION="Open Source Commander Keen clone (needs original game files)" |
51 |
+HOMEPAGE="http://clonekeenplus.sourceforge.net" |
52 |
+SRC_URI="https://gitlab.com/Dringgstein/${MY_PN}/-/archive/v${PV}/${MY_P}.tar.bz2" |
53 |
+ |
54 |
+LICENSE="GPL-2" |
55 |
+SLOT="0" |
56 |
+KEYWORDS="~amd64 ~x86" |
57 |
+IUSE="+downloader opengl +python" |
58 |
+RESTRICT="mirror" # contains keen files, but we do not install them |
59 |
+ |
60 |
+RDEPEND="media-libs/libsdl2[opengl?,video] |
61 |
+ media-libs/sdl2-image |
62 |
+ media-libs/sdl2-mixer[vorbis] |
63 |
+ sys-libs/zlib[minizip] |
64 |
+ downloader? ( net-misc/curl ) |
65 |
+ opengl? ( virtual/opengl ) |
66 |
+ python? ( ${PYTHON_DEPS} )" |
67 |
+ |
68 |
+DEPEND="${RDEPEND} |
69 |
+ dev-libs/boost" |
70 |
+ |
71 |
+BDEPEND="virtual/pkgconfig" |
72 |
+ |
73 |
+PATCHES=( |
74 |
+ "${FILESDIR}"/${PN}-2.3.1-minizip.patch |
75 |
+ "${FILESDIR}"/${PN}-2.3.1-desktop.patch |
76 |
+ "${FILESDIR}"/${PN}-2.3.1-build.patch |
77 |
+ "${FILESDIR}"/${PN}-2.3.1-paths.patch |
78 |
+) |
79 |
+ |
80 |
+S="${WORKDIR}/${MY_P}" |
81 |
+ |
82 |
+SHAREDIR="/usr/share" |
83 |
+GAMESDIR="${SHAREDIR}/${PN}/games" |
84 |
+DOCS=() |
85 |
+ |
86 |
+src_configure() { |
87 |
+ local mycmakeargs=( |
88 |
+ -DAPPDIR="${EPREFIX}/usr/bin" |
89 |
+ -DGAMES_SHAREDIR="${EPREFIX}${SHAREDIR}" |
90 |
+ -DDOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
91 |
+ -DDOWNLOADER=$(usex downloader) |
92 |
+ -DOPENGL=$(usex opengl) |
93 |
+ -DUSE_PYTHON3=$(usex python) |
94 |
+ -DUSE_SDL2=ON |
95 |
+ -DBUILD_SHARED_LIBS=OFF |
96 |
+ ) |
97 |
+ |
98 |
+ cmake-utils_src_configure |
99 |
+} |
100 |
+ |
101 |
+src_install() { |
102 |
+ cmake-utils_src_install |
103 |
+ |
104 |
+ # The normal executable name is weird. |
105 |
+ dosym CGeniusExe /usr/bin/${PN} |
106 |
+ |
107 |
+ # Game data can be manually installed here. |
108 |
+ keepdir "${GAMESDIR}" |
109 |
+} |
110 |
+ |
111 |
+pkg_postinst() { |
112 |
+ xdg_icon_cache_update |
113 |
+ |
114 |
+ elog "Run ${PN} to start the game. It will search for game data" |
115 |
+ elog "in ~/.CommanderGenius/games and ${EPREFIX}${GAMESDIR}." |
116 |
+ elog "You can also specify paths in cgenius.cfg or pass paths as an" |
117 |
+ elog "argument." |
118 |
+ elog |
119 |
+ use downloader && elog "Data for some games can be downloaded from the menu." |
120 |
+ elog |
121 |
+ elog "Check your settings in ~/.CommanderGenius/cgenius.cfg after you have" |
122 |
+ elog "started the game for the first time." |
123 |
+ elog |
124 |
+ use opengl && elog "You may also want to set \"OpenGL = true\"." |
125 |
+} |
126 |
+ |
127 |
+pkg_postrm() { |
128 |
+ xdg_icon_cache_update |
129 |
+} |
130 |
|
131 |
diff --git a/games-arcade/commandergenius/files/commandergenius-2.3.1-build.patch b/games-arcade/commandergenius/files/commandergenius-2.3.1-build.patch |
132 |
new file mode 100644 |
133 |
index 00000000000..b5a9e1288a6 |
134 |
--- /dev/null |
135 |
+++ b/games-arcade/commandergenius/files/commandergenius-2.3.1-build.patch |
136 |
@@ -0,0 +1,12 @@ |
137 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
138 |
+index 9733f6d78..b515ee7a1 100644 |
139 |
+--- a/CMakeLists.txt |
140 |
++++ b/CMakeLists.txt |
141 |
+@@ -78,7 +78,6 @@ add_subdirectory("src") |
142 |
+ |
143 |
+ MESSAGE( STATUS "CG_VERSION = ${CG_VERSION}" ) |
144 |
+ |
145 |
+-INCLUDE(package.cmake) |
146 |
+ |
147 |
+ MESSAGE( STATUS "Build system is prepared. To Build the project just type \"make\"" ) |
148 |
+ MESSAGE( STATUS "If you want to create the installation package just type \"make package\" after you build the project" ) |
149 |
|
150 |
diff --git a/games-arcade/commandergenius/files/commandergenius-2.3.1-desktop.patch b/games-arcade/commandergenius/files/commandergenius-2.3.1-desktop.patch |
151 |
new file mode 100644 |
152 |
index 00000000000..4d2c246e5b7 |
153 |
--- /dev/null |
154 |
+++ b/games-arcade/commandergenius/files/commandergenius-2.3.1-desktop.patch |
155 |
@@ -0,0 +1,52 @@ |
156 |
+From 84243052d0b9409b4d5b28e751e598287b00bab9 Mon Sep 17 00:00:00 2001 |
157 |
+From: James Le Cuirot <chewi@g.o> |
158 |
+Date: Sun, 24 Feb 2019 21:26:38 +0000 |
159 |
+Subject: [PATCH 1/2] Remove deprecated "Application" entry from desktop |
160 |
+ categories |
161 |
+ |
162 |
+The desktop-file-validate tool says it is deprecated. |
163 |
+--- |
164 |
+ share/cgenius.desktop | 2 +- |
165 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
166 |
+ |
167 |
+diff --git a/share/cgenius.desktop b/share/cgenius.desktop |
168 |
+index 8d0771522..b7b39ffef 100644 |
169 |
+--- a/share/cgenius.desktop |
170 |
++++ b/share/cgenius.desktop |
171 |
+@@ -6,4 +6,4 @@ Icon=/usr/share/icons/hicolor/512x512/apps/CGLogo.png |
172 |
+ Terminal=false |
173 |
+ Type=Application |
174 |
+ StartupNotify=true |
175 |
+-Categories=Application;Game;ArcadeGame; |
176 |
++Categories=Game;ArcadeGame; |
177 |
+-- |
178 |
+2.20.1 |
179 |
+ |
180 |
+From e9d6157210015b4aa5efcb9ba0c57842ae4ef266 Mon Sep 17 00:00:00 2001 |
181 |
+From: James Le Cuirot <chewi@g.o> |
182 |
+Date: Sun, 24 Feb 2019 21:31:28 +0000 |
183 |
+Subject: [PATCH 2/2] Remove unnecessary absolute icon path from desktop entry |
184 |
+ |
185 |
+We should not assume that the game has been installed to /usr and |
186 |
+there is no need to specify an absolute path for the icon anyway as |
187 |
+the standard says that bare icon names should be looked up. |
188 |
+--- |
189 |
+ share/cgenius.desktop | 2 +- |
190 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
191 |
+ |
192 |
+diff --git a/share/cgenius.desktop b/share/cgenius.desktop |
193 |
+index b7b39ffef..9b09ec9fc 100644 |
194 |
+--- a/share/cgenius.desktop |
195 |
++++ b/share/cgenius.desktop |
196 |
+@@ -2,7 +2,7 @@ |
197 |
+ Name=Commander Genius |
198 |
+ Comment=Play natively Commander Keen Games |
199 |
+ Exec=CGeniusExe |
200 |
+-Icon=/usr/share/icons/hicolor/512x512/apps/CGLogo.png |
201 |
++Icon=CGLogo |
202 |
+ Terminal=false |
203 |
+ Type=Application |
204 |
+ StartupNotify=true |
205 |
+-- |
206 |
+2.20.1 |
207 |
+ |
208 |
|
209 |
diff --git a/games-arcade/commandergenius/files/commandergenius-2.3.1-minizip.patch b/games-arcade/commandergenius/files/commandergenius-2.3.1-minizip.patch |
210 |
new file mode 100644 |
211 |
index 00000000000..ca2553b5f7d |
212 |
--- /dev/null |
213 |
+++ b/games-arcade/commandergenius/files/commandergenius-2.3.1-minizip.patch |
214 |
@@ -0,0 +1,93 @@ |
215 |
+From 04f776e73248d19d9beaf4ea8d407b7c85ecc9c9 Mon Sep 17 00:00:00 2001 |
216 |
+From: James Le Cuirot <chewi@g.o> |
217 |
+Date: Sun, 24 Feb 2019 20:25:34 +0000 |
218 |
+Subject: [PATCH] Allow use of external minizip library instead of linking just |
219 |
+ zlib |
220 |
+ |
221 |
+Some distributions package the minizip part of zlib, as well as zlib |
222 |
+itself, so allow that to be used with help from pkg-config. |
223 |
+--- |
224 |
+ src/engine/unzip/CMakeLists.txt | 42 +++++++++++++++++++++------------ |
225 |
+ src/engine/unzip/miniunz.c | 4 ++-- |
226 |
+ 2 files changed, 29 insertions(+), 17 deletions(-) |
227 |
+ |
228 |
+diff --git a/src/engine/unzip/CMakeLists.txt b/src/engine/unzip/CMakeLists.txt |
229 |
+index 5f2b8a959..24833abb7 100644 |
230 |
+--- a/src/engine/unzip/CMakeLists.txt |
231 |
++++ b/src/engine/unzip/CMakeLists.txt |
232 |
+@@ -1,23 +1,35 @@ |
233 |
+-find_package( ZLIB REQUIRED ) |
234 |
+-if ( ZLIB_FOUND ) |
235 |
+- include_directories( ${ZLIB_INCLUDE_DIRS} ) |
236 |
+-else ( ZLIB_FOUND ) |
237 |
+- Message(FATAL_ERROR "Zlib development packages not found!") |
238 |
+-endif( ZLIB_FOUND ) |
239 |
++find_package(PkgConfig) |
240 |
+ |
241 |
++if ( PKGCONFIG_FOUND ) |
242 |
++ pkg_check_modules(ZLIB minizip) |
243 |
++else ( PKGCONFIG_FOUND ) |
244 |
++ unset(ZLIB_FOUND) |
245 |
++endif ( PKGCONFIG_FOUND ) |
246 |
+ |
247 |
++if ( ZLIB_FOUND ) |
248 |
++ set(CXXSRC miniunz.c) |
249 |
++ unset(HSRC) |
250 |
++else ( ZLIB_FOUND ) |
251 |
++ find_package(ZLIB REQUIRED) |
252 |
++ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) |
253 |
+ |
254 |
++ set(CXXSRC |
255 |
++ miniunz.c |
256 |
++ ioapi.c |
257 |
++ iowin32.c |
258 |
++ unzip.c) |
259 |
+ |
260 |
+-set(CXXSRC |
261 |
+- miniunz.c |
262 |
+- ioapi.c |
263 |
+- iowin32.c |
264 |
+- unzip.c) |
265 |
++ set(HSRC |
266 |
++ ioapi.h |
267 |
++ iowin32.h |
268 |
++ unzip.h) |
269 |
++endif ( ZLIB_FOUND ) |
270 |
+ |
271 |
+-set(HSRC |
272 |
+- ioapi.h |
273 |
+- iowin32.h |
274 |
+- unzip.h) |
275 |
++if ( ZLIB_FOUND ) |
276 |
++ include_directories( ${ZLIB_INCLUDE_DIRS} ) |
277 |
++else ( ZLIB_FOUND ) |
278 |
++ Message(FATAL_ERROR "Zlib development packages not found!") |
279 |
++endif( ZLIB_FOUND ) |
280 |
+ |
281 |
+ add_library(unzip ${CXXSRC} ${HSRC}) |
282 |
+ |
283 |
+diff --git a/src/engine/unzip/miniunz.c b/src/engine/unzip/miniunz.c |
284 |
+index 694aa8e60..0f289c96c 100644 |
285 |
+--- a/src/engine/unzip/miniunz.c |
286 |
++++ b/src/engine/unzip/miniunz.c |
287 |
+@@ -56,7 +56,7 @@ |
288 |
+ #endif |
289 |
+ |
290 |
+ |
291 |
+-#include "unzip.h" |
292 |
++#include <unzip.h> |
293 |
+ |
294 |
+ #define CASESENSITIVITY (0) |
295 |
+ #define WRITEBUFFERSIZE (8192) |
296 |
+@@ -64,7 +64,7 @@ |
297 |
+ |
298 |
+ #ifdef _WIN32 |
299 |
+ #define USEWIN32IOAPI |
300 |
+-#include "iowin32.h" |
301 |
++#include <iowin32.h> |
302 |
+ #endif |
303 |
+ /* |
304 |
+ mini unzip, demo of unzip package |
305 |
+-- |
306 |
+2.20.1 |
307 |
+ |
308 |
|
309 |
diff --git a/games-arcade/commandergenius/files/commandergenius-2.3.1-paths.patch b/games-arcade/commandergenius/files/commandergenius-2.3.1-paths.patch |
310 |
new file mode 100644 |
311 |
index 00000000000..50fb90b9502 |
312 |
--- /dev/null |
313 |
+++ b/games-arcade/commandergenius/files/commandergenius-2.3.1-paths.patch |
314 |
@@ -0,0 +1,11 @@ |
315 |
+diff -Naur a/GsKit/base/utils/FindFile.cpp b/GsKit/base/utils/FindFile.cpp |
316 |
+--- a/GsKit/base/utils/FindFile.cpp 2019-02-08 15:17:29.000000000 +0000 |
317 |
++++ b/GsKit/base/utils/FindFile.cpp 2019-02-19 23:14:32.299939859 +0000 |
318 |
+@@ -493,7 +493,6 @@ |
319 |
+ #else |
320 |
+ AddToFileList(&basesearchpaths, "${HOME}/.CommanderGenius"); |
321 |
+ #endif |
322 |
+- AddToFileList(&basesearchpaths, "."); |
323 |
+ AddToFileList(&basesearchpaths, SYSTEM_DATA_DIR"/commandergenius"); // no use of ${SYSTEM_DATA}, because it is uncommon and could cause confusion to the user |
324 |
+ #endif |
325 |
+ } |
326 |
|
327 |
diff --git a/games-arcade/commandergenius/metadata.xml b/games-arcade/commandergenius/metadata.xml |
328 |
index 1f862355f14..86222e373a5 100644 |
329 |
--- a/games-arcade/commandergenius/metadata.xml |
330 |
+++ b/games-arcade/commandergenius/metadata.xml |
331 |
@@ -10,9 +10,10 @@ |
332 |
Use <pkg>media-libs/tremor</pkg> as ogg decoder |
333 |
instead of <pkg>media-libs/libvorbis</pkg> |
334 |
</flag> |
335 |
+ <flag name="downloader">Allows some Keen games to be downloaded from the menu</flag> |
336 |
</use> |
337 |
<upstream> |
338 |
<remote-id type="sourceforge">clonekeenplus</remote-id> |
339 |
- <remote-id type="github">gerstrong/Commander-Genius</remote-id> |
340 |
+ <remote-id type="gitlab">Dringgstein/Commander-Genius</remote-id> |
341 |
</upstream> |
342 |
</pkgmetadata> |