aboutsummaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2017-09-08 00:19:33 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2017-09-08 00:19:33 +0100
commit8c0ffd397b35cadfca32308acb17fb137e307f10 (patch)
tree0e5d6c99336dd5c46d74c9d98c289f65fc22fef0 /development
parentb5365b1f400b9e17b1281b9f885543abe1477894 (diff)
development/rmac: Added (cross assembler for 6502 and 68000).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r--development/rmac/README14
-rw-r--r--development/rmac/git2targz.sh50
-rw-r--r--development/rmac/rmac.1188
-rw-r--r--development/rmac/rmac.SlackBuild96
-rw-r--r--development/rmac/rmac.info12
-rw-r--r--development/rmac/rmac.rst138
-rw-r--r--development/rmac/slack-desc19
7 files changed, 517 insertions, 0 deletions
diff --git a/development/rmac/README b/development/rmac/README
new file mode 100644
index 0000000000000..a69de78ffbd69
--- /dev/null
+++ b/development/rmac/README
@@ -0,0 +1,14 @@
+rmac (cross assembler for 6502 and 68000)
+
+RMAC began its life as MADMAC. It was initially written at Atari
+Corporation by programmers who needed a high performance assembler for
+their work. Then, more than 20 years later, because there was still a
+need for such an assembler and what was available wasn't up to
+expectations, Subqmod and eventually Reboot continued work on the
+freely released source, adding Jaguar extensions and fixing bugs. And
+of course recently 6502 support was added back!
+
+RMAC targets the Atari Jaguar, ST, and 800/XL/XE 8-bit systems. The
+file "ATARI.S" mentioned in the documentation is installed to
+"/usr/share/rmac/atari.s". To use it in a project, either copy it to
+the project directory, or give -i/usr/share/rmac as an argument to rmac.
diff --git a/development/rmac/git2targz.sh b/development/rmac/git2targz.sh
new file mode 100644
index 0000000000000..282edaaec59d2
--- /dev/null
+++ b/development/rmac/git2targz.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Create source tarball from git repo, with generated version
+# number. We don't want to include the whole git history in the tarball,
+# but we do want to build the git hash into slack-desc, so there's a bit
+# of extra stuff here.
+
+# 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.
+
+PRGNAM=rmac
+CLONE_URL=http://shamusworld.gotdns.org/git/$PRGNAM
+
+set -e
+
+GITDIR=$( mktemp -dt $PRGNAM.git.XXXXXX )
+rm -rf $GITDIR
+git clone $CLONE_URL $GITDIR
+
+CWD="$( pwd )"
+cd $GITDIR
+
+# get upstream's version number from version.h. easier to do in C than bash.
+cat <<EOF >v.c
+#include <stdio.h>
+#include "version.h"
+int main(int argc, char **argv) {
+ printf("%d.%d.%d\n", MAJOR, MINOR, PATCH);
+ return 0;
+}
+EOF
+
+gcc -o v v.c
+VERSION="$( ./v )"
+rm -f v v.c
+
+DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 )
+VERSION=${VERSION}_$DATE
+
+# git revision stored in gitrev, the SlackBuild seds it into the slack-desc.
+git rev-parse --short HEAD > $PRGNAM.gitrev
+
+# tarball won't contain git history.
+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
diff --git a/development/rmac/rmac.1 b/development/rmac/rmac.1
new file mode 100644
index 0000000000000..bf28056a445e9
--- /dev/null
+++ b/development/rmac/rmac.1
@@ -0,0 +1,188 @@
+.\" Man page generated from reStructuredText.
+.
+.TH RMAC 1 "2017-09-01" "1.8.6" "SlackBuilds.org"
+.SH NAME
+RMAC \- 68000 and 6502 cross assembler
+.
+.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
+..
+.\" RST source for rmac(1) man page. Convert with:
+.
+.\" rst2man.py rmac.rst > rmac.1
+.
+.\" rst2man.py comes from the SBo development/docutils package.
+.
+.SH SYNOPSIS
+.sp
+rmac [\fI\-options\fP] \fIsource\-file\fP [\fIsource\-file ...\fP]
+.SH DESCRIPTION
+.sp
+RMAC began its life as MADMAC. It was initially written at Atari
+Corporation by programmers who needed a high performance assembler for
+their work. Then, more than 20 years later, because there was still a need
+for such an assembler and what was available wasn\(aqt up to expectations,
+Subqmod and eventually Reboot continued work on the freely released
+source, adding Jaguar extensions and fixing bugs. And of course recently
+6502 support was added back!
+.SH OPTIONS
+.sp
+\-dname\fI[=value]\fP Define symbol, with optional value.
+.sp
+\-e\fI[file[.err]]\fP Direct error messages to the specified file.
+.INDENT 0.0
+.TP
+.BI \-f\fB a
+ALCYON output object file format (implied when \fB\-p\fP or \fB\-ps\fP is enabled).
+.TP
+.BI \-f\fB b
+BSD COFF output object file format.
+.TP
+.BI \-f\fB e
+ELF output object file format.
+.TP
+.BI \-f\fB x
+Atari 800 com/exe/xex output object file format.
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-i\fIpath\fP Set include\-file directory search path. \fINote\fP this is a
+\fBsemicolon\fP separated list of directories.
+.UNINDENT
+.sp
+\-l\fI[file[prn]]\fP Construct and direct assembly listing to the specified file.
+.sp
+\-l\fI*[filename]\fP Create an output listing file without pagination
+.INDENT 0.0
+.TP
+.B \-n
+Don\(aqt do things behind your back in RISC assembler
+.UNINDENT
+.sp
+\-o\fIfile[.o]\fP Direct object code output to the specified file.
+.sp
++/~oall Turn all optimisations on/off
+.sp
++o\fI0\-3\fP Enable specific optimisation
+.sp
+~o\fI0\-3\fP Disable specific optimisation
+.INDENT 0.0
+.INDENT 3.5
+\fI0: Absolute long adddresses to word (default: on)\fP
+.sp
+\fI1: move.l #x,dn/an to moveq (default: on)\fP
+.sp
+\fI2: Word branches to short (default: on)\fP
+.sp
+\fI3: Outer displacement 0(an) to (an) (default: on)\fP
+.sp
+\fI4: lea size(An),An to addq #size,An (default: off)\fP
+.sp
+\fI5: Absolute long base displacement to word (default: off)\fP
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-p
+Produce an executable (\fB\&.prg\fP) output file.
+.TP
+.BI \-p\fB s
+Produce an executable (\fB\&.prg\fP) output file with symbols.
+.TP
+.B \-q
+Make RMAC resident in memory (Atari ST only).
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-r \fIsize\fP automatically pad the size of each
+segment in the output file until the size is an integral multiple of the
+specified boundary. Size is a letter that specifies the desired boundary.
+.INDENT 7.0
+.INDENT 3.5
+\fI\-rw Word (2 bytes, default alignment)\fP
+.sp
+\fI\-rl Long (4 bytes)\fP
+.sp
+\fI\-rp Phrase (8 bytes)\fP
+.sp
+\fI\-rd Double Phrase (16 bytes)\fP
+.sp
+\fI\-rq Quad Phrase (32 bytes)\fP
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.INDENT 0.0
+.TP
+.B \-s
+Warn about unoptimized long branches and applied optimisations.
+.TP
+.B \-u
+Force referenced and undefined symbols global.
+.TP
+.B \-v
+Verbose mode (print running dialogue).
+.TP
+.B \-x
+Turn on debugging mode
+.TP
+.BI \-y\fB n
+Set listing page size to n lines.
+.UNINDENT
+.sp
+file\fI[s]\fP Assemble the specified file.
+.SH FILES
+.INDENT 0.0
+.INDENT 3.5
+.INDENT 0.0
+.TP
+.B /usr/share/rmac/atari.s
+Atari ST system equates.
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.SH ENVIRONMENT
+.INDENT 0.0
+.INDENT 3.5
+.INDENT 0.0
+.TP
+.B RMACPATH
+Semicolon\-separated list of directories to search for include files.
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.SH AUTHORS
+.sp
+rmac is Copyright (C) 199x Landon Dyer, 2011\-2017 Reboot.
+.sp
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+.SH SEE ALSO
+.sp
+\fIhatari\fP(1)
+.sp
+The full \fBrmac\fP documentation in /usr/doc/rmac\-1.8.6/rmac.rst.
+.\" Generated by docutils manpage writer.
+.
diff --git a/development/rmac/rmac.SlackBuild b/development/rmac/rmac.SlackBuild
new file mode 100644
index 0000000000000..883d83b114cde
--- /dev/null
+++ b/development/rmac/rmac.SlackBuild
@@ -0,0 +1,96 @@
+#!/bin/sh
+
+# Slackware build script for rmac
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Upstream doesn't do source release tarballs, see git2targz.sh.
+
+PRGNAM=rmac
+VERSION=${VERSION:-1.8.6_20170829}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+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
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
+cd $PRGNAM-$VERSION
+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 {} \;
+
+sed -i "s,-O2,$SLKCFLAGS," makefile
+make
+
+# Manual install.
+mkdir -p $PKG/usr/bin $PKG/usr/share/$PRGNAM
+install -s -m0755 $PRGNAM $PKG/usr/bin
+
+# The README talks about a 'distribution disk' and mentions some files
+# that should be on it. This is a holdover from madmac, as rmac has
+# no distribution disk... but let's include the files here anyway.
+# These were taken from:
+# https://github.com/OpenSourcedGames/Atari-7800/tree/master/7800DEVSYS/7800DEVSYS/MADMAC/EXAMPLES
+# ...and converted to *nix \n line endings.
+tar xvf $CWD/madmac-examples.tar.xz
+cd madmac-examples
+chown root.root *
+chmod 644 *
+mkdir -p $PKG/usr/share/$PRGNAM/examples
+mv * $PKG/usr/share/$PRGNAM/examples
+ln -s examples/atari.s $PKG/usr/share/$PRGNAM/atari.s
+cd -
+
+# man page written for this SlackBuild, basically a cut-down version
+# of docs/rman.rst.
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+ln -s ../../share/$PRGNAM/examples $PKG/usr/doc/$PRGNAM-$VERSION/examples
+cp -a docs/* $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+sed "s,@gitrev@,$( cat $PRGNAM.gitrev )," \
+ $CWD/slack-desc \
+ > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/rmac/rmac.info b/development/rmac/rmac.info
new file mode 100644
index 0000000000000..9a41a9a83d7f0
--- /dev/null
+++ b/development/rmac/rmac.info
@@ -0,0 +1,12 @@
+PRGNAM="rmac"
+VERSION="1.8.6_20170829"
+HOMEPAGE="http://atariage.com/forums/topic/264842-rmac-the-grandchild-of-madmac-assembler-finally-gets-6502-support/"
+DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/rmac-1.8.6_20170829.tar.xz \
+ http://urchlay.naptime.net/~urchlay/src/madmac-examples.tar.xz"
+MD5SUM="603805326d105dca2fafd12f9ba81110 \
+ 3d6dff2b72815935c322c91277ea5074"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/development/rmac/rmac.rst b/development/rmac/rmac.rst
new file mode 100644
index 0000000000000..aeb8d8eaf72f2
--- /dev/null
+++ b/development/rmac/rmac.rst
@@ -0,0 +1,138 @@
+.. RST source for rmac(1) man page. Convert with:
+.. rst2man.py rmac.rst > rmac.1
+.. rst2man.py comes from the SBo development/docutils package.
+
+.. |version| replace:: 1.8.6
+.. |date| date::
+
+====
+RMAC
+====
+
+------------------------------
+68000 and 6502 cross assembler
+------------------------------
+
+:Manual section: 1
+:Manual group: SlackBuilds.org
+:Date: |date|
+:Version: |version|
+
+SYNOPSIS
+========
+
+rmac [*-options*] *source-file* [*source-file ...*]
+
+DESCRIPTION
+===========
+
+RMAC began its life as MADMAC. It was initially written at Atari
+Corporation by programmers who needed a high performance assembler for
+their work. Then, more than 20 years later, because there was still a need
+for such an assembler and what was available wasn't up to expectations,
+Subqmod and eventually Reboot continued work on the freely released
+source, adding Jaguar extensions and fixing bugs. And of course recently
+6502 support was added back!
+
+OPTIONS
+=======
+
+-dname\ *[=value]* Define symbol, with optional value.
+
+-e\ *[file[.err]]* Direct error messages to the specified file.
+
+-fa ALCYON output object file format (implied when **-p** or **-ps** is enabled).
+
+-fb BSD COFF output object file format.
+
+-fe ELF output object file format.
+
+-fx Atari 800 com/exe/xex output object file format.
+
+-i\ *path* Set include-file directory search path. *Note* this is a
+ **semicolon** separated list of directories.
+
+-l\ *[file[prn]]* Construct and direct assembly listing to the specified file.
+
+-l\ *\*[filename]* Create an output listing file without pagination
+
+-n Don't do things behind your back in RISC assembler
+
+-o\ *file[.o]* Direct object code output to the specified file.
+
++/~oall Turn all optimisations on/off
+
++o\ *0-3* Enable specific optimisation
+
+~o\ *0-3* Disable specific optimisation
+
+ `0: Absolute long adddresses to word (default: on)`
+
+ `1: move.l #x,dn/an to moveq (default: on)`
+
+ `2: Word branches to short (default: on)`
+
+ `3: Outer displacement 0(an) to (an) (default: on)`
+
+ `4: lea size(An),An to addq #size,An (default: off)`
+
+ `5: Absolute long base displacement to word (default: off)`
+
+-p Produce an executable (**.prg**) output file.
+
+-ps Produce an executable (**.prg**) output file with symbols.
+
+-q Make RMAC resident in memory (Atari ST only).
+
+-r *size* automatically pad the size of each
+ segment in the output file until the size is an integral multiple of the
+ specified boundary. Size is a letter that specifies the desired boundary.
+
+ `-rw Word (2 bytes, default alignment)`
+
+ `-rl Long (4 bytes)`
+
+ `-rp Phrase (8 bytes)`
+
+ `-rd Double Phrase (16 bytes)`
+
+ `-rq Quad Phrase (32 bytes)`
+
+-s Warn about unoptimized long branches and applied optimisations.
+
+-u Force referenced and undefined symbols global.
+
+-v Verbose mode (print running dialogue).
+
+-x Turn on debugging mode
+
+-yn Set listing page size to n lines.
+
+file\ *[s]* Assemble the specified file.
+
+FILES
+=====
+
+ /usr/share/rmac/atari.s
+ Atari ST system equates.
+
+ENVIRONMENT
+===========
+
+ RMACPATH
+ Semicolon-separated list of directories to search for include files.
+
+AUTHORS
+=======
+
+rmac is Copyright (C) 199x Landon Dyer, 2011-2017 Reboot.
+
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+
+SEE ALSO
+========
+
+*hatari*\ (1)
+
+The full **rmac** documentation in /usr/doc/rmac-|version|/rmac.rst.
diff --git a/development/rmac/slack-desc b/development/rmac/slack-desc
new file mode 100644
index 0000000000000..80edc6df72698
--- /dev/null
+++ b/development/rmac/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------------------------------------------------------|
+rmac: rmac (cross assembler for 6502 and 68000)
+rmac:
+rmac: RMAC began its life as MADMAC. It was initially written at Atari
+rmac: Corporation by programmers who needed a high performance assembler
+rmac: for their work. Then, more than 20 years later, because there was
+rmac: still a need for such an assembler and what was available wasn't
+rmac: up to expectations, Subqmod and eventually Reboot continued work
+rmac: on the freely released source, adding Jaguar extensions and fixing
+rmac: bugs. And of course recently 6502 support was added back!
+rmac:
+rmac: This package was built from git commit @gitrev@