aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-19 18:36:19 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-29 17:07:16 +0700
commit24d27c9175b02474d70c9b145f4bf2d5a4834877 (patch)
treecbf318c37fa62ecb738e209e7335a8edef2dfac3
parent817876646be5a705915fd2895ae8a27203084329 (diff)
games/jezzball-kazzmir: Fix -current build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--games/jezzball-kazzmir/Makefile16
-rw-r--r--games/jezzball-kazzmir/README8
-rw-r--r--games/jezzball-kazzmir/README_Slackware.txt3
-rw-r--r--games/jezzball-kazzmir/doinst.sh6
-rw-r--r--games/jezzball-kazzmir/icons/16.pngbin0 -> 12428 bytes
-rw-r--r--games/jezzball-kazzmir/icons/32.pngbin0 -> 13499 bytes
-rw-r--r--games/jezzball-kazzmir/icons/48.pngbin0 -> 14558 bytes
-rw-r--r--games/jezzball-kazzmir/icons/64.pngbin0 -> 12001 bytes
-rw-r--r--games/jezzball-kazzmir/jezzball-kazzmir.680
-rw-r--r--games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild47
-rw-r--r--games/jezzball-kazzmir/jezzball-kazzmir.pngbin839 -> 0 bytes
-rw-r--r--games/jezzball-kazzmir/jezzball-kazzmir.rst69
-rw-r--r--games/jezzball-kazzmir/slack-desc4
13 files changed, 211 insertions, 22 deletions
diff --git a/games/jezzball-kazzmir/Makefile b/games/jezzball-kazzmir/Makefile
new file mode 100644
index 0000000000000..62fd93548c164
--- /dev/null
+++ b/games/jezzball-kazzmir/Makefile
@@ -0,0 +1,16 @@
+PRGNAM=jezzball
+
+SRCS=$(wildcard src/*.cpp)
+OBJS=$(patsubst %.cpp,%.o,$(SRCS))
+
+CXX=g++
+OPTFLAGS=
+CXXFLAGS=$(OPTFLAGS) -Wno-write-strings $(shell allegro-config --cflags) $(shell libpng-config --cflags)
+LDFLAGS=$(shell allegro-config --libs) -ljpgalleg -lloadpng $(shell libpng-config --libs)
+
+all: $(PRGNAM)
+
+$(PRGNAM): $(OBJS)
+ $(CXX) -o $(PRGNAM) $(OBJS) $(LDFLAGS)
+
+$(OBJS): $(SRCS)
diff --git a/games/jezzball-kazzmir/README b/games/jezzball-kazzmir/README
index 2a5ee8ca69308..b2596fc11419a 100644
--- a/games/jezzball-kazzmir/README
+++ b/games/jezzball-kazzmir/README
@@ -1,9 +1,9 @@
jezzball-kazzmir (2d arcade/puzzle game)
-Jezzball is a classic game much like qix wherein you must create walls
-and not get hit by the flying balls. If you create enough walls to cover
-80% of the screen you go to the next level where you get one extra life
-and another ball trying to kill you.
+Jezzball is a classic game much like Qix, wherein you must create
+walls and not get hit by the flying balls. If you create enough walls
+to cover 80% of the screen, you go to the next level, where you get
+one extra life and another ball trying to kill you.
Left click to create a wall.
Right click to change the direction of the mouse.
diff --git a/games/jezzball-kazzmir/README_Slackware.txt b/games/jezzball-kazzmir/README_Slackware.txt
index f25afd83a0ed2..79d41f86dc28e 100644
--- a/games/jezzball-kazzmir/README_Slackware.txt
+++ b/games/jezzball-kazzmir/README_Slackware.txt
@@ -17,3 +17,6 @@ Porting changes from the original:
- Use /usr/share for the data files, instead of the current directory.
- Minor compile/linking fixes (see the SlackBuild).
+
+- Use a Makefile rather than scons. The SConstruct no longer works with
+ recent versions of scons.
diff --git a/games/jezzball-kazzmir/doinst.sh b/games/jezzball-kazzmir/doinst.sh
index 5fb28930db0b9..3e5691a052b5b 100644
--- a/games/jezzball-kazzmir/doinst.sh
+++ b/games/jezzball-kazzmir/doinst.sh
@@ -1,3 +1,9 @@
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/games/jezzball-kazzmir/icons/16.png b/games/jezzball-kazzmir/icons/16.png
new file mode 100644
index 0000000000000..49e0aeaa2e575
--- /dev/null
+++ b/games/jezzball-kazzmir/icons/16.png
Binary files differ
diff --git a/games/jezzball-kazzmir/icons/32.png b/games/jezzball-kazzmir/icons/32.png
new file mode 100644
index 0000000000000..9b2ef50ebbab5
--- /dev/null
+++ b/games/jezzball-kazzmir/icons/32.png
Binary files differ
diff --git a/games/jezzball-kazzmir/icons/48.png b/games/jezzball-kazzmir/icons/48.png
new file mode 100644
index 0000000000000..39b97d76ae01e
--- /dev/null
+++ b/games/jezzball-kazzmir/icons/48.png
Binary files differ
diff --git a/games/jezzball-kazzmir/icons/64.png b/games/jezzball-kazzmir/icons/64.png
new file mode 100644
index 0000000000000..e3f58ae8f0cc5
--- /dev/null
+++ b/games/jezzball-kazzmir/icons/64.png
Binary files differ
diff --git a/games/jezzball-kazzmir/jezzball-kazzmir.6 b/games/jezzball-kazzmir/jezzball-kazzmir.6
new file mode 100644
index 0000000000000..fd58804a420ab
--- /dev/null
+++ b/games/jezzball-kazzmir/jezzball-kazzmir.6
@@ -0,0 +1,80 @@
+.\" Man page generated from reStructuredText.
+.
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.TH "JEZZBALL-KAZZMIR" 6 "2021-10-19" "1.1" "SlackBuilds.org"
+.SH NAME
+jezzball-kazzmir \- clone of classic Jezzball game
+.\" RST source for jezzball-kazzmir(6) man page. Convert with:
+.
+.\" rst2man.py jezzball-kazzmir.rst > jezzball-kazzmir.6
+.
+.\" rst2man.py comes from the SBo development/docutils package.
+.
+.SH SYNOPSIS
+.sp
+jezzball\-kazzmir [\fI\-d datadir\fP]
+.SH DESCRIPTION
+.sp
+Jezzball is a classic game much like Qix, wherein you must create walls
+and not get hit by the flying balls. If you create enough walls to cover
+80% of the screen, you go to the next level, where you get one extra life
+and another ball trying to kill you.
+.sp
+This is a clone of the original Jezzball, with gameplay similar but
+not identical to the original Windows version.
+.SH OPTIONS
+.INDENT 0.0
+.TP
+.B \fB\-d\fP \fIdatadir\fP
+Use alternate game data directory. The default is \fI/usr/share/games/jezzball\-kazzmir\fP\&.
+.UNINDENT
+.SH CONTROLS
+.sp
+The game is played entirely with the mouse.
+.sp
+Left click to create a wall.
+.sp
+Right click to change the direction of the mouse (horizontal/vertical).
+.SH FILES
+.INDENT 0.0
+.TP
+.B \fB/var/games/jezzball\-kazzmir/scores.jzb\fP
+High score file.
+.UNINDENT
+.SH AUTHORS
+.sp
+jezzball\-kazzmir was written by by Kazzmir aka Jon Rafkind.
+.sp
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+.SH SEE ALSO
+.sp
+The jezzball\-kazzmir homepage: \fI\%https://www.allegro.cc/depot/Jezzball\fP
+.\" Generated by docutils manpage writer.
+.
diff --git a/games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild b/games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild
index 96ff797a4fd79..5de311229da3f 100644
--- a/games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild
+++ b/games/jezzball-kazzmir/jezzball-kazzmir.SlackBuild
@@ -10,11 +10,16 @@
# stable (random-looking hostnames). Homepage is the allegro.cc game depot
# entry for this game, since the original homepage is defunct.
+# 20211019 bkw: BUILD=3
+# - fix -current build.
+# - new-style icons.
+# - man page.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=jezzball-kazzmir
VERSION=${VERSION:-1.1}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -26,9 +31,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
@@ -69,11 +71,8 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$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 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# 20151122 bkw: use allegro4's loadpng instead of the bundled one. fixes
# build on -current, does no harm on 14.1.
@@ -82,9 +81,6 @@ patch -p1 < $CWD/loadpng.diff
sed -i 's,\./data\|data/,'"$DATADIR"',' src/main.cpp
sed -i 's,score\.jzb,'$SCOREDIR'/&,' src/score.cpp
-# link fix, plus use our cflags
-sed -i -e "s,-O2,$SLKCFLAGS," -e 's,jpgal,jpgalleg,' SConstruct
-
# fix globbing
sed -i 's,FA_ARCH,FA_ALL,' src/main.cpp
@@ -97,7 +93,12 @@ sed -i '1i#include <string.h>' src/region.cpp
# the unpatched game *is* nonfunctional because it's too annoying to play.
patch -p1 < $CWD/insults.diff
-scons
+# 20211019 bkw: Slackware pre-15.0 -current's scons doesn't like the
+# SConstruct from this old project. I *hate* scons. Seriously. This
+# project is small enough it'd be better off with a simple
+# Makefile. So I wrote one.
+cat $CWD/Makefile > Makefile
+make OPTFLAGS="$SLKCFLAGS"
# manual install
mkdir -p $PKG/usr/games $PKG/$DATADIR
@@ -115,14 +116,28 @@ install -oroot -groot -m0644 pics/*.png $PKG/$DATADIR/pics
# world-writable scorefile. The dir it's in is only writable by root,
# the game can't create the scorefile if it's missing, so we have to
# include the stock one in the package (which the game can and will
-# modify as needed).
+# modify as needed). Note that this can't usefully be installed as a
+# .new config file, because slackpkg doesn't look in /var/games for
+# those (so the user will never be prompted for it).
mkdir -p $PKG/$SCOREDIR
zcat $CWD/score.jzb.gz > $PKG/$SCOREDIR/score.jzb
chmod 666 $PKG/$SCOREDIR/score.jzb
-# icon made with the gimp, from a screenshot of the game
+# icons made with the gimp, from screenshots of the game
+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/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
+# man page written for this build
+mkdir -p $PKG/usr/man/man6
+gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz
# .desktop file written for this build
mkdir -p $PKG/usr/share/applications
diff --git a/games/jezzball-kazzmir/jezzball-kazzmir.png b/games/jezzball-kazzmir/jezzball-kazzmir.png
deleted file mode 100644
index d7b079775c001..0000000000000
--- a/games/jezzball-kazzmir/jezzball-kazzmir.png
+++ /dev/null
Binary files differ
diff --git a/games/jezzball-kazzmir/jezzball-kazzmir.rst b/games/jezzball-kazzmir/jezzball-kazzmir.rst
new file mode 100644
index 0000000000000..c6bcb238414b2
--- /dev/null
+++ b/games/jezzball-kazzmir/jezzball-kazzmir.rst
@@ -0,0 +1,69 @@
+.. RST source for jezzball-kazzmir(6) man page. Convert with:
+.. rst2man.py jezzball-kazzmir.rst > jezzball-kazzmir.6
+.. rst2man.py comes from the SBo development/docutils package.
+
+.. |version| replace:: 1.1
+.. |date| date::
+
+================
+jezzball-kazzmir
+================
+
+------------------------------
+clone of classic Jezzball game
+------------------------------
+
+:Manual section: 6
+:Manual group: SlackBuilds.org
+:Date: |date|
+:Version: |version|
+
+SYNOPSIS
+========
+
+jezzball-kazzmir [*-d datadir*]
+
+DESCRIPTION
+===========
+
+Jezzball is a classic game much like Qix, wherein you must create walls
+and not get hit by the flying balls. If you create enough walls to cover
+80% of the screen, you go to the next level, where you get one extra life
+and another ball trying to kill you.
+
+This is a clone of the original Jezzball, with gameplay similar but
+not identical to the original Windows version.
+
+OPTIONS
+=======
+
+**-d** *datadir*
+ Use alternate game data directory. The default is */usr/share/games/jezzball-kazzmir*.
+
+CONTROLS
+========
+
+The game is played entirely with the mouse.
+
+Left click to create a wall.
+
+Right click to change the direction of the mouse (horizontal/vertical).
+
+FILES
+=====
+
+**/var/games/jezzball-kazzmir/scores.jzb**
+ High score file.
+
+AUTHORS
+=======
+
+jezzball-kazzmir was written by by Kazzmir aka Jon Rafkind.
+
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+
+SEE ALSO
+========
+
+The jezzball-kazzmir homepage: https://www.allegro.cc/depot/Jezzball
diff --git a/games/jezzball-kazzmir/slack-desc b/games/jezzball-kazzmir/slack-desc
index faf2720672470..29000859d79eb 100644
--- a/games/jezzball-kazzmir/slack-desc
+++ b/games/jezzball-kazzmir/slack-desc
@@ -8,9 +8,9 @@
|-----handy-ruler------------------------------------------------------|
jezzball-kazzmir: jezzball-kazzmir (2d arcade/puzzle game)
jezzball-kazzmir:
-jezzball-kazzmir: Jezzball is a classic game much like qix wherein you must create
+jezzball-kazzmir: Jezzball is a classic game much like Qix, wherein you must create
jezzball-kazzmir: walls and not get hit by the flying balls. If you create enough
-jezzball-kazzmir: walls to cover 80% of the screen you goto the next level where you
+jezzball-kazzmir: walls to cover 80% of the screen, you go to the next level, where you
jezzball-kazzmir: get one extra life and another ball trying to kill you.
jezzball-kazzmir:
jezzball-kazzmir: Left click to create a wall.