summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2019-04-14 14:24:03 +0100
committerJames Le Cuirot <chewi@gentoo.org>2019-04-14 14:26:07 +0100
commit34f929fa2a9bba8d1029c1b407a2ee65660abfdd (patch)
tree038b77c5cde2df3ec87076b73ddc496271ec0b04 /games-arcade/commandergenius
parentwww-misc/urlwatch: require pyyaml<5 for old versions (diff)
downloadgentoo-34f929fa2a9bba8d1029c1b407a2ee65660abfdd.tar.gz
gentoo-34f929fa2a9bba8d1029c1b407a2ee65660abfdd.tar.bz2
gentoo-34f929fa2a9bba8d1029c1b407a2ee65660abfdd.zip
games-arcade/commandergenius: Version bump to 2.3.3
The path handling still seems a bit buggy but it more or less works with the included patch. Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-arcade/commandergenius')
-rw-r--r--games-arcade/commandergenius/Manifest1
-rw-r--r--games-arcade/commandergenius/commandergenius-2.3.3.ebuild91
-rw-r--r--games-arcade/commandergenius/files/commandergenius-2.3.1-build.patch12
-rw-r--r--games-arcade/commandergenius/files/commandergenius-2.3.1-desktop.patch52
-rw-r--r--games-arcade/commandergenius/files/commandergenius-2.3.1-minizip.patch93
-rw-r--r--games-arcade/commandergenius/files/commandergenius-2.3.1-paths.patch11
-rw-r--r--games-arcade/commandergenius/metadata.xml3
7 files changed, 262 insertions, 1 deletions
diff --git a/games-arcade/commandergenius/Manifest b/games-arcade/commandergenius/Manifest
index 77859bf4c178..dcd67035647e 100644
--- a/games-arcade/commandergenius/Manifest
+++ b/games-arcade/commandergenius/Manifest
@@ -1 +1,2 @@
+DIST Commander-Genius-v2.3.3.tar.bz2 63885924 BLAKE2B a072f922bac6f76e615bbb602c1b5ac4fca634a90bdead461d666da0d70ad5ddd6865504c84a09905bb313728b840df973ae006d120ae01d8c8f8a7bd4a10abe SHA512 f64f24b01cd0921570f633913c8a3b1b50537596b2c46377862a913e36c74934521c1c55fca676b78674c669d475d9c2c2c09ac4a22ebdad1826508e6b9598b6
DIST commandergenius-1.8.3.tar.gz 71446309 BLAKE2B 01f54e3deb4189e103d9ae23efadfe82363893b48e31d4b5b505f961191b5afe36440b67f0da55d59b6fceeadb15659503d3326975cb131f131b9a630ac35ae8 SHA512 821a356751629b7f3b122f52a31588f2174580fa6450699f8a03bcd78e305c649c7b36bb21dd2d222411c648b78c3bb02c11e9691e8cb2459380e6a70c2dbe2a
diff --git a/games-arcade/commandergenius/commandergenius-2.3.3.ebuild b/games-arcade/commandergenius/commandergenius-2.3.3.ebuild
new file mode 100644
index 000000000000..4c3fc02b5724
--- /dev/null
+++ b/games-arcade/commandergenius/commandergenius-2.3.3.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{5,6,7} )
+
+inherit cmake-utils desktop python-single-r1 xdg-utils
+
+MY_PN="Commander-Genius"
+MY_P="${MY_PN}-v${PV}"
+DESCRIPTION="Open Source Commander Keen clone (needs original game files)"
+HOMEPAGE="http://clonekeenplus.sourceforge.net"
+SRC_URI="https://gitlab.com/Dringgstein/${MY_PN}/-/archive/v${PV}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+downloader opengl +python"
+RESTRICT="mirror" # contains keen files, but we do not install them
+
+RDEPEND="media-libs/libsdl2[opengl?,video]
+ media-libs/sdl2-image
+ media-libs/sdl2-mixer[vorbis]
+ sys-libs/zlib[minizip]
+ downloader? ( net-misc/curl )
+ opengl? ( virtual/opengl )
+ python? ( ${PYTHON_DEPS} )"
+
+DEPEND="${RDEPEND}
+ dev-libs/boost"
+
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.1-minizip.patch
+ "${FILESDIR}"/${PN}-2.3.1-desktop.patch
+ "${FILESDIR}"/${PN}-2.3.1-build.patch
+ "${FILESDIR}"/${PN}-2.3.1-paths.patch
+)
+
+S="${WORKDIR}/${MY_P}"
+
+SHAREDIR="/usr/share"
+GAMESDIR="${SHAREDIR}/${PN}/games"
+DOCS=()
+
+src_configure() {
+ local mycmakeargs=(
+ -DAPPDIR="${EPREFIX}/usr/bin"
+ -DGAMES_SHAREDIR="${EPREFIX}${SHAREDIR}"
+ -DDOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+ -DDOWNLOADER=$(usex downloader)
+ -DOPENGL=$(usex opengl)
+ -DUSE_PYTHON3=$(usex python)
+ -DUSE_SDL2=ON
+ -DBUILD_SHARED_LIBS=OFF
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # The normal executable name is weird.
+ dosym CGeniusExe /usr/bin/${PN}
+
+ # Game data can be manually installed here.
+ keepdir "${GAMESDIR}"
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+
+ elog "Run ${PN} to start the game. It will search for game data"
+ elog "in ~/.CommanderGenius/games and ${EPREFIX}${GAMESDIR}."
+ elog "You can also specify paths in cgenius.cfg or pass paths as an"
+ elog "argument."
+ elog
+ use downloader && elog "Data for some games can be downloaded from the menu."
+ elog
+ elog "Check your settings in ~/.CommanderGenius/cgenius.cfg after you have"
+ elog "started the game for the first time."
+ elog
+ use opengl && elog "You may also want to set \"OpenGL = true\"."
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+}
diff --git a/games-arcade/commandergenius/files/commandergenius-2.3.1-build.patch b/games-arcade/commandergenius/files/commandergenius-2.3.1-build.patch
new file mode 100644
index 000000000000..b5a9e1288a60
--- /dev/null
+++ b/games-arcade/commandergenius/files/commandergenius-2.3.1-build.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9733f6d78..b515ee7a1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -78,7 +78,6 @@ add_subdirectory("src")
+
+ MESSAGE( STATUS "CG_VERSION = ${CG_VERSION}" )
+
+-INCLUDE(package.cmake)
+
+ MESSAGE( STATUS "Build system is prepared. To Build the project just type \"make\"" )
+ MESSAGE( STATUS "If you want to create the installation package just type \"make package\" after you build the project" )
diff --git a/games-arcade/commandergenius/files/commandergenius-2.3.1-desktop.patch b/games-arcade/commandergenius/files/commandergenius-2.3.1-desktop.patch
new file mode 100644
index 000000000000..4d2c246e5b76
--- /dev/null
+++ b/games-arcade/commandergenius/files/commandergenius-2.3.1-desktop.patch
@@ -0,0 +1,52 @@
+From 84243052d0b9409b4d5b28e751e598287b00bab9 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sun, 24 Feb 2019 21:26:38 +0000
+Subject: [PATCH 1/2] Remove deprecated "Application" entry from desktop
+ categories
+
+The desktop-file-validate tool says it is deprecated.
+---
+ share/cgenius.desktop | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/share/cgenius.desktop b/share/cgenius.desktop
+index 8d0771522..b7b39ffef 100644
+--- a/share/cgenius.desktop
++++ b/share/cgenius.desktop
+@@ -6,4 +6,4 @@ Icon=/usr/share/icons/hicolor/512x512/apps/CGLogo.png
+ Terminal=false
+ Type=Application
+ StartupNotify=true
+-Categories=Application;Game;ArcadeGame;
++Categories=Game;ArcadeGame;
+--
+2.20.1
+
+From e9d6157210015b4aa5efcb9ba0c57842ae4ef266 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sun, 24 Feb 2019 21:31:28 +0000
+Subject: [PATCH 2/2] Remove unnecessary absolute icon path from desktop entry
+
+We should not assume that the game has been installed to /usr and
+there is no need to specify an absolute path for the icon anyway as
+the standard says that bare icon names should be looked up.
+---
+ share/cgenius.desktop | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/share/cgenius.desktop b/share/cgenius.desktop
+index b7b39ffef..9b09ec9fc 100644
+--- a/share/cgenius.desktop
++++ b/share/cgenius.desktop
+@@ -2,7 +2,7 @@
+ Name=Commander Genius
+ Comment=Play natively Commander Keen Games
+ Exec=CGeniusExe
+-Icon=/usr/share/icons/hicolor/512x512/apps/CGLogo.png
++Icon=CGLogo
+ Terminal=false
+ Type=Application
+ StartupNotify=true
+--
+2.20.1
+
diff --git a/games-arcade/commandergenius/files/commandergenius-2.3.1-minizip.patch b/games-arcade/commandergenius/files/commandergenius-2.3.1-minizip.patch
new file mode 100644
index 000000000000..ca2553b5f7d3
--- /dev/null
+++ b/games-arcade/commandergenius/files/commandergenius-2.3.1-minizip.patch
@@ -0,0 +1,93 @@
+From 04f776e73248d19d9beaf4ea8d407b7c85ecc9c9 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sun, 24 Feb 2019 20:25:34 +0000
+Subject: [PATCH] Allow use of external minizip library instead of linking just
+ zlib
+
+Some distributions package the minizip part of zlib, as well as zlib
+itself, so allow that to be used with help from pkg-config.
+---
+ src/engine/unzip/CMakeLists.txt | 42 +++++++++++++++++++++------------
+ src/engine/unzip/miniunz.c | 4 ++--
+ 2 files changed, 29 insertions(+), 17 deletions(-)
+
+diff --git a/src/engine/unzip/CMakeLists.txt b/src/engine/unzip/CMakeLists.txt
+index 5f2b8a959..24833abb7 100644
+--- a/src/engine/unzip/CMakeLists.txt
++++ b/src/engine/unzip/CMakeLists.txt
+@@ -1,23 +1,35 @@
+-find_package( ZLIB REQUIRED )
+-if ( ZLIB_FOUND )
+- include_directories( ${ZLIB_INCLUDE_DIRS} )
+-else ( ZLIB_FOUND )
+- Message(FATAL_ERROR "Zlib development packages not found!")
+-endif( ZLIB_FOUND )
++find_package(PkgConfig)
+
++if ( PKGCONFIG_FOUND )
++ pkg_check_modules(ZLIB minizip)
++else ( PKGCONFIG_FOUND )
++ unset(ZLIB_FOUND)
++endif ( PKGCONFIG_FOUND )
+
++if ( ZLIB_FOUND )
++ set(CXXSRC miniunz.c)
++ unset(HSRC)
++else ( ZLIB_FOUND )
++ find_package(ZLIB REQUIRED)
++ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
+
++ set(CXXSRC
++ miniunz.c
++ ioapi.c
++ iowin32.c
++ unzip.c)
+
+-set(CXXSRC
+- miniunz.c
+- ioapi.c
+- iowin32.c
+- unzip.c)
++ set(HSRC
++ ioapi.h
++ iowin32.h
++ unzip.h)
++endif ( ZLIB_FOUND )
+
+-set(HSRC
+- ioapi.h
+- iowin32.h
+- unzip.h)
++if ( ZLIB_FOUND )
++ include_directories( ${ZLIB_INCLUDE_DIRS} )
++else ( ZLIB_FOUND )
++ Message(FATAL_ERROR "Zlib development packages not found!")
++endif( ZLIB_FOUND )
+
+ add_library(unzip ${CXXSRC} ${HSRC})
+
+diff --git a/src/engine/unzip/miniunz.c b/src/engine/unzip/miniunz.c
+index 694aa8e60..0f289c96c 100644
+--- a/src/engine/unzip/miniunz.c
++++ b/src/engine/unzip/miniunz.c
+@@ -56,7 +56,7 @@
+ #endif
+
+
+-#include "unzip.h"
++#include <unzip.h>
+
+ #define CASESENSITIVITY (0)
+ #define WRITEBUFFERSIZE (8192)
+@@ -64,7 +64,7 @@
+
+ #ifdef _WIN32
+ #define USEWIN32IOAPI
+-#include "iowin32.h"
++#include <iowin32.h>
+ #endif
+ /*
+ mini unzip, demo of unzip package
+--
+2.20.1
+
diff --git a/games-arcade/commandergenius/files/commandergenius-2.3.1-paths.patch b/games-arcade/commandergenius/files/commandergenius-2.3.1-paths.patch
new file mode 100644
index 000000000000..50fb90b95022
--- /dev/null
+++ b/games-arcade/commandergenius/files/commandergenius-2.3.1-paths.patch
@@ -0,0 +1,11 @@
+diff -Naur a/GsKit/base/utils/FindFile.cpp b/GsKit/base/utils/FindFile.cpp
+--- a/GsKit/base/utils/FindFile.cpp 2019-02-08 15:17:29.000000000 +0000
++++ b/GsKit/base/utils/FindFile.cpp 2019-02-19 23:14:32.299939859 +0000
+@@ -493,7 +493,6 @@
+ #else
+ AddToFileList(&basesearchpaths, "${HOME}/.CommanderGenius");
+ #endif
+- AddToFileList(&basesearchpaths, ".");
+ AddToFileList(&basesearchpaths, SYSTEM_DATA_DIR"/commandergenius"); // no use of ${SYSTEM_DATA}, because it is uncommon and could cause confusion to the user
+ #endif
+ }
diff --git a/games-arcade/commandergenius/metadata.xml b/games-arcade/commandergenius/metadata.xml
index 1f862355f14e..86222e373a5e 100644
--- a/games-arcade/commandergenius/metadata.xml
+++ b/games-arcade/commandergenius/metadata.xml
@@ -10,9 +10,10 @@
Use <pkg>media-libs/tremor</pkg> as ogg decoder
instead of <pkg>media-libs/libvorbis</pkg>
</flag>
+ <flag name="downloader">Allows some Keen games to be downloaded from the menu</flag>
</use>
<upstream>
<remote-id type="sourceforge">clonekeenplus</remote-id>
- <remote-id type="github">gerstrong/Commander-Genius</remote-id>
+ <remote-id type="gitlab">Dringgstein/Commander-Genius</remote-id>
</upstream>
</pkgmetadata>