summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2013-01-27 15:17:57 +0000
committerJulian Ospald <hasufell@gentoo.org>2013-01-27 15:17:57 +0000
commit69e7e4fbd5dd175b5188c1b27489970cde98dc25 (patch)
treeb7cd70b0cd22971a441b0fc4969fe02ae62ac8d6 /games-strategy/outerspace
parentStable for x86, wrt bug #450678 (diff)
downloadgentoo-2-69e7e4fbd5dd175b5188c1b27489970cde98dc25.tar.gz
gentoo-2-69e7e4fbd5dd175b5188c1b27489970cde98dc25.tar.bz2
gentoo-2-69e7e4fbd5dd175b5188c1b27489970cde98dc25.zip
version bump wrt #380487, convert to distutils-r1
(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
Diffstat (limited to 'games-strategy/outerspace')
-rw-r--r--games-strategy/outerspace/ChangeLog10
-rw-r--r--games-strategy/outerspace/files/outerspace-0.5.68-setup.patch83
-rw-r--r--games-strategy/outerspace/outerspace-0.5.68.ebuild81
3 files changed, 172 insertions, 2 deletions
diff --git a/games-strategy/outerspace/ChangeLog b/games-strategy/outerspace/ChangeLog
index 6f5337d5d7aa..18153c1ba28a 100644
--- a/games-strategy/outerspace/ChangeLog
+++ b/games-strategy/outerspace/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for games-strategy/outerspace
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/outerspace/ChangeLog,v 1.18 2011/01/30 18:14:46 phajdan.jr Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/outerspace/ChangeLog,v 1.19 2013/01/27 15:17:57 hasufell Exp $
+
+*outerspace-0.5.68 (27 Jan 2013)
+
+ 27 Jan 2013; Julian Ospald <hasufell@gentoo.org> +outerspace-0.5.68.ebuild,
+ +files/outerspace-0.5.68-setup.patch:
+ version bump wrt #380487, convert to distutils-r1
30 Jan 2011; Pawel Hajdan jr <phajdan.jr@gentoo.org>
outerspace-0.5.67-r1.ebuild:
diff --git a/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch b/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch
new file mode 100644
index 000000000000..202c53bc7ee1
--- /dev/null
+++ b/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch
@@ -0,0 +1,83 @@
+--- setup.py
++++ setup.py
+@@ -42,12 +42,7 @@
+
+ # collect data files
+ data_files = []
+-data_files.append(
+- (
+- ".",
+- ["../ChangeLog.txt", "../COPYING", "../README", "../README_CZ"]
+- )
+-)
++
+
+ # resources
+ for root, dirs, files in os.walk('res'):
+@@ -57,16 +52,6 @@
+ pass
+ if files:
+ data_files.append((root, [os.path.join(root, file) for file in files]))
+-
+-data_files.append(
+- (
+- "res/techspec",
+- [
+- "../server/lib/ige/ospace/Rules/techs.spf",
+- "../server/lib/ige/ospace/Rules/Tech.spf",
+- ]
+- )
+-)
+
+ if havePy2Exe:
+ data_files.append((".", ["../updater/update.exe"]))
+@@ -114,10 +99,3 @@
+ **extraArgs
+ )
+
+-# cleanup
+-def onerror(func, path, err):
+- if func is os.remove:
+- os.chmod(path, stat.S_IWRITE)
+- os.remove(path)
+-
+-shutil.rmtree("libsrvr", onerror = onerror)
+--- osc.py
++++ osc.py
+@@ -23,12 +23,36 @@
+ # tweak PYTHONPATH
+ import sys
+ import os
++import errno
+ sys.path.insert(0, "lib")
+
+ for item in ("libsrvr", "../server/lib"):
+ if os.path.exists(item):
+ sys.path.insert(0, item)
+ break
++
++userdir=os.path.expanduser("~/.outerspace")
++resdir=os.path.join(userdir, "res")
++rootresdir="@GENTOO_DATADIR@/res"
++
++if not (os.path.isdir(userdir)):
++ try:
++ os.makedirs(userdir)
++ except:
++ sys.exit("unable to create %s" % userdir)
++
++try:
++ os.symlink(rootresdir, resdir)
++except OSError, e:
++ if e.errno == errno.EEXIST:
++ os.remove(resdir)
++ os.symlink(rootresdir, resdir)
++
++try:
++ os.chdir(userdir)
++except:
++ sys.exit("unable to cd into %s" % userdir)
++
+
+ #configure gc
+ #import gc
diff --git a/games-strategy/outerspace/outerspace-0.5.68.ebuild b/games-strategy/outerspace/outerspace-0.5.68.ebuild
new file mode 100644
index 000000000000..a1f41389f5d3
--- /dev/null
+++ b/games-strategy/outerspace/outerspace-0.5.68.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/outerspace/outerspace-0.5.68.ebuild,v 1.1 2013/01/27 15:17:57 hasufell Exp $
+
+EAPI=5
+PYTHON_COMPAT=( python2_6 python2_7 )
+
+inherit eutils gnome2-utils distutils-r1 games
+
+MY_PN=${PN/outerspace/Outer Space}
+DESCRIPTION="on-line strategy game taking place in the dangerous universe"
+HOMEPAGE="http://www.ospace.net/"
+SRC_URI="mirror://sourceforge/ospace/Client/${PV}/Outer%20Space-${PV}.tar.gz -> ${P}.tar.gz
+ mirror://sourceforge/ospace/Client/${PV}/outerspace_${PV}-0ubuntu1_all.deb"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-python/pygame-1.7"
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+src_unpack() {
+ default
+ unpack ./data.tar.gz
+}
+
+python_install() {
+ distutils-r1_python_install \
+ --install-scripts="${GAMES_BINDIR}" \
+ --install-data="${GAMES_DATADIR}/${PN}" \
+ --install-lib="$(python_get_sitedir)"
+
+ # source tarball is missing files
+ # get them from ubuntu.deb
+ insinto "$(python_get_sitedir)"/ige/ospace/Rules
+ doins "${WORKDIR}"/usr/share/games/outerspace/libsrvr/ige/ospace/Rules/{Tech,techs}.spf
+}
+
+src_prepare() {
+ # fix setup script
+ # rework python start script to avoid shell-wrapper script
+ epatch "${FILESDIR}"/${P}-setup.patch
+
+ sed -i\
+ -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
+ osc.py || die "sed failed"
+
+ distutils-r1_src_prepare
+}
+
+src_compile() {
+ distutils-r1_src_compile
+}
+
+src_install() {
+ distutils-r1_src_install
+ newicon -s 48 res/icon48.png ${PN}.png
+ make_desktop_entry "osc.py" "${MY_PN}"
+ prepgamesdirs
+}
+
+pkg_preinst() {
+ games_pkg_preinst
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ gnome2_icon_cache_update
+
+ einfo
+ einfo "start the game via 'osc.py'"
+ einfo
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}