diff options
author | Antonio Leal <antonioleal@yahoo.com> | 2022-06-03 23:50:30 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-06-04 10:37:10 +0700 |
commit | 35b209f52e6ba48d8a6a8fcce906789a62580414 (patch) | |
tree | 20f6628bb51c360a7eff8e12161b94f875161d4a /misc/yaze-ag | |
parent | d3339af9fb9a41484c1e7cea577d07a629cfa065 (diff) | |
download | slackbuilds-35b209f52e6ba48d8a6a8fcce906789a62580414.tar.gz |
misc/yaze-ag: Added (yet another z80 emulator )
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'misc/yaze-ag')
-rw-r--r-- | misc/yaze-ag/Makefile.patch | 21 | ||||
-rw-r--r-- | misc/yaze-ag/README | 26 | ||||
-rw-r--r-- | misc/yaze-ag/slack-desc | 19 | ||||
-rw-r--r-- | misc/yaze-ag/yaze-ag.SlackBuild | 156 | ||||
-rw-r--r-- | misc/yaze-ag/yaze-ag.info | 10 | ||||
-rw-r--r-- | misc/yaze-ag/yaze.sh.patch | 16 |
6 files changed, 248 insertions, 0 deletions
diff --git a/misc/yaze-ag/Makefile.patch b/misc/yaze-ag/Makefile.patch new file mode 100644 index 0000000000..4fea92dbd1 --- /dev/null +++ b/misc/yaze-ag/Makefile.patch @@ -0,0 +1,21 @@ +--- Makefile 2021-12-20 20:33:32.000000000 +0000 ++++ Makefile.new 2022-05-28 19:10:55.440386452 +0100 +@@ -6,12 +6,12 @@ + CC = gcc + + #where you want the binaries and manual page +-BINDIR = /usr/local/bin +-MANDIR = /usr/local/man/man1 +-LIBDIR = /usr/local/lib/yaze +-DSKDIR = $(LIBDIR)/disks +-DOCDIR = $(LIBDIR)/doc +-DOCHTMLDIR = $(LIBDIR)/doc_html ++BINDIR = /usr/bin ++MANDIR = /usr/man/man1 ++LIBDIR = /usr/lib/yaze-ag ++DSKDIR = /usr/share/yaze-ag/disks ++DOCDIR = /usr/doc/yaze-ag-2.51.3/doc ++DOCHTMLDIR = /usr/doc/yaze-ag-2.51.3/doc_html + + #OPTIMIZE = -g -m486 + #OPTIMIZE = -g -save-temps -m486 diff --git a/misc/yaze-ag/README b/misc/yaze-ag/README new file mode 100644 index 0000000000..8604bb2302 --- /dev/null +++ b/misc/yaze-ag/README @@ -0,0 +1,26 @@ +yaze-ag is designed to provide an exact simulation of the Z80 +microprocessor. It is fast, emulates undocumented opcodes, and +passes instruction regression tests against real Z80 hardware. +NEW in yaze-ag version 2.xx is the support of an emulated Memory +Management Unit (MMU) and the BIOS which supports CP/M 3.1. + +YAZE-AG is a Z80-CPU-Emulator and NOT a CP/M-Emulator! + +Inside the Emulator runs an original CP/M or a replacement of CP/M. + +YAZE-AG uses the free CP/M 3.1 replacement "ZPM3N10" of Simeon Cran +(bootfile "yaze-cpm3.boot") or the CP/M 2.2 replacement "Superdos" +(bootfile "yaze.boot"). + +(Optionally) when building on x84_64 you can specify an alternative +Makefile like this: + +./yaze-ag.SlackBuild Makefile_linux_64_intel_corei7 +./yaze-ag.SlackBuild Makefile_linux_64_intel_nocona +./yaze-ag.SlackBuild Makefile_linux_64_intel_skylake +./yaze-ag.SlackBuild Makefile_linux_64_intel_tigerlake +./yaze-ag.SlackBuild Makefile_linux_64_amd_athlon64 + +Please visit the homepage for further reading on this excelent +emulator. + diff --git a/misc/yaze-ag/slack-desc b/misc/yaze-ag/slack-desc new file mode 100644 index 0000000000..25406666e2 --- /dev/null +++ b/misc/yaze-ag/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +yaze-ag: yaze-ag (yet another z80 emulator ) +yaze-ag: +yaze-ag: is designed to provide an exact simulation of the Z80 microprocessor. +yaze-ag: It is fast, emulates undocumented opcodes, and passes instruction +yaze-ag: regression tests against real Z80 hardware. +yaze-ag: NEW in yaze-ag version 2.xx is the support of an emulated Memory +yaze-ag: Management Unit (MMU) and the BIOS which supports CP/M 3.1. +yaze-ag: +yaze-ag: YAZE-AG is a Z80-CPU-Emulator and NOT a CP/M-Emulator! +yaze-ag: Inside the Emulator runs an original CP/M or a replacement of CP/M. +yaze-ag: Please visit homepage for further reading on this excelent emulator. diff --git a/misc/yaze-ag/yaze-ag.SlackBuild b/misc/yaze-ag/yaze-ag.SlackBuild new file mode 100644 index 0000000000..8c4ae3d013 --- /dev/null +++ b/misc/yaze-ag/yaze-ag.SlackBuild @@ -0,0 +1,156 @@ +#!/bin/bash + +# Slackware build script for yaze-ag + +# Copyright 2022 Antonio Leal, Lisbon, Portugal +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=yaze-ag +VERSION=${VERSION:-2.51.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} +BUILDDIR=$TMP/$PRGNAM-$VERSION + + +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 +rm -rf $PKG $BUILDDIR +mkdir -p $TMP $PKG $OUTPUT $BUILDDIR +cd $TMP +tar xvfz $CWD/$PRGNAM-$VERSION.tar.gz +cd $BUILDDIR + +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 {} \; + +if [ "$1" != "" ]; then + if [ -f "$1" ]; then + echo + echo "Building with $1" + echo + cp $1 Makefile + else + echo + echo "$1 does not exist." + echo + exit 1 + fi +else + case "$( uname -m )" in + i?86) + cp Makefile_linux_32_i586 Makefile + ;; + x86_64) + cp Makefile_linux_64_intel_corei7 Makefile + ;; + *) echo "Package for $(uname -m) architecture is not available." ; exit 1 ;; + esac +fi +patch Makefile $CWD/Makefile.patch +patch yaze.sh $CWD/yaze.sh.patch +make +BINDIR=${BINDIR:-$PKG/usr/bin} +MANDIR=${MANDIR:-$PKG/usr/man/man1} +LIBDIR=${LIBDIR:-$PKG/usr/lib/yaze-ag} +DSKDIR=${DSKDIR:-$PKG/usr/share/yaze-ag/disks} +DOCDIR=${DOCDIR:-$PKG/usr/doc/yaze-ag-$VERSION/doc} +DOCHTMLDIR=${DOCHTMLDIR:-$PKG/usr/doc/yaze-ag-$VERSION/doc_html} +mkdir -p $BINDIR $MANDIR $LIBDIR $DSKDIR $DOCDIR $DOCHTMLDIR +install -s -c -m 755 yaze_bin $BINDIR +install -s -c -m 755 cdm $BINDIR +install -c -m 755 yaze $BINDIR +install -c -m 644 yaze-cpm3.boot $LIBDIR +install -c -m 644 yaze.boot $LIBDIR +install -c -m 644 m2.ktt $LIBDIR +install -c -m 644 sample.ktt $LIBDIR +install -c -m 644 yaze.ktt $LIBDIR +install -c -m 644 yaze.1 $MANDIR +install -c -m 644 cdm.1 $MANDIR +install -c -m 644 cpm.1 $MANDIR +install -c -m 644 z80.1 $MANDIR +/bin/sh $BUILDDIR/install_disks.sh $DSKDIR +/bin/sh $BUILDDIR/install_doc.sh $DOCDIR +/bin/sh $BUILDDIR/install_doc_html.sh $DOCHTMLDIR +cd $LIBDIR +rm -f md5 $BUILDDIR/md5.yaze-ag +find . -type f -exec /bin/md5sum -b {} >>$BUILDDIR/md5.yaze-ag \; +mv $BUILDDIR/md5.yaze-ag md5 + +( cd $BINDIR ; rm -rf cpm ) +( cd $BINDIR ; ln -sf yaze cpm ) +( cd $BINDIR ; rm -rf z80 ) +( cd $BINDIR ; ln -sf yaze z80 ) + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +find $PKG -print0 | xargs -0 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 + +find $PKG -name perllocal.pod -o -name ".packlist" -o -name "*.bs" | xargs rm -f || true + +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/yaze-ag-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/misc/yaze-ag/yaze-ag.info b/misc/yaze-ag/yaze-ag.info new file mode 100644 index 0000000000..8e83e3e7e2 --- /dev/null +++ b/misc/yaze-ag/yaze-ag.info @@ -0,0 +1,10 @@ +PRGNAM="yaze-ag" +VERSION="2.51.3" +HOMEPAGE="https://www.mathematik.uni-ulm.de/users/ag/yaze-ag" +DOWNLOAD="https://www.mathematik.uni-ulm.de/users/ag/yaze-ag/devel/yaze-ag-2.51.3.tar.gz" +MD5SUM="2c005d44d190665b5d9066307a2b4a9b" +DOWNLOAD_x86_64="https://www.mathematik.uni-ulm.de/users/ag/yaze-ag/devel/yaze-ag-2.51.3.tar.gz" +MD5SUM_x86_64="2c005d44d190665b5d9066307a2b4a9b" +REQUIRES="" +MAINTAINER="Antonio Leal" +EMAIL="antonioleal@yahoo.com" diff --git a/misc/yaze-ag/yaze.sh.patch b/misc/yaze-ag/yaze.sh.patch new file mode 100644 index 0000000000..9b5a05d26e --- /dev/null +++ b/misc/yaze-ag/yaze.sh.patch @@ -0,0 +1,16 @@ +--- yaze.sh 2015-04-26 15:15:29.000000000 +0100 ++++ yaze.sh.new 2022-05-28 20:33:43.386759212 +0100 +@@ -1,9 +1,9 @@ + #!/bin/sh + +-S_YAZEFILES=/usr/local/lib/yaze +-S_CPMDSKS=/usr/local/lib/yaze/disks +-S_DOCFILES=/usr/local/lib/yaze/doc +-S_DOCFILES_html=/usr/local/lib/yaze/doc_html ++S_YAZEFILES=/usr/lib/yaze-ag ++S_CPMDSKS=/usr/share/yaze-ag/disks ++S_DOCFILES=/usr/doc/yaze-ag-2.51.3/doc ++S_DOCFILES_html=/usr/doc/yaze-ag-2.51.3/doc_html + + if [ ! -f .yazerc ] + then |