commit:     f2d7872ae56b9f2dfdf46fac1b3fe7301fdf1152
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 24 12:16:38 2025 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 24 12:17:47 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2d7872a

games-arcade/commandergenius: Version bump to 3.6.1

Seems okay with Clang now, even with stricter flags.

Closes: https://bugs.gentoo.org/739096
Closes: https://bugs.gentoo.org/884709
Closes: https://bugs.gentoo.org/965851
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-arcade/commandergenius/Manifest              |  1 +
 .../commandergenius/commandergenius-3.6.1.ebuild   | 88 ++++++++++++++++++++++
 .../commandergenius-3.6.1-desktop-icon-ext.patch   | 20 +++++
 .../files/commandergenius-3.6.1-paths.patch        | 10 +++
 4 files changed, 119 insertions(+)

diff --git a/games-arcade/commandergenius/Manifest 
b/games-arcade/commandergenius/Manifest
index 8161b0760396..bb0667e29442 100644
--- a/games-arcade/commandergenius/Manifest
+++ b/games-arcade/commandergenius/Manifest
@@ -1 +1,2 @@
 DIST Commander-Genius-v2.4.0.tar.bz2 62351265 BLAKE2B 
0a3338bee2e494f415ce5072978f050766fff16e5df5e7b27824fb4d4c699d2e5a690924f339189325383bee273cbfa5424f43aa9dc87ae4abf63c7cbf1ea6cd
 SHA512 
76eda96fade00d164d3ea5b95acadfb28a3b24864a5ce3f2c9317837a1027cd8d0282a474b8d25bacc26008a26a6adc5062ee655f9abd350d44db58aa70d3b3b
+DIST Commander-Genius-v3.6.1.tar.bz2 55509384 BLAKE2B 
2b98d9629128f0fe7b0d688d79d695b0cf3f36f13c009b81537a1bedc6bb04d15ef0fc17634af5692c3d022a40e098c83c2601862b9a2579db049ec471ad72e9
 SHA512 
d0e2a074c75d2634900d31308fe42c117f676c4d88786a977207f25cedf6ec22b365098176de24109ba2d50c4c693f29dd11dd6edce50aaafc043c5fa205b20a

diff --git a/games-arcade/commandergenius/commandergenius-3.6.1.ebuild 
b/games-arcade/commandergenius/commandergenius-3.6.1.ebuild
new file mode 100644
index 000000000000..f375ca77373b
--- /dev/null
+++ b/games-arcade/commandergenius/commandergenius-3.6.1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic xdg
+
+MY_P=Commander-Genius-v${PV}
+
+DESCRIPTION="Open Source Commander Keen clone (needs original game files)"
+HOMEPAGE="https://clonekeenplus.sourceforge.io/";
+SRC_URI="https://gitlab.com/Dringgstein/Commander-Genius/-/archive/v${PV}/${MY_P}.tar.bz2";
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+downloader opengl"
+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]
+       media-libs/sdl2-ttf
+       virtual/minizip:=
+       downloader? ( net-misc/curl )
+       opengl? ( media-libs/libglvnd )
+"
+DEPEND="
+       ${RDEPEND}
+       dev-libs/boost
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2.3.1-build.patch
+       "${FILESDIR}"/${PN}-3.6.1-paths.patch
+       "${FILESDIR}"/${P}-desktop-icon-ext.patch
+)
+
+src_prepare() {
+       # Drop unneeded code to avoid CMake issues.
+       rm -r tools || die
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       filter-lto #858530
+
+       local mycmakeargs=(
+               -DBUILD_SHARED_LIBS=no
+               -DCCACHE_FOUND=no
+               -DAPPDIR="${EPREFIX}"/usr/bin
+               -DDOCDIR="${EPREFIX}"/usr/share/doc/${PF}
+               -DGAMES_SHAREDIR="${EPREFIX}"/usr/share
+               -DDOWNLOADER=$(usex downloader)
+               -DUSE_OPENGL=$(usex opengl)
+       )
+
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+
+       # default executable name is weird
+       dosym CGeniusExe /usr/bin/${PN}
+
+       # game data can be manually installed here
+       keepdir /usr/share/${PN}/games
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+
+       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\"."
+}

diff --git 
a/games-arcade/commandergenius/files/commandergenius-3.6.1-desktop-icon-ext.patch
 
b/games-arcade/commandergenius/files/commandergenius-3.6.1-desktop-icon-ext.patch
new file mode 100644
index 000000000000..f4c344b04992
--- /dev/null
+++ 
b/games-arcade/commandergenius/files/commandergenius-3.6.1-desktop-icon-ext.patch
@@ -0,0 +1,20 @@
+From 9bb4a985b2d66952789b10302b6848279817c2d5 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <[email protected]>
+Date: Mon, 24 Nov 2025 11:42:47 +0000
+Subject: [PATCH] The Icon Theme Specification says Icon should not have an
+ extension
+
+--- a/share/cgenius.desktop
++++ b/share/cgenius.desktop
+@@ -2,7 +2,7 @@
+ Name=Commander Genius
+ Comment=Play natively Commander Keen Games
+ Exec=CGeniusExe
+-Icon=cg.svg
++Icon=cg
+ Terminal=false
+ Type=Application
+ StartupNotify=true
+-- 
+2.52.0
+

diff --git 
a/games-arcade/commandergenius/files/commandergenius-3.6.1-paths.patch 
b/games-arcade/commandergenius/files/commandergenius-3.6.1-paths.patch
new file mode 100644
index 000000000000..464f796c6bff
--- /dev/null
+++ b/games-arcade/commandergenius/files/commandergenius-3.6.1-paths.patch
@@ -0,0 +1,10 @@
+--- a/GsKit/base/interface/FindFile.cpp
++++ b/GsKit/base/interface/FindFile.cpp
+@@ -512,7 +512,6 @@ void InitBaseSearchPaths()
+       AddToFileList(&basesearchpaths, "${HOME}/.CommanderGenius");
+     #endif
+ #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
+ }

Reply via email to