summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasufell <julian.ospald@googlemail.com>2012-04-09 22:01:16 +0200
committerhasufell <julian.ospald@googlemail.com>2012-04-09 22:01:16 +0200
commit647cc3b2d51a046ceb3e9668eccb3489211efe57 (patch)
treef58e19f5a46aa5f5ce054635ef253e47ea836a97 /games-arcade/clonekeenplus/clonekeenplus-9999.ebuild
parentapp-text/discount: New ebuild for bug #294000 thanks to hasufell from #gentoo... (diff)
downloadsunrise-647cc3b2d51a046ceb3e9668eccb3489211efe57.tar.gz
sunrise-647cc3b2d51a046ceb3e9668eccb3489211efe57.tar.bz2
sunrise-647cc3b2d51a046ceb3e9668eccb3489211efe57.zip
games-arcade/clonekeenplus: New Ebuild for bug 411385 thanks to floppym
Diffstat (limited to 'games-arcade/clonekeenplus/clonekeenplus-9999.ebuild')
-rw-r--r--games-arcade/clonekeenplus/clonekeenplus-9999.ebuild89
1 files changed, 89 insertions, 0 deletions
diff --git a/games-arcade/clonekeenplus/clonekeenplus-9999.ebuild b/games-arcade/clonekeenplus/clonekeenplus-9999.ebuild
new file mode 100644
index 000000000..ac87feb1e
--- /dev/null
+++ b/games-arcade/clonekeenplus/clonekeenplus-9999.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+EGIT_REPO_URI="git://${PN}.git.sourceforge.net/gitroot/${PN}/${PN}"
+
+inherit cmake-utils eutils git-2 toolchain-funcs games
+
+DESCRIPTION="Open Source Commander Keen clone"
+HOMEPAGE="http://clonekeenplus.sourceforge.ne"
+
+LICENSE="|| ( GPL-1 GPL-2 GPL-3 )
+ LGPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="tremor"
+
+RDEPEND="media-libs/libogg
+ media-libs/libsdl[X,audio,opengl,video]
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libxcb
+ !tremor? ( media-libs/libvorbis )
+ tremor? ( media-libs/tremor )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+CMAKE_IN_SOURCE_BUILD=1
+
+src_prepare() {
+ epatch "${FILESDIR}"/{cmake,findfile}.patch
+
+ sed \
+ -e "/SYSTEM_DATA_DIR/s#/usr/share#${GAMES_DATADIR}#" \
+ -i src/FindFile.h || die
+}
+
+src_configure() {
+ local mycmakeargs arch
+ arch=$(tc-arch)
+
+ case $arch in
+ amd64)
+ mycmakeargs=(
+ -DBUILD_TYPE=LINUX64
+ -DHAVE_64_BIT=1
+ )
+ ;;
+ x86)
+ mycmakeargs=(
+ -DBUILD_TYPE=LINUX32
+ -DHAVE_64_BIT=0
+ )
+ ;;
+ *)
+ die "unsopported architecture"
+ ;;
+ esac
+
+ mycmakeargs+=(
+ -DAPPDIR="${GAMES_BINDIR}"
+ -DSHAREDIR="${GAMES_DATADIR}"/CommanderGenius
+ -DDOCDIR="/usr/share/${PF}/doc"
+ $(cmake-utils_use !tremor OGG)
+ $(cmake-utils_use tremor TREMOR)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ mv vfsroot/cglogo512.png ${PN}.png || die
+ cmake-utils_src_install
+ doicon ${PN}.png || die
+ make_desktop_entry CGenius ${PN} ${PN}
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "Check your settings in ~/.CommanderGenius/cgenius.cfg"
+ elog "after you have first started the game. You may need to"
+ elog "set \"OpenGL = true\" and adjust other settings."
+}