mirror of
https://github.com/SlackBuildsOrg/slackbuilds
synced 2024-09-28 15:21:00 +02:00
development/msbasic2ascii: Added (detokenizers for MS BASIC)
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
8785cacbe3
commit
86af8dcfaa
5 changed files with 189 additions and 0 deletions
14
development/msbasic2ascii/README
Normal file
14
development/msbasic2ascii/README
Normal file
|
@ -0,0 +1,14 @@
|
|||
msbasic2ascii (detokenizers for MS BASIC variants)
|
||||
|
||||
This package contains detokenizers for 12 different flavors of
|
||||
Microsoft BASIC. They convert the binary SAVE format to human
|
||||
readable BASIC source. Supported BASICs include TSR-80 Model I Level
|
||||
II (trs80ascii) and Model 4 (trsm4ascii), MSX (msxascii), GW-BASIC
|
||||
(gwascii), MS-BASIC for CP/M (cpmascii), Tandy CoCo (cocoascii),
|
||||
Dragon 32/64 (drascii).
|
||||
|
||||
Also, experimental unsupported detokenizers are included for
|
||||
OSI 8K BASIC (osiascii), Exidy Sorceror (sorcascii), Nascom
|
||||
BASIC (nscmascii), Crytal BASIC (xtalascii), and Compucolor
|
||||
(compucolorascii). Some of these are known to be incomplete, and some
|
||||
just need testing against real-world code.
|
63
development/msbasic2ascii/compile_fixes.diff
Normal file
63
development/msbasic2ascii/compile_fixes.diff
Normal file
|
@ -0,0 +1,63 @@
|
|||
diff -Naur msbasic2ascii-0.2/Makefile msbasic2ascii-0.2.patched/Makefile
|
||||
--- msbasic2ascii-0.2/Makefile 2020-12-21 16:15:34.000000000 -0500
|
||||
+++ msbasic2ascii-0.2.patched/Makefile 2023-04-28 01:00:17.275684858 -0400
|
||||
@@ -47,7 +47,7 @@
|
||||
MOD4 = trsm4.o
|
||||
COCO = coco.o
|
||||
DRAG = dragon.o
|
||||
-SOR = sorcerer.o
|
||||
+SORC = sorcerer.o
|
||||
OSI = osi.o
|
||||
NSC = nascom.o
|
||||
XTL = xtal.o
|
||||
diff -Naur msbasic2ascii-0.2/gwbasic.h msbasic2ascii-0.2.patched/gwbasic.h
|
||||
--- msbasic2ascii-0.2/gwbasic.h 2020-12-21 16:15:34.000000000 -0500
|
||||
+++ msbasic2ascii-0.2.patched/gwbasic.h 2023-04-28 00:54:13.835719062 -0400
|
||||
@@ -26,6 +26,15 @@
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+extern void gwb_dprintf(char *format, ...);
|
||||
+extern int gx_process();
|
||||
+extern int ge_new(char *buf);
|
||||
+extern char *gets(char *s);
|
||||
+
|
||||
/* On the NeXT the basic curses is lame! */
|
||||
#if defined(NeXT)
|
||||
#include <ncurses.h>
|
||||
diff -Naur msbasic2ascii-0.2/nascom.h msbasic2ascii-0.2.patched/nascom.h
|
||||
--- msbasic2ascii-0.2/nascom.h 2020-12-21 16:15:34.000000000 -0500
|
||||
+++ msbasic2ascii-0.2.patched/nascom.h 2023-04-28 01:01:22.307678738 -0400
|
||||
@@ -8,17 +8,17 @@
|
||||
|
||||
|
||||
gwb_optable gwb_ops[] = {
|
||||
-0x80,"END"
|
||||
-0x81,"FOR"
|
||||
-0x82,"NEXT"
|
||||
-0x83,"DATA"
|
||||
-0x84,"INPUT"
|
||||
-0x85,"DIM"
|
||||
-0x86,"READ"
|
||||
-0x87,"LET"
|
||||
-0x88,"GOTO"
|
||||
-0x89,"RUN"
|
||||
-0x8a,"IF"
|
||||
+0x80,"END",
|
||||
+0x81,"FOR",
|
||||
+0x82,"NEXT",
|
||||
+0x83,"DATA",
|
||||
+0x84,"INPUT",
|
||||
+0x85,"DIM",
|
||||
+0x86,"READ",
|
||||
+0x87,"LET",
|
||||
+0x88,"GOTO",
|
||||
+0x89,"RUN",
|
||||
+0x8a,"IF",
|
||||
0x8b,"RESTORE",
|
||||
0x8c,"GOSUB",
|
||||
0x8d,"RETURN",
|
83
development/msbasic2ascii/msbasic2ascii.SlackBuild
Normal file
83
development/msbasic2ascii/msbasic2ascii.SlackBuild
Normal file
|
@ -0,0 +1,83 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Slackware build script for msbasic2ascii
|
||||
|
||||
# Written by B. Watson (urchlay@slackware.uk)
|
||||
|
||||
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=msbasic2ascii
|
||||
VERSION=${VERSION:-0.2}
|
||||
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}
|
||||
|
||||
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-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
|
||||
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
|
||||
|
||||
# Fixes for modern compilers. Actually some of this stuff would be broken
|
||||
# on 2000-era gcc, even.
|
||||
patch -p1 < $CWD/compile_fixes.diff
|
||||
|
||||
sed -i "/^CFLAGS/s,-g,$SLKCFLAGS," Makefile
|
||||
make
|
||||
mkdir -p $PKG/usr/bin $PKG/usr/man/man1
|
||||
make install INSTDIR=$PKG/usr/bin
|
||||
|
||||
# 'make install' doesn't build/install these. Include them in case someone
|
||||
# needs them. They ain't no man pages for 'em, but *shrug*.
|
||||
make untst
|
||||
cp -a osiascii sorcascii nscmascii xtalascii compucolorascii $PKG/usr/bin
|
||||
|
||||
strip $PKG/usr/bin/*
|
||||
cp -a *.1 $PKG/usr/man/man1
|
||||
gzip $PKG/usr/man/man1/*.1
|
||||
|
||||
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
mkdir -p $PKGDOC
|
||||
cp -a CHANGES COPYRIGHT README* TODO $PKGDOC
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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
|
10
development/msbasic2ascii/msbasic2ascii.info
Normal file
10
development/msbasic2ascii/msbasic2ascii.info
Normal file
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="msbasic2ascii"
|
||||
VERSION="0.2"
|
||||
HOMEPAGE="http://edmond.orignac.pagesperso-orange.fr/detokenizer.html"
|
||||
DOWNLOAD="http://edmond.orignac.pagesperso-orange.fr/msbasic2ascii-0.2.tar.gz"
|
||||
MD5SUM="d9a3f779892aa9277b154beccae74bf5"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
MAINTAINER="B. Watson"
|
||||
EMAIL="urchlay@slackware.uk"
|
19
development/msbasic2ascii/slack-desc
Normal file
19
development/msbasic2ascii/slack-desc
Normal file
|
@ -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------------------------------------------------------|
|
||||
msbasic2ascii: msbasic2ascii (detokenizers for MS BASIC variants)
|
||||
msbasic2ascii:
|
||||
msbasic2ascii: This package contains detokenizers for 12 different flavors of
|
||||
msbasic2ascii: Microsoft BASIC. They convert the binary SAVE format to human readable
|
||||
msbasic2ascii: BASIC source. Supported BASICs include TSR-80 (Model I Level II, Model
|
||||
msbasic2ascii: 4), MSX, GW-BASIC, MS-BASIC for CP/M, Tandy CoCo, Dragon 32/64.
|
||||
msbasic2ascii:
|
||||
msbasic2ascii: Also, experimental unsupported detokenizers are included for
|
||||
msbasic2ascii: OSI 8K BASIC, Exidy Sorceror, Nascom BASIC, Crytal BASIC, and
|
||||
msbasic2ascii: Compucolor. Some of these are known to be incomplete, and some just
|
||||
msbasic2ascii: need testing against real-world code.
|
Loading…
Reference in a new issue