diff options
author | B. Watson <urchlay@slackware.uk> | 2025-02-23 17:54:48 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2025-03-01 08:37:37 +0700 |
commit | 6359824d0396d863a2f5270aaca542b05ea164b1 (patch) | |
tree | e7791769f5321cbb273e41459aa62820e2000d30 /development/msbasic2ascii | |
parent | c31c5a6c976154888422932fc49432aacb7f1699 (diff) |
development/msbasic2ascii: Updated for version 0.2+20250222_db15677.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/msbasic2ascii')
-rw-r--r-- | development/msbasic2ascii/compile_fixes.diff | 63 | ||||
-rw-r--r-- | development/msbasic2ascii/msbasic2ascii.SlackBuild | 44 | ||||
-rw-r--r-- | development/msbasic2ascii/msbasic2ascii.info | 6 | ||||
-rw-r--r-- | development/msbasic2ascii/restore_untested.diff | 89 |
4 files changed, 121 insertions, 81 deletions
diff --git a/development/msbasic2ascii/compile_fixes.diff b/development/msbasic2ascii/compile_fixes.diff deleted file mode 100644 index 5881359d1f..0000000000 --- a/development/msbasic2ascii/compile_fixes.diff +++ /dev/null @@ -1,63 +0,0 @@ -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", diff --git a/development/msbasic2ascii/msbasic2ascii.SlackBuild b/development/msbasic2ascii/msbasic2ascii.SlackBuild index 853be6b0db..2c8f1b4830 100644 --- a/development/msbasic2ascii/msbasic2ascii.SlackBuild +++ b/development/msbasic2ascii/msbasic2ascii.SlackBuild @@ -6,10 +6,16 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20250223 bkw: update for latest upstream git, 0.2+20250222_db15677. +# Got an email from upstream, he's moved the code to github and done a +# bit of work on it recently. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=msbasic2ascii -VERSION=${VERSION:-0.2} +VERSION=${VERSION:-0.2+20250222_db15677} +COMMIT=${COMMIT:-db15677bc904fca004290ac0f7c6a89663a86f3e} +SRCNAM=detokenizers BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -46,30 +52,38 @@ 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 +rm -rf $SRCNAM-$COMMIT +tar xvf $CWD/$SRCNAM-$COMMIT.tar.gz +cd $SRCNAM-$COMMIT 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 {} \+ +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +PKGMAN1=$PKG/usr/man/man1 +PKGBIN=$PKG/usr/bin +mkdir -p $PKGBIN $PKGMAN1 + +# 20250223 bkw: Fix implicit prototype warnings. +echo 'extern void gwb_dprintf(char *format, ...);' >> gwbasic.h -# Fixes for modern compilers. Actually some of this stuff would be broken -# on 2000-era gcc, even. -patch -p1 < $CWD/compile_fixes.diff +# 20250223 bkw: Upstream removed the experimental/untested stuff +# from the Makefile; put it back. Also fix missing commas in nascom.h. +patch -p1 < $CWD/restore_untested.diff +# 20250223 bkw: 'make install' is broken, don't use. sed -i "/^CFLAGS/s,-g,$SLKCFLAGS," Makefile make -mkdir -p $PKG/usr/bin $PKG/usr/man/man1 -make install INSTDIR=$PKG/usr/bin +install -s \ + trs80ascii msxascii gwascii cpmascii cocoascii drascii trsm4ascii \ + $PKGBIN # '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 +install -s osiascii sorcascii nscmascii xtalascii compucolorascii $PKGBIN -strip $PKG/usr/bin/* -cp -a *.1 $PKG/usr/man/man1 -gzip $PKG/usr/man/man1/*.1 +cp -a *.1 $PKGMAN1 +gzip $PKGMAN1/*.1 PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKGDOC diff --git a/development/msbasic2ascii/msbasic2ascii.info b/development/msbasic2ascii/msbasic2ascii.info index 097ecf1770..a250887bab 100644 --- a/development/msbasic2ascii/msbasic2ascii.info +++ b/development/msbasic2ascii/msbasic2ascii.info @@ -1,8 +1,8 @@ PRGNAM="msbasic2ascii" -VERSION="0.2" +VERSION="0.2+20250222_db15677" HOMEPAGE="http://web.archive.org/web/20231001092017/http://edmond.orignac.pagesperso-orange.fr/detokenizer.html" -DOWNLOAD="https://slackware.uk/~urchlay/src/msbasic2ascii-0.2.tar.gz" -MD5SUM="d9a3f779892aa9277b154beccae74bf5" +DOWNLOAD="https://github.com/edorig/detokenizers/archive/db15677bc904fca004290ac0f7c6a89663a86f3e/detokenizers-db15677bc904fca004290ac0f7c6a89663a86f3e.tar.gz" +MD5SUM="7636afe3a48fe8df3a9d856cc6240df8" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/msbasic2ascii/restore_untested.diff b/development/msbasic2ascii/restore_untested.diff new file mode 100644 index 0000000000..879673af32 --- /dev/null +++ b/development/msbasic2ascii/restore_untested.diff @@ -0,0 +1,89 @@ +diff --git a/Makefile b/Makefile +index 4d341bd..c4757f4 100644 +--- a/Makefile ++++ b/Makefile +@@ -46,6 +46,11 @@ CPM = cpm_interpreter.o + COCO = coco.o + DRAG = dragon.o + TRS4 = trsm4.o ++SORC = sorcerer.o ++OSI = osi.o ++NSC = nascom.o ++XTL = xtal.o ++CMPCLR = compucolor.o + #SOR = sorcerer.o + #OSI = osi.o + #XTAL = xtal.o +@@ -64,8 +69,16 @@ BINARY7 = trsm4ascii + + BINARY= $(BINARY1) $(BINARY2) $(BINARY3) $(BINARY4) $(BINARY5) $(BINARY6) $(BINARY7) + ++UNTST1 = osiascii ++UNTST2 = sorcascii ++UNTST3 = nscmascii ++UNTST4 = xtalascii ++UNTST5 = compucolorascii ++ + all: $(BINARY) + ++untst: $(UNTST1) $(UNTST2) $(UNTST3) $(UNTST4) $(UNTST5) ++ + $(BINARY1): $(HEADERS) $(OBJECTS) $(TRS) + $(CC) $(CFLAGS) -o $(BINARY1) $(OBJECTS) $(TRS) $(LIBS) + +@@ -86,6 +99,22 @@ $(BINARY6): $(HEADERS) $(OBJECTS) $(DRAG) + + $(BINARY7): $(HEADERS) $(OBJECTS) $(TRS4) + $(CC) $(CFLAGS) -o $(BINARY7) $(OBJECTS) $(TRS4) $(LIBS) ++ ++$(UNTST1): $(HEADERS) $(OBJECTS) $(OSI) ++ $(CC) $(CFLAGS) -o $(UNTST1) $(OBJECTS) $(OSI) $(LIBS) ++ ++$(UNTST2): $(HEADERS) $(OBJECTS) $(SORC) ++ $(CC) $(CFLAGS) -o $(UNTST2) $(OBJECTS) $(SORC) $(LIBS) ++ ++$(UNTST3): $(HEADERS) $(OBJECTS) $(NSC) ++ $(CC) $(CFLAGS) -o $(UNTST3) $(OBJECTS) $(NSC) $(LIBS) ++ ++$(UNTST4): $(HEADERS) $(OBJECTS) $(XTL) ++ $(CC) $(CFLAGS) -o $(UNTST4) $(OBJECTS) $(XTL) $(LIBS) ++ ++$(UNTST5): $(HEADERS) $(OBJECTS) $(CMPCLR) ++ $(CC) $(CFLAGS) -o $(UNTST5) $(OBJECTS) $(CMPCLR) $(LIBS) ++ + clean: + rm -f *.o $(BINARY) *~ + +diff --git a/nascom.h b/nascom.h +index 7f3a064..e0f8f4e 100644 +--- a/nascom.h ++++ b/nascom.h +@@ -8,17 +8,17 @@ typedef struct { + + + 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", |