diff options
author | B. Watson <yalhcru@gmail.com> | 2020-04-27 00:53:28 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-05-03 08:48:50 +0700 |
commit | 0cb1f29dbb533193ec76e27ed16c4fa63ef990a5 (patch) | |
tree | 463df6c70cfdc0203cddd6d5dd4e05376b886f30 /games/hatari | |
parent | 0ce644acc46cc9a428753bb94b0158786f3dd253 (diff) |
games/hatari: Support IPF/CTR images, various fixes.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/hatari')
-rw-r--r-- | games/hatari/README | 37 | ||||
-rw-r--r-- | games/hatari/hatari.SlackBuild | 87 | ||||
-rw-r--r-- | games/hatari/hatariui-create-cfg-if-missing.diff | 17 | ||||
-rw-r--r-- | games/hatari/hatariui.desktop | 6 | ||||
-rw-r--r-- | games/hatari/manpage.diff | 89 | ||||
-rw-r--r-- | games/hatari/slack-desc | 10 |
6 files changed, 215 insertions, 31 deletions
diff --git a/games/hatari/README b/games/hatari/README index ec9a202d4e13c..e99972b3c9193 100644 --- a/games/hatari/README +++ b/games/hatari/README @@ -1,20 +1,31 @@ -Hatari is an Atari ST and STE emulator for Linux, BSD, BeOS, Mac OS X and -other systems that are supported by the SDL library. The Atari ST was a -16/32 bit computer system which was first released by Atari in 1985. Using -the Motorola 68000 CPU, it was a very popular computer having quite a lot -of CPU power at that time. +hatari (Atari ST/STE/Falcon emulator) + +Hatari is an Atari ST/STE/Falcon emulator for Linux, BSD, BeOS, Mac OS +X and other systems that are supported by the SDL library. The Atari +ST was a 16/32 bit computer system which was first released by Atari +in 1985. Using the Motorola 68000 CPU, it was a very popular computer +having quite a lot of CPU power at that time. Unlike many other Atari ST emulators which try to give you a good environment for running GEM applications, Hatari tries to emulate the -hardware of a ST as close as possible so that it is able to run most +hardware of an ST as close as possible so that it is able to run most of the old ST games and demos. -Recommended dependency: hatari_tos_roms. hatari includes a free -replacement called EmuTOS, but most users will want to install the real -ROM images. Most ST software won't work without hatari_tos_roms. +Optional dependencies: + +hatari_tos_roms - hatari includes a free ROM replacement called EmuTOS, +but most applications (especially games) will require the real ROM images. +*Highly* recommended. + +libcapsimage - Required if you want hatari to support KyroFlux IPF and +CTR disk images. Recommended, but creates non-redistributable package +(mixing GPL and no-commercial-use code). Autodetected. + +portaudio - Only used for emulated Falcon microphone support. Autotetected. -Optional dependency: portaudio. Only used for emulated Falcon microphone -support. Autotetected by the SlackBuild. +portmidi - May offer better MIDI support than the default ALSA raw MIDI +device support. Autodetected. -Optional dependency: SDL2. Autodetected. If you have SDL2 installed but -want to build hatari with SDL-1.2, set SDL2=no in the environment. +SDL2 - Using SDL2 offers some benefits like better fullscreen support +and resizing in windowed mode. Autodetected. If you have SDL2 installed +but want to build hatari with SDL-1.2, export SDL2=no in the environment. diff --git a/games/hatari/hatari.SlackBuild b/games/hatari/hatari.SlackBuild index 87f9dcb703797..35adec40d0ccd 100644 --- a/games/hatari/hatari.SlackBuild +++ b/games/hatari/hatari.SlackBuild @@ -6,6 +6,21 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20200426 bkw: +# - BUILD=2 +# - Include support for IPF and CTR images (copy-protected images), +# with new optional dep libcapsimage. +# - Switch to cmake instead of using fake autotools. +# - Add missing chown/find/chmod after tarball extraction. +# - Doubleplusungood refs unfiles in man pages. +# - Install a couple more doc files in doc dir. +# - Patch hatariui to have it create a default user config file if +# if can't find one, rather than dying. +# - Install utf-8 French man page in correct dir, also convert & install +# a 8859-1 one. +# - Nitpick README and slack-desc. +# - Make cmake find readline, for history/completion in the debugger. + # 20191130 bkw: updated for v2.2.1. # 20180612 bkw: updated for v2.1.0. @@ -44,7 +59,7 @@ PRGNAM=hatari VERSION=${VERSION:-2.2.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -62,12 +77,16 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e @@ -77,9 +96,22 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM-$VERSION - -# configure script is really a wrapper for cmake, doesn't support -# --bindir, --mandir, --docdir. cheat a little. +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ + +# hatariui will fail to start if there's no ~/.config/hatari/hatari.cfg. +# hatari's got a --saveconfig option that creates a default hatari.cfg, +# so let's have hatariui use that instead of failing. +patch -p1 < $CWD/hatariui-create-cfg-if-missing.diff + +# man page hadn't been updated since 2014, it says the config file lives +# in the old ~/.hatari/ location. also fix a few typos and formatting +# issues. +patch -p1 < $CWD/manpage.diff + +# cmake doesn't support anything like --bindir, --mandir, --docdir. cheat +# a little. sed -i \ -e 's,BINDIR *bin,BINDIR games,' \ -e 's,share/man/man1,man/man6,' \ @@ -99,11 +131,33 @@ if pkg-config --exists sdl2 && [ "${SDL2:-yes}" != "no" ]; then SDL2OPT="" WITHSDL=2.0 else - SDL2OPT="--disable-sdl2" + SDL2OPT="-DENABLE_SDL2:BOOL=0" WITHSDL=1.2 fi -./configure $SDL2OPT --prefix=/usr +# stoopid overcomplex SHOUTY cmake stuff... +sed -i 's/ncurses\.h/&;readline.h/' cmake/FindReadline.cmake + +# and libcapsimage 5.1 doesn't support a couple of typedefs that +# existed in 4.2. +sed -i \ + -e '1i#include <stdint.h>' \ + -e 's,CapsLong,int32_t,g' \ + -e 's,CapsULong,uint32_t,g' \ + src/floppy_ipf.c + +# 20200427 bkw: upstream actually runs cmake directly in the source +# dir rather than the "mkdir build; cd build; cmake .." stuff from +# our template. I'm going to do it their way. +cmake \ + -DCMAKE_VERBOSE_MAKEFILE=TRUE \ + $SDL2OPT \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release . # Hard-coded paths for icon symlinks, they end up getting created in the # real /usr, not $PKG/usr. @@ -122,18 +176,24 @@ cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$PRGNAM.SlackBuild cp tools/hmsa/readme-hmsa.txt readme.txt gpl.txt \ doc/changelog.txt doc/coding.txt doc/toc.js \ doc/video-recording.txt doc/fr/clavier-exemple.txt \ + doc/de/*.txt \ $DOCDIR -# The UI has its own docs: +# The UI has its own docs. These are actually used by the UI, so they +# must be available in /usr/share/hatari (hence the symlinks). UIDOCDIR=$DOCDIR/${PRGNAM}ui mkdir -p $UIDOCDIR for i in README TODO release-notes.txt; do ln -s ../../../share/$PRGNAM/${PRGNAM}ui/$i $UIDOCDIR/$i done -# Someone might find the French man page useful: -mkdir -p $PKG/usr/man/fr/man6 -gzip -9c < doc/fr/$PRGNAM.1 > $PKG/usr/man/fr/man6/$PRGNAM.6.gz +# Someone might find the French man page useful. It's in utf-8, so +# put it in the right dir. +mkdir -p $PKG/usr/man/fr.UTF-8/man6 $PKG/usr/man/fr/man6 +gzip -9c < doc/fr/$PRGNAM.1 > $PKG/usr/man/fr.UTF-8/man6/$PRGNAM.6.gz +# For non-UTF-8 users: +iconv --to ISO-8859-1 doc/fr/$PRGNAM.1 | \ + gzip -9c > $PKG/usr/man/fr/man6/$PRGNAM.6.gz # Replace .desktop with modified one, auto-associates ST disks/executables. cat $CWD/${PRGNAM}ui.desktop > $PKG/usr/share/applications/${PRGNAM}ui.desktop @@ -153,8 +213,13 @@ ln -s application-x-st-disk-image.svg \ # Don't symlink emutos to tos here, do it conditionally in doinst.sh. ( cd $PKG/usr/share/$PRGNAM && mv tos.img emutos.img ) +WITHLCAPS=without +ldd $PKG/usr/games/$PRGNAM | grep -q libcapsimage && WITHLCAPS=with + mkdir -p $PKG/install -sed "s,@WITHSDL@,$WITHSDL," $CWD/slack-desc > $PKG/install/slack-desc +sed -e "s,@WITHSDL@,$WITHSDL," \ + -e "s,@WITHLCAPS@,$WITHLCAPS," \ + $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG diff --git a/games/hatari/hatariui-create-cfg-if-missing.diff b/games/hatari/hatariui-create-cfg-if-missing.diff new file mode 100644 index 0000000000000..13637fce44695 --- /dev/null +++ b/games/hatari/hatariui-create-cfg-if-missing.diff @@ -0,0 +1,17 @@ +diff -Naur hatari-2.2.1/python-ui/hatariui hatari-2.2.1.patched/python-ui/hatariui +--- hatari-2.2.1/python-ui/hatariui 2019-02-08 03:30:10.000000000 -0500 ++++ hatari-2.2.1.patched/python-ui/hatariui 2020-04-27 00:47:57.786768381 -0400 +@@ -3,6 +3,13 @@ + # Don't modify the 'path' or 'conf' variable names or initial values, + # those will be replaced by Makefile when this script is installed. + ++# 20200426 bkw: create default config file if missing ++[ -e ~/.config/hatari/hatari.cfg ] || ( ++ mkdir -p ~/.config/hatari/ ++ cd ~/.config/hatari/ ++ hatari --saveconfig ++) ++ + path=${0%/*} + name=${0##*/} + diff --git a/games/hatari/hatariui.desktop b/games/hatari/hatariui.desktop index e28390015875c..b264f4b8919bd 100644 --- a/games/hatari/hatariui.desktop +++ b/games/hatari/hatariui.desktop @@ -2,11 +2,13 @@ Version=1.0 Type=Application Name=Hatari UI +GenericName=Atari ST emulator +Comment=Run old Atari ST/STE/TT/Falcon software Exec=hatariui %f -Icon=hatari-icon +Icon=hatari +MimeType=application/x-st-disk-image;application/x-st-executable;application/vnd.msa-disk-image;application/vnd.fastcopy-disk-image;application/x-stx-disk-image; Categories=Game;Emulator; Actions=Boot; -MimeType=application/x-st-disk-image;application/x-st-executable;application/vnd.msa-disk-image;application/vnd.fastcopy-disk-image;application/x-stx-disk-image; [Desktop Action Boot] Name=Boot diff --git a/games/hatari/manpage.diff b/games/hatari/manpage.diff new file mode 100644 index 0000000000000..82f9ed921a267 --- /dev/null +++ b/games/hatari/manpage.diff @@ -0,0 +1,89 @@ +diff -Naur hatari-2.2.1/doc/hatari.1 hatari-2.2.1.patched/doc/hatari.1 +--- hatari-2.2.1/doc/hatari.1 2019-02-08 03:30:10.000000000 -0500 ++++ hatari-2.2.1.patched/doc/hatari.1 2020-04-26 23:41:11.738132546 -0400 +@@ -2,7 +2,7 @@ + .\" First parameter, NAME, should be all caps + .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection + .\" other parameters are allowed: see man(7), man(1) +-.TH "HATARI" "1" "2014-05-08" "Hatari" "" ++.TH "HATARI" "1" "2020-04-26" "Hatari" "" + .\" Please adjust this date whenever revising the manpage. + + .SH "NAME" +@@ -557,7 +557,7 @@ + .TP + .B \-\-benchmark + Start in benchmark mode (use with --run-vbls). +-This allows to measure the speed of the emulation in frames per second ++This allows measuring the speed of the emulation in frames per second + by running at maximum speed (don't wait for VBL). Disable audio/video + output to have as little OS overhead as possible + +@@ -599,7 +599,9 @@ + will act as + .B Alternate + as well as long as you do not press it together with a Hatari hotkey +-combination. ++combination. Note to US keyboard layout users: if you don't have an ++.B AltGr ++key on your keyboard, use the right Alt key. + .PP + The + .B right Ctrl +@@ -730,33 +732,45 @@ + + .SH "FILES AND DIRECTORIES" + .TP +-/etc/hatari.cfg (or /usr/local/etc/hatari.cfg) ++/etc/hatari.cfg + The global configuration file of Hatari. + .TP +-~/.hatari/ ++~/.config/hatari/ + The (default) directory for user's personal Hatari files; +-.B hatari.cfg ++.RS 2 ++.TP ++hatari.cfg + (configuration file), +-.B hatari.nvram ++.TP ++hatari.nvram + (NVRAM content file), +-.B hatari.sav ++.TP ++hatari.sav + (Hatari memory state snapshot file which Hatari can load/save automatically + when it starts/exits), +-.B hatari.prn ++.TP ++hatari.prn + (printer output file), +-.B hatari.wav ++.TP ++hatari.wav + (recorded sound output in WAV format), +-.B hatari.ym ++.TP ++hatari.ym + (recorded sound output in YM format). ++.RE + .TP +-/usr/share/hatari/ (or /usr/local/share/hatari/) ++/usr/share/hatari/ + The global data directory of Hatari. ++.RS 2 + .TP + tos.img + The TOS ROM image will be loaded from the data directory of Hatari unless it + is specified on the command line or the configuration file. ++.RE + + .SH "AUTHOR" + This manual page was written by Marco Herrn <marco@mherrn.de> for the +-Debian project and later modified by Thomas Huth and Eero Tamminen to +-suit the latest version of Hatari. ++Debian project and later modified by Thomas Huth and Eero Tamminen to suit ++the (then) latest version of Hatari. Later it was modified by B. Watson ++<yalhcru@gmail.com> for the SlackBuilds.org project to suit the latest ++(2.2.1) version of Hatari, and to fix some of the formatting. diff --git a/games/hatari/slack-desc b/games/hatari/slack-desc index 378aaca07ef60..fa776a63b7160 100644 --- a/games/hatari/slack-desc +++ b/games/hatari/slack-desc @@ -6,14 +6,14 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -hatari: hatari (Atari ST and STE Emulator) +hatari: hatari (Atari ST/STE/Falcon) hatari: -hatari: Hatari is an Atari ST and STE emulator for Linux and other systems +hatari: Hatari is an Atari ST/STE/Falcon emulator for Linux and other systems hatari: that are supported by the SDL library. The Atari ST was a 16/32 bit hatari: computer system which was first released by Atari in 1985. hatari: -hatari: Hatari tries to emulate the hardware of a ST as close as possible so +hatari: Hatari tries to emulate the hardware of an ST as close as possible so hatari: that it is able to run most of the old ST games and demos. hatari: -hatari: This package was built with SDL-@WITHSDL@ support. -hatari: +hatari: This package was built with SDL-@WITHSDL@ support, and +hatari: @WITHLCAPS@ libcapsimage support. |