summaryrefslogtreecommitdiff
path: root/games/zoom
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-11 20:51:43 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-13 00:52:42 +0700
commit8e4083e4833bdcfacdb8d3a70d6f346b4b95fb5d (patch)
tree6b007d4f5871f68e0695ac87e043e4f3102b66c7 /games/zoom
parenta19c2e14dd3a331707f8bdba8660c9334d80e123 (diff)
downloadslackbuilds-8e4083e4833bdcfacdb8d3a70d6f346b4b95fb5d.tar.gz
games/zoom: Bugfix patches, new icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/zoom')
-rw-r--r--games/zoom/README18
-rw-r--r--games/zoom/doinst.sh5
-rw-r--r--games/zoom/icons/128.png (renamed from games/zoom/zoom.png)bin20793 -> 20793 bytes
-rw-r--r--games/zoom/icons/16.pngbin0 -> 744 bytes
-rw-r--r--games/zoom/icons/256.pngbin0 -> 67911 bytes
-rw-r--r--games/zoom/icons/32.pngbin0 -> 1946 bytes
-rw-r--r--games/zoom/icons/48.pngbin0 -> 4980 bytes
-rw-r--r--games/zoom/icons/64.pngbin0 -> 7558 bytes
-rw-r--r--games/zoom/no_inline.diff120
-rw-r--r--games/zoom/patches/acinclude.patch9
-rw-r--r--games/zoom/patches/avoid-v6-set-colours-crash.patch18
-rw-r--r--games/zoom/patches/config_xft.diff (renamed from games/zoom/config_xft.diff)0
-rw-r--r--games/zoom/patches/enable-antialiasing.patch15
-rw-r--r--games/zoom/patches/remove_rice.diff (renamed from games/zoom/remove_rice.diff)0
-rw-r--r--games/zoom/patches/restore-return.patch33
-rw-r--r--games/zoom/patches/series8
-rw-r--r--games/zoom/patches/static-inline.patch45
-rw-r--r--games/zoom/patches/zoomrc_in_etc.diff12
-rw-r--r--games/zoom/slack-desc8
-rw-r--r--games/zoom/zoom.172
-rw-r--r--games/zoom/zoom.SlackBuild80
-rw-r--r--games/zoom/zoom.desktop2
-rw-r--r--games/zoom/zoom.info4
23 files changed, 261 insertions, 188 deletions
diff --git a/games/zoom/README b/games/zoom/README
index d9a7e6107b..2004450f54 100644
--- a/games/zoom/README
+++ b/games/zoom/README
@@ -1,7 +1,15 @@
zoom (play interactive fiction games)
-Zoom is a player for Z-Code, TADS and HUGO stories or games. These are
-usually text adventures ('interactive fiction'), and were first created
-by Infocom with the Zork series of games. Throughout the 80's, Infocom
-released many interactive fiction stories before their ambitions to
-enter the database market finally brought them low.
+Zoom is a player for Z-Code stories or games. These are usually text
+adventures ('interactive fiction'), and were first created by Infocom
+with the Zork series of games. Throughout the '80s, Infocom released
+many interactive fiction stories before their ambitions to enter the
+database market finally brought them low.
+
+There is also a selection of freeware Z-Code games here:
+
+https://www.ifarchive.org/if-archive/games/zcode/
+
+Note: This is not video conferencing software! For that, you want
+network/zoom-linux. It's also not a magnifier for X. For that, you
+want accessibility/xzoom.
diff --git a/games/zoom/doinst.sh b/games/zoom/doinst.sh
index 5318469e28..860ac30217 100644
--- a/games/zoom/doinst.sh
+++ b/games/zoom/doinst.sh
@@ -1,17 +1,14 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
- # If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
- # toss the redundant copy
rm $NEW
fi
- # Otherwise, we leave the .new copy for the admin to consider...
}
-config usr/share/zoom/zoomrc.new
+config etc/zoom/zoomrc.new
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
diff --git a/games/zoom/zoom.png b/games/zoom/icons/128.png
index bb6d3d1364..bb6d3d1364 100644
--- a/games/zoom/zoom.png
+++ b/games/zoom/icons/128.png
Binary files differ
diff --git a/games/zoom/icons/16.png b/games/zoom/icons/16.png
new file mode 100644
index 0000000000..8c7c4e8842
--- /dev/null
+++ b/games/zoom/icons/16.png
Binary files differ
diff --git a/games/zoom/icons/256.png b/games/zoom/icons/256.png
new file mode 100644
index 0000000000..27f166e2ee
--- /dev/null
+++ b/games/zoom/icons/256.png
Binary files differ
diff --git a/games/zoom/icons/32.png b/games/zoom/icons/32.png
new file mode 100644
index 0000000000..20aad04799
--- /dev/null
+++ b/games/zoom/icons/32.png
Binary files differ
diff --git a/games/zoom/icons/48.png b/games/zoom/icons/48.png
new file mode 100644
index 0000000000..7924b1d325
--- /dev/null
+++ b/games/zoom/icons/48.png
Binary files differ
diff --git a/games/zoom/icons/64.png b/games/zoom/icons/64.png
new file mode 100644
index 0000000000..8e79c22c9f
--- /dev/null
+++ b/games/zoom/icons/64.png
Binary files differ
diff --git a/games/zoom/no_inline.diff b/games/zoom/no_inline.diff
deleted file mode 100644
index d7ff771e81..0000000000
--- a/games/zoom/no_inline.diff
+++ /dev/null
@@ -1,120 +0,0 @@
-diff -Naur zoom-1.1.5/src/interp.c zoom-1.1.5.patched/src/interp.c
---- zoom-1.1.5/src/interp.c 2011-11-05 07:40:53.000000000 -0400
-+++ zoom-1.1.5.patched/src/interp.c 2017-06-21 03:26:42.543594700 -0400
-@@ -101,7 +101,7 @@
- } \
- }
-
--static inline void push(ZStack* stack, const ZWord word)
-+static void push(ZStack* stack, const ZWord word)
- {
- *(stack->stack_top++) = word;
- stack->stack_size--;
-@@ -131,7 +131,7 @@
- #endif
- }
-
--inline ZWord pop(ZStack* stack)
-+ZWord pop(ZStack* stack)
- {
- stack->stack_size++;
-
-@@ -159,7 +159,7 @@
- return *(--stack->stack_top);
- }
-
--inline ZWord top(ZStack* stack)
-+ZWord top(ZStack* stack)
- {
- if (stack->current_frame)
- {
-@@ -232,7 +232,7 @@
- return newframe;
- }
-
--inline void store(ZStack* stack, int var, ZWord value)
-+void store(ZStack* stack, int var, ZWord value)
- {
- #ifdef DEBUG
- printf_debug("Storing %i in Variable #%x\n", value, var);
-@@ -253,7 +253,7 @@
- }
- }
-
--inline void store_nopush(ZStack* stack, int var, ZWord value)
-+void store_nopush(ZStack* stack, int var, ZWord value)
- {
- #ifdef DEBUG
- printf_debug("Storing %i in Variable #%x\n", value, var);
-@@ -313,7 +313,7 @@
- int isdefault;
- };
-
--static inline struct prop* get_object_prop_3(ZUWord object, ZWord property)
-+static struct prop* get_object_prop_3(ZUWord object, ZWord property)
- {
- ZByte* obj;
- ZByte* prop;
-@@ -364,7 +364,7 @@
- int header;
- };
-
--static inline struct propinfo* get_object_propinfo_4(ZByte* prop)
-+static struct propinfo* get_object_propinfo_4(ZByte* prop)
- {
- static struct propinfo pinfo;
-
-@@ -387,7 +387,7 @@
- return &pinfo;
- }
-
--static inline struct prop* get_object_prop_4(ZUWord object, ZWord property)
-+static struct prop* get_object_prop_4(ZUWord object, ZWord property)
- {
- ZByte* obj;
- ZByte* prop;
-@@ -539,7 +539,7 @@
- }
- #endif
-
--inline static int true_colour(int col)
-+static int true_colour(int col)
- {
- switch (col)
- {
-@@ -575,7 +575,7 @@
- }
- }
-
--inline static int convert_colour(int col)
-+static int convert_colour(int col)
- {
- switch (col)
- {
-@@ -1473,7 +1473,7 @@
- return -1;
- }
-
--static inline void zcode_setup_window(int window)
-+static void zcode_setup_window(int window)
- {
- v6_set_window(window);
- v6_define_window(window,
-@@ -1497,7 +1497,7 @@
- #endif
- }
-
--static inline int zcode_v6_push_stack(ZStack* stack,
-+static int zcode_v6_push_stack(ZStack* stack,
- ZUWord stk,
- ZUWord value)
- {
-@@ -1528,7 +1528,7 @@
- return 1;
- }
-
--static inline int v6_window(int win)
-+static int v6_window(int win)
- {
- if (win > 7)
- zmachine_fatal("No such window: %i", win);
diff --git a/games/zoom/patches/acinclude.patch b/games/zoom/patches/acinclude.patch
new file mode 100644
index 0000000000..f605e40ac1
--- /dev/null
+++ b/games/zoom/patches/acinclude.patch
@@ -0,0 +1,9 @@
+Description: add the included m4 files
+Author: Stephen Kitt <skitt@debian.org>
+
+--- /dev/null
++++ b/acinclude.m4
+@@ -0,0 +1,3 @@
++m4_include([m4/carbon.m4])
++m4_include([m4/display.m4])
++m4_include([m4/util.m4])
diff --git a/games/zoom/patches/avoid-v6-set-colours-crash.patch b/games/zoom/patches/avoid-v6-set-colours-crash.patch
new file mode 100644
index 0000000000..75215cc706
--- /dev/null
+++ b/games/zoom/patches/avoid-v6-set-colours-crash.patch
@@ -0,0 +1,18 @@
+Description: Avoid crashing with invalid coordinates
+Author: Alexandre Detiste <alexandre.detiste@gmail.com>
+Bug-Debian: https://bugs.debian.org/813674
+
+--- a/src/v6display.c
++++ b/src/v6display.c
+@@ -498,9 +498,9 @@
+ fg = ACTWIN.fore;
+ if (bg == -2)
+ bg = ACTWIN.back;
+- if (fg == -1)
++ if (fg == -1 || ACTWIN.curx < 0 || ACTWIN.cury < 0)
+ fg = DEFAULT_FORE;
+- if (bg == -1)
++ if (bg == -1 || ACTWIN.curx < 0 || ACTWIN.cury < 0)
+ bg = DEFAULT_BACK;
+
+ if (bg == -3)
diff --git a/games/zoom/config_xft.diff b/games/zoom/patches/config_xft.diff
index 8b1d7100e9..8b1d7100e9 100644
--- a/games/zoom/config_xft.diff
+++ b/games/zoom/patches/config_xft.diff
diff --git a/games/zoom/patches/enable-antialiasing.patch b/games/zoom/patches/enable-antialiasing.patch
new file mode 100644
index 0000000000..f75c600604
--- /dev/null
+++ b/games/zoom/patches/enable-antialiasing.patch
@@ -0,0 +1,15 @@
+Description: Enable anti-aliasing by default
+Author: Stephen Kitt <skitt@debian.org>
+Bug-Debian: https://bugs.debian.org/813715
+
+--- a/src/zoomrc
++++ b/src/zoomrc
+@@ -25,7 +25,7 @@
+ font 9 "font3" symbolic
+
+ size 80,30
+- antialias no
++ antialias yes
+
+ colours (0,0,0), (255,0,0), (0,255,0), (255,255,0), (0,0,255), (255,0,255),
+ (0,255,255), (255,255,204),
diff --git a/games/zoom/remove_rice.diff b/games/zoom/patches/remove_rice.diff
index 1a9e3b7f2f..1a9e3b7f2f 100644
--- a/games/zoom/remove_rice.diff
+++ b/games/zoom/patches/remove_rice.diff
diff --git a/games/zoom/patches/restore-return.patch b/games/zoom/patches/restore-return.patch
new file mode 100644
index 0000000000..9412980e91
--- /dev/null
+++ b/games/zoom/patches/restore-return.patch
@@ -0,0 +1,33 @@
+commit 5ef19e08bbeff74096a1944ec8ba591cdab8cc55
+Author: Andrew Hunter <andrew@logicalshift.co.uk>
+Date: Sun Nov 13 21:20:23 2011 +0000
+
+ Restored a return statement that got deleted way back in changeset 1cd73ed without anybody (well, me) noticing.
+
+ The effect of this missing return statement was to make aread callbacks that return true continue as if they had returned false and randomly crash after they try to write to the (now freed) buffer.
+
+ Amazingly, this hasn't been reported up until now. I suspect that there are few or no cases where aread callbacks return a value other than zero.
+
+ Also added a paranoid buffer check, which is probably unnecessary but looks like good practice in any case.
+
+diff --git a/src/interp.c b/src/interp.c
+index 60b3e13..a5fa8fe 100644
+--- a/src/interp.c
++++ b/src/interp.c
+@@ -1057,6 +1057,7 @@ static void zcode_op_aread_5678(ZDWord* pc,
+ {
+ mem[1] = 0;
+ free(buf);
++ return;
+ }
+ }
+
+@@ -1151,7 +1152,7 @@ static void zcode_op_aread_5678(ZDWord* pc,
+ int x;
+
+ mem[1] = 0;
+- for (x=0; buf[x] != 0; x++)
++ for (x=0; buf[x] != 0 && x < bufLen; x++)
+ {
+ mem[1]++;
+ buf[x] = unicode_to_lower(buf[x]);
diff --git a/games/zoom/patches/series b/games/zoom/patches/series
new file mode 100644
index 0000000000..636b59b5a3
--- /dev/null
+++ b/games/zoom/patches/series
@@ -0,0 +1,8 @@
+config_xft.diff
+remove_rice.diff
+avoid-v6-set-colours-crash.patch
+acinclude.patch
+restore-return.patch
+enable-antialiasing.patch
+static-inline.patch
+zoomrc_in_etc.diff
diff --git a/games/zoom/patches/static-inline.patch b/games/zoom/patches/static-inline.patch
new file mode 100644
index 0000000000..4e5190ef4c
--- /dev/null
+++ b/games/zoom/patches/static-inline.patch
@@ -0,0 +1,45 @@
+commit 6b0ad57dd2c125c9126e9b7913560ad25709a36f
+Author: Andrew Hunter <andrew@logicalshift.co.uk>
+Date: Sat Mar 3 16:31:35 2012 +0000
+
+ Inline functions need to be marked as static in order to compile with LLVM
+
+diff --git a/src/interp.c b/src/interp.c
+index a5fa8fe..3d446fa 100644
+--- a/src/interp.c
++++ b/src/interp.c
+@@ -232,7 +232,7 @@ ZFrame* call_routine(ZDWord* pc, ZStack* stack, ZDWord start)
+ return newframe;
+ }
+
+-inline void store(ZStack* stack, int var, ZWord value)
++static inline void store(ZStack* stack, int var, ZWord value)
+ {
+ #ifdef DEBUG
+ printf_debug("Storing %i in Variable #%x\n", value, var);
+@@ -253,7 +253,7 @@ inline void store(ZStack* stack, int var, ZWord value)
+ }
+ }
+
+-inline void store_nopush(ZStack* stack, int var, ZWord value)
++static inline void store_nopush(ZStack* stack, int var, ZWord value)
+ {
+ #ifdef DEBUG
+ printf_debug("Storing %i in Variable #%x\n", value, var);
+diff --git a/src/tokenise.c b/src/tokenise.c
+index 5925169..fb442d0 100644
+--- a/src/tokenise.c
++++ b/src/tokenise.c
+@@ -154,9 +154,9 @@ ZDictionary* dictionary_cache(const ZUWord dict_pos)
+
+ int cache = 1;
+
+-inline ZUWord lookup_word(unsigned int* word,
+- int wordlen,
+- ZUWord dct)
++static inline ZUWord lookup_word(unsigned int* word,
++ int wordlen,
++ ZUWord dct)
+ {
+ ZByte packed[12];
+ int zscii_len;
diff --git a/games/zoom/patches/zoomrc_in_etc.diff b/games/zoom/patches/zoomrc_in_etc.diff
new file mode 100644
index 0000000000..760fb294a3
--- /dev/null
+++ b/games/zoom/patches/zoomrc_in_etc.diff
@@ -0,0 +1,12 @@
+diff -Naur zoom-1.1.5/src/rc.c zoom-1.1.5.patched/src/rc.c
+--- zoom-1.1.5/src/rc.c 2011-11-05 07:40:53.000000000 -0400
++++ zoom-1.1.5.patched/src/rc.c 2021-10-11 19:43:39.814078341 -0400
+@@ -41,7 +41,7 @@
+ rc_game* rc_defgame = NULL;
+
+ #ifdef DATADIR
+-# define ZOOMRC DATADIR "/zoomrc"
++# define ZOOMRC "/etc/zoom/zoomrc"
+ # define GAMEDIR DATADIR "/games"
+ #else
+ # define ZOOMRC "zoomrc"
diff --git a/games/zoom/slack-desc b/games/zoom/slack-desc
index 012f1d6fec..a675e847f0 100644
--- a/games/zoom/slack-desc
+++ b/games/zoom/slack-desc
@@ -8,10 +8,10 @@
|-----handy-ruler------------------------------------------------------|
zoom: zoom (play interactive fiction games)
zoom:
-zoom: Zoom is a player for Z-Code, TADS and HUGO stories or games. These
-zoom: are usually text adventures ('interactive fiction'), and were first
-zoom: created by Infocom with the Zork series of games. Throughout the
-zoom: 80's, Infocom released many interactive fiction stories before their
+zoom: Zoom is a player for Z-Code stories or games. These are usually
+zoom: text adventures ('interactive fiction'), and were first created
+zoom: by Infocom with the Zork series of games. Throughout the '80s,
+zoom: Infocom released many interactive fiction stories before their
zoom: ambitions to enter the database market finally brought them low.
zoom:
zoom:
diff --git a/games/zoom/zoom.1 b/games/zoom/zoom.1
index 5a6a787924..276fbade73 100644
--- a/games/zoom/zoom.1
+++ b/games/zoom/zoom.1
@@ -1,58 +1,80 @@
-.TH ZOOM "1" "November 2012" "SlackBuilds.org" "User Commands"
+.TH ZOOM "1" "October 2021" "SlackBuilds.org" "User Commands"
.SH NAME
-zoom \- interpreter for interactive fiction games
+zoom \- interpreter for Z\-Code interactive fiction games
.SH SYNOPSIS
.B zoom
-[\fIOPTION\fR...] [\fIstory-file\fR] [\fIsave-file\fR]
+[\fIOPTION\fR ...] [\fIstory-file\fR] [\fIsave-file\fR]
.SH DESCRIPTION
Interactive Fiction is a fancy name for 'text adventures', thought up by
a company called called 'Infocom' circa 1979.
.PP
-Zoom is an advanced player for interactive fiction stories written in four major formats:
-.SS Z\-Code
-The format used by Infocom in the 1980s for games including Zork and Trinity, as well as new games written using the Inform language.
-.SS Glulx
-A modern language intended to be the successor to Z\-Code.
-.SS TADS
-A modern language developed by Mike Roberts.
-.SS HUGO
-A modern language developed by The General Coffee Compnay.
+Zoom is an advanced player for interactive fiction stories written Z\-Code format.
+This is the format used by Infocom in the 1980s for games including Zork and Trinity, as well as new games written using the Inform language.
+.B zoom
+supports all versions of the Z-Machine, including version 6 with graphical resources (converted to Blorb format).
.SH OPTIONS
.TP
\fB\-D\fR, \fB\-\-debugmode\fR
-Enable source\-level debugger (requires gameinfo.dbg)
+Enable source\-level debugger (requires gameinfo.dbg).
.TP
\fB\-w\fR, \fB\-\-warnings\fR
Display interpreter warnings
.TP
\fB\-W\fR, \fB\-\-fatal\fR
-Warnings are fatal
+Make warnings fatal.
.TP
\fB\-?\fR, \fB\-\-help\fR
-Give this help list
+Give a list of command\-line options.
.TP
\fB\-\-usage\fR
-Give a short usage message
+Give a short usage message.
.TP
\fB\-V\fR, \fB\-\-version\fR
-Print program version
+Print program version.
.SH FILES
.TP
\fB/usr/share/zoom/games/\fR
-When zoom is called without a story-file argument, it presents a menu of
+When \fBzoom\fR is called without a story-file argument, it presents a menu of
the games found here, if any.
.TP
-\fB/usr/share/zoom/zoomrc\fR
-System\-wide config file, mostly for setting fonts and colors.
+\fB/etc/zoom/zoomrc\fR
+System\-wide config file, mostly for setting fonts and colors. Only
+used if \fB$HOME/.zoomrc\fR doesn't exist.
.TP
\fB$HOME/.zoomrc\fR
-Per\-user config file.
+Per\-user config file. If this file exists, it is used instead of
+the system config file, above. So for personalizing your settings, you
+will want to start out by copying \fB/etc/zoom/zoomrc\fR to \fB~/.zoomrc\fI.
+.PP
+Note that it's a \fIfatal error\fR if \fBzoom\fR can't read either of these
+config files!
+.SH NOTE
+If you were expecting to be able to play TADS, HUGO, or Glulx games with
+\fBzoom\fR, I hate to disappoint you... but the Linux build of \fBzoom\fR
+only supports Z\-Code. The \fIMacintosh\fR (OSX/Cocoa) build does support
+the other formats, but the support code would be difficult to port to
+Linux \fBzoom\fR. I incorrectly stated that the other formats were
+available in a previous version of this man page. Sorry about that.
+.SH BUGS
+Report bugs to bugs@logicalshift.co.uk.
+.PP
+There's one "bug" with this man page: it's installed in manual section 1.
+It should be section 6 (games), but there's a \fBzoom\fR(6) man page in the
+xscreensaver package, and we don't want to conflict with it.
+.SH AUTHOR
+Zoom was written by Andrew Hunter. See
+.nh
+\fB/usr/doc/zoom-@VERSION@/COPYING\fR
+.hy
+for license information.
+.PP
+This man page was written by B. Watson <yalhcru@gmail.com> for
+the SlackBuilds.org project. It's licensed under the WTFPL, so
+do WTF you want with it.
.SH "SEE ALSO"
+\fBzork\fR(6), \fBfrotz\fR(6), \fBfizmo\fR(6), \fBinform\fR(6).
+.PP
Full documentation is installed in
.nh
\fB/usr/doc/zoom-@VERSION@/manual/index.html\fR
.hy
-.SH BUGS
-Report bugs to bugs@logicalshift.co.uk.
-.SH AUTHOR
-Zoom was written by Andrew Hunter
diff --git a/games/zoom/zoom.SlackBuild b/games/zoom/zoom.SlackBuild
index 7cb57c01b0..70b2eb3495 100644
--- a/games/zoom/zoom.SlackBuild
+++ b/games/zoom/zoom.SlackBuild
@@ -6,6 +6,18 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211011 bkw: BUILD=2
+# - binary in /usr/games.
+# - update man page.
+# - do NOT move man page to section 6, there's already a zoom(6), which
+# is part of xscreensaver.
+# - finally noticed that the Linux build of zoom does *not* play
+# TADS, HUGO, or Glulx games. The Mac OSX Cocoa build does, but the
+# extra code is in Objective C and doesn't look like it's portable
+# to non-Mac platforms. So update README, slack-desc, and the man
+# page to reflect that this is a Z-Code-only interpreter.
+# - add a few bugfix patches from Debian.
+# - new-style icons.
# 20170621 bkw: fix build for -current
cd $(dirname $0) ; CWD=$(pwd)
@@ -24,9 +36,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -55,26 +64,32 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-
-# gcc7 hates all the inline functions in interp.c.
-patch -p1 < $CWD/no_inline.diff
-
-# We don't need -funroll-loops and friends. They break the build on -current.
-patch -p1 < $CWD/remove_rice.diff
-
-# Modern Xft doesn't ship a xft-config script, hack the configure script
-# to use pkg-config.
-patch -p1 < $CWD/config_xft.diff
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+
+# 20211011 bkw: replace my old no_inline.patch with Debian's.
+# config_xft.diff, remove_rice.diff, zoomrc_in_etc.diff are mine. The
+# rest of patches/ came from Debian's zoom-player patchlevel 6.
+# This includes a couple of fixes for crashing bugs.
+for i in $( cat $CWD/patches/series ); do
+ echo "=== applying $i"
+ patch -p1 < $CWD/patches/$i
+done
+
+# 20211011 bkw: note to self: --enable-new-terp defines HAVE_COMPUTED_GOTOS
+# in config.h. Supposedly this might be faster on some architectures, and
+# slower on others. I don't enable this feature because:
+# - The games already run fast enough.
+# - The Debian packagers didn't enable it, so it's not likely to be
+# well-tested.
+# - I'd have to spend time/effort trying to figure out how to benchmark
+# the interpreter to see if it even made a difference.
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --bindir=/usr/games \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
@@ -84,32 +99,43 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
-# enable antialiasing by default. The comment in the config file
-# doesn't seem to apply (it was written years ago).
-sed -i '/antialias/s,no,yes,' $PKG/usr/share/$PRGNAM/${PRGNAM}rc
-mv $PKG/usr/share/$PRGNAM/${PRGNAM}rc $PKG/usr/share/$PRGNAM/${PRGNAM}rc.new
+# Move config file to /etc, since we patched it for that.
+mkdir -p $PKG/etc/$PRGNAM
+mv $PKG/usr/share/$PRGNAM/${PRGNAM}rc $PKG/etc/$PRGNAM/${PRGNAM}rc.new
# If zoom is run with no arguments, it shows a menu of games from its
# default location. Let's make this the same location inform installs
-# its example games to.
+# its example games to (also, zork installs its games here).
mkdir -p $PKG/usr/share/zcode
ln -s ../zcode $PKG/usr/share/$PRGNAM/games
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
rm -f manual/Makefile*
-cp -a \
- AUTHORS COPYING ChangeLog NEWS README THANKS TODO manual \
+cp -a AUTHORS COPYING ChangeLog NEWS README THANKS TODO manual \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# Icons extracted from src/macos/zoom-app.icns with icns2png from
+# the libicns package. There was no 48x48 or 64x64, so I scaled
+# the 128x128 one down with convert(1). I didn't include the 512x512
+# or 256x256 icons, AFAIK nothing uses icons that large (yet?).
+for i in $CWD/icons/*.png; do
+ px=$( basename $i | cut -d. -f1 )
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ cat $i > $dir/$PRGNAM.png
+done
+
mkdir -p $PKG/usr/share/pixmaps/
-cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png
+ln -s ../icons/hicolor/64x64/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/share/applications/
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
mkdir -p $PKG/usr/man/man1
-sed "s,@VERSION@,$VERSION,g" < $CWD/$PRGNAM.1 | gzip -9c > $PKG/usr/man/man1/$PRGNAM.1.gz
+sed "s,@VERSION@,$VERSION,g" < $CWD/$PRGNAM.1 \
+ | gzip -9c > $PKG/usr/man/man1/$PRGNAM.1.gz
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/games/zoom/zoom.desktop b/games/zoom/zoom.desktop
index dc8aa96e5f..3092acd3c7 100644
--- a/games/zoom/zoom.desktop
+++ b/games/zoom/zoom.desktop
@@ -4,7 +4,7 @@ Name=Zoom
GenericName=Game Engine
Comment=Player for Interactive Fiction Games
Icon=zoom
-Exec=zoom
+Exec=/usr/games/zoom
Terminal=false
Type=Application
Categories=Game;AdventureGame;
diff --git a/games/zoom/zoom.info b/games/zoom/zoom.info
index 56aa2dfb47..aaa1d552a6 100644
--- a/games/zoom/zoom.info
+++ b/games/zoom/zoom.info
@@ -1,7 +1,7 @@
PRGNAM="zoom"
VERSION="1.1.5"
-HOMEPAGE="http://www.logicalshift.co.uk/unix/zoom/"
-DOWNLOAD="http://www.ifarchive.org/if-archive/infocom/interpreters/zoom/zoom-1.1.5.tar.gz"
+HOMEPAGE="https://www.logicalshift.co.uk/unix/zoom/"
+DOWNLOAD="https://www.ifarchive.org/if-archive/infocom/interpreters/zoom/zoom-1.1.5.tar.gz"
MD5SUM="e24df12fd1bdfd0c4361d465bdceb949"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""