diff options
author | B. Watson <yalhcru@gmail.com> | 2021-10-26 22:21:15 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-29 17:07:24 +0700 |
commit | 735e405bd244f4b9ae1e09aa6dc5b8090e5aed47 (patch) | |
tree | c54ac776f411e8673ede6173965ccd3fc5df3068 /games/openjazz | |
parent | 32cb34b26c7c979c82944eaeaf47cf26003436f4 (diff) |
games/openjazz: Updated for version 20190106.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/openjazz')
-rw-r--r-- | games/openjazz/README | 2 | ||||
-rw-r--r-- | games/openjazz/doinst.sh | 5 | ||||
-rw-r--r-- | games/openjazz/openjazz-shareware.desktop | 6 | ||||
-rw-r--r-- | games/openjazz/openjazz.6 | 31 | ||||
-rw-r--r-- | games/openjazz/openjazz.SlackBuild | 61 | ||||
-rw-r--r-- | games/openjazz/openjazz.info | 6 | ||||
-rw-r--r-- | games/openjazz/openjazz.pod | 21 | ||||
-rw-r--r-- | games/openjazz/paths.diff | 210 |
8 files changed, 181 insertions, 161 deletions
diff --git a/games/openjazz/README b/games/openjazz/README index 9e3763f427b0e..02c2c8bd0a771 100644 --- a/games/openjazz/README +++ b/games/openjazz/README @@ -1,3 +1,5 @@ +openjazz (engine for Jazz Jackrabbit games) + OpenJazz is a free, open-source version of the classic Jazz Jackrabbit games. OpenJazz can be compiled on a wide range of operating systems, including Windows 98/Me/XP and Linux. OpenJazz requires the files diff --git a/games/openjazz/doinst.sh b/games/openjazz/doinst.sh index 4e8ba7071dea7..3e5691a052b5b 100644 --- a/games/openjazz/doinst.sh +++ b/games/openjazz/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/openjazz/openjazz-shareware.desktop b/games/openjazz/openjazz-shareware.desktop index d32a47921d15f..6e1a330639a15 100644 --- a/games/openjazz/openjazz-shareware.desktop +++ b/games/openjazz/openjazz-shareware.desktop @@ -1,7 +1,7 @@ [Desktop Entry] -Name=Jazz Jackrabbit (shareware) -Comment=Classic DOS game (OpenJazz engine) -Exec=openjazz +Name=Jazz Jackrabbit Shareware +Comment=Classic MS-DOS platform game (OpenJazz engine) +Exec=/usr/games/openjazz-shareware Icon=openjazz-shareware Terminal=false Type=Application diff --git a/games/openjazz/openjazz.6 b/games/openjazz/openjazz.6 index 21d4515242d3e..5e6688a5aab7c 100644 --- a/games/openjazz/openjazz.6 +++ b/games/openjazz/openjazz.6 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -46,7 +46,7 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" -.\" If the F register is turned on, we'll generate index entries on stderr for +.\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. @@ -56,12 +56,12 @@ .. .nr rF 0 .if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{ -. if \nF \{ +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. -. if !\nF==2 \{ +. if !\nF==2 \{\ . nr % 0 . nr F 2 . \} @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "OPENJAZZ 6" -.TH OPENJAZZ 6 "2014-03-27" "160214" "SlackBuilds.org" +.TH OPENJAZZ 6 "2021-10-27" "20190106" "SlackBuilds.org" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -143,6 +143,8 @@ openjazz \- free/open\-source game engine for Jazz Jackrabbit .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBopenjazz\fR \fI[\-f]\fR \fI[dir] ...\fR +.PP +\&\fBopenjazz-shareware\fR \fI\-f\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" OpenJazz is a free, open-source version of the classic Jazz Jackrabbit(tm) @@ -168,6 +170,14 @@ get confused: there's a \*(L"Holiday Hare 1998\*(R", which isn't supported .PP There is no support for saving/loading the game. Multiplayer is supported, but not well tested. +.PP +\&\fBopenjazz-shareware\fR launches the shareware version of the +game. It's just a wrapper script that executes \*(L"openjazz +/usr/share/games/openjazz/shareware\*(R". +.PP +To play one of the retail games (listed above), copy its data files to +a directory, then either run \fBopenjazz\fR from within that directory, +or else run it with the full path to the directory as an argument. .SH "OPTIONS" .IX Header "OPTIONS" \&\fB\-f\fR starts the game fullscreen. Any other option beginning with \- will @@ -189,13 +199,14 @@ The search path for game data files includes, in order: .PD .PP In addition, the file \fBopenjazz.000\fR (containing the OpenJazz logo, -note the lowercase name) will be searched for in \fB/usr/share/openjazz\fR +note the lowercase name) will be searched for in \fB/usr/share/games/openjazz\fR after all other directories (so each separate game doesn't need its own copy, when you've got multiple games installed). .PP -\&\fB\f(CB$HOME\fB/.openjazz/\fR stores user preferences and any custom levels -downloaded from multiplayer servers. Will be created if it doesn't -exist. +\&\fB\f(CB$HOME\fB/.openjazz/\fR stores user preferences (\fBopenjazz.cfg\fR) and any +custom levels downloaded from multiplayer servers. Will be created +if it doesn't exist. \fBopenjazz.cfg\fR is not human-readable nor +editable. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBhttp://www.alister.eu/jazz/oj/faq.php\fR diff --git a/games/openjazz/openjazz.SlackBuild b/games/openjazz/openjazz.SlackBuild index bf2e751efef18..d9d38e62e162b 100644 --- a/games/openjazz/openjazz.SlackBuild +++ b/games/openjazz/openjazz.SlackBuild @@ -6,10 +6,17 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211026 bkw: +# - update for v20190106. Can't build old versions. +# - binary in /usr/games, share dir /usr/share/games/openjazz. +# - update man page. +# - install shareware docs as *.txt, convert to utf-8. +# - recreate paths.diff for this version. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=openjazz -VERSION=${VERSION:-160214} +VERSION=${VERSION:-20190106} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -22,9 +29,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 @@ -50,26 +54,19 @@ fi set -e -SRCNAM=OpenJazz -ZIPFILE=$SRCNAM-src-$VERSION.zip - rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -mkdir -p $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION -unzip $CWD/$ZIPFILE 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 {} \+ # Patch does 4 things: -# - Always look for openjazz.000 in /usr/share/openjazz. Saves the user +# - Always look for openjazz.000 in /usr/share/games/openjazz. Saves the user # from having to keep copies or symlinks of it in every game dir. # - Writes config file to user's homedir, not current dir. @@ -96,6 +93,7 @@ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --bindir=/usr/games/ \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ @@ -106,32 +104,50 @@ CXXFLAGS="$SLKCFLAGS" \ make make install-strip DESTDIR=$PKG -# icon came from windows jazz jackrabbit CD, converted with icotool +# grr. +mv $PKG/usr/games/OpenJazz $PKG/usr/games/$PRGNAM +mkdir -p $PKG/usr/share/games +mv $PKG/usr/share/$PRGNAM $PKG/usr/share/games/$PRGNAM + +# 20211026 bkw: upstream's .desktop is useless. +rm -f $PKG/usr/share/applications/*.desktop + mkdir -p $PKG/usr/share/pixmaps -cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png +ln -s ../icons/hicolor/48x48/apps/OpenJazz.png $PKG/usr/share/pixmaps/OpenJazz.png mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/shareware \ - $PKG/usr/share/$PRGNAM/shareware + $PKG/usr/share/games/$PRGNAM/shareware -cd $PKG/usr/share/$PRGNAM/shareware +# shareware data. the *.DOC files are renamed to .txt to avoid dumb +# desktop environments thinking they're ms-word docs. ORDER_DE and +# ORDER_UK are non-ASCII, convert to Unicode and UTF-8. +cd $PKG/usr/share/games/$PRGNAM/shareware unzip $CWD/jjrabbit.zip for i in *.DOC; do - sed 's,\r,,g' $i > $PKG/usr/doc/$PRGNAM-$VERSION/shareware/$i + j=$( basename $i .DOC ) + dest=$PKG/usr/doc/$PRGNAM-$VERSION/shareware/$j.txt + sed 's,\r,,g' $i | iconv -f cp437 -t utf-8 > $dest done rm -f *.EXE *.DIZ *.DOC *.PIF cd - -# wrapper script +# shareware wrapper script mkdir -p $PKG/usr/games cat <<EOF >$PKG/usr/games/$PRGNAM-shareware #!/bin/sh -exec $PRGNAM /usr/share/$PRGNAM/shareware "\$@" +exec $PRGNAM /usr/share/games/$PRGNAM/shareware "\$@" EOF chmod 755 $PKG/usr/games/$PRGNAM-shareware +# shareware icon came from windows jazz jackrabbit CD, converted with icotool +cat $CWD/$PRGNAM.png > $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM-shareware.png +ln -s ../icons/hicolor/48x48/apps/$PRGNAM-shareware.png \ + $PKG/usr/share/pixmaps/$PRGNAM-shareware.png + # man page written for this slackbuild mkdir -p $PKG/usr/man/man6 gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz +ln -s $PRGNAM.6.gz $PKG/usr/man/man6/$PRGNAM-shareware.6.gz mkdir -p $PKG/usr/share/applications cat $CWD/$PRGNAM-shareware.desktop \ @@ -140,6 +156,7 @@ cat $CWD/$PRGNAM-shareware.desktop \ for i in *.txt; do sed 's,\r,,g' $i > $PKG/usr/doc/$PRGNAM-$VERSION/$i done +cp -a README* $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/games/openjazz/openjazz.info b/games/openjazz/openjazz.info index b83569a91e774..312488afc0304 100644 --- a/games/openjazz/openjazz.info +++ b/games/openjazz/openjazz.info @@ -1,9 +1,9 @@ PRGNAM="openjazz" -VERSION="160214" +VERSION="20190106" HOMEPAGE="http://www.alister.eu/jazz/oj/" -DOWNLOAD="http://ponce.cc/slackware/sources/repo/OpenJazz-src-160214.zip \ +DOWNLOAD="https://github.com/AlisterT/openjazz/releases/download/20190106/openjazz-20190106.tar.xz \ https://slackware.uk/~urchlay/src/jjrabbit.zip" -MD5SUM="a570ae8b148a8b0fd7a3a121289a4721 \ +MD5SUM="a5ba8d68ff37007f337705780aad7309 \ 48bc5ae9ac3d0bb3a45a8262f68bf78c" DOWNLOAD_x86_64="" MD5SUM_x86_64="" diff --git a/games/openjazz/openjazz.pod b/games/openjazz/openjazz.pod index cce21dcba47cb..b2ae3bd6fcbf0 100644 --- a/games/openjazz/openjazz.pod +++ b/games/openjazz/openjazz.pod @@ -1,5 +1,5 @@ # pod source for openjazz man page -# pod2man -s6 -r160214 --stderr -cSlackBuilds.org openjazz.pod > openjazz.6 +# pod2man -s6 -r20190106 --stderr -cSlackBuilds.org openjazz.pod > openjazz.6 =pod @@ -11,6 +11,8 @@ B<openjazz> - free/open-source game engine for Jazz Jackrabbit B<openjazz> I<[-f]> I<[dir] ...> +B<openjazz-shareware> I<-f> + =head1 DESCRIPTION OpenJazz is a free, open-source version of the classic Jazz Jackrabbit(tm) @@ -39,6 +41,14 @@ get confused: there's a "Holiday Hare 1998", which isn't supported There is no support for saving/loading the game. Multiplayer is supported, but not well tested. +B<openjazz-shareware> launches the shareware version of the +game. It's just a wrapper script that executes "openjazz +/usr/share/games/openjazz/shareware". + +To play one of the retail games (listed above), copy its data files to +a directory, then either run B<openjazz> from within that directory, +or else run it with the full path to the directory as an argument. + =head1 OPTIONS B<-f> starts the game fullscreen. Any other option beginning with - will @@ -62,13 +72,14 @@ The search path for game data files includes, in order: =back In addition, the file B<openjazz.000> (containing the OpenJazz logo, -note the lowercase name) will be searched for in B</usr/share/openjazz> +note the lowercase name) will be searched for in B</usr/share/games/openjazz> after all other directories (so each separate game doesn't need its own copy, when you've got multiple games installed). -B<$HOME/.openjazz/> stores user preferences and any custom levels -downloaded from multiplayer servers. Will be created if it doesn't -exist. +B<$HOME/.openjazz/> stores user preferences (B<openjazz.cfg>) and any +custom levels downloaded from multiplayer servers. Will be created +if it doesn't exist. B<openjazz.cfg> is not human-readable nor +editable. =head1 SEE ALSO diff --git a/games/openjazz/paths.diff b/games/openjazz/paths.diff index 96a3319381bc3..e24b46988bc68 100644 --- a/games/openjazz/paths.diff +++ b/games/openjazz/paths.diff @@ -1,132 +1,106 @@ -diff -Naur orig/src/io/file.cpp patched/src/io/file.cpp ---- orig/src/io/file.cpp 2014-02-15 22:14:10.000000000 -0500 -+++ patched/src/io/file.cpp 2014-03-27 01:48:27.000000000 -0400 -@@ -32,6 +32,7 @@ - #include "io/gfx/video.h"
- #include "util.h" - -+#include <stdlib.h> - #include <string.h> - #include <zlib.h> -
-@@ -43,6 +44,16 @@ +diff -Naur openjazz-20190106/src/io/file.cpp openjazz-20190106.patched/src/io/file.cpp +--- openjazz-20190106/src/io/file.cpp 2018-06-18 17:54:50.791926735 -0400 ++++ openjazz-20190106.patched/src/io/file.cpp 2021-10-26 19:57:37.051448527 -0400 +@@ -48,6 +48,16 @@ * @param write Whether or not the file can be written to - */
- File::File (const char* name, bool write) {
+ */ + File::File (const char* name, bool write) { +#ifdef HOMEDIR -+ if(write) { -+ char *writepath = createString(getenv("HOME"), "/.openjazz/"); -+ bool ok = open(writepath, name, write); -+ delete [] writepath; -+ if(ok) return; -+ log("Could not open file for writing in $HOME", name); -+ throw E_FILE; -+ } ++ if(write) { ++ char *writepath = createString(getenv("HOME"), "/.openjazz/"); ++ bool ok = open(writepath, name, write); ++ delete [] writepath; ++ if(ok) return; ++ log("Could not open file for writing in $HOME", name); ++ throw E_FILE; ++ } +#endif -
- Path* path;
-
-@@ -55,7 +66,7 @@ -
- }
-
-- log("Could not open file", name);
-+ log("Could not find file in path", name);
-
- throw E_FILE;
-
-@@ -69,9 +80,7 @@ -
- fclose(file);
-
--#ifdef VERBOSE
- log("Closed file", filePath);
--#endif
-
- delete[] filePath;
-
-@@ -117,13 +126,13 @@ -
- if (file) {
-
--#ifdef VERBOSE
- log("Opened file", filePath);
--#endif
-
- return true;
-
-- }
-+ } else {
-+ log("Could not open file", filePath);
-+ } -
- delete[] filePath;
-
-diff -Naur orig/src/io/sound.cpp patched/src/io/sound.cpp ---- orig/src/io/sound.cpp 2013-11-23 11:54:26.000000000 -0500 -+++ patched/src/io/sound.cpp 2014-03-27 01:47:03.000000000 -0400 + + Path* path; + +@@ -60,7 +70,7 @@ + + } + +- log("Could not open file", name); ++ log("Could not find file in path", name); + + throw E_FILE; + +@@ -74,9 +84,7 @@ + + fclose(file); + +-#ifdef VERBOSE + log("Closed file", filePath); +-#endif + + delete[] filePath; + +diff -Naur openjazz-20190106/src/io/sound.cpp openjazz-20190106.patched/src/io/sound.cpp +--- openjazz-20190106/src/io/sound.cpp 2018-10-08 05:17:30.504617277 -0400 ++++ openjazz-20190106.patched/src/io/sound.cpp 2021-10-26 19:58:53.975443489 -0400 @@ -27,6 +27,8 @@ - */
-
-
+ */ + + +#include <ctype.h> +#include <string.h> - #include "file.h"
- #include "sound.h"
-
-@@ -203,7 +205,15 @@ -
- } catch (int e) {
-
-- return;
-+ char *upperName = strdup(fileName); -+ for(char *ch = upperName; *ch; ++ch) -+ *ch = toupper(*ch); -+ try { -+ file = new File(upperName, false); -+ free(upperName); -+ } catch(int e) { -+ return;
-+ } -
- }
-
-diff -Naur orig/src/main.cpp patched/src/main.cpp ---- orig/src/main.cpp 2014-02-16 10:59:02.000000000 -0500 -+++ patched/src/main.cpp 2014-03-27 01:51:17.000000000 -0400 -@@ -47,6 +47,8 @@ - #include "setup.h"
- #include "util.h"
-
-+#include <sys/stat.h>
-+#include <sys/types.h>
- #include <string.h>
-
- #if defined(CAANOO) || defined(WIZ) || defined(GP2X)
-@@ -174,7 +176,9 @@ - #ifdef WIN32
- firstPath = new Path(firstPath, createString(getenv("HOME"), "\\"));
- #else
-- firstPath = new Path(firstPath, createString(getenv("HOME"), "/."));
-+ char *homeSubDir = createString(getenv("HOME"), "/.openjazz/"); -+ mkdir(homeSubDir, 0700); /* ignore errors */ -+ firstPath = new Path(firstPath, homeSubDir); - #endif
- #endif
-
-diff -Naur orig/src/menu/mainmenu.cpp patched/src/menu/mainmenu.cpp ---- orig/src/menu/mainmenu.cpp 2013-07-20 11:46:16.000000000 -0400 -+++ patched/src/menu/mainmenu.cpp 2014-03-27 01:47:03.000000000 -0400 + #include "file.h" + #include "sound.h" + +@@ -280,7 +282,15 @@ + + } catch (int e) { + +- return; ++ char *upperName = strdup(fileName); ++ for(char *ch = upperName; *ch; ++ch) ++ *ch = toupper(*ch); ++ try { ++ file = new File(upperName, false); ++ free(upperName); ++ } catch(int e) { ++ return; ++ } + + } + +diff -Naur openjazz-20190106/src/main.cpp openjazz-20190106.patched/src/main.cpp +--- openjazz-20190106/src/main.cpp 2018-03-29 22:03:53.319965677 -0400 ++++ openjazz-20190106.patched/src/main.cpp 2021-10-26 20:03:30.167425404 -0400 +@@ -31,6 +31,7 @@ + + #define EXTERN + ++#include <sys/stat.h> + #include "game/game.h" + #include "io/controls.h" + #include "io/file.h" +@@ -194,7 +195,9 @@ + #ifdef _WIN32 + firstPath = new Path(firstPath, createString(getenv("HOME"), "\\")); + #else +- firstPath = new Path(firstPath, createString(getenv("HOME"), "/.")); ++ char *homeSubDir = createString(getenv("HOME"), "/.openjazz/"); ++ mkdir(homeSubDir, 0700); /* ignore errors */ ++ firstPath = new Path(firstPath, homeSubDir); + #endif + #endif + +diff -Naur openjazz-20190106/src/menu/mainmenu.cpp openjazz-20190106.patched/src/menu/mainmenu.cpp +--- openjazz-20190106/src/menu/mainmenu.cpp 2019-01-06 07:14:31.696191429 -0500 ++++ openjazz-20190106.patched/src/menu/mainmenu.cpp 2021-10-26 20:04:32.023421353 -0400 @@ -58,7 +58,11 @@ } catch (int e) { - throw e; -+ try { -+ file = new File("/usr/share/openjazz/" LOGO_FILE, false); -+ } catch(int e) { -+ throw e; -+ } ++ try { ++ file = new File("/usr/share/games/openjazz/openjazz.000", false); ++ } catch(int e) { ++ throw e; ++ } } |