Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-strategy/outerspace/, games-strategy/outerspace/files/
Date: Wed, 02 May 2018 19:28:42
Message-Id: 1525289289.5a239cece181e5580c0b754d0cab2f2773b65b61.pacho@gentoo
1 commit: 5a239cece181e5580c0b754d0cab2f2773b65b61
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 2 18:56:13 2018 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Wed May 2 19:28:09 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5a239cec
7
8 games-strategy/outerspace: Stop using games.eclass
9
10 Package-Manager: Portage-2.3.31, Repoman-2.3.9
11
12 .../outerspace/files/outerspace-0.5.68-setup.patch | 8 +--
13 .../outerspace/outerspace-0.5.68-r1.ebuild | 72 ++++++++++++++++++++++
14 2 files changed, 76 insertions(+), 4 deletions(-)
15
16 diff --git a/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch b/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch
17 index 202c53bc7ee..c95852dca3d 100644
18 --- a/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch
19 +++ b/games-strategy/outerspace/files/outerspace-0.5.68-setup.patch
20 @@ -1,5 +1,5 @@
21 ---- setup.py
22 -+++ setup.py
23 +--- a/setup.py
24 ++++ b/setup.py
25 @@ -42,12 +42,7 @@
26
27 # collect data files
28 @@ -42,8 +42,8 @@
29 - os.remove(path)
30 -
31 -shutil.rmtree("libsrvr", onerror = onerror)
32 ---- osc.py
33 -+++ osc.py
34 +--- a/osc.py
35 ++++ b/osc.py
36 @@ -23,12 +23,36 @@
37 # tweak PYTHONPATH
38 import sys
39
40 diff --git a/games-strategy/outerspace/outerspace-0.5.68-r1.ebuild b/games-strategy/outerspace/outerspace-0.5.68-r1.ebuild
41 new file mode 100644
42 index 00000000000..7ac6c532fd4
43 --- /dev/null
44 +++ b/games-strategy/outerspace/outerspace-0.5.68-r1.ebuild
45 @@ -0,0 +1,72 @@
46 +# Copyright 1999-2018 Gentoo Foundation
47 +# Distributed under the terms of the GNU General Public License v2
48 +
49 +EAPI=6
50 +PYTHON_COMPAT=( python2_7 )
51 +
52 +inherit desktop gnome2-utils distutils-r1
53 +
54 +MY_PN="${PN/outerspace/Outer Space}"
55 +DESCRIPTION="On-line strategy game taking place in the dangerous universe"
56 +HOMEPAGE="http://www.ospace.net/"
57 +SRC_URI="mirror://sourceforge/ospace/Client/${PV}/Outer%20Space-${PV}.tar.gz -> ${P}.tar.gz
58 + mirror://sourceforge/ospace/Client/${PV}/outerspace_${PV}-0ubuntu1_all.deb"
59 +
60 +LICENSE="GPL-2"
61 +SLOT="0"
62 +KEYWORDS="~amd64 ~x86"
63 +IUSE=""
64 +
65 +RDEPEND=">=dev-python/pygame-1.7"
66 +DEPEND=""
67 +
68 +S="${WORKDIR}/${MY_PN}-${PV}"
69 +
70 +src_unpack() {
71 + default
72 + unpack ./data.tar.gz
73 +}
74 +
75 +python_install() {
76 + distutils-r1_python_install \
77 + --install-scripts="/usr/bin" \
78 + --install-data="/usr/share/${PN}" \
79 + --install-lib="$(python_get_sitedir)"
80 +
81 + # source tarball is missing files
82 + # get them from ubuntu.deb
83 + insinto "$(python_get_sitedir)"/ige/ospace/Rules
84 + doins "${WORKDIR}"/usr/share/games/outerspace/libsrvr/ige/ospace/Rules/{Tech,techs}.spf
85 +}
86 +
87 +src_prepare() {
88 + default
89 +
90 + # fix setup script
91 + # rework python start script to avoid shell-wrapper script
92 + eapply "${FILESDIR}"/${P}-setup.patch
93 +
94 + sed -i\
95 + -e "s:@GENTOO_DATADIR@:/usr/share/${PN}:" \
96 + osc.py || die "sed failed"
97 +
98 + distutils-r1_src_prepare
99 +}
100 +
101 +src_install() {
102 + distutils-r1_src_install
103 + newicon res/logo-login.png ${PN}.png
104 + make_desktop_entry "osc.py" "${MY_PN}"
105 +}
106 +
107 +pkg_preinst() {
108 + gnome2_icon_savelist
109 +}
110 +
111 +pkg_postinst() {
112 + gnome2_icon_cache_update
113 +}
114 +
115 +pkg_postrm() {
116 + gnome2_icon_cache_update
117 +}