summaryrefslogtreecommitdiffstats
path: root/games/gnonograms
diff options
context:
space:
mode:
Diffstat (limited to 'games/gnonograms')
-rw-r--r--games/gnonograms/README8
-rw-r--r--games/gnonograms/gnonogram-controller.diff.txt22
-rw-r--r--games/gnonograms/gnonograms.SlackBuild21
-rw-r--r--games/gnonograms/gnonograms.info2
4 files changed, 42 insertions, 11 deletions
diff --git a/games/gnonograms/README b/games/gnonograms/README
index c86f231b80..ad58ad20b6 100644
--- a/games/gnonograms/README
+++ b/games/gnonograms/README
@@ -1,4 +1,4 @@
-Gnonograms is an implementation of the Japanese logic puzzle "Nonograms", also
-known as "Tsunami", "Griddlers" .....". The object of the game is to discover
-the pattern in the grid which is encoded by the clues which are give for each
-row and column.
+Gnonograms is an implementation of the Japanese logic puzzle
+"Nonograms", also known as "Tsunami", "Griddlers" .....". The object of
+the game is to discover the pattern in the grid which is encoded by the
+clues which are given for each row and column.
diff --git a/games/gnonograms/gnonogram-controller.diff.txt b/games/gnonograms/gnonogram-controller.diff.txt
new file mode 100644
index 0000000000..ff2ef945c3
--- /dev/null
+++ b/games/gnonograms/gnonogram-controller.diff.txt
@@ -0,0 +1,22 @@
+--- gnonograms3-0.9.9.3.orig/src/Gnonogram_controller.vala 2022-03-06 21:13:21.361933019 +0900
++++ gnonograms3-0.9.9.3/src/Gnonogram_controller.vala 2022-03-06 21:14:58.313462343 +0900
+@@ -244,8 +244,8 @@
+ {
+ double maxrowheight, maxcolwidth, deffontheight;
+
+- maxrowheight=screen_height/((double)(r)*1.4);
+- maxcolwidth=screen_width/((double)(c)*1.4);
++ maxrowheight=screen_height/((double)r*1.4);
++ maxcolwidth=screen_width/((double)c*1.4);
+ deffontheight=double.min(maxrowheight,maxcolwidth)/2;
+
+ _rowbox.set_font_height(deffontheight);
+@@ -948,7 +948,7 @@
+ int hours= ((int)seconds)/3600;
+ seconds-=((double)hours)*3600.000;
+ int minutes=((int)seconds)/60;
+- seconds-=(double)(minutes)*60.000;
++ seconds-=((double)minutes)*60.000;
+ string s=(_("Time taken: %d hours, %d minutes, %8.3f seconds")).printf(hours, minutes, seconds) +"\n\n";
+ if (_penalty) s=s+(_("Including %4.0f seconds time penalty")).printf(_time_penalty);
+ return s;
diff --git a/games/gnonograms/gnonograms.SlackBuild b/games/gnonograms/gnonograms.SlackBuild
index 9805310bcf..4048c10cd8 100644
--- a/games/gnonograms/gnonograms.SlackBuild
+++ b/games/gnonograms/gnonograms.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Slackware build script for Gnonograms
#
@@ -22,27 +22,34 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=gnonograms
SRCNAM=gnonograms3
VERSION=${VERSION:-0.9.9.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
-CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -66,6 +73,8 @@ cd $SRCNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
+patch -p1 < $CWD/gnonogram-controller.diff.txt
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -88,4 +97,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/gnonograms/gnonograms.info b/games/gnonograms/gnonograms.info
index 9be93d487c..1f77dbc974 100644
--- a/games/gnonograms/gnonograms.info
+++ b/games/gnonograms/gnonograms.info
@@ -5,6 +5,6 @@ DOWNLOAD="http://ponce.cc/slackware/sources/repo/gnonograms3-0.9.9.3.tar.gz"
MD5SUM="dc2b86cf2062acacc6a86e66c89af317"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="vala"
+REQUIRES=""
MAINTAINER="Erik Hanson"
EMAIL="erik@slackbuilds.org"