summaryrefslogtreecommitdiffstats
path: root/development/vasm
diff options
context:
space:
mode:
Diffstat (limited to 'development/vasm')
-rw-r--r--development/vasm/README9
-rw-r--r--development/vasm/slack-desc19
-rw-r--r--development/vasm/vasm.SlackBuild117
-rw-r--r--development/vasm/vasm.info10
4 files changed, 155 insertions, 0 deletions
diff --git a/development/vasm/README b/development/vasm/README
new file mode 100644
index 0000000000..465a80938f
--- /dev/null
+++ b/development/vasm/README
@@ -0,0 +1,9 @@
+vasm (portable multi-target cross assembler)
+
+vasm is a portable and retargetable assembler able to create linkable
+objects in different formats as well as absolute code. Different CPU,
+syntax, and output modules are supported.
+
+Supported target CPUs:
+
+6502 6800 6809 arm c16x jagrisc m68k pdp11 ppc tr3200 vidcore x86 z80
diff --git a/development/vasm/slack-desc b/development/vasm/slack-desc
new file mode 100644
index 0000000000..3c01da0bfb
--- /dev/null
+++ b/development/vasm/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------------------------------------------------------|
+vasm: vasm (portable multi-target cross assembler)
+vasm:
+vasm: vasm is a portable and retargetable assembler able to create linkable
+vasm: objects in different formats as well as absolute code. Different CPU,
+vasm: syntax, and output modules are supported.
+vasm:
+vasm: Supported target CPUs:
+vasm:
+vasm: 6502 6800 6809 arm c16x jagrisc m68k pdp11 ppc tr3200 vidcore x86 z80
+vasm:
+vasm:
diff --git a/development/vasm/vasm.SlackBuild b/development/vasm/vasm.SlackBuild
new file mode 100644
index 0000000000..d00fa2806b
--- /dev/null
+++ b/development/vasm/vasm.SlackBuild
@@ -0,0 +1,117 @@
+#!/bin/bash
+
+# Slackware build script for vasm
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# 20230912 bkw: update for v1.9d.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=vasm
+VERSION=${VERSION:-1.9d}
+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
+# create our own versioned top-level dir.
+mkdir -p $PRGNAM-$VERSION
+cd $PRGNAM-$VERSION
+tar xvf $CWD/${PRGNAM}${VERSION/./_}.tar.gz
+cd $PRGNAM
+chown -R root:root .
+# permissions are awful, don't use template here.
+find . -type d -exec chmod 755 {} +
+find . -type f -exec chmod 644 {} +
+
+sed -i "/^COPTS/s,-O2,$SLKCFLAGS," Makefile
+
+runmake() {
+ local cpu="$( echo "$1" | cut -d- -f1 )"
+ local syntax="$( echo "$1" | cut -d- -f2 )"
+ rm -rf obj/*
+ make CPU=$cpu SYNTAX=$syntax
+ install -s -m0755 ${PRGNAM}${cpu}* $PKG/usr/bin
+ rm -f ${PRGNAM}${cpu}*
+}
+
+# qnice looks to be a toy/test architecture (only 22 opcodes), and
+# it's never explained in the docs. leave it out.
+
+# every CPU gets std syntax:
+CPUS="6502 6800 6809 arm c16x jagrisc m68k \
+ pdp11 ppc tr3200 vidcore x86 z80"
+
+# only a few CPUs get extra syntax modules:
+EXTRAS="m68k-mot ppc-mot 6502-madmac jagrisc-madmac \
+ 6502-oldstyle 6800-oldstyle 6809-oldstyle z80-oldstyle"
+
+mkdir -p $PKG/usr/bin
+for cpu in $CPUS; do
+ runmake $cpu-std
+done
+for cpusyn in $EXTRAS; do
+ runmake $cpusyn
+done
+
+install -s -m0755 vobjdump $PKG/usr/bin
+
+# 20230912 bkw: 1.9d's texi doc is slightly broken.
+sed -i 's, \(option{\), @\1,' doc/output_tos.texi
+
+make doc/vasm.pdf
+
+# This would require texi2html... but it fails with the texi2html
+# we have on SBo:
+#make doc/vasm.html
+
+# This works, but doesn't create an index or TOC. Without
+# --no-split, the result is kinda hard to use.
+( cd doc && texi2any --no-split --html vasm.texi )
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a doc/vasm.pdf $PKGDOC
+cp -a doc/index.html $PKGDOC/vasm.html
+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
diff --git a/development/vasm/vasm.info b/development/vasm/vasm.info
new file mode 100644
index 0000000000..9193269ef7
--- /dev/null
+++ b/development/vasm/vasm.info
@@ -0,0 +1,10 @@
+PRGNAM="vasm"
+VERSION="1.9d"
+HOMEPAGE="http://sun.hasenbraten.de/vasm/"
+DOWNLOAD="http://phoenix.owl.de/tags/vasm1_9d.tar.gz"
+MD5SUM="14e87e882ac20f1a69dddf2fd7c6db86"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"