]> Pileus Git - ~andy/sunrise/commitdiff
games-strategy/openra: New Ebuild for bug 372029
authorhasufell <julian.ospald@googlemail.com>
Sun, 1 Apr 2012 00:12:09 +0000 (00:12 +0000)
committerhasufell <julian.ospald@googlemail.com>
Sun, 1 Apr 2012 00:12:09 +0000 (00:12 +0000)
svn path=/sunrise/; revision=12894

games-strategy/openra/ChangeLog [new file with mode: 0644]
games-strategy/openra/Manifest [new file with mode: 0644]
games-strategy/openra/files/openra-0_pre20120304-makefile.patch [new file with mode: 0644]
games-strategy/openra/files/openra-cnc.desktop [new file with mode: 0644]
games-strategy/openra/files/openra-editor.desktop [new file with mode: 0644]
games-strategy/openra/files/openra-ra.desktop [new file with mode: 0644]
games-strategy/openra/metadata.xml [new file with mode: 0644]
games-strategy/openra/openra-0_pre20120304.ebuild [new file with mode: 0644]

diff --git a/games-strategy/openra/ChangeLog b/games-strategy/openra/ChangeLog
new file mode 100644 (file)
index 0000000..87e0a8d
--- /dev/null
@@ -0,0 +1,12 @@
+# ChangeLog for games-strategy/openra
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*openra-0_pre20120304 (31 Mar 2012)
+
+  31 Mar 2012; hasufell <julian.ospald@googlemail.com>
+  +openra-0_pre20120304.ebuild, +files/openra-0_pre20120304-makefile.patch,
+  +files/openra-cnc.desktop, +files/openra-editor.desktop,
+  +files/openra-ra.desktop, +metadata.xml:
+  New Ebuild for bug 372029
+
diff --git a/games-strategy/openra/Manifest b/games-strategy/openra/Manifest
new file mode 100644 (file)
index 0000000..3bbcd40
--- /dev/null
@@ -0,0 +1,8 @@
+AUX openra-0_pre20120304-makefile.patch 1418 RMD160 bc7ebe5b02e0631af12bbd0692333b3004446243 SHA1 162af092633cdb30c4cf9b686df24327bb5fab51 SHA256 0b200103f4667f0e444a8fff681523728dfdf19c5c6c5cb15252b91c0afb61ca
+AUX openra-cnc.desktop 179 RMD160 37515323230b95ea3f9ae55b8583a6b485eb84f4 SHA1 a9df52c1967e00da6790bf987c55caf16b09e4b6 SHA256 6d5d77d5206ce24a40eac150f70ef9561553da5390dcd010ccaac064db31a0ef
+AUX openra-editor.desktop 147 RMD160 1b71e5a6d3c67349c874bd62d2884249fbe6573f SHA1 03c302358840fb2e7988dcae5b5d5d2639c3e65d SHA256 be65ea2c5548662ce0ee5d9863f26fac0c0626dc712bb1c1e6ff6a6af064621d
+AUX openra-ra.desktop 169 RMD160 c625dc42ef786f4fab61f510b495459ecf18f8aa SHA1 264747729e1c83bd24ea4b7cd884c3ea1479ddad SHA256 f6ca60a25bc66619d83a0bf93d990f338299ef42e54a4c3eb237239057b08686
+DIST openra-0_pre20120304.tar.gz 10302208 RMD160 6806fc50ec48b91da48b51b349d45976e89e59c0 SHA1 0561e3725af61a10ee0ff0bc1b542e3a24feb9df SHA256 4713db425c817ff9addbbc20c8d37f48f57ad0df6796707b75c27bd1b62d0aea
+EBUILD openra-0_pre20120304.ebuild 1835 RMD160 55f42e096fdd241c6b77d455dba6b7ec3e6dbfe7 SHA1 c5e344c5e9a2e8fd946f5068d79371e2cd5c212d SHA256 379d4ae86f2342127c5566066106fe85456195316733ccf85bf401babe160c72
+MISC ChangeLog 421 RMD160 6c3378b8220a9218b88ac3bf290cbd13bfdec0c8 SHA1 cad4294f824813162a32c072fc6cf02e5a44425b SHA256 bde8d57045c77eb0475981c9157b2d174645c4c9fedcf3b80ec28b5939f2073c
+MISC metadata.xml 277 RMD160 deef251b1089c0d0655fdbf52772c18f013c3786 SHA1 0c0b2d64253140602f55f3a9f253d15bf3feac45 SHA256 3706bb4995873a3063e6224888dee01cde0df6f2522f745b2d38ebcc7db0cd2f
diff --git a/games-strategy/openra/files/openra-0_pre20120304-makefile.patch b/games-strategy/openra/files/openra-0_pre20120304-makefile.patch
new file mode 100644 (file)
index 0000000..9e7edfa
--- /dev/null
@@ -0,0 +1,46 @@
+From: hasufell <julian.ospald@googlemail.com>
+Date: Sat Mar 31 21:32:07 CEST 2012
+Subject: paths and install rules
+
+fix non-modifable paths and broken install-rules
+
+--- Makefile
++++ Makefile
+@@ -180,10 +180,10 @@
+ #
+ # Install / Uninstall for *nix
+ #
+-prefix = /usr/local
+-datarootdir = $(prefix)/share
+-datadir = $(datarootdir)
+-bindir = $(prefix)/bin
++prefix ?= /usr/local
++datarootdir ?= $(prefix)/share
++datadir ?= $(datarootdir)
++bindir ?= $(prefix)/bin
+ BIN_INSTALL_DIR = $(DESTDIR)$(bindir)
+ INSTALL_DIR = $(DESTDIR)$(datadir)/openra
+ INSTALL = install
+@@ -219,15 +219,20 @@
+       @cp -r glsl $(INSTALL_DIR)
+       @cp -r cg $(INSTALL_DIR)
+       @cp *.ttf $(INSTALL_DIR)
+-      @cp --parents -r thirdparty/Tao $(INSTALL_DIR)
++      @cp thirdparty/Tao/* $(INSTALL_DIR)
+       @$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll $(INSTALL_DIR)
+       @echo "#!/bin/sh" > openra
+       @echo "cd "$(datadir)"/openra" >> openra
+-      @echo "mono "$(datadir)"/openra/OpenRA.Game.exe \"$$""@\"" >> openra
++      @echo "exec mono "$(datadir)"/openra/OpenRA.Game.exe \"$$""@\"" >> openra
++
++      @echo "#!/bin/sh" > openra
++      @echo "cd "$(datadir)"/openra" >> openra-editor
++      @echo "exec mono "$(datadir)"/openra/OpenRA.Editor.exe \"$$""@\"" >> openra-editor
+       @$(INSTALL_PROGRAM) -d $(BIN_INSTALL_DIR)
+       @$(INSTALL_PROGRAM) -m +rx openra $(BIN_INSTALL_DIR)
++      @$(INSTALL_PROGRAM) -m +rx openra-editor $(BIN_INSTALL_DIR)
+ uninstall:
+       @-rm -r $(INSTALL_DIR)
diff --git a/games-strategy/openra/files/openra-cnc.desktop b/games-strategy/openra/files/openra-cnc.desktop
new file mode 100644 (file)
index 0000000..09002fd
--- /dev/null
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+GenericName=OpenRA - Command & Conquer
+Name=OpenRA CNC
+Icon=openra
+Exec=openra Game.Mods=cnc Graphics.Renderer=Gl
+Terminal=false
+Categories=Game;
diff --git a/games-strategy/openra/files/openra-editor.desktop b/games-strategy/openra/files/openra-editor.desktop
new file mode 100644 (file)
index 0000000..48aa45a
--- /dev/null
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+GenericName=OpenRA - Editor
+Name=OpenRA Map Editor
+Icon=openra
+Exec=openra-editor
+Terminal=false
+Categories=Game;
diff --git a/games-strategy/openra/files/openra-ra.desktop b/games-strategy/openra/files/openra-ra.desktop
new file mode 100644 (file)
index 0000000..98abf52
--- /dev/null
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+GenericName=OpenRA - Red Alert
+Name=OpenRA RA
+Icon=openra
+Exec=openra Game.Mods=ra Graphics.Renderer=Gl
+Terminal=false
+Categories=Game;
diff --git a/games-strategy/openra/metadata.xml b/games-strategy/openra/metadata.xml
new file mode 100644 (file)
index 0000000..f851f11
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer>
+               <email>maintainer-wanted@gentoo.org</email>
+       </maintainer>
+       <use>
+               <flag name="cg">NVIDIA toolkit plugin</flag>
+       </use>
+</pkgmetadata>
+
diff --git a/games-strategy/openra/openra-0_pre20120304.ebuild b/games-strategy/openra/openra-0_pre20120304.ebuild
new file mode 100644 (file)
index 0000000..cea21e1
--- /dev/null
@@ -0,0 +1,85 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit eutils mono gnome2-utils games
+
+DESCRIPTION="A Libre/Free RTS engine supporting early Westwood games like Command & Conquer and Red Alert"
+HOMEPAGE="http://open-ra.org/"
+SRC_URI="http://badading.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="cg"
+
+DEPEND="dev-dotnet/libgdiplus
+       dev-lang/mono
+       media-libs/freetype:2[X]
+       media-libs/libsdl[X,audio,video]
+       media-libs/openal
+       virtual/jpeg
+       virtual/opengl
+       cg? ( media-gfx/nvidia-cg-toolkit )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       # fix a few paths and install-rules
+       epatch "${FILESDIR}"/${P}-makefile.patch
+
+       if use cg ; then
+               # set default renderer to cg
+               sed \
+                       -e '/Renderer/s/Gl/Cg/' \
+                       -i ${PN}-{cnc,ra}.desktop \
+                       || die "setting default renderer in desktop file failed"
+       fi
+}
+
+src_install() {
+       # no configure script
+       emake \
+               prefix="${GAMES_PREFIX}" \
+               datarootdir="${GAMES_DATADIR_BASE}" \
+               datadir="${GAMES_DATADIR}" \
+               bindir="${GAMES_BINDIR}" \
+               DESTDIR="${D}" \
+               install || die
+
+       # icons
+       insinto /usr/share/icons/
+       doins -r packaging/linux/hicolor || die
+       newicon soviet-logo.png ${PN}.png || die
+
+       # .desktop files
+       domenu "${FILESDIR}"/${PN}-{cnc,editor,ra}.desktop || die
+
+       #docs
+       dodoc README HACKING CHANGELOG || die
+
+       # file permissions
+       prepgamesdirs
+}
+
+pkg_preinst() {
+       games_pkg_preinst
+       gnome2_icon_savelist
+}
+
+pkg_postinst() {
+       games_pkg_postinst
+       gnome2_icon_cache_update
+
+       if use cg ; then
+               elog "If you have problems starting the game consider switching"
+               elog "back to Graphics.Renderer=Gl in openra*.desktop or pass that"
+               elog "argument on the command line:"
+               elog "openra Game.Mods=... Graphics.Renderer=Gl"
+       fi
+}
+
+pkg_postrm() {
+       gnome2_icon_cache_update
+}