diff options
author | B. Watson <urchlay@slackware.uk> | 2022-12-27 14:40:15 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-12-31 09:14:49 +0700 |
commit | be7f95b10aba00224501206a530ed29f4587961a (patch) | |
tree | d98ef09612ea6c0bb3266f10daf932086391e6a0 /system | |
parent | 8941956057e0c1b149f361c94622678632962b66 (diff) |
system/cbmbasic: Updated for version 1.0+20221218_352a313.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/cbmbasic/cbmbasic.1 | 94 | ||||
-rw-r--r-- | system/cbmbasic/cbmbasic.SlackBuild | 18 | ||||
-rw-r--r-- | system/cbmbasic/cbmbasic.info | 8 | ||||
-rw-r--r-- | system/cbmbasic/cbmbasic.rst | 75 | ||||
-rw-r--r-- | system/cbmbasic/git2tarxz.sh | 48 |
5 files changed, 233 insertions, 10 deletions
diff --git a/system/cbmbasic/cbmbasic.1 b/system/cbmbasic/cbmbasic.1 new file mode 100644 index 0000000000000..2f4273baac876 --- /dev/null +++ b/system/cbmbasic/cbmbasic.1 @@ -0,0 +1,94 @@ +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "CBMBASIC" 1 "2022-12-27" "1.0+20221218_352a313" "SlackBuilds.org" +.SH NAME +cbmbasic \- port of Commodore 64 BASIC to modern systems +.\" RST source for cbmbasic(1) man page. Convert with: +. +.\" rst2man.py cbmbasic.rst > cbmbasic.1 +. +.\" rst2man.py comes from the SBo development/docutils package. +. +.SH SYNOPSIS +.sp +\fBcbmbasic\fP +.sp +\fBcbmbasic\fP \fIprogram.bas\fP +.SH DESCRIPTION +.sp +\fBcbmbasic\fP is a 100% compatible version of Commodore\(aqs version of +Microsoft BASIC 6502 as found on the Commodore 64. You can use it in +interactive mode or pass a BASIC file as a command line parameter. +.sp +\fBcbmbasic\fP does not emulate 6502 code; all code is completely native. On a 1 GHz CPU you get about 1000x speed compared to a 1 MHz 6502. +.sp +There are no command\-line options. +.SH USAGE +.sp +You can use \fBcbmbasic\fP in interactive mode by just running the binary +without parameters, or you can specify an ASCII\-encoded BASIC program +on the command line. You can also use \fBcbmbasic\fP as a UNIX scripting +language by adding a hashbang line to your BASIC program and making +it executable: +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ ls \-l hello.bas +\-rwxr\-xr\-x 1 mist staff 40 7 Apr 21:30 hello.bas +$ cat hello.bas +#!/usr/bin/env cbmbasic +PRINT"HELLO WORLD!" +$ ./hello.bas +HELLO WORLD! +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +\fBcbmbasic\fP implements a small plugin system that lets developers add +additional statements, functions etc. Right now, you can turn this on +with \fBSYS 1\fP (turn off with \fBSYS 0\fP) and use the new statements +LOCATE \fIy\fP, \fIx\fP (set cursor position), SYSTEM \fIstring\fP (run shell +command) and the extended WAIT \fIport\fP, \fImask\fP, which implements the +Bill Gates easter egg. +.SH AUTHORS +.sp +\fBcbmbasic\fP was ported by Michael Steil and James Abbatiello. The +original 6502 version was written by Microsoft. +.sp +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. +.SH SEE ALSO +.sp +The cbmbasic homepage: \fI\%https://github.com/mist64/cbmbasic\fP +.\" Generated by docutils manpage writer. +. diff --git a/system/cbmbasic/cbmbasic.SlackBuild b/system/cbmbasic/cbmbasic.SlackBuild index 3c9b14ced5aff..3dfce9ebc4317 100644 --- a/system/cbmbasic/cbmbasic.SlackBuild +++ b/system/cbmbasic/cbmbasic.SlackBuild @@ -6,12 +6,13 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20221227 bkw: update to latest git, add man page # 20210827 bkw: fix build on -current cd $(dirname $0) ; CWD=$(pwd) PRGNAM=cbmbasic -VERSION=${VERSION:-1.0} +VERSION=${VERSION:-1.0+20221218_352a313} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -53,19 +54,24 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tgz +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz 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 {} \+ -make CFLAGS="$SLKCFLAGS -fcommon" LDFLAGS="-L/usr/lib$LIBDIRSUFFIX" +make CFLAGS="$SLKCFLAGS" LDFLAGS="-L/usr/lib$LIBDIRSUFFIX" mkdir -p $PKG/usr/bin install -s -m0755 $PRGNAM $PKG/usr/bin -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a README.txt test/*.bas $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +mkdir -p $PKG/usr/man/man1 +gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC/examples +cp -a README.* $PKGDOC +cp -a test/*.bas $PKGDOC/examples +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/system/cbmbasic/cbmbasic.info b/system/cbmbasic/cbmbasic.info index c118912c42d59..5723de8317a6f 100644 --- a/system/cbmbasic/cbmbasic.info +++ b/system/cbmbasic/cbmbasic.info @@ -1,8 +1,8 @@ PRGNAM="cbmbasic" -VERSION="1.0" -HOMEPAGE="http://cbmbasic.sourceforge.net/" -DOWNLOAD="https://downloads.sourceforge.net/project/cbmbasic/cbmbasic/1.0/cbmbasic-1.0.tgz" -MD5SUM="966cf93950809c3eace244af702cf895" +VERSION="1.0+20221218_352a313" +HOMEPAGE="https://github.com/mist64/cbmbasic" +DOWNLOAD="https://slackware.uk/~urchlay/src/cbmbasic-1.0+20221218_352a313.tar.xz" +MD5SUM="259ba3cda69d9436545e5e5ae6427330" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/system/cbmbasic/cbmbasic.rst b/system/cbmbasic/cbmbasic.rst new file mode 100644 index 0000000000000..bc34a0d8bb2a7 --- /dev/null +++ b/system/cbmbasic/cbmbasic.rst @@ -0,0 +1,75 @@ +.. RST source for cbmbasic(1) man page. Convert with: +.. rst2man.py cbmbasic.rst > cbmbasic.1 +.. rst2man.py comes from the SBo development/docutils package. + +.. |version| replace:: 1.0+20221218_352a313 +.. |date| date:: + +======== +cbmbasic +======== + +-------------------------------------------- +port of Commodore 64 BASIC to modern systems +-------------------------------------------- + +:Manual section: 1 +:Manual group: SlackBuilds.org +:Date: |date| +:Version: |version| + +SYNOPSIS +======== + +**cbmbasic** + +**cbmbasic** *program.bas* + +DESCRIPTION +=========== + +**cbmbasic** is a 100% compatible version of Commodore's version of +Microsoft BASIC 6502 as found on the Commodore 64. You can use it in +interactive mode or pass a BASIC file as a command line parameter. + +**cbmbasic** does not emulate 6502 code; all code is completely native. On a 1 GHz CPU you get about 1000x speed compared to a 1 MHz 6502. + +There are no command-line options. + +USAGE +===== + +You can use **cbmbasic** in interactive mode by just running the binary +without parameters, or you can specify an ASCII-encoded BASIC program +on the command line. You can also use **cbmbasic** as a UNIX scripting +language by adding a hashbang line to your BASIC program and making +it executable:: + + $ ls -l hello.bas + -rwxr-xr-x 1 mist staff 40 7 Apr 21:30 hello.bas + $ cat hello.bas + #!/usr/bin/env cbmbasic + PRINT"HELLO WORLD!" + $ ./hello.bas + HELLO WORLD! + +**cbmbasic** implements a small plugin system that lets developers add +additional statements, functions etc. Right now, you can turn this on +with **SYS 1** (turn off with **SYS 0**) and use the new statements +LOCATE *y*, *x* (set cursor position), SYSTEM *string* (run shell +command) and the extended WAIT *port*, *mask*, which implements the +Bill Gates easter egg. + +AUTHORS +======= + +**cbmbasic** was ported by Michael Steil and James Abbatiello. The +original 6502 version was written by Microsoft. + +This man page written for the SlackBuilds.org project +by B. Watson, and is licensed under the WTFPL. + +SEE ALSO +======== + +The cbmbasic homepage: https://github.com/mist64/cbmbasic diff --git a/system/cbmbasic/git2tarxz.sh b/system/cbmbasic/git2tarxz.sh new file mode 100644 index 0000000000000..c2be8b271094e --- /dev/null +++ b/system/cbmbasic/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. + +# Upstream doesn't use tags. Old (sourceforge) release was 1.0 +# before the move to github, so include 1.0 in VERSION. +OLDVER=1.0 + +PRGNAM=cbmbasic +CLONE_URL=https://github.com/mist64/cbmbasic + +set -e + +GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX ) +rm -rf $GITDIR +git clone $CLONE_URL $GITDIR + +CWD="$( pwd )" +cd $GITDIR + +if [ "$1" != "" ]; then + git reset --hard "$1" || exit 1 +fi + +GIT_SHA=$( git rev-parse --short HEAD ) + +DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 ) + +VERSION=${OLDVER}+${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" |