summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2020-03-30 23:38:03 +0100
committerJames Le Cuirot <chewi@gentoo.org>2020-03-30 23:38:03 +0100
commit63d904d5f9801328fbcc70c62c4482141d3fda81 (patch)
tree30e6b7b8a14384359c2389ee53e3fa52b87c67a6 /games-arcade
parentdev-lang/rust-bin: update metadata.xml (diff)
downloadgentoo-63d904d5f9801328fbcc70c62c4482141d3fda81.tar.gz
gentoo-63d904d5f9801328fbcc70c62c4482141d3fda81.tar.bz2
gentoo-63d904d5f9801328fbcc70c62c4482141d3fda81.zip
games-arcade/commandergenius: Version bump to 2.4.0
Package-Manager: Portage-2.3.96, Repoman-2.3.20 Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/commandergenius/Manifest1
-rw-r--r--games-arcade/commandergenius/commandergenius-2.4.0.ebuild91
2 files changed, 92 insertions, 0 deletions
diff --git a/games-arcade/commandergenius/Manifest b/games-arcade/commandergenius/Manifest
index ca4a0d63c69b..67267068a0c7 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 Commander-Genius-v2.4.0.tar.bz2 62351265 BLAKE2B 0a3338bee2e494f415ce5072978f050766fff16e5df5e7b27824fb4d4c699d2e5a690924f339189325383bee273cbfa5424f43aa9dc87ae4abf63c7cbf1ea6cd SHA512 76eda96fade00d164d3ea5b95acadfb28a3b24864a5ce3f2c9317837a1027cd8d0282a474b8d25bacc26008a26a6adc5062ee655f9abd350d44db58aa70d3b3b
diff --git a/games-arcade/commandergenius/commandergenius-2.4.0.ebuild b/games-arcade/commandergenius/commandergenius-2.4.0.ebuild
new file mode 100644
index 000000000000..9baded9ec4a0
--- /dev/null
+++ b/games-arcade/commandergenius/commandergenius-2.4.0.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit desktop python-single-r1 xdg cmake
+
+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"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+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
+ 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-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)
+ -DUSE_OPENGL=$(usex opengl)
+ -DUSE_PYTHON3=$(usex python)
+ -DUSE_SDL2=ON
+ -DUSE_SDL_TTF=ON # Crashes when disabled.
+ )
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_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_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\"."
+}