diff options
author | Antonio Leal <antonioleal@yahoo.com> | 2024-08-22 20:36:48 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-08-22 22:32:04 +0700 |
commit | af84ca0f886b6423886cf9d3d0de7920ad17d65d (patch) | |
tree | 5efaab6a8a9d543f7579c1d446216ce659ade303 /system | |
parent | 33860c8e10a17d6d353c66ec8b53c167eb6a36fa (diff) |
system/CanAce: Added (A Jupiter ACE Emulator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/CanAce/CanAce.SlackBuild | 127 | ||||
-rw-r--r-- | system/CanAce/CanAce.desktop | 9 | ||||
-rw-r--r-- | system/CanAce/CanAce.info | 12 | ||||
-rw-r--r-- | system/CanAce/CanAce.png | bin | 0 -> 94271 bytes | |||
-rw-r--r-- | system/CanAce/README | 18 | ||||
-rw-r--r-- | system/CanAce/doinst.sh | 4 | ||||
-rw-r--r-- | system/CanAce/patches/CMakeLists.txt.patch | 8 | ||||
-rw-r--r-- | system/CanAce/patches/canace.tcl.patch | 21 | ||||
-rw-r--r-- | system/CanAce/patches/srcCMakeLists.txt.patch | 8 | ||||
-rw-r--r-- | system/CanAce/patches/tkwin.c.patch | 42 | ||||
-rw-r--r-- | system/CanAce/slack-desc | 19 |
11 files changed, 268 insertions, 0 deletions
diff --git a/system/CanAce/CanAce.SlackBuild b/system/CanAce/CanAce.SlackBuild new file mode 100644 index 0000000000..7b44bb8f6d --- /dev/null +++ b/system/CanAce/CanAce.SlackBuild @@ -0,0 +1,127 @@ +#!/bin/bash + +# Slackware build script for CanAce + +# Copyright 2024- Antonio Leal, Porto Salvo, Oeiras, 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=CanAce +VERSION=${VERSION:-20130224_c135151} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} +COMMIT=${COMMIT:-c13515135345daf50bc8f6e4c3ddc4d6bcd01443} +XDGPATH=`echo "foreach dir [split [::tcl::tm::path list]] {puts \\$dir}" | tclsh | tail -n1` + +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} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$COMMIT +tar xvf $CWD/$PRGNAM-$COMMIT.tar.gz +cd $PRGNAM-$COMMIT + + +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 {} \; + +# Apply Slackware mods +if [ "${SLACKMODS:-yes}" = "yes" ]; then + patch CMakeLists.txt $CWD/patches/CMakeLists.txt.patch + patch src/CMakeLists.txt $CWD/patches/srcCMakeLists.txt.patch + patch src/canace.tcl $CWD/patches/canace.tcl.patch + patch src/tkwin.c $CWD/patches/tkwin.c.patch +fi + +# Build executable +cmake . \ + -DCMAKE_C_FLAGS_RELEASE="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS_RELEASE="$SLKCFLAGS" \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_MODULE_LINKER_FLAGS_RELEASE="-pthread" +make + +# Setup package files +mkdir -p $PKG/usr/bin +install -D -m0755 src/canace $PKG/usr/bin/canace + +mkdir -p $PKG/usr/share/canace +cp ace.rom $PKG/usr/share/canace + +mkdir -p ${PKG}${XDGPATH} +tar xvf $CWD/xdgbasedir_tcl-0.3.tar.gz xdgbasedir_tcl-0.3/xdgbasedir-0.3.tm +mv xdgbasedir_tcl-0.3/xdgbasedir-0.3.tm ${PKG}${XDGPATH} + +mkdir -p $PKG/usr/share/pixmaps +cp $CWD/CanAce.png $PKG/usr/share/pixmaps/CanAce.png + +mkdir -p $PKG/usr/share/applications +cp $CWD/CanAce.desktop $PKG/usr/share/applications +(cd $PKG/usr/bin; ln -s canace CanAce) + +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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING CHANGELOG.md README.md boldcomp.email.txt \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/CanAce/CanAce.desktop b/system/CanAce/CanAce.desktop new file mode 100644 index 0000000000..401e566397 --- /dev/null +++ b/system/CanAce/CanAce.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=CanAce +Comment=Jupiter Ace Emulation +Exec=canace +Icon=CanAce +StartupNotify=false +Terminal=false +Type=Application +Categories=System;Emulator; diff --git a/system/CanAce/CanAce.info b/system/CanAce/CanAce.info new file mode 100644 index 0000000000..5f4f414fac --- /dev/null +++ b/system/CanAce/CanAce.info @@ -0,0 +1,12 @@ +PRGNAM="CanAce" +VERSION="20130224_c135151" +HOMEPAGE="https://github.com/LawrenceWoodman/CanAce" +DOWNLOAD="https://github.com/LawrenceWoodman/CanAce/archive/c13515135345daf50bc8f6e4c3ddc4d6bcd01443/CanAce-c13515135345daf50bc8f6e4c3ddc4d6bcd01443.tar.gz \ + https://github.com/lawrencewoodman/xdgbasedir_tcl/archive/v0.3/xdgbasedir_tcl-0.3.tar.gz" +MD5SUM="6d3afa005f6224ee63d099043cb8198f \ + 694d95ed64aa3da4e1a38fa48a1c50b1" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Antonio Leal" +EMAIL="antonioleal@yahoo.com" diff --git a/system/CanAce/CanAce.png b/system/CanAce/CanAce.png Binary files differnew file mode 100644 index 0000000000..7b0fd056e9 --- /dev/null +++ b/system/CanAce/CanAce.png diff --git a/system/CanAce/README b/system/CanAce/README new file mode 100644 index 0000000000..00930041ae --- /dev/null +++ b/system/CanAce/README @@ -0,0 +1,18 @@ +CanAce is a fork by Lawrence Woodman of xAce featuring a +tcl frontend and some fixes to the original source. + +It is an emulator for the Jupiter Ace that runs under most +flavours of Unix. It was originally written by Edward Patel and +based on a ZX81 emulator called xz81 written by Russell Marks, +which was in turn based on Ian Collier's xz80, a ZX Spectrum +emulator for X. + +This CanAce Slackware version implements some modifications +to the original release including one to change between +"slow" and "fast" emulation speed by pressing the "F2" key, +very useful while spooling text sources. + +If you prefer to build the vanilla +version invoke the SlackBuild as follows: + +SLACKMODS=no ./CanAce.SlackBuild diff --git a/system/CanAce/doinst.sh b/system/CanAce/doinst.sh new file mode 100644 index 0000000000..4e8ba7071d --- /dev/null +++ b/system/CanAce/doinst.sh @@ -0,0 +1,4 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + diff --git a/system/CanAce/patches/CMakeLists.txt.patch b/system/CanAce/patches/CMakeLists.txt.patch new file mode 100644 index 0000000000..c357fafaa3 --- /dev/null +++ b/system/CanAce/patches/CMakeLists.txt.patch @@ -0,0 +1,8 @@ +--- CMakeLists.txt 2024-08-21 12:44:09.291353132 +0100 ++++ CMakeLists.txt.new 2024-08-21 12:44:52.859354969 +0100 +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.6) + project(CanAce) + + enable_testing() diff --git a/system/CanAce/patches/canace.tcl.patch b/system/CanAce/patches/canace.tcl.patch new file mode 100644 index 0000000000..10362a4490 --- /dev/null +++ b/system/CanAce/patches/canace.tcl.patch @@ -0,0 +1,21 @@ +--- CanAce-c13515135345daf50bc8f6e4c3ddc4d6bcd01443-vanilla/src/canace.tcl 2013-02-24 06:53:19.000000000 +0000 ++++ CanAce-c13515135345daf50bc8f6e4c3ddc4d6bcd01443/src/canace.tcl 2024-08-21 15:47:25.177576017 +0100 +@@ -20,6 +20,9 @@ + + proc HandleEmuKey {key} { + switch -- $key { ++ F2 { ++ ToggleWarpMode ++ } + F12 { + ResetAce + ClearStatusBar +@@ -99,7 +102,7 @@ + } + + proc DisplayAbout {} { +- tk_messageBox -message "CanAce v[GetCanAceVersion]" -type ok ++ tk_messageBox -message "CanAce [GetCanAceVersion]\n(on Slackware steroids...)" -type ok + } + + proc CreateMenu {} { diff --git a/system/CanAce/patches/srcCMakeLists.txt.patch b/system/CanAce/patches/srcCMakeLists.txt.patch new file mode 100644 index 0000000000..ecb551700f --- /dev/null +++ b/system/CanAce/patches/srcCMakeLists.txt.patch @@ -0,0 +1,8 @@ +--- CMakeLists.txt 2024-08-21 12:36:04.388332687 +0100 ++++ CMakeLists.txt.new 2024-08-21 12:38:10.621338009 +0100 +@@ -1,4 +1,4 @@ +-add_definitions(-DSCALE=2 -DCANACE_VERSION=\"0.1\") ++add_definitions(-DSCALE=4 -DCANACE_VERSION=\"20130224_c135151\") + add_executable(canace canace.c tkkeys.c tkspooler.c tktape.c acescreen.c z80.c tape.c keyboard.c spooler.c) + + add_custom_command( diff --git a/system/CanAce/patches/tkwin.c.patch b/system/CanAce/patches/tkwin.c.patch new file mode 100644 index 0000000000..53a2c373d0 --- /dev/null +++ b/system/CanAce/patches/tkwin.c.patch @@ -0,0 +1,42 @@ +--- CanAce-c13515135345daf50bc8f6e4c3ddc4d6bcd01443-vanilla/src/tkwin.c 2013-02-24 06:53:19.000000000 +0000 ++++ CanAce-c13515135345daf50bc8f6e4c3ddc4d6bcd01443/src/tkwin.c 2024-08-21 15:27:06.051458589 +0100 +@@ -34,6 +34,8 @@ + static int TkWin_displayWindow(void); + static void TkWin_createCommands(void); + ++extern int warpMode; ++ + int + TkWin_init(unsigned char *_mem) + { +@@ -126,6 +128,19 @@ + return TCL_OK; + } + ++static int ++ToggleWarpModeCmd(ClientData clientData, Tcl_Interp *_interp, ++ int objc, Tcl_Obj *CONST objv[]) ++{ ++ if (warpMode == 0) { ++ warpMode = 1; ++ } ++ else ++ { ++ warpMode = 0; ++ } ++ return TCL_OK; ++} + + static int + GetScaleCmd(ClientData clientData, Tcl_Interp *_interp, +@@ -195,6 +210,10 @@ + (ClientData) NULL, + (Tcl_CmdDeleteProc *) NULL); + ++ Tcl_CreateObjCommand(interp, "ToggleWarpMode", ToggleWarpModeCmd, ++ (ClientData) NULL, ++ (Tcl_CmdDeleteProc *) NULL); ++ + Tcl_CreateObjCommand(interp, "GetScale", GetScaleCmd, + (ClientData) NULL, + (Tcl_CmdDeleteProc *) NULL); diff --git a/system/CanAce/slack-desc b/system/CanAce/slack-desc new file mode 100644 index 0000000000..92292cfe56 --- /dev/null +++ b/system/CanAce/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------------------------------------------------------| +CanAce: CanAce (A Jupiter Ace emulator for Linux) +CanAce: +CanAce: +CanAce: CanAce is a fork by Lawrence Woodman of xAce featuring a +CanAce: tcl frontend and some fixes to the original source. +CanAce: +CanAce: +CanAce: Homepage at https://github.com/lawrencewoodman/CanAce/ +CanAce: +CanAce: +CanAce: |