commit: 646df5c2d8bb035184b8d01273356ad5600c7e13 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Sat Feb 25 09:41:14 2023 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Sat Feb 25 10:19:43 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=646df5c2
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 <AT> gentoo.org> ....4.0.ebuild => commandergenius-2.4.0-r1.ebuild} | 53 +++++++++++----------- 1 file 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 similarity index 63% rename from games-arcade/commandergenius/commandergenius-2.4.0.ebuild rename to 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() {
