From bf998447e6c92b85ff7a17f036c344476843c28e Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 2 Nov 2021 03:47:11 -0400 Subject: games/o2em: Fix -current build. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- games/o2em/README | 5 ++ games/o2em/doinst.sh | 1 - games/o2em/o2em.1 | 207 --------------------------------------------- games/o2em/o2em.6 | 207 +++++++++++++++++++++++++++++++++++++++++++++ games/o2em/o2em.SlackBuild | 53 +++++++----- games/o2em/o2em.info | 2 +- games/o2em/o2em.sh | 2 +- games/o2em/slack-desc | 2 +- 8 files changed, 245 insertions(+), 234 deletions(-) delete mode 100644 games/o2em/o2em.1 create mode 100644 games/o2em/o2em.6 (limited to 'games') diff --git a/games/o2em/README b/games/o2em/README index 43d8cd8449..557e53f20a 100644 --- a/games/o2em/README +++ b/games/o2em/README @@ -1,3 +1,5 @@ +o2em (Magnavox Odyssey II/VideoPac+ emulator) + o2em is an emulator for the Magnavox Odyssey II and VideoPac+ systems. The Odyssey2 BIOS ROM image is required for emulation. To include it in @@ -6,3 +8,6 @@ image itself, called either o2rom.bin or o2bios.rom, and place it in the build directory before running the SlackBuild. The ROM will be installed in /usr/share/o2em/bios/o2rom.bin; if you build the package without the ROM, just place a copy of the ROM there after installing the package. + +Note to desktop users: o2em is a command-line X program and must be +run from an X terminal. It won't appear in your applications menu. diff --git a/games/o2em/doinst.sh b/games/o2em/doinst.sh index 19400050fd..4110f5514d 100644 --- a/games/o2em/doinst.sh +++ b/games/o2em/doinst.sh @@ -3,4 +3,3 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 fi fi - diff --git a/games/o2em/o2em.1 b/games/o2em/o2em.1 deleted file mode 100644 index f065163635..0000000000 --- a/games/o2em/o2em.1 +++ /dev/null @@ -1,207 +0,0 @@ -.TH O2EM "1" "January 2011" "SlackBuilds.org" "User Commands" -.SH NAME -o2em \- Emulator for Odyssey II and VideoPac+ systems -.SH SYNOPSIS -.B o2em -<\fIfile\fR> -[\fI-options\fR] -.SH DESCRIPTION -O2EM is an open source Odyssey2 / Videopac console emulator. -.SH OPTIONS -.TP -\fBfile\fR -Cartridge ROM image. -.br -\fINOTE:\fR Unlike most programs, o2em requires the file argument -first, before any options. -.TP -\fB\-help\fR -Help display -.TP -\fB\-wsize\fR=n -Window size (1\-4) -.TP -\fB\-fullscreen\fR -Full screen mode -.TP -\fB\-help\fR -Show help -.TP -\fB\-scanlines\fR -Enable scanlines -.TP -\fB\-nosound\fR -Turn off sound emulation -.TP -\fB\-novoice\fR -Turn off voice emulation -.TP -\fB\-svolume\fR=n -Set sound volume (0\-100) -.TP -\fB\-vvolume\fR=n -Set voice volume (0\-100) -.TP -\fB\-filter\fR -Enable low-pass audio filter -.TP -\fB\-debug\fR -Start the emulator in -debug mode -.TP -\fB\-speed\fR=n -Relative speed -(100 = original) -.TP -\fB\-nolimit\fR -Turn off speed limiter -.TP -\fB\-bios\fR=file -Set the O2 bios file name/dir -.TP -\fB\-biosdir\fR=path -Set the O2 bios path -(default= bios/) -.TP -\fB\-romdir\fR=path -Set the O2 roms Path -(default= roms/) -.TP -\fB\-scshot\fR=file -Set the screenshot file -name/template -.TP -\fB\-euro\fR -Use European timing / -50Hz mode -.TP -\fB\-exrom\fR -Use special 3K program/ -1K data ROM mode -Use 3K rom mapping mode -.TP -\fB\-s\fR=mode/keys -Define stick n mode/keys (n=1\-2, see \fBo2em.txt\fR) -.TP -\fB\-c52\fR -Start the emulator with -french Odyssey 2 BIOS -.TP -\fB\-g7400\fR -Start the emulator -with VP+ BIOS -.TP -\fB\-jopac\fR -Start the emulator with -french VP+ bios -.TP -\fB\-scoretype\fR=m -Set Scoretype to m (see \fBo2em.txt\fR) -.TP -\fB\-scoreadr\fR=n -Set Scoreaddress to n -(decimal value) -.TP -\fB\-scorefile\fR=file -Set Output-Scorefile to -file (highscore.txt) -.TP -\fB\-score\fR=n -Set Highscore to n -.TP -\fB\-savefile\fR=file -Load/Save State -from/to file -.SH KEY BINDINGS -These are the default key bindings, and can be changed -on the command line or in the config file. -.TP -\fBArrow keys + L\fR -Default joystick 1 emulation -.TP -\fBW,D,S,A + Space\fR -Default joystick 2 emulation -.TP -\fBESC or F12\fR -Leave the emulator -.TP -\fBF1\fR -Pause/Information -.TP -\fBF2\fR -Save State\-File -.TP -\fBF3\fR -Load State\-File -.TP -\fBF4\fR -Enter debugger -.TP -\fBF5\fR -Reset emulator (same as pressing the reset on the O2 keyboard) -.TP -\fBF6\fR -Inject Highscore -.TP -\fBF8\fR -Make a screen shot -.TP -\fBCaps Lock\fR -Enables/Disables the O2 keyboard input of the keys used by -joystick emulation -.SH FILES -.TP -\fB/usr/bin/o2em\fR -Shell script wrapper. Sets up ~/.o2em if needed, runs the actual -binary. This is required because o2em was ported from DOS, and -expects to be run in its own directory; with the wrapper, it -behaves like a proper UNIX program (run anywhere, writes only -to ~/.o2em). -.TP -\fB/usr/libexec/o2em.bin\fR -The actual o2em binary. Normally, you don't want to run this -directly (let the wrapper run it for you). -.TP -\fB/usr/share/o2em/bios\fR -BIOS ROM images. At minimum, \fBo2rom.bin\fR must exist. To use the -\fB\-c52\fR, -\fB\-jopac\fR, or -\fB\-g7400\fR -options, the appropriate BIOS image must be located here (see below). -The emulator checks the CRC of the ROM images, -and will refuse to start with an image it doesn't recognize. The correct -files are: -.PP -c52.bin (md5sum f1071cdb0b6b10dde94d3bc8a6146387) -.br -g7400.bin (md5sum c500ff71236068e0dc0d0603d265ae76) -.br -jopac.bin (md5sum 279008e4a0db2dc5f1c048853b033828) -.br -o2rom.bin (md5sum 562d5ebf9e030a40d6fabfc2f33139fd) -.PP -These are the same files used by MESS, except o2rom.bin is called -o2bios.rom by MESS. -.TP -\fB/usr/share/o2em/voice\fR -Voice samples, used to emulate the Odyssey2's speech synthesis chip. -.TP -\fB~/.o2em/\fR -Working directory for o2em. Will be created by shell script wrapper -the first time it's run. All save\-state and screenshot files will be -written here. The BIOS image, cartridge images, and voice samples will -be symlinked into this directory by the wrapper script. -.TP -\fB~/.o2em/o2em_def.cfg\fR -Config file (optional). See o2em.txt for details. -.TP -\fB/usr/doc/o2em\-\fR\fI$VERSION\fR\fB/o2em.txt\fR -Full documentation for o2em. -.SH AUTHORS -o2em was originally created by Daniel Boris, and has been developed by -Andre de la Rocha since version 0.80 and Arlindo M. de Oliveira since version 1.16. -.PP -This manual page was written by B. Watson for the SlackBuilds.org project (but -may be used by anyone for any reason). -.PP -Wrapper script also by B. Watson. diff --git a/games/o2em/o2em.6 b/games/o2em/o2em.6 new file mode 100644 index 0000000000..6de8e2c234 --- /dev/null +++ b/games/o2em/o2em.6 @@ -0,0 +1,207 @@ +.TH O2EM "6" "Nov 2021" "1.18" "SlackBuilds.org" +.SH NAME +o2em \- Emulator for Odyssey II and VideoPac+ systems +.SH SYNOPSIS +.B o2em +<\fIfile\fR> +[\fI-options\fR] +.SH DESCRIPTION +O2EM is an open source Odyssey2 / Videopac console emulator. +.SH OPTIONS +.TP +\fBfile\fR +Cartridge ROM image. +.br +\fINOTE:\fR Unlike most programs, o2em requires the file argument +first, before any options. +.TP +\fB\-help\fR +Help display +.TP +\fB\-wsize\fR=n +Window size (1\-4) +.TP +\fB\-fullscreen\fR +Full screen mode +.TP +\fB\-help\fR +Show help +.TP +\fB\-scanlines\fR +Enable scanlines +.TP +\fB\-nosound\fR +Turn off sound emulation +.TP +\fB\-novoice\fR +Turn off voice emulation +.TP +\fB\-svolume\fR=n +Set sound volume (0\-100) +.TP +\fB\-vvolume\fR=n +Set voice volume (0\-100) +.TP +\fB\-filter\fR +Enable low-pass audio filter +.TP +\fB\-debug\fR +Start the emulator in +debug mode +.TP +\fB\-speed\fR=n +Relative speed +(100 = original) +.TP +\fB\-nolimit\fR +Turn off speed limiter +.TP +\fB\-bios\fR=file +Set the O2 bios file name/dir +.TP +\fB\-biosdir\fR=path +Set the O2 bios path +(default= bios/) +.TP +\fB\-romdir\fR=path +Set the O2 roms Path +(default= roms/) +.TP +\fB\-scshot\fR=file +Set the screenshot file +name/template +.TP +\fB\-euro\fR +Use European timing / +50Hz mode +.TP +\fB\-exrom\fR +Use special 3K program/ +1K data ROM mode +Use 3K rom mapping mode +.TP +\fB\-s\fR=mode/keys +Define stick n mode/keys (n=1\-2, see \fBo2em.txt\fR) +.TP +\fB\-c52\fR +Start the emulator with +french Odyssey 2 BIOS +.TP +\fB\-g7400\fR +Start the emulator +with VP+ BIOS +.TP +\fB\-jopac\fR +Start the emulator with +french VP+ bios +.TP +\fB\-scoretype\fR=m +Set Scoretype to m (see \fBo2em.txt\fR) +.TP +\fB\-scoreadr\fR=n +Set Scoreaddress to n +(decimal value) +.TP +\fB\-scorefile\fR=file +Set Output-Scorefile to +file (highscore.txt) +.TP +\fB\-score\fR=n +Set Highscore to n +.TP +\fB\-savefile\fR=file +Load/Save State +from/to file +.SH KEY BINDINGS +These are the default key bindings, and can be changed +on the command line or in the config file. +.TP +\fBArrow keys + L\fR +Default joystick 1 emulation +.TP +\fBW,D,S,A + Space\fR +Default joystick 2 emulation +.TP +\fBESC or F12\fR +Leave the emulator +.TP +\fBF1\fR +Pause/Information +.TP +\fBF2\fR +Save State\-File +.TP +\fBF3\fR +Load State\-File +.TP +\fBF4\fR +Enter debugger +.TP +\fBF5\fR +Reset emulator (same as pressing the reset on the O2 keyboard) +.TP +\fBF6\fR +Inject Highscore +.TP +\fBF8\fR +Make a screen shot +.TP +\fBCaps Lock\fR +Enables/Disables the O2 keyboard input of the keys used by +joystick emulation +.SH FILES +.TP +\fB/usr/games/o2em\fR +Shell script wrapper. Sets up ~/.o2em if needed, runs the actual +binary. This is required because o2em was ported from DOS, and +expects to be run in its own directory; with the wrapper, it +behaves like a proper UNIX program (run anywhere, writes only +to ~/.o2em). +.TP +\fB/usr/libexec/o2em.bin\fR +The actual o2em binary. Normally, you don't want to run this +directly (let the wrapper run it for you). +.TP +\fB/usr/share/games/o2em/bios\fR +BIOS ROM images. At minimum, \fBo2rom.bin\fR must exist. To use the +\fB\-c52\fR, +\fB\-jopac\fR, or +\fB\-g7400\fR +options, the appropriate BIOS image must be located here (see below). +The emulator checks the CRC of the ROM images, +and will refuse to start with an image it doesn't recognize. The correct +files are: +.PP +c52.bin (md5sum f1071cdb0b6b10dde94d3bc8a6146387) +.br +g7400.bin (md5sum c500ff71236068e0dc0d0603d265ae76) +.br +jopac.bin (md5sum 279008e4a0db2dc5f1c048853b033828) +.br +o2rom.bin (md5sum 562d5ebf9e030a40d6fabfc2f33139fd) +.PP +These are the same files used by MESS, except o2rom.bin is called +o2bios.rom by MESS. +.TP +\fB/usr/share/games/o2em/voice\fR +Voice samples, used to emulate the Odyssey2's speech synthesis chip. +.TP +\fB~/.o2em/\fR +Working directory for o2em. Will be created by shell script wrapper +the first time it's run. All save\-state and screenshot files will be +written here. The BIOS image, cartridge images, and voice samples will +be symlinked into this directory by the wrapper script. +.TP +\fB~/.o2em/o2em_def.cfg\fR +Config file (optional). See o2em.txt for details. +.TP +\fB/usr/doc/o2em\-\fR\fI$VERSION\fR\fB/o2em.txt\fR +Full documentation for o2em. +.SH AUTHORS +o2em was originally created by Daniel Boris, and has been developed by +Andre de la Rocha since version 0.80 and Arlindo M. de Oliveira since version 1.16. +.PP +This manual page was written by B. Watson for the SlackBuilds.org project (but +may be used by anyone for any reason). +.PP +Wrapper script also by B. Watson. diff --git a/games/o2em/o2em.SlackBuild b/games/o2em/o2em.SlackBuild index 896b9b60c0..3beb1561ee 100644 --- a/games/o2em/o2em.SlackBuild +++ b/games/o2em/o2em.SlackBuild @@ -6,11 +6,18 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20211102 bkw: BUILD=2 +# - fix -current build. +# - binaries in /usr/games. +# - man page in section 6. +# - /usr/share/o2em => /usr/share/games/o2em. +# - convert docs to utf-8. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=o2em VERSION=${VERSION:-1.18} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} 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 @@ -55,11 +59,8 @@ rm -rf $SRC unzip -L $CWD/$SRC.zip cd $SRC 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 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ # Patch does this: # make makefile.linux use allegro-config to find cflags/libs for allegro @@ -71,26 +72,26 @@ patch -p1 < $CWD/compile_fix.diff patch -p1 < $CWD/wordsize.diff cd src -make -f makefile.linux SLKCFLAGS="$SLKCFLAGS" +make -f makefile.linux SLKCFLAGS="$SLKCFLAGS -fcommon" -mkdir -p $PKG/usr/bin $PKG/usr/libexec $PKG/usr/share/pixmaps -install -s -m0755 -oroot -groot dis48 $PKG/usr/bin +mkdir -p $PKG/usr/games $PKG/usr/libexec \ + $PKG/usr/share/pixmaps $PKG/usr/share/icons/hicolor/64x64/apps +install -s -m0755 -oroot -groot dis48 $PKG/usr/games install -s -m0755 -oroot -groot $PRGNAM $PKG/usr/libexec/$PRGNAM.bin -install -m0755 -oroot -groot $CWD/$PRGNAM.sh $PKG/usr/bin/$PRGNAM -install -m0644 -oroot -groot $PRGNAM.png $PKG/usr/share/pixmaps +install -m0755 -oroot -groot $CWD/$PRGNAM.sh $PKG/usr/games/$PRGNAM +install -m0644 -oroot -groot $PRGNAM.png $PKG/usr/share/icons/hicolor/64x64/apps +ln -s ../icons/hicolor/64x64/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png # There is no .desktop file because the emulator lacks a UI (if we # launch it from the K menu, it prints an error on stdout and exits), # and because ".bin" isn't much of a MIME type so we can't really # do association (there's no magic header for the ROMs either). -mkdir -p $PKG/usr/man/man1 -gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz +mkdir -p $PKG/usr/man/man6 +gzip -9c < $CWD/$PRGNAM.6 > $PKG/usr/man/man6/$PRGNAM.6.gz -mkdir -p $PKG/usr/share/$PRGNAM/{bios,voice} -if [ -e "$CWD/o2mainsamp.zip" ]; then - unzip -L $CWD/o2mainsamp.zip -d $PKG/usr/share/$PRGNAM/voice -fi +mkdir -p $PKG/usr/share/games/$PRGNAM/{bios,voice} +unzip -L $CWD/o2mainsamp.zip -d $PKG/usr/share/games/$PRGNAM/voice if [ -e $CWD/odyssey2.zip ]; then unzip $CWD/odyssey2.zip @@ -102,18 +103,24 @@ elif [ -e $CWD/o2rom.bin ]; then fi if [ -n "$ROMFILE" ]; then - cat $ROMFILE > $PKG/usr/share/$PRGNAM/bios/o2rom.bin + cat $ROMFILE > $PKG/usr/share/games/$PRGNAM/bios/o2rom.bin + INCROM="includes" +else + INCROM="does NOT include" fi mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cd ../docs for file in *; do - sed 's/\r//g' < $file > $PKG/usr/doc/$PRGNAM-$VERSION/$file + sed 's/\r//g' < $file \ + | iconv -f iso-8859-1 -t utf-8 \ + > $PKG/usr/doc/$PRGNAM-$VERSION/$file done cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +sed -e "s,@INCROM@,$INCROM," \ + $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG diff --git a/games/o2em/o2em.info b/games/o2em/o2em.info index b666a22e2e..c10553324d 100644 --- a/games/o2em/o2em.info +++ b/games/o2em/o2em.info @@ -1,7 +1,7 @@ PRGNAM="o2em" VERSION="1.18" HOMEPAGE="http://o2em.sourceforge.net/" -DOWNLOAD="http://downloads.sourceforge.net/project/o2em/o2em/1.18/o2em118src.zip \ +DOWNLOAD="https://downloads.sourceforge.net/project/o2em/o2em/1.18/o2em118src.zip \ http://o2em.sourceforge.net/files/o2mainsamp.zip" MD5SUM="be96af886370df337fe8584827717627 \ 9910ecb7d87fcd5696dd4dd00c792e33" diff --git a/games/o2em/o2em.sh b/games/o2em/o2em.sh index 5c0d75163c..7c42edf03e 100644 --- a/games/o2em/o2em.sh +++ b/games/o2em/o2em.sh @@ -12,7 +12,7 @@ # source, but we want to avoid massive amounts of patching. EXE=/usr/libexec/o2em.bin -SHAREDIR=/usr/share/o2em +SHAREDIR=/usr/share/games/o2em DIR=~/.o2em if [ ! -d $DIR ]; then diff --git a/games/o2em/slack-desc b/games/o2em/slack-desc index 9a413ec45d..ce93fb7947 100644 --- a/games/o2em/slack-desc +++ b/games/o2em/slack-desc @@ -10,7 +10,7 @@ o2em: o2em (Magnavox Odyssey II/VideoPac+ emulator) o2em: o2em: o2em is an emulator for the Magnavox Odyssey II and VideoPac+ systems. o2em: -o2em: +o2em: This package @INCROM@ the system ROM image. o2em: o2em: o2em: -- cgit v1.2.3