summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2007-10-14 07:26:57 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2007-10-14 07:26:57 +0000
commit2b37efa9673171f614c93a88df9ed21a76868f14 (patch)
treec6cc3948056c7a1f8e16185a392e4fd1203fe3db /games-simulation
parentadd games-simulation/singularity:music; sort (diff)
downloadgentoo-2-2b37efa9673171f614c93a88df9ed21a76868f14.tar.gz
gentoo-2-2b37efa9673171f614c93a88df9ed21a76868f14.tar.bz2
gentoo-2-2b37efa9673171f614c93a88df9ed21a76868f14.zip
make music optional at upstream request (bug #195447)
(Portage version: 2.1.3.9)
Diffstat (limited to 'games-simulation')
-rw-r--r--games-simulation/singularity/ChangeLog6
-rw-r--r--games-simulation/singularity/files/singularity-0.26a-musicdir.patch32
-rw-r--r--games-simulation/singularity/singularity-0.26a.ebuild14
3 files changed, 46 insertions, 6 deletions
diff --git a/games-simulation/singularity/ChangeLog b/games-simulation/singularity/ChangeLog
index 87eb8ec52532..c6bb439637a6 100644
--- a/games-simulation/singularity/ChangeLog
+++ b/games-simulation/singularity/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-simulation/singularity
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-simulation/singularity/ChangeLog,v 1.4 2007/10/02 06:46:57 tupone Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-simulation/singularity/ChangeLog,v 1.5 2007/10/14 07:26:57 mr_bones_ Exp $
+
+ 14 Oct 2007; Michael Sterrett <mr_bones_@gentoo.org>
+ +files/singularity-0.26a-musicdir.patch, singularity-0.26a.ebuild:
+ make music optional at upstream request (bug #195447)
*singularity-0.26a (02 Oct 2007)
diff --git a/games-simulation/singularity/files/singularity-0.26a-musicdir.patch b/games-simulation/singularity/files/singularity-0.26a-musicdir.patch
new file mode 100644
index 000000000000..3a80f1e31d65
--- /dev/null
+++ b/games-simulation/singularity/files/singularity-0.26a-musicdir.patch
@@ -0,0 +1,32 @@
+Index: code/g.py
+===================================================================
+--- code/g.py (revision 406)
++++ code/g.py (revision 407)
+@@ -142,14 +142,21 @@
+ musicarray = []
+ musicarraylen=0
+ musicpath=path.join(data_loc, "..", "music")
++ default_music_available = True
+ if not path.isdir(musicpath):
+- makedirs(musicpath)
+- temp_ls = listdir(musicpath)
+- temp_ls_len = len(temp_ls)
+- for file_name in temp_ls:
+- if file_name[-3:] == "ogg" or file_name[-3:] == "mp3":
+- musicarray.append(path.join(musicpath, file_name))
++ try:
++ makedirs(musicpath)
++ except:
+
++ # We don't have permission to write here. Don't bother
++ # trying to load music.
++ default_music_available = False
++
++ if default_music_available:
++ for file_name in listdir(musicpath):
++ if file_name[-3:] == "ogg" or file_name[-3:] == "mp3":
++ musicarray.append(path.join(musicpath, file_name))
++
+ #also, grab any user files
+ musicpath=path.join(get_save_folder(True), "music")
+ if not path.isdir(musicpath):
diff --git a/games-simulation/singularity/singularity-0.26a.ebuild b/games-simulation/singularity/singularity-0.26a.ebuild
index 65cd49f5f663..cae88aa66a0f 100644
--- a/games-simulation/singularity/singularity-0.26a.ebuild
+++ b/games-simulation/singularity/singularity-0.26a.ebuild
@@ -1,20 +1,20 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-simulation/singularity/singularity-0.26a.ebuild,v 1.1 2007/10/02 06:46:57 tupone Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-simulation/singularity/singularity-0.26a.ebuild,v 1.2 2007/10/14 07:26:57 mr_bones_ Exp $
-inherit games
+inherit eutils games
MUSIC=endgame-${PN}-music-001
DESCRIPTION="A simulation of a true AI. Go from computer to computer, pursued by the entire world. Keep hidden, and you might have a chance."
HOMEPAGE="http://www.emhsoft.com/singularity/"
SRC_URI="http://www.emhsoft.com/singularity/${PN}_${PV}.tar.gz
- http://www.emhsoft.com/singularity/${MUSIC}.zip"
+ music? ( http://www.emhsoft.com/singularity/${MUSIC}.zip )"
LICENSE="GPL-2 CCPL-Attribution-ShareAlike-2.5"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="music"
RDEPEND="dev-python/pygame"
DEPEND="${RDEPEND}
@@ -25,11 +25,15 @@ src_unpack() {
cd "${S}"
rm code/*.pyc data/*.html # Remove unecessary files
+ epatch "${FILESDIR}/${P}-musicdir.patch"
}
src_install() {
insinto "${GAMES_DATADIR}/${PN}"
- doins -r code data ../${MUSIC}/music || die "doins failed"
+ doins -r code data || die "doins failed"
+ if use music ; then
+ doins -r ../${MUSIC}/music || die "doins failed"
+ fi
games_make_wrapper singularity "python ./singularity.py" "${GAMES_DATADIR}/${PN}/code"
dodoc README.txt TODO Changelog AUTHORS
prepgamesdirs