summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson2021-10-30 10:28:54 +0200
committer Willy Sudiarto Raharjo2021-12-04 04:08:51 +0100
commit407df0de814eef259f98b14b0f0799a60ef837f6 (patch)
tree74a666c0d4db0967e974fe2defe3cb7caeb0e851
parent39010c3f65647e8fa2c0afc2ebb733b77bd46e6b (diff)
downloadslackbuilds-407df0de814eef259f98b14b0f0799a60ef837f6.tar.gz
games/jfsw: Updated for version 20210725_716e1e3.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--games/jfsw/README13
-rw-r--r--games/jfsw/README_game_data.txt4
-rw-r--r--games/jfsw/README_music.txt94
-rw-r--r--games/jfsw/desktop/jfsw-build.desktop7
-rw-r--r--games/jfsw/desktop/jfsw.desktop (renamed from games/jfsw/jfsw.desktop)2
-rw-r--r--games/jfsw/desktop/kenbuild.desktop7
-rw-r--r--games/jfsw/doinst.sh5
-rw-r--r--games/jfsw/git2tarxz.sh74
-rw-r--r--games/jfsw/jfsw.SlackBuild219
-rw-r--r--games/jfsw/jfsw.info12
-rw-r--r--games/jfsw/jfsw.pngbin6827 -> 79506 bytes
-rw-r--r--games/jfsw/kenbuild.sh12
-rw-r--r--games/jfsw/patches/disable_fluid.diff12
-rw-r--r--games/jfsw/patches/disable_sdl2.diff31
-rw-r--r--games/jfsw/patches/dont_use_jack.diff10
-rw-r--r--games/jfsw/patches/fixsegfault.diff12
-rw-r--r--games/jfsw/patches/sdl1_fix.diff12
-rw-r--r--games/jfsw/patches/sdl_cdrom_fix.diff20
-rw-r--r--games/jfsw/patches/twin_dragon_grp.diff11
-rw-r--r--games/jfsw/slack-desc2
-rw-r--r--games/jfsw/twin_dragon_grp.diff23
21 files changed, 248 insertions, 334 deletions
diff --git a/games/jfsw/README b/games/jfsw/README
index 3dbf282d0a..47ab39bb08 100644
--- a/games/jfsw/README
+++ b/games/jfsw/README
@@ -4,6 +4,9 @@ The aim of this port is to present Shadow Warrior as closely as possible
to the original game while adding optional features to expand the
possibilities of the game.
+The package also includes kenbuild (Ken Silverman's Build engine demo
+game) and jfsw-build (the map editor for jfsw).
+
To play the game, you will need at least one ".grp" game data file.
Choices are:
@@ -18,10 +21,8 @@ Choices are:
Any or all of the game data packages can be installed at the same time
without conflict.
-If you install the full version of the game, you may also want to
-install jfsw_hires_pack for some graphic enhancements. Don't bother
-trying if all you have is the shareware sw.grp: it segfaults on
-startup.
+You may also want to install jfsw_hires_pack for some graphic
+enhancements.
To get the in-game music to play, see README_music.txt.
@@ -33,3 +34,7 @@ axes should have "" values.
Note: I've had zero luck trying to run game mods with jfsw. If you get
any mods working, I'd love to hear from you (email address in .info
file), let me know how you did it.
+
+Note: if you need the Build engine tools (kextract, kgroup, etc), you
+can either install eduke32, or set TOOLS=yes in jfsw's environment. If
+you do both, you'll end up with conflicting files in the packages.
diff --git a/games/jfsw/README_game_data.txt b/games/jfsw/README_game_data.txt
index d67b11c383..49320163a0 100644
--- a/games/jfsw/README_game_data.txt
+++ b/games/jfsw/README_game_data.txt
@@ -20,11 +20,15 @@ Shadow Warrior that was originally developed in the 90s but never released
commercially. In 2005, it was released as a freeware download. To play
this version of the game, install jfsw_wanton_destruction.
+jfsw can also play Twin Dragon, another expansion pack. Install
+jfsw_twin_dragon to play this version of the game.
+
Possible .grp files:
Registered sw.grp: 47536148 bytes, md5sum 9d200b5fb4ace8797e7f8638c4f96af2
"Alternate" sw.grp: 47536148 bytes, md5sum 92006f69a15ffa5f48b7dcd07b75fda9
Shareware sw.grp: 26056769 bytes, md5sum dafeec1b83bd31edc6dafffc9a75bdb8
Wanton Destruction wt.grp: 48698128 bytes, d0f8dc0718127ca480abf14f3a9508c2
+Twin Dragon td.grp: 53480783 bytes, md5sum 26ebd69e0286c938f29e24b75ad896f1
If you have the "alternate" (hacked? pirated?) version of sw.grp, it
differs by only a few bytes. jfsw will refuse to "see" it because the
diff --git a/games/jfsw/README_music.txt b/games/jfsw/README_music.txt
index f6c44ca5ab..e3292c50ea 100644
--- a/games/jfsw/README_music.txt
+++ b/games/jfsw/README_music.txt
@@ -1,84 +1,18 @@
-The most important things to understand about the music in Shadow Warrior:
+The shareware (demo) version of the game is the only version that uses
+MIDI.
-The demo/shareware version of the game uses MIDI. There are actually
-.MID files stored within sw.grp.
+The registered version of the game was distributed on CD, and played
+the music from audio tracks on the disc. This isn't supported in jfsw.
+There is no MIDI data inside the .grp files for the registered version
+or the expansions.
-The full/registered version and/or expansion pack uses CD audio
-tracks. They *can't* use MIDI: there's no MIDI data inside its .grp
-files at all.
+There are two choices to get music working in jfsw:
-So there are 2 completely separate procedures for getting the music
-to work, depending on whether you're playing the full/expansion or
-demo version.
+- OGG files, created by ripping the audio from the game CD. This
+ works with all versions of the game. To get them, install
+ jfsw_registered_data. The other games (Shareware, Twin Dragon,
+ Wanton Destruction) will use the same audio tracks.
-Full (Registered) Version, Wanton Destruction expansion
--------------------------------------------------------
-
-For these versions, jfsw doesn't actually support CD audio from a
-physical CD [*]. It does, however, support .ogg files made from the CD.
-
-As of April 2020, the jfsw_registered_data build includes the .ogg files,
-so there's no need to rip them from CD or download them separately. If
-you're playing Wanton Destruction, install both jfsw_registered_data
-and jfsw_wanton_destruction.
-
-Run the game, and the music should play. If not, use the in-game menus
-(Options, Sound Menu) to enable the music and turn up the volume.
-
-If you followed the steps below to get the demo music to play, you'll
-have to re-edit ~/.jfsw/sw.cfg and change the MusicDevice back to 0.
-
-If you're never going to play the demo version, there's no need to build
-jfsw with fluidsynth support (although, it won't hurt anything if you do).
-
-Note: When using the .ogg soundtrack, under some conditions, it seems
-the background music stops playing after loading a saved game. If this
-happens to you, toggle the music off & back on (under Options, Sound
-Menu), which should start it playing again.
-
-[*] There is some code in jfaudiolib that's supposed to play CD audio
- but it's (a) SDL-1.2 only, and (b) broken.
-
-Demo (Shareware) Version
-------------------------
-
-For the shareware version, the MIDI data is already present inside the
-sw.grp file. To actually hear it, you'll have to:
-
-1. Build and install fluidsynth. Doesn't matter whether or not
- optional jack and/or lash are included (jfsw doesn't use them though).
-
-2. Build and install fluid-soundfont.
-
-3. Build and install jfsw. When installing, the description should say
- the package was built with fluidsynth.
-
-4. Run the game once, and exit it normally, to get it to create a config
- file. You should now have a ~/.jfsw/sw.cfg file.
-
-5. Edit ~/.jfsw/sw.cfg, find the line that says "MusicDevice = 0", and
- change the 0 to a 6. This enables fluidsynth.
-
-6. Run the game again. Make sure the music is enabled and the music
- volume is turned up (under Options, Sound Menu).
-
-Unfortunately, the edited config file won't work with the full version.
-You'll have to change MusicDevice back to 0 (meaning 'autodetect') to get
-the .ogg tracks to play. Other possible values are 1 (SDL) and 7 (ALSA).
-
-There's no direct way to change which soundfont jfsw uses. What it does is
-look in /usr/share/sounds/sf2/ and pick the first soundfont it finds, in
-sorted order. Basically it does the C++ equivalent of:
-
-$ ls /usr/share/sounds/sf2/*.sf2 | head -1
-
-If the only sound fonts in that directory are the ones installed by
-the fluid-soundfont package, it will choose "FluidR3_GM.sf2", which is
-reasonable and sounds good.
-
-If you want to use a different soundfont, try something like this:
-
-# cd /usr/share/sounds/sf2/
-# ln -s MySoundFont.sf2 000-jfsw.sf2
-
-Check with the ls command above, to make sure 000-jfsw.sf2 sorts first.
+- MIDI. This only works for the shareware/demo version (jfsw_demo_data),
+ and is only necessary if you don't want to install jfsw_registered_data.
+ To use MIDI, install fluidsynth-soundfont.
diff --git a/games/jfsw/desktop/jfsw-build.desktop b/games/jfsw/desktop/jfsw-build.desktop
new file mode 100644
index 0000000000..fc60f06205
--- /dev/null
+++ b/games/jfsw/desktop/jfsw-build.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=JFSW Build Editor
+Icon=jfsw
+Exec=/usr/games/jfsw-build
+Terminal=false
+Type=Application
+Categories=Game;ActionGame;
diff --git a/games/jfsw/jfsw.desktop b/games/jfsw/desktop/jfsw.desktop
index 39fa3cba51..2ec32e83d0 100644
--- a/games/jfsw/jfsw.desktop
+++ b/games/jfsw/desktop/jfsw.desktop
@@ -1,7 +1,7 @@
[Desktop Entry]
Name=JFShadowWarrior
Icon=jfsw
-Exec=/usr/games/sw
+Exec=/usr/games/jfsw
Terminal=false
Type=Application
Categories=Game;ActionGame;
diff --git a/games/jfsw/desktop/kenbuild.desktop b/games/jfsw/desktop/kenbuild.desktop
new file mode 100644
index 0000000000..224cf9122c
--- /dev/null
+++ b/games/jfsw/desktop/kenbuild.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=JFKenBuild
+Icon=jfsw
+Exec=/usr/games/kenbuild
+Terminal=false
+Type=Application
+Categories=Game;ActionGame;
diff --git a/games/jfsw/doinst.sh b/games/jfsw/doinst.sh
index 4e8ba7071d..3e5691a052 100644
--- a/games/jfsw/doinst.sh
+++ b/games/jfsw/doinst.sh
@@ -2,3 +2,8 @@ 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/jfsw/git2tarxz.sh b/games/jfsw/git2tarxz.sh
new file mode 100644
index 0000000000..99dff8ca6f
--- /dev/null
+++ b/games/jfsw/git2tarxz.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+# Create source tarball from git repo, with generated version number.
+
+# Takes one optional argument, which is the commit or tag to create a
+# tarball of. With no arg, HEAD is used.
+
+# Version number example: 0.0.1+20200227_ad7ec17
+
+# Notes:
+
+# Do not use this if you're packaging a release.
+
+# This script doesn't need to be run as root. It does need to be able
+# to write to the current directory it's run from.
+
+# Running this script twice for the same commit will NOT give identical
+# tarballs, even if the contents are identical. This is because tar
+# includes the current time in a newly-created tarball (plus there may
+# be other git-related reasons).
+
+# Once you've generated a tarball, you'll still need a place to host it.
+# Ask on the mailing list, if you don't have your own web server to
+# play with.
+
+## Config:
+
+# Name of SBo build:
+PRGNAM=jfsw
+
+# Github project and user names:
+PROJECT=${PRGNAM}
+GITUSER=jonof
+
+# For github projects, you can use this unmodified:
+CLONE_URL=https://github.com/$GITUSER/$PROJECT.git
+
+# For non-github projects, you might not need GITUSER, in which case
+# just omit it from the script.
+
+## End of config.
+
+set -e
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+git clone $CLONE_URL $GITDIR
+
+CWD="$( pwd )"
+
+cd $GITDIR
+git submodule update --init
+
+if [ "$1" != "" ]; then
+ git reset --hard "$1" || exit 1
+fi
+
+GIT_SHA=$( git rev-parse --short HEAD )
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+
+VERSION=${DATE}_${GIT_SHA}
+
+find . -name .git\* -print0 | xargs -0 rm -rf
+
+cd "$CWD"
+rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz
+mv $GITDIR $PRGNAM-$VERSION
+tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION
+
+echo
+echo "Created tarball: $PRGNAM-$VERSION.tar.xz"
+echo "VERSION=\"$VERSION\""
+echo "MD5SUM=\"$( md5sum $PRGNAM-$VERSION.tar.xz | cut -d' ' -f1 )\""
diff --git a/games/jfsw/jfsw.SlackBuild b/games/jfsw/jfsw.SlackBuild
index 60820b2643..136b95a48b 100644
--- a/games/jfsw/jfsw.SlackBuild
+++ b/games/jfsw/jfsw.SlackBuild
@@ -7,6 +7,19 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211103 bkw:
+# - updated for 20210725_716e1e3 (latest git).
+# - combine all the source tarballs into one (see git2tarxz.sh).
+# - get rid of options for building with SDL1 and without fluidsynth.
+# - get rid of fixsegfault.diff, upstream fixed the bug.
+# - rebase the remaining patches (dont_use_jack.diff, twin_dragon_grp.diff)
+# on this version. can't build the old versions any more, sorry.
+# - install the binary only as 'jfsw' (not 'sw'). this is because
+# eduke32 now supports Shadow Warrior, and its binary is also 'sw'.
+# which will be renamed to eduke32-sw or edsw or something like that.
+# - optionally (TOOLS=yes) install the tools (kextract, kgroup, etc).
+# - new-style icons.
+
# 20180710 bkw: BUILD=2
# - updated for 20180424_8fc2d54 (latest git).
# - finally fix long-standing segfault bug.
@@ -23,24 +36,11 @@
# - allow fluidsynth builds to work even if fluidsynth built with JACK.
# - add SDL2=no and FLUID=no build options.
-# When updating to the latest commit of jfsw, we gotta make sure we
-# get the correct commits of the other 3 sources (jfaudiolib, jfbuild,
-# jfmact). To do this:
-# git clone https://github.com/jonof/jfsw.git jfsw.tmp
-# cd jfsw.tmp
-# git submodule init
-# git submodule update
-# Fortunately only the .info file needs to be updated. This script
-# parses it instead of having the commit hashes hardcoded here too.
-# VERSION is duplicated as usual, but here it only serves to name the
-# package (you could build just fine with any VERSION so long as the
-# .info file is correct).
-
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=jfsw
-VERSION=${VERSION:-20180424_8fc2d54}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-20210725_716e1e3}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -52,9 +52,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
@@ -80,135 +77,109 @@ fi
set -e
-# We got 4 source tarballs to extract, so create an enclosing $PRGNAM
-# dir to put them all in (for ease of cleanup, if nothing else). When
-# we're ready to build, the source will all be in $TMP/$PRGNAM/$PRGNAM.
rm -rf $PKG
-rm -rf $TMP/$PRGNAM
-mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
-cd $TMP/$PRGNAM
-
-# 20180710 bkw: this is an unusual thing for a SlackBuild to do:
-# parse its own .info file. Done this way to avoid duplicating
-# all those full-length git hashes in both files.
-if [ ! -e "$CWD/$PRGNAM.info" ]; then
- echo "$PRGNAM.info not found, where did it go?" 1>&2
- exit 1
-fi
-
-# For paranoia's sake, don't actually source the entire .info file, just
-# grab the DOWNLOAD= assignment. This rather cryptic sed command means
-# "start printing lines when you hit one that starts with DOWNLOAD,
-# and exit when you hit one that ends with gz and a double-quote
-# (plus possible trailing whitespace)". Result is the multi-line DOWNLOAD
-# assigment only.
-DLFRAG="$( mktemp ./tmp.info.XXXXXX )"
-sed -n '/^DOWNLOAD/,$p;/gz" *$/q' < "$CWD/$PRGNAM.info" > $DLFRAG
-source $DLFRAG
-
-for URL in $DOWNLOAD; do
- SRCNAM="$( basename "$URL" .tar.gz )"
- PNAM=$(echo $SRCNAM | sed -e 's/-.*//')
- [ "$PNAM" = "$PRGNAM" ] || DIRS="$TMP/$PRGNAM/$PNAM $DIRS"
- rm -rf $SRCNAM $PNAM
- tar xvf $CWD/$SRCNAM.tar.gz
- mv $SRCNAM $PNAM
-done
-
-cd $PRGNAM
-mv $DIRS .
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+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 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
-
-# 20180711 bkw: how to trigger a known segfault:
-# <orbea> make a save game, load that save game, die while holding the
-# fire button
-# I came up with a band-aid to work around the segfault. Stops the
-# fire button from working the same as a Y keypress (or at all), in Y/N
-# prompts. Patch was sent upstream: https://github.com/jonof/jfsw/issues/14
-patch -p1 < $CWD/patches/fixsegfault.diff
-
-# 20180712 bkw: one liner attempt to get SDL (1.2 only) CD-audio support
-# working. It turns out there's something worse wrong, I can't even get
-# the example code from libsdl.org to play a CD (it'll list the tracks,
-# but SDL_CDPlayTracks() doesn't work, the drive won't even spin up).
-# Since this is SDL 1.2, not 2.x, any attempt to ask for help from an
-# SDL developer or expert is going to be answered with "port your code to
-# SDL 2.x!", so I'm just documenting CD support in jfsw as being broken.
-#patch -p1 < $CWD/patches/sdl_cdrom_fix.diff
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# 20180712 bkw: if fluidsynth happens to have been built with optional
# JACK support, it'll be the default driver and jfsw will try to use it.
-# This doesn't actually work, so:
+# This doesn't actually work.
+# 20211029 bkw: Slackware has fluidsynth now, it isn't built
+# with jack. But I'm leaving this in, because there might be a
+# fluidsynth-jack build after 15.0 releases.
patch -p1 < $CWD/patches/dont_use_jack.diff
-# 20180712 bkw: we have sdl.pc (not sdl1.pc) for SDL 1.2.x:
-patch -p1 < $CWD/patches/sdl1_fix.diff
-
-# 20180712 bkw: upstream doesn't provide a way to override autodetection
-# of SDL2 and fluidsynth, so I do it with a couple of patches:
-[ "${SDL2:-yes}" = "no" ] && patch -p1 < $CWD/patches/disable_sdl2.diff
-[ "${FLUID:-yes}" = "no" ] && patch -p1 < $CWD/patches/disable_fluid.diff
-
-# 20180711 bkw: The -Wno-return-type isn't needed for gcc but does no
-# harm. Left in place in case someone wants to build this with clang
-# (add a CC=clang arg to the make command, or 'export CC=clang').
-
-# 20180711 bkw: JFAUDIOLIB_USE_SDLMIXER=1 doesn't work (build fail due
-# to missing driver_sdlmixer.c). Maybe someday it'll work and then we
-# hear the demo music without having to install fluidsynth?
-
-# 20200416 bkw: fluidsynth 2.x works OK, but the version check in the
-# source doesn't like its version number.
-sed -i '/^#error.*Fluid/d' jfaudiolib/src/driver_fluidsynth.c
-
# 20200428 bkw: add Twin Dragon td.grp to the list of supported GRP
# files. Need this for the jfsw_twin_dragon build.
-patch -p1 < $CWD/twin_dragon_grp.diff
-
-make \
- RELEASE=1 \
- PREFIX=/usr/share/games/$PRGNAM \
- CFLAGS="$SLKCFLAGS -Wno-return-type" \
- CXXFLAGS="$SLKCFLAGS"
-
-# Document what the binary package needs in its slack-desc.
-BIN_NAME=sw
-SDLVER=1.2
-WITHFLUID=without
-ldd $BIN_NAME | grep -q libSDL2 && SDLVER=2.0
-ldd $BIN_NAME | grep -q libfluidsynth && WITHFLUID=with
+patch -p1 < $CWD/patches/twin_dragon_grp.diff
+
+# 20211030 bkw: make the default video mode 24bpp, in the absence of a
+# config file. This is needed to make the HRP work OOTB. Specifically,
+# the launcher (on my system anyway) doesn't offer any 24bpp modes by
+# default, only 8 and 32. And the HRP *has to have* 24 (no, 32 won't
+# work). It's 2021, I don't think anyone's still using anything that
+# doesn't support 24bpp (at least not in a desktop/laptop PC running
+# Slackware). Thanks again to orbea for figuring this out.
+sed -i '/ScreenBPP *= *8/s,8,24,' src/config.c
+
+install_exe() {
+ install -s -m0755 -oroot -groot "$@"
+}
+
+runmake() {
+ echo "===> running: make " $@
+ make "$@" \
+ RELEASE=1 \
+ DATADIR=/usr/share/games/$PRGNAM \
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS"
+}
+
+runmake
# no 'make install' target
mkdir -p $PKG/usr/games
-install -s -m0755 -oroot -groot $BIN_NAME $PKG/usr/games
-ln -s $BIN_NAME $PKG/usr/games/$PRGNAM
+install_exe sw $PKG/usr/games/$PRGNAM
+install_exe build $PKG/usr/games/$PRGNAM-build
+
+# just for shiggles, include kenbuild in the package:
+make -C jfbuild
+mkdir -p $PKG/usr/libexec/$PRGNAM $PKG/usr/share/games/kenbuild
+install_exe jfbuild/kenbuild-data/game $PKG/usr/libexec/$PRGNAM/kenbuild
+install -m0755 -oroot -groot $CWD/kenbuild.sh $PKG/usr/games/kenbuild
+cp jfbuild/kenbuild-data/*.{map,h,dat} $PKG/usr/share/games/kenbuild
+
+if [ "${TOOLS:-no}" = "yes" ]; then
+ runmake -C jfbuild utils
+ # the set of available tools changes sometimes, don't let the build
+ # fail because one tool is gone in a new release.
+ for i in arttool kextract kgroup transpal wad2art wad2map; do
+ if [ -x jfbuild/$i ]; then
+ install_exe jfbuild/$i $PKG/usr/games/$i
+ else
+ echo "!!! $i didn't get built, investigate!"
+ fi
+ done
+fi
-# Data directory included in package, even though we don't include data file.
-# Why? Because the user might be grabbing sw.grp from a retail CD-ROM, and
-# if this dir doesn't exist, he might get confused...
+# Data directory included in package, even though we don't include
+# data files. Why? Because the user might be grabbing sw.grp from
+# a retail CD-ROM, and if this dir doesn't exist, he might get
+# confused...
mkdir -p $PKG/usr/share/games/$PRGNAM
-# Icon taken from the highres pack, highres/screen/menu/2870.png
+# There's an .ico icon, but it maxes out at 48x48.
+# This icon made from highres/screen/menu/2324.png in the highres pack,
+# by copying just the yinyang logo.
+for px in 16 32 48 64 128; do
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ convert -resize $size $CWD/$PRGNAM.png $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
-mkdir -p $PKG/usr/share/applications
-cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop
+DESKTOPDIR=$PKG/usr/share/applications
+mkdir -p $DESKTOPDIR
+for i in $CWD/desktop/*.desktop; do
+ cat $i > $DESKTOPDIR/$( basename $i )
+done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a GNU.TXT readme.txt releasenotes.html $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a GPL.TXT README.md releasenotes.html $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README_SBo.txt
mkdir -p $PKG/install
-sed -e "s,@WITHFLUID@,$WITHFLUID," \
- -e "s,@SDLVER@,$SDLVER, " \
- $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
diff --git a/games/jfsw/jfsw.info b/games/jfsw/jfsw.info
index 986bec380b..50a772403b 100644
--- a/games/jfsw/jfsw.info
+++ b/games/jfsw/jfsw.info
@@ -1,14 +1,8 @@
PRGNAM="jfsw"
-VERSION="20180424_8fc2d54"
+VERSION="20210725_716e1e3"
HOMEPAGE="http://www.jonof.id.au/jfsw"
-DOWNLOAD="https://github.com/jonof/jfsw/archive/8fc2d54/jfsw-8fc2d549d4ad840021da40e9021c6a2b891f41c2.tar.gz \
- https://github.com/jonof/jfaudiolib/archive/94ea357/jfaudiolib-94ea3575592fa7730e32ac8c6bc383639eafecf8.tar.gz \
- https://github.com/jonof/jfbuild/archive/9fd9fc3/jfbuild-9fd9fc3ca880966df78249cd6d8463de26a73351.tar.gz \
- https://github.com/jonof/jfmact/archive/f915216/jfmact-f915216973de73c42c326fdd3b1734ac12316427.tar.gz"
-MD5SUM="def769103d62b71e05f0678a836be271 \
- 57f8c038767447236103c75da87bdd56 \
- 7a6a40a506f69b2f1617a142ae4e18c1 \
- ad429cc636cba0c265a857c138a92a9d"
+DOWNLOAD="https://slackware.uk/~urchlay/src/jfsw-20210725_716e1e3.tar.xz"
+MD5SUM="034fcfdafda31ee5968cd7ae5484b515"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/games/jfsw/jfsw.png b/games/jfsw/jfsw.png
index d3fb98ee36..5e86b34e7e 100644
--- a/games/jfsw/jfsw.png
+++ b/games/jfsw/jfsw.png
Binary files differ
diff --git a/games/jfsw/kenbuild.sh b/games/jfsw/kenbuild.sh
new file mode 100644
index 0000000000..1daaa81027
--- /dev/null
+++ b/games/jfsw/kenbuild.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# wrapper script for kenbuild, part of jfsw SlackBuild on SBo.
+
+set -e
+mkdir -p ~/.kenbuild
+cd ~/.kenbuild
+for i in /usr/share/games/kenbuild/*; do
+ [ -e "$( basename $i )" ] || ln -s $i .
+done
+
+exec /usr/libexec/jfsw/kenbuild "$@"
diff --git a/games/jfsw/patches/disable_fluid.diff b/games/jfsw/patches/disable_fluid.diff
deleted file mode 100644
index 970e8bd67a..0000000000
--- a/games/jfsw/patches/disable_fluid.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur jfsw.orig/jfaudiolib/Makefile.shared jfsw/jfaudiolib/Makefile.shared
---- jfsw.orig/jfaudiolib/Makefile.shared 2017-02-02 07:22:54.000000000 -0500
-+++ jfsw/jfaudiolib/Makefile.shared 2018-07-12 15:25:01.996310856 -0400
-@@ -30,8 +30,4 @@
- JFAUDIOLIB_LDFLAGS+= $(shell pkg-config --libs alsa)
- JFAUDIOLIB_LDFLAGS+=-lpthread
- endif
-- ifeq (yes,$(shell pkg-config --exists fluidsynth && echo yes))
-- JFAUDIOLIB_HAVE_FLUIDSYNTH=1
-- JFAUDIOLIB_LDFLAGS+= $(shell pkg-config --libs fluidsynth)
-- endif
- endif
diff --git a/games/jfsw/patches/disable_sdl2.diff b/games/jfsw/patches/disable_sdl2.diff
deleted file mode 100644
index 4254028826..0000000000
--- a/games/jfsw/patches/disable_sdl2.diff
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -Naur jfsw.orig2/jfaudiolib/Makefile.shared jfsw/jfaudiolib/Makefile.shared
---- jfsw.orig2/jfaudiolib/Makefile.shared 2018-07-12 15:44:51.443280637 -0400
-+++ jfsw/jfaudiolib/Makefile.shared 2018-07-12 15:43:41.666282410 -0400
-@@ -16,15 +16,10 @@
- JFAUDIOLIB_HAVE_VORBIS=1
- JFAUDIOLIB_LDFLAGS+= $(shell pkg-config --libs vorbisfile)
- endif
-- ifeq (yes,$(shell pkg-config --exists sdl2 && echo yes))
-- JFAUDIOLIB_HAVE_SDL=2
-- JFAUDIOLIB_LDFLAGS+= $(shell pkg-config --libs sdl2)
-- else
- ifeq (yes,$(shell pkg-config --exists sdl && echo yes))
- JFAUDIOLIB_HAVE_SDL=1
- JFAUDIOLIB_LDFLAGS+= $(shell pkg-config --libs sdl)
- endif
-- endif
- ifeq (yes,$(shell pkg-config --exists alsa && echo yes))
- JFAUDIOLIB_HAVE_ALSA=1
- JFAUDIOLIB_LDFLAGS+= $(shell pkg-config --libs alsa)
-diff -Naur jfsw.orig2/jfbuild/Makefile.shared jfsw/jfbuild/Makefile.shared
---- jfsw.orig2/jfbuild/Makefile.shared 2017-02-04 02:45:28.000000000 -0500
-+++ jfsw/jfbuild/Makefile.shared 2018-07-12 15:51:08.320271062 -0400
-@@ -9,7 +9,7 @@
- GLLIBLIN=-lGL
-
- SDLCONFIG=$(shell which sdl-config)
--SDL2CONFIG=$(shell which sdl2-config)
-+SDL2CONFIG=
-
- # Path to the included libsquish
- LIBSQUISH=libsquish
diff --git a/games/jfsw/patches/dont_use_jack.diff b/games/jfsw/patches/dont_use_jack.diff
index 35dcbdb017..f02a83aaf4 100644
--- a/games/jfsw/patches/dont_use_jack.diff
+++ b/games/jfsw/patches/dont_use_jack.diff
@@ -1,10 +1,10 @@
-diff -Naur jfsw.orig/jfaudiolib/src/driver_fluidsynth.c jfsw/jfaudiolib/src/driver_fluidsynth.c
---- jfsw.orig/jfaudiolib/src/driver_fluidsynth.c 2017-02-02 07:22:54.000000000 -0500
-+++ jfsw/jfaudiolib/src/driver_fluidsynth.c 2018-07-12 05:08:37.119250512 -0400
-@@ -342,6 +342,10 @@
+diff -Naur jfsw-20210725_716e1e3/jfaudiolib/src/driver_fluidsynth.c jfsw-20210725_716e1e3.patched/jfaudiolib/src/driver_fluidsynth.c
+--- jfsw-20210725_716e1e3/jfaudiolib/src/driver_fluidsynth.c 2021-10-28 17:13:18.000000000 -0400
++++ jfsw-20210725_716e1e3.patched/jfaudiolib/src/driver_fluidsynth.c 2021-10-29 02:12:45.665659393 -0400
+@@ -371,6 +371,10 @@
return FSynthErr_Error;
}
-
+
+ /* 20180712 bkw: don't try to use JACK (it doesn't work) */
+ if(fluid_settings_str_equal(fluidsettings, "audio.driver", "jack"))
+ fluid_settings_setstr(fluidsettings, "audio.driver", "alsa");
diff --git a/games/jfsw/patches/fixsegfault.diff b/games/jfsw/patches/fixsegfault.diff
deleted file mode 100644
index 9290ffef96..0000000000
--- a/games/jfsw/patches/fixsegfault.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur jfsw.orig/src/menus.c jfsw/src/menus.c
---- jfsw.orig/src/menus.c 2017-03-24 23:22:17.000000000 -0400
-+++ jfsw/src/menus.c 2018-07-10 22:51:52.032019948 -0400
-@@ -2540,7 +2540,7 @@
- CONTROL_ClearUserInput(&mnu_input);
- CONTROL_GetUserInput(&mnu_input);
-
-- if (KB_KeyPressed(sc_Y) || KB_KeyPressed(sc_Enter) || mnu_input.button0)
-+ if (KB_KeyPressed(sc_Y) || KB_KeyPressed(sc_Enter))
- return (TRUE);
- else
- return (FALSE);
diff --git a/games/jfsw/patches/sdl1_fix.diff b/games/jfsw/patches/sdl1_fix.diff
deleted file mode 100644
index 1e68caab33..0000000000
--- a/games/jfsw/patches/sdl1_fix.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur jfsw.orig/jfaudiolib/Makefile.shared jfsw/jfaudiolib/Makefile.shared
---- jfsw.orig/jfaudiolib/Makefile.shared 2017-02-02 07:22:54.000000000 -0500
-+++ jfsw/jfaudiolib/Makefile.shared 2018-07-12 15:31:55.593300348 -0400
-@@ -22,7 +22,7 @@
- else
- ifeq (yes,$(shell pkg-config --exists sdl && echo yes))
- JFAUDIOLIB_HAVE_SDL=1
-- JFAUDIOLIB_LDFLAGS+= $(shell pkg-config --libs sdl1)
-+ JFAUDIOLIB_LDFLAGS+= $(shell pkg-config --libs sdl)
- endif
- endif
- ifeq (yes,$(shell pkg-config --exists alsa && echo yes))
diff --git a/games/jfsw/patches/sdl_cdrom_fix.diff b/games/jfsw/patches/sdl_cdrom_fix.diff
deleted file mode 100644
index bffad4a76b..0000000000
--- a/games/jfsw/patches/sdl_cdrom_fix.diff
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -Naur jfsw.orig/jfaudiolib/src/driver_sdl.c jfsw/jfaudiolib/src/driver_sdl.c
---- jfsw.orig/jfaudiolib/src/driver_sdl.c 2017-02-02 07:22:54.000000000 -0500
-+++ jfsw/jfaudiolib/src/driver_sdl.c 2018-07-12 17:08:14.907153516 -0400
-@@ -375,6 +375,7 @@
- int SDLDrv_CD_Init(void)
- {
- #if (SDL_MAJOR_VERSION == 1)
-+ CDstatus status;
- Uint32 inited;
- Uint32 err = 0;
- int i;
-@@ -407,6 +408,8 @@
- return SDLErr_Error;
- }
-
-+ status = SDL_CDStatus(CDRom);
-+
- fprintf(stderr, "SDL_CD: numtracks: %d\n", CDRom->numtracks);
- for (i = 0; i < CDRom->numtracks; i++) {
- fprintf(stderr, "SDL_CD: track %d - %s, %dsec\n",
diff --git a/games/jfsw/patches/twin_dragon_grp.diff b/games/jfsw/patches/twin_dragon_grp.diff
new file mode 100644
index 0000000000..a83d0bb0d4
--- /dev/null
+++ b/games/jfsw/patches/twin_dragon_grp.diff
@@ -0,0 +1,11 @@
+diff -Naur jfsw-20210725_716e1e3/src/grpscan.c jfsw-20210725_716e1e3.patched/src/grpscan.c
+--- jfsw-20210725_716e1e3/src/grpscan.c 2021-10-28 17:13:15.000000000 -0400
++++ jfsw-20210725_716e1e3.patched/src/grpscan.c 2021-10-29 02:06:21.962684518 -0400
+@@ -35,6 +35,7 @@
+ { "Registered Version", 0x7545319F, 47536148, 0, "sw.grp", NULL, NULL },
+ { "Shareware Version", 0x08A7FA1F, 26056769, 0, "swshare.grp", NULL, NULL },
+ { "Wanton Destruction (Addon)", 0xA9AAA7B7, 48698128, 0, "wt.grp", NULL, NULL },
++ { "Twin Dragon (Addon)", 0xe06cb6b4, 53480783, 0, "td.grp", NULL, NULL },
+ { NULL, 0, 0, 0, NULL, NULL, NULL },
+ };
+ struct grpfile *foundgrps = NULL;
diff --git a/games/jfsw/slack-desc b/games/jfsw/slack-desc
index 1dc31d5144..7f466bba1c 100644
--- a/games/jfsw/slack-desc
+++ b/games/jfsw/slack-desc
@@ -12,7 +12,7 @@ jfsw: The aim of this port is to present Shadow Warrior as closely as
jfsw: possible to the original game while adding optional features to expand
jfsw: the possibilities of the game.
jfsw:
-jfsw: Package built with SDL @SDLVER@ and @WITHFLUID@ fluidsynth.
+jfsw:
jfsw:
jfsw:
jfsw:
diff --git a/games/jfsw/twin_dragon_grp.diff b/games/jfsw/twin_dragon_grp.diff
deleted file mode 100644
index 1b4a1ce07e..0000000000
--- a/games/jfsw/twin_dragon_grp.diff
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -Naur jfsw-8fc2d549d4ad840021da40e9021c6a2b891f41c2/src/grpscan.c jfsw-8fc2d549d4ad840021da40e9021c6a2b891f41c2.patched/src/grpscan.c
---- jfsw-8fc2d549d4ad840021da40e9021c6a2b891f41c2/src/grpscan.c 2017-03-24 23:22:17.000000000 -0400
-+++ jfsw-8fc2d549d4ad840021da40e9021c6a2b891f41c2.patched/src/grpscan.c 2020-04-28 20:48:40.091365360 -0400
-@@ -34,6 +34,7 @@
- { "Registered Version", 0x7545319F, 47536148, NULL },
- { "Shareware Version", 0x08A7FA1F, 26056769, NULL },
- { "Wanton Destruction (Addon)", 0xA9AAA7B7, 48698128, NULL },
-+ { "Twin Dragon (Addon)", 0xe06cb6b4, 53480783 },
- };
- struct grpfile *foundgrps = NULL;
-
-diff -Naur jfsw-8fc2d549d4ad840021da40e9021c6a2b891f41c2/src/grpscan.h jfsw-8fc2d549d4ad840021da40e9021c6a2b891f41c2.patched/src/grpscan.h
---- jfsw-8fc2d549d4ad840021da40e9021c6a2b891f41c2/src/grpscan.h 2017-03-24 23:22:17.000000000 -0400
-+++ jfsw-8fc2d549d4ad840021da40e9021c6a2b891f41c2.patched/src/grpscan.h 2020-04-28 20:52:36.787343843 -0400
-@@ -25,7 +25,7 @@
- #define __grpscan_h__
-
- // List of internally-known GRP files
--#define numgrpfiles 3
-+#define numgrpfiles 4
- struct grpfile {
- const char *name;
- int crcval;