aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2023-04-18 15:47:08 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-22 11:38:36 +0700
commit77bc44d36d3a80e856089a0caaeb93e7a6d7e2e9 (patch)
tree0ed0f005076973a3a6db0dc7887158ee681c034e /system
parent48bd8b0010b1bd4a522c94ec774538b3bf89ce82 (diff)
system/xtrs: New maintainer, many changes.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/xtrs/README18
-rw-r--r--system/xtrs/default_rom_dir.patch16
-rw-r--r--system/xtrs/doinst.sh5
-rw-r--r--system/xtrs/icons/128.pngbin0 -> 45783 bytes
-rw-r--r--system/xtrs/icons/16.pngbin0 -> 18101 bytes
-rw-r--r--system/xtrs/icons/22.pngbin0 -> 18526 bytes
-rw-r--r--system/xtrs/icons/32.pngbin0 -> 19941 bytes
-rw-r--r--system/xtrs/icons/48.pngbin0 -> 22739 bytes
-rw-r--r--system/xtrs/icons/64.pngbin0 -> 26198 bytes
-rw-r--r--system/xtrs/sbo.diff108
-rw-r--r--system/xtrs/slack-desc4
-rw-r--r--system/xtrs/xtrs-ico.pngbin362 -> 0 bytes
-rw-r--r--system/xtrs/xtrs.SlackBuild102
-rw-r--r--system/xtrs/xtrs.desktop8
-rw-r--r--system/xtrs/xtrs.info6
15 files changed, 186 insertions, 81 deletions
diff --git a/system/xtrs/README b/system/xtrs/README
index 90666ff79bba0..b5ae112c6d6c2 100644
--- a/system/xtrs/README
+++ b/system/xtrs/README
@@ -1,16 +1,14 @@
+xtrs (TRS-80 Model I/III/4/4P Emulator for Unix)
+
xtrs is a Radio Shack TRS-80 Model I/III/4/4P emulator for Unix and
the X Window system. It includes lower case, the real time clock,
-hi-res graphics, serial port, parallel printer, mouse, cassette,
-sound and music output (requires OSS), 5" and 8" floppy disk drives in
-single and double density, and even hard disk drives.
-
-To run xtrs, you will need a 'romfile' with the contents of the
-original ROM of the model you want to emulate. Since these are
-copyrighted, they are not included in this package. However, do not
-despair! The xtrs page explains how to obtain a legal copy of the
-MODELA/III file that can be used. These or other ROM images should be
-copied to the /usr/share/xtrs directory.
+hi-res graphics, serial port, parallel printer, mouse, cassette, sound
+and music output, 5" and 8" floppy disk drives in single and double
+density, and even hard disk drives.
A simple xtrs.desktop file is included that will start xtrs with the
default options. Read the included 'xtrs' man page after installation
for more information and command-line options.
+
+Note for first-time users: press F8 to exit xtrs. The regular
+window-close button is non-functional.
diff --git a/system/xtrs/default_rom_dir.patch b/system/xtrs/default_rom_dir.patch
deleted file mode 100644
index 4fa57f673e03b..0000000000000
--- a/system/xtrs/default_rom_dir.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -Nur xtrs-4.9d.orig/Makefile.local xtrs-4.9d/Makefile.local
---- xtrs-4.9d.orig/Makefile.local 2009-06-15 18:32:57.000000000 -0500
-+++ xtrs-4.9d/Makefile.local 2009-09-26 16:29:19.371490363 -0500
-@@ -36,9 +36,9 @@
- # time, use these lines (with the appropriate file names). The default file
- # name is ignored and can be omitted if the ROM for that model is built in.
-
--DEFAULT_ROM = -DDEFAULT_ROM='"/usr/local/lib/xtrs/level2rom.hex"' \
-- -DDEFAULT_ROM3='"/usr/local/lib/xtrs/romimage.m3"' \
-- -DDEFAULT_ROM4P='"/usr/local/lib/xtrs/romimage.m4p"'
-+DEFAULT_ROM = -DDEFAULT_ROM='"/usr/share/xtrs/level2rom.hex"' \
-+ -DDEFAULT_ROM3='"/usr/share/xtrs/romimage.m3"' \
-+ -DDEFAULT_ROM4P='"/usr/share/xtrs/romimage.m4p"'
-
- # If you would like to change where xtrs looks for disk?-? files, edit
- # this line. "." of course means the current working directory.
diff --git a/system/xtrs/doinst.sh b/system/xtrs/doinst.sh
index 4e8ba7071dea7..3e5691a052b5b 100644
--- a/system/xtrs/doinst.sh
+++ b/system/xtrs/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/system/xtrs/icons/128.png b/system/xtrs/icons/128.png
new file mode 100644
index 0000000000000..8b4230a6fa5fa
--- /dev/null
+++ b/system/xtrs/icons/128.png
Binary files differ
diff --git a/system/xtrs/icons/16.png b/system/xtrs/icons/16.png
new file mode 100644
index 0000000000000..e59155b14721b
--- /dev/null
+++ b/system/xtrs/icons/16.png
Binary files differ
diff --git a/system/xtrs/icons/22.png b/system/xtrs/icons/22.png
new file mode 100644
index 0000000000000..b8c13c85262da
--- /dev/null
+++ b/system/xtrs/icons/22.png
Binary files differ
diff --git a/system/xtrs/icons/32.png b/system/xtrs/icons/32.png
new file mode 100644
index 0000000000000..ed8dccec88bf9
--- /dev/null
+++ b/system/xtrs/icons/32.png
Binary files differ
diff --git a/system/xtrs/icons/48.png b/system/xtrs/icons/48.png
new file mode 100644
index 0000000000000..a810d34f01e74
--- /dev/null
+++ b/system/xtrs/icons/48.png
Binary files differ
diff --git a/system/xtrs/icons/64.png b/system/xtrs/icons/64.png
new file mode 100644
index 0000000000000..80947c645e57a
--- /dev/null
+++ b/system/xtrs/icons/64.png
Binary files differ
diff --git a/system/xtrs/sbo.diff b/system/xtrs/sbo.diff
new file mode 100644
index 0000000000000..be2ad80e0df9c
--- /dev/null
+++ b/system/xtrs/sbo.diff
@@ -0,0 +1,108 @@
+diff -Naur xtrs-4.9d/Makefile xtrs-4.9d.patched/Makefile
+--- xtrs-4.9d/Makefile 2009-06-15 19:35:20.000000000 -0400
++++ xtrs-4.9d.patched/Makefile 2023-04-18 04:57:54.855888189 -0400
+@@ -205,14 +205,15 @@
+ install: install-progs install-man
+
+ install-progs: $(PROGS)
+- $(INSTALL) -c -m 755 $(PROGS) $(BINDIR)
++ $(INSTALL) -s -c -m 755 $(PROGS) $(BINDIR)
++ $(INSTALL) -c -m 755 cassette.sh $(BINDIR)/cassette
+
+ install-man: $(MANPAGES)
+- $(INSTALL) -c -m 644 xtrs.man $(MANDIR)/man1/xtrs.1
+- $(INSTALL) -c -m 644 cassette.man $(MANDIR)/man1/cassette.1
+- $(INSTALL) -c -m 644 mkdisk.man $(MANDIR)/man1/mkdisk.1
+- $(INSTALL) -c -m 644 cmddump.man $(MANDIR)/man1/cmddump.1
+- $(INSTALL) -c -m 644 hex2cmd.man $(MANDIR)/man1/hex2cmd.1
++ $(INSTALL) -c -m 644 xtrs.man $(MANDIR)/man6/xtrs.6
++ $(INSTALL) -c -m 644 cassette.man $(MANDIR)/man6/cassette.6
++ $(INSTALL) -c -m 644 mkdisk.man $(MANDIR)/man6/mkdisk.6
++ $(INSTALL) -c -m 644 cmddump.man $(MANDIR)/man6/cmddump.6
++ $(INSTALL) -c -m 644 hex2cmd.man $(MANDIR)/man6/hex2cmd.6
+
+ depend:
+ makedepend -- $(CFLAGS) -- $(SOURCES)
+diff -Naur xtrs-4.9d/Makefile.local xtrs-4.9d.patched/Makefile.local
+--- xtrs-4.9d/Makefile.local 2009-06-15 19:32:57.000000000 -0400
++++ xtrs-4.9d.patched/Makefile.local 2023-04-18 04:54:34.470907048 -0400
+@@ -36,9 +36,9 @@
+ # time, use these lines (with the appropriate file names). The default file
+ # name is ignored and can be omitted if the ROM for that model is built in.
+
+-DEFAULT_ROM = -DDEFAULT_ROM='"/usr/local/lib/xtrs/level2rom.hex"' \
+- -DDEFAULT_ROM3='"/usr/local/lib/xtrs/romimage.m3"' \
+- -DDEFAULT_ROM4P='"/usr/local/lib/xtrs/romimage.m4p"'
++DEFAULT_ROM = -DDEFAULT_ROM='"/usr/share/trs80-roms/level2.rom"' \
++ -DDEFAULT_ROM3='"/usr/share/trs80-roms/model3.rom"' \
++ -DDEFAULT_ROM4P='"/usr/share/trs80-roms/model4p.rom"'
+
+ # If you would like to change where xtrs looks for disk?-? files, edit
+ # this line. "." of course means the current working directory.
+@@ -85,17 +85,17 @@
+ # If you want xtrs to look for a global app-defaults file
+ # at runtime in $APPDEFAULTS/Xtrs:
+
+-APPDEFAULTS = -DAPPDEFAULTS='"/usr/X11/lib/X11/app-defaults"'
++APPDEFAULTS = -DAPPDEFAULTS='"/etc/X11/app-defaults"'
+
+ # prefix directory
+
+-PREFIX=/usr/local
++PREFIX=/usr
+ #If included in distribution: PREFIX=/usr
+
+ # Set these to where you want installed stuff to go, if you install them.
+
+-BINDIR = $(PREFIX)/bin
+-MANDIR = $(PREFIX)/share/man
++BINDIR = $(PREFIX)/games
++MANDIR = $(PREFIX)/man
+
+ # Change this if you have a BSD-compatible install program that is
+ # not the first program named "install" on your $PATH
+diff -Naur xtrs-4.9d/cassette.man xtrs-4.9d.patched/cassette.man
+--- xtrs-4.9d/cassette.man 2008-06-26 00:40:04.000000000 -0400
++++ xtrs-4.9d.patched/cassette.man 2023-04-18 04:59:28.921879337 -0400
+@@ -1,4 +1,4 @@
+-.TH cassette 1
++.TH cassette 6
+ .SH Name
+ cassette \- data cassette image manipulator for xtrs TRS-80 emulator
+ .SH Syntax
+diff -Naur xtrs-4.9d/cmddump.man xtrs-4.9d.patched/cmddump.man
+--- xtrs-4.9d/cmddump.man 2008-06-26 00:40:07.000000000 -0400
++++ xtrs-4.9d.patched/cmddump.man 2023-04-18 04:59:35.808878689 -0400
+@@ -1,4 +1,4 @@
+-.TH cmddump 1 2001-02-22
++.TH cmddump 6 2001-02-22
+ .SH Name
+ cmddump \- simulated TRS-80 CMD file loader
+ .SH Syntax
+diff -Naur xtrs-4.9d/hex2cmd.man xtrs-4.9d.patched/hex2cmd.man
+--- xtrs-4.9d/hex2cmd.man 2008-06-26 00:40:09.000000000 -0400
++++ xtrs-4.9d.patched/hex2cmd.man 2023-04-18 04:59:42.338878074 -0400
+@@ -1,4 +1,4 @@
+-.TH hex2cmd 1
++.TH hex2cmd 6
+ .SH Name
+ hex2cmd \- convert Intel hex format to TRS-80 CMD format
+ .SH Syntax
+diff -Naur xtrs-4.9d/mkdisk.man xtrs-4.9d.patched/mkdisk.man
+--- xtrs-4.9d/mkdisk.man 2008-06-26 00:40:12.000000000 -0400
++++ xtrs-4.9d.patched/mkdisk.man 2023-04-18 04:59:52.715877098 -0400
+@@ -1,4 +1,4 @@
+-.TH mkdisk 1
++.TH mkdisk 6
+ .SH Name
+ mkdisk \- Make a blank emulated floppy or hard disk for xtrs,
+ or add/remove an emulated write protect tab
+diff -Naur xtrs-4.9d/xtrs.man xtrs-4.9d.patched/xtrs.man
+--- xtrs-4.9d/xtrs.man 2009-06-15 19:44:45.000000000 -0400
++++ xtrs-4.9d.patched/xtrs.man 2023-04-18 04:59:58.745876530 -0400
+@@ -1,4 +1,4 @@
+-.TH xtrs 1
++.TH xtrs 6
+ .SH Name
+ xtrs \- TRS-80 Model I/III/4/4P emulator for the X Window System
+ .SH Syntax
diff --git a/system/xtrs/slack-desc b/system/xtrs/slack-desc
index 327ceffb328c4..19d41a5d074bd 100644
--- a/system/xtrs/slack-desc
+++ b/system/xtrs/slack-desc
@@ -11,8 +11,8 @@ xtrs:
xtrs: xtrs is a Radio Shack TRS-80 Model I/III/4/4P emulator for Unix and
xtrs: the X Window system. It includes lower case, the real time clock, hi-
xtrs: res graphics, serial port, parallel printer, mouse, cassette, sound
-xtrs: and music output (requires OSS), 5" and 8" floppy disk drives in
-xtrs: single and double density, and even hard disk drives.
+xtrs: and music output, 5" and 8" floppy disk drives in single and double
+xtrs: density, and even hard disk drives.
xtrs:
xtrs: http://www.tim-mann.org/xtrs.html
xtrs:
diff --git a/system/xtrs/xtrs-ico.png b/system/xtrs/xtrs-ico.png
deleted file mode 100644
index 6f28450c5237a..0000000000000
--- a/system/xtrs/xtrs-ico.png
+++ /dev/null
Binary files differ
diff --git a/system/xtrs/xtrs.SlackBuild b/system/xtrs/xtrs.SlackBuild
index 822025dee82f2..fc6a154f337d3 100644
--- a/system/xtrs/xtrs.SlackBuild
+++ b/system/xtrs/xtrs.SlackBuild
@@ -2,14 +2,26 @@
# Slackware build script for xtrs - the X Windows TRS-80 emulator
-# Written by Niels Horn <niels.horn@gmail.com>
-# revision date 2010/07/17
+# Originally written by Niels Horn <email removed>.
+# Highly modified and now maintained by B. Watson <urchlay@slackware.uk>.
+# There was no license on the original version. Modified version is
+# licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20230418 bkw: BUILD=3
+# - new maintainer.
+# - use ROMs from trs80-roms package by default.
+# - binaries in /usr/games; man pages in section 6.
+# - replace old 32x21 icon.
+# - remove ROMs from package (they live in trs80-roms now).
+# - include all the trs-80 native stuff in the doc dir, like
+# sdltrs does. basically it's the same stuff, too.
+# - link with libaoss, to get audio working.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=xtrs
VERSION=${VERSION:-4.9d}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -21,9 +33,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
@@ -35,16 +44,12 @@ 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
@@ -56,44 +61,49 @@ cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
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 {} \;
-
-# Make /usr/share/xtrs the default rom directory
-patch -p1 < $CWD/default_rom_dir.patch
-
-# xtrs does not have a ./configure
-make \
- DEBUG="$SLKCFLAGS" \
- PREFIX=/usr \
- MANDIR=/usr/man \
- APPDEFAULTS='-DAPPDEFAULTS=\"/etc/X11/app-defaults\"'
-
-mkdir -p $PKG/usr/bin $PKG/usr/man/man1
-make BINDIR=$PKG/usr/bin MANDIR=$PKG/usr/man install
-
-# Make a directory for the ROMs (not included), include fakerom.hex & xtrsrom4p.hex
-mkdir -p $PKG/usr/share/xtrs
-cp -a fakerom.hex xtrsrom4p.hex $PKG/usr/share/xtrs
-
-# Copy icon & desktop file to package
-mkdir -p $PKG/usr/share/{applications,pixmaps}
+# upstream permissions are wonky, do not revert to template.
+find . -type f -a -exec chmod 644 {} + -o \
+ -type d -a -exec chmod 755 {} +
+
+# 20230418 bkw: patch does all this:
+# - use system-wide ROMs from trs80-roms package.
+# - install binaries to /usr/games and man pages to section 6.
+# - strip binaries.
+# - use correct app-defaults dir.
+patch -p1 < $CWD/sbo.diff
+
+# 20230418 bkw: the -laoss here allows xtrs to make sound via ALSA
+# or PulseAudio (via /etc/asound.conf).
+make DEBUG="$SLKCFLAGS" EXTRALIBS="-laoss"
+mkdir -p $PKG/usr/games $PKG/usr/man/man6
+make BINDIR=$PKG/usr/games MANDIR=$PKG/usr/man install
+
+gzip -9 $PKG/usr/man/man*/*
+
+# 20230418 bkw: made this icon by combining the sdltrs icon
+# and the X logo (tinted red). not beautiful, but distinctive.
+for i in $CWD/icons/*.png; do
+ px="$( basename $i .png )"
+ 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
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+
+mkdir -p $PKG/usr/share/applications
cat $CWD/xtrs.desktop > $PKG/usr/share/applications/xtrs.desktop
-cp $CWD/xtrs-ico.png $PKG/usr/share/pixmaps
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a ChangeLog README xtrsrom4p.README $PKG/usr/doc/$PRGNAM-$VERSION
-find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# 20230418 bkw: the .txt files are just rendered versions of the man
+# pages (with ddoouubblleedd characters), do not package.
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC/utilities
+cp -a ChangeLog README *.html $PKGDOC
+cp -a *.ccc *.cmd *.tgz *.jcl *.bas *.z80 *.lst xtrsemt.h *.hex *.README \
+ $PKGDOC/utilities
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/system/xtrs/xtrs.desktop b/system/xtrs/xtrs.desktop
index b2ebc5df6be63..39f0b111cfb37 100644
--- a/system/xtrs/xtrs.desktop
+++ b/system/xtrs/xtrs.desktop
@@ -1,10 +1,10 @@
[Desktop Entry]
Version=1.0
Type=Application
-Name=xtrs
-Comment=Emulator for TRS-80
-Categories=System;
+Name=XTRS
+Comment=TRS-80 Model I/III/4/4P Emulator
+Categories=System;Emulator;
Exec=xtrs
-Icon=xtrs-ico
+Icon=xtrs
Terminal=false
StartupNotify=false
diff --git a/system/xtrs/xtrs.info b/system/xtrs/xtrs.info
index afa2d5d971abe..6311ce70e1a6b 100644
--- a/system/xtrs/xtrs.info
+++ b/system/xtrs/xtrs.info
@@ -5,6 +5,6 @@ DOWNLOAD="http://www.tim-mann.org/trs80/xtrs-4.9d.tar.gz"
MD5SUM="8bb7cf88a3bc1da890f1f29398120bf3"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES=""
-MAINTAINER="Niels Horn"
-EMAIL="niels.horn@gmail.com"
+REQUIRES="trs80-roms"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"