summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2015-10-18 19:02:25 +0200
committerJulian Ospald <hasufell@gentoo.org>2015-10-18 19:04:08 +0200
commit95d7bbec5ad3de15bb1f374a4d30b5b6ece44d40 (patch)
tree3223a30655928ceb9f2e3ca3d91a5a47de491eae /games-strategy/openra/openra-20131223-r2.ebuild
parentsys-libs/uclibc: add myself as co-maintainer. (diff)
downloadgentoo-95d7bbec5ad3de15bb1f374a4d30b5b6ece44d40.tar.gz
gentoo-95d7bbec5ad3de15bb1f374a4d30b5b6ece44d40.tar.bz2
gentoo-95d7bbec5ad3de15bb1f374a4d30b5b6ece44d40.zip
games-strategy/openra: fix virtual/jpeg SLOT
Diffstat (limited to 'games-strategy/openra/openra-20131223-r2.ebuild')
-rw-r--r--games-strategy/openra/openra-20131223-r2.ebuild93
1 files changed, 93 insertions, 0 deletions
diff --git a/games-strategy/openra/openra-20131223-r2.ebuild b/games-strategy/openra/openra-20131223-r2.ebuild
new file mode 100644
index 000000000000..515437beb1f4
--- /dev/null
+++ b/games-strategy/openra/openra-20131223-r2.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils mono-env gnome2-utils vcs-snapshot games
+
+DESCRIPTION="A free RTS engine supporting games like Command & Conquer and Red Alert"
+HOMEPAGE="http://open-ra.org/"
+SRC_URI="https://github.com/OpenRA/OpenRA/tarball/release-${PV} -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="tools"
+
+DEPEND="dev-dotnet/libgdiplus
+ dev-lang/mono
+ media-libs/freetype:2[X]
+ || (
+ media-libs/libsdl[X,opengl,video]
+ media-libs/libsdl2[X,opengl,video]
+ )
+ media-libs/openal
+ virtual/jpeg:0
+ virtual/opengl"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ mono-env_pkg_setup
+ games_pkg_setup
+}
+
+src_unpack() {
+ vcs-snapshot_src_unpack
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sdl2.patch
+ # register game-version
+ sed \
+ -e "/Version/s/{DEV_VERSION}/release-${PV}/" \
+ -i mods/{ra,cnc,d2k}/mod.yaml || die
+}
+
+src_compile() {
+ emake $(usex tools "all" "")
+}
+
+src_install() {
+ emake \
+ bindir="${GAMES_BINDIR}" \
+ libexecdir="$(games_get_libdir)" \
+ DESTDIR="${D}" \
+ $(usex tools "install-all" "install")
+
+ # icons
+ insinto /usr/share/icons/
+ doins -r packaging/linux/hicolor
+
+ # desktop entries
+ make_desktop_entry "${PN} Game.Mods=cnc" "OpenRA CNC" ${PN}
+ make_desktop_entry "${PN} Game.Mods=ra" "OpenRA RA" ${PN}
+ make_desktop_entry "${PN} Game.Mods=d2k" "OpenRA Dune2k" ${PN}
+ make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN}
+
+ dodoc "${FILESDIR}"/README.gentoo README.md CHANGELOG
+
+ # file permissions
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ elog "optional dependencies:"
+ elog " media-gfx/nvidia-cg-toolkit (fallback renderer if OpenGL fails)"
+ elog
+ elog "you might also want to emerge media-libs/libsdl2 specifically,"
+ elog "because ${PN} supports both sdl1.2 and sdl2, but the ebuild only"
+ elog "pulls in one of them, prefering sdl1.2."
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}