summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-02-25 04:41:14 -0500
committerIonen Wolkens <ionen@gentoo.org>2023-02-25 05:19:43 -0500
commit646df5c2d8bb035184b8d01273356ad5600c7e13 (patch)
treeaaad492a6c4e6040b9444492f6a3a0bf8a0fa70a /games-arcade/commandergenius
parentdev-vcs/hg-git-1.0.1: version bump, python 3.11 (diff)
downloadgentoo-646df5c2d8bb035184b8d01273356ad5600c7e13.tar.gz
gentoo-646df5c2d8bb035184b8d01273356ad5600c7e13.tar.bz2
gentoo-646df5c2d8bb035184b8d01273356ad5600c7e13.zip
games-arcade/commandergenius: EAPI7->8, enable py3.11, filter-lto
Still needs a bump, but that will need closer looking into and ideally someone more familiar with this and having the game files. wrt python, support for 3.11 falls back on users given it's used for their own scripts (later versions replace python by lua). Albeit may already have been using 3.11 or 3.12 given cmake wasn't told which interpreter library to link with before. Just a lazy fix wrt bug #858530 to do at same time as revbump, haven't looked closer. Closes: https://bugs.gentoo.org/858530 Closes: https://bugs.gentoo.org/896954 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'games-arcade/commandergenius')
-rw-r--r--games-arcade/commandergenius/commandergenius-2.4.0-r1.ebuild (renamed from games-arcade/commandergenius/commandergenius-2.4.0.ebuild)53
1 files changed, 26 insertions, 27 deletions
diff --git a/games-arcade/commandergenius/commandergenius-2.4.0.ebuild b/games-arcade/commandergenius/commandergenius-2.4.0-r1.ebuild
index 976c50c53abb..f263f3a77456 100644
--- a/games-arcade/commandergenius/commandergenius-2.4.0.ebuild
+++ b/games-arcade/commandergenius/commandergenius-2.4.0-r1.ebuild
@@ -1,17 +1,18 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{9,10} )
+# note: version >=2.5.0 switches from python to lua
+PYTHON_COMPAT=( python3_{9..11} )
+inherit cmake flag-o-matic python-single-r1 xdg
-inherit python-single-r1 xdg cmake
+MY_P="Commander-Genius-v${PV}"
-MY_PN="Commander-Genius"
-MY_P="${MY_PN}-v${PV}"
DESCRIPTION="Open Source Commander Keen clone (needs original game files)"
-HOMEPAGE="https://clonekeenplus.sourceforge.io"
-SRC_URI="https://gitlab.com/Dringgstein/${MY_PN}/-/archive/v${PV}/${MY_P}.tar.bz2"
+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"
@@ -28,50 +29,48 @@ RDEPEND="
sys-libs/zlib[minizip]
downloader? ( net-misc/curl )
opengl? ( virtual/opengl )
- python? ( ${PYTHON_DEPS} )
-"
-
+ python? ( ${PYTHON_DEPS} )"
DEPEND="
${RDEPEND}
- dev-libs/boost
-"
-
-BDEPEND="virtual/pkgconfig"
+ dev-libs/boost"
+BDEPEND="python? ( ${PYTHON_DEPS} )"
PATCHES=(
"${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=()
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
src_configure() {
+ filter-lto #858530
+
local mycmakeargs=(
- -DAPPDIR="${EPREFIX}/usr/bin"
- -DGAMES_SHAREDIR="${EPREFIX}${SHAREDIR}"
- -DDOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+ -DAPPDIR="${EPREFIX}"/usr/bin
+ -DDOCDIR="${EPREFIX}"/usr/share/doc/${PF}
+ -DGAMES_SHAREDIR="${EPREFIX}"/usr/share
-DDOWNLOADER=$(usex downloader)
-DUSE_OPENGL=$(usex opengl)
-DUSE_PYTHON3=$(usex python)
- -DUSE_SDL2=ON
- -DUSE_SDL_TTF=ON # Crashes when disabled.
+ -DUSE_SDL2=yes
+ -DUSE_SDL_TTF=yes # crashes when disabled
+ $(usev python -DPython3_EXECUTABLE="${PYTHON}")
)
cmake_src_configure
}
src_install() {
+ local DOCS=() # skip .in template file, can drop this on bump
cmake_src_install
- # The normal executable name is weird.
+ # default executable name is weird
dosym CGeniusExe /usr/bin/${PN}
- # Game data can be manually installed here.
- keepdir "${GAMESDIR}"
+ # game data can be manually installed here
+ keepdir /usr/share/${PN}/games
}
pkg_postinst() {