summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author B. Watson2023-05-16 09:10:55 +0200
committer Willy Sudiarto Raharjo2023-05-20 06:17:50 +0200
commita11cc995729f60388fa12b1be6b5499b657e783c (patch)
treee14ec9d89a8d266bb5642d1e587e36af93bb3df8
parent6f1d2d54cdd064448d5baa4cbc4b13f46ffa5372 (diff)
downloadslackbuilds-a11cc995729f60388fa12b1be6b5499b657e783c.tar.gz
system/sdltrs: Updated for version 1.2.9a+20230517_29980234.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/sdltrs/README23
-rw-r--r--system/sdltrs/git2tarxz.sh48
-rw-r--r--system/sdltrs/sdltrs.SlackBuild39
-rw-r--r--system/sdltrs/sdltrs.info8
4 files changed, 92 insertions, 26 deletions
diff --git a/system/sdltrs/README b/system/sdltrs/README
index 773428d847..698d7b71a2 100644
--- a/system/sdltrs/README
+++ b/system/sdltrs/README
@@ -5,11 +5,18 @@ OSX, Windows and Linux. It has been ported from the excellent X
Window Unix emulator xtrs. Instead of using the X-Window system for
graphics, it uses the portable SDL library.
-Note: When you start up sdltrs for the first time, it attempts to boot
-from floppy disk. If you didn't give "-disk0 /path/to/image.dsk"
-on the command line (or if you launched it from your desktop's
-application menu), it will "hang" with a black screen. Press Alt+D to
-enter the emulator's disk menu and either select a bootable floppy
-image or disable the floppy disk controller, or else run sdltrs
-with the -nofloppy option. See the man page and the documentation at
-/usr/doc/sdltrs-1.2.27/html/index.html for further details.
+Note: When you start up sdltrs for the first time, it attempts
+to boot from floppy disk. If you didn't give either the "-disk0
+/path/to/image.dsk" or "-nofloppy" options on the command line, it
+will "hang" with a black screen, because it's trying to boot from a
+nonexistent floppy disc. To recover from this:
+
+- Hold down F10 (TRS-80 Reset) and press Escape (TRS-80 Break key) to
+ skip the disk boot and enter the ROM BASIC.
+
+- Press Alt+D to enter the emulator's disk menu, and from there,
+ either select a bootable disk image for drive 0, or disable the
+ floppy disk controller. Then press Shift-F10 to reboot the TRS-80.
+
+See the man page and the documentation at
+/usr/doc/sdltrs-$VERSION/html/index.html for further details.
diff --git a/system/sdltrs/git2tarxz.sh b/system/sdltrs/git2tarxz.sh
new file mode 100644
index 0000000000..36c790bdc7
--- /dev/null
+++ b/system/sdltrs/git2tarxz.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+# Create source tarball from git repo, with generated version
+# number.
+
+# Note that 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.
+
+# Takes one optional argument, which is the commit or tag to create
+# a tarball of. With no arg, HEAD is used.
+
+PRGNAM=sdltrs-sdl2
+CLONE_URL=https://gitlab.com/jengun/sdltrs/
+
+set -e
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+git clone $CLONE_URL $GITDIR
+
+CWD="$( pwd )"
+cd $GITDIR
+
+git checkout remotes/origin/sdl2
+
+if [ "$1" != "" ]; then
+ git reset --hard "$1" || exit 1
+fi
+
+VERTAG=$( git tag -l | tail -1 | sed 's,^v,,' )
+
+GIT_SHA=$( git rev-parse --short HEAD )
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+
+VERSION=${VERTAG}+${DATE}_${GIT_SHA}
+
+rm -rf .git
+find . -name .gitignore -print0 | xargs -0 rm -f
+
+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"
diff --git a/system/sdltrs/sdltrs.SlackBuild b/system/sdltrs/sdltrs.SlackBuild
index 65b34869c4..67a55de495 100644
--- a/system/sdltrs/sdltrs.SlackBuild
+++ b/system/sdltrs/sdltrs.SlackBuild
@@ -24,6 +24,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230517 bkw: update for latest git, v1.2.9a+20230517_29980234,
+# the sdl2 branch. This is done at the suggestion of the upstream
+# maintainer, because the master branch doesn't support SDL2's
+# hardware rendering and scaling. The binary changes names to
+# sdl2trs, so there's symlinks to the old name for now.
+
# 20230418 bkw:
# - new maintainer.
# - update for v1.2.27 (make => meson, for one thing).
@@ -44,7 +50,9 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=sdltrs
-VERSION=${VERSION:-1.2.27}
+SRCNAM=sdltrs-sdl2
+EXENAM=sdl2trs
+VERSION=${VERSION:-1.2.9a+20230517_29980234}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -84,10 +92,10 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-rm -rf $TMP/$PRGNAM-$VERSION
+rm -rf $TMP/$SRCNAM-$VERSION
cd $TMP
-tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
-cd $PRGNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.xz
+cd $SRCNAM-$VERSION
chown -R root:root .
# upstream permissions are wonky, do not revert to template.
find . -type f -a -exec chmod 644 {} + -o \
@@ -110,36 +118,39 @@ cd build
--sysconfdir=/etc \
-Dstrip=true
"${NINJA:=ninja}" -v
- install -D -m0755 -s $PRGNAM $PKG/usr/games/$PRGNAM
+ install -D -m0755 -s $EXENAM $PKG/usr/games/$EXENAM
+ ln -s $EXENAM $PKG/usr/games/$PRGNAM
cd ..
# 20230418 bkw: use upstream's man page, but section 6.
mkdir -p $PKG/usr/man/man6
sed -e '/^\.TH/s, 1 , 6 ,' \
-e '/^\.TH/s,$, SlackBuilds.org,' \
- src/$PRGNAM.1 \
- | gzip -9c > $PKG/usr/man/man6/$PRGNAM.6.gz
+ src/$EXENAM.1 \
+ | gzip -9c > $PKG/usr/man/man6/$EXENAM.6.gz
+ln -s $EXENAM.6.gz $PKG/usr/man/man6/$PRGNAM.6.gz
-# 20230418 bkw: upstream's .desktop lacks categories.
-echo 'Categories=System;Emulator;' >> $PRGNAM.desktop
-install -D -m0644 $PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
+sed -i -e 's,Games;,Game;,' \
+ -e 's,^Exec=,&/usr/games/,' \
+ $EXENAM.desktop
+install -D -m0644 $EXENAM.desktop $PKG/usr/share/applications/$EXENAM.desktop
# 20230418 bkw: use upstream's icon, but pre-resized.
HICOLOR=$PKG/usr/share/icons/hicolor
-SVGICON=icons/$PRGNAM.svg
+SVGICON=icons/$EXENAM.svg
for px in 16 22 32 48 64 96 128; do
size=${px}x${px}
dir=$HICOLOR/$size/apps
mkdir -p $dir
- rsvg-convert -w $px -h $px -o $dir/$PRGNAM.png $SVGICON
+ rsvg-convert -w $px -h $px -o $dir/$EXENAM.png $SVGICON
done
mkdir -p $HICOLOR/scalable/apps
-cp -a $SVGICON $HICOLOR/scalable/apps/$PRGNAM.svg
+cp -a $SVGICON $HICOLOR/scalable/apps/$EXENAM.svg
mkdir -p $PKG/usr/share/pixmaps
-ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
+ln -s ../icons/hicolor/48x48/apps/$EXENAM.png $PKG/usr/share/pixmaps/$EXENAM.png
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
diff --git a/system/sdltrs/sdltrs.info b/system/sdltrs/sdltrs.info
index 1c5d6c16ac..9a7f89ecc4 100644
--- a/system/sdltrs/sdltrs.info
+++ b/system/sdltrs/sdltrs.info
@@ -1,8 +1,8 @@
PRGNAM="sdltrs"
-VERSION="1.2.27"
-HOMEPAGE="http://sdltrs.sourceforge.net"
-DOWNLOAD="https://gitlab.com/jengun/sdltrs/-/archive/1.2.27/sdltrs-1.2.27.tar.bz2"
-MD5SUM="2db333ea038ae81788fd73d812b6c21f"
+VERSION="1.2.9a+20230517_29980234"
+HOMEPAGE="https://gitlab.com/jengun/sdltrs/"
+DOWNLOAD="https://slackware.uk/~urchlay/src/sdltrs-sdl2-1.2.9a+20230517_29980234.tar.xz"
+MD5SUM="33cf0d222d4fa40142d24ee144995465"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="trs80-roms"