summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
author Willy Sudiarto Raharjo2022-03-06 13:57:04 +0100
committer Willy Sudiarto Raharjo2022-03-07 02:38:03 +0100
commit3e4508b0b2bcf7a8ac3d942df7c956cc08d10b61 (patch)
treea949852c84df6a44eddaf5cf86b15b510d5891a5 /games
parentf2d40d27591f7bf419dbf1fb4ba5151ad79d24cc (diff)
downloadslackbuilds-3e4508b0b2bcf7a8ac3d942df7c956cc08d10b61.tar.gz
games/gnogograms: Fix build.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/gnonograms/gnonogram-controller.diff.txt22
-rw-r--r--games/gnonograms/gnonograms.SlackBuild2
2 files changed, 24 insertions, 0 deletions
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 f20fd4eb77..f345214364 100644
--- a/games/gnonograms/gnonograms.SlackBuild
+++ b/games/gnonograms/gnonograms.SlackBuild
@@ -76,6 +76,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 \