wok rev 6960
singularity: patch and path change
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Tue Oct 26 13:14:13 2010 +0200 (2010-10-26) |
parents | 45e0a8f552a9 |
children | 538cfce65b66 |
files | singularity/receipt singularity/stuff/percents-0.30b.patch |
line diff
1.1 --- a/singularity/receipt Tue Oct 26 12:57:37 2010 +0200 1.2 +++ b/singularity/receipt Tue Oct 26 13:14:13 2010 +0200 1.3 @@ -6,6 +6,7 @@ 1.4 SHORT_DESC="Strategy game - simulation of true Al" 1.5 MAINTAINER="slaxemulator@gmail.com" 1.6 DEPENDS="python python-pygame libsdl-image libsdl-mixer python-numpy" 1.7 +BUILD_DEPENDS="patch" 1.8 TARBALL="$PACKAGE-$VERSION-src.tar.gz" 1.9 WEB_SITE="http://emhsoft.com/singularity/index.html" 1.10 WGET_URL="http://endgame-singularity.googlecode.com/files/$TARBALL" 1.11 @@ -13,14 +14,15 @@ 1.12 # Rules to gen a SliTaz package suitable for Tazpkg. 1.13 genpkg_rules() 1.14 { 1.15 - mkdir -p $fs/usr/bin $fs/usr/share/singularity 1.16 - cp -a $src/singularity.py $fs/usr/share/singularity 1.17 + patch -p0 < stuff/percents-$VERSION.patch 1.18 + mkdir -p $fs/usr/bin $fs/usr/games/singularity 1.19 + cp -a $src/singularity.py $fs/usr/games/singularity 1.20 cat >> $fs/usr/bin/singularity <<EOT 1.21 #!/bin/sh 1.22 -cd /usr/share/singularity 1.23 +cd /usr/games/singularity 1.24 exec python singularity.py "$@" 1.25 EOT 1.26 chmod +x $fs/usr/bin/singularity 1.27 - cp -R $src/code $src/data $fs/usr/share/singularity 1.28 + cp -a $src/code $src/data $fs/usr/games/singularity 1.29 } 1.30
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/singularity/stuff/percents-0.30b.patch Tue Oct 26 13:14:13 2010 +0200 2.3 @@ -0,0 +1,14 @@ 2.4 +--- singularity-0.30b/code/g.py 2.5 ++++ singularity-0.30b/code/g.py 2.6 +@@ -265,9 +265,9 @@ 2.7 + def to_percent(raw_percent, show_full = False): 2.8 + locale_name, encoding = locale.getlocale() 2.9 + if raw_percent % 100 != 0 or show_full: 2.10 +- return locale.format("%.2f%%", raw_percent / 100.).decode(encoding) 2.11 ++ return locale.format("%.2f", raw_percent / 100.).decode(encoding) 2.12 + else: 2.13 +- return locale.format("%d%%", raw_percent // 100).decode(encoding) 2.14 ++ return locale.format("%d", raw_percent // 100).decode(encoding) 2.15 + 2.16 + # nearest_percent takes values in the internal representation and modifies 2.17 + # them so that they only represent the nearest percentage.