diff options
-rw-r--r-- | development/xa/README | 11 | ||||
-rw-r--r-- | development/xa/dxa-malloc-patch.txt | 21 | ||||
-rw-r--r-- | development/xa/dxa-valgrind-patch.txt | 12 | ||||
-rw-r--r-- | development/xa/slack-desc | 19 | ||||
-rw-r--r-- | development/xa/xa.SlackBuild | 92 | ||||
-rw-r--r-- | development/xa/xa.info | 16 |
6 files changed, 171 insertions, 0 deletions
diff --git a/development/xa/README b/development/xa/README new file mode 100644 index 000000000000..41fa1f24a0a7 --- /dev/null +++ b/development/xa/README @@ -0,0 +1,11 @@ +xa (Andre Fachat's open-source 6502 cross assembler) + +xa is a high-speed, two-pass, portable cross-assembler. It understands +mnemonics and generates code for NMOS 6502s (such as 6502A, 6504, 6507, +6510, 7501, 8500, 8501, 8502...), CMOS 6502s (65C02 and Rockwell R65C02) +and the 65816. + +This build includes xa's companion piece, the disassembler dxa. dxa is +considered alpha-quality software, but is included because it's still +very useful. It produces output that can be reassembled with xa, but +doesn't support the 65816 CPU. diff --git a/development/xa/dxa-malloc-patch.txt b/development/xa/dxa-malloc-patch.txt new file mode 100644 index 000000000000..895ac7b454bf --- /dev/null +++ b/development/xa/dxa-malloc-patch.txt @@ -0,0 +1,21 @@ +--- label.c.orig 2006-11-01 18:23:28.000000000 +0200 ++++ label.c 2010-08-31 21:45:43.000000000 +0300 +@@ -40,7 +40,7 @@ + #include "opcodes.h" + + label *labeltable; +-char defaultlabel[5]; ++char defaultlabel[6]; + unsigned numLabels = 0; + + #ifndef __STDC__ +@@ -55,7 +55,7 @@ + label *entry; + char *buffer; + +- if (!((buffer = malloc (strlen (name))))) ++ if (!((buffer = malloc (strlen (name) + 1)))) + return; + + entry = numLabels ? + diff --git a/development/xa/dxa-valgrind-patch.txt b/development/xa/dxa-valgrind-patch.txt new file mode 100644 index 000000000000..92a5658f69d3 --- /dev/null +++ b/development/xa/dxa-valgrind-patch.txt @@ -0,0 +1,12 @@ +diff --git a/tools/dxa-0.1.3/scan.c b/tools/dxa-0.1.3/scan.c +index e7855f8..586d31b 100644 +--- a/tools/dxa-0.1.3/scan.c ++++ b/tools/dxa-0.1.3/scan.c +@@ -597,6 +597,7 @@ int ScanSpecified (void) + (unsigned int)entry->address); + return 1; + } ++ entry = FindNextEntryType (NULL, ~0, RTN_SURE); + DeleteEntry (entry); + } + diff --git a/development/xa/slack-desc b/development/xa/slack-desc new file mode 100644 index 000000000000..bb69a66cb939 --- /dev/null +++ b/development/xa/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 ':'. + + |-----handy-ruler------------------------------------------------------| +xa: xa (Andre Fachat's open-source 6502 cross assembler) +xa: +xa: xa is a high-speed, two-pass, portable cross-assembler. It understands +xa: mnemonics and generates code for NMOS 6502s (such as 6502A, 6504, +xa: 6507, 6510, 7501, 8500, 8501, 8502 ...), CMOS 6502s (65C02, Rockwell +xa: R65C02) and the 65816. +xa: +xa: +xa: +xa: +xa: diff --git a/development/xa/xa.SlackBuild b/development/xa/xa.SlackBuild new file mode 100644 index 000000000000..cf2c3f1c99df --- /dev/null +++ b/development/xa/xa.SlackBuild @@ -0,0 +1,92 @@ +#!/bin/bash + +# Slackware build script for xa + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=xa +VERSION=${VERSION:-2.3.5} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# dxa is a separate distribution with its own version number +DXAVER=0.1.3 + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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.gz +cd $PRGNAM-$VERSION +chown -R root:root . + +# tarball permissions are worse than usual. +find . -type d -exec chmod 755 {} \; -o -type f -exec chmod 644 {} \; + +sed -i "s,-O2,$SLKCFLAGS," Makefile + +# Note: non-standard use of DESTDIR +make DESTDIR=/usr +make install DESTDIR=$PKG/usr MANDIR=$PKG/usr/man/man1 +strip $PKG/usr/bin/* + +# man pages are installed +x, ugh +chmod -x $PKG/usr/man/man?/*.? +gzip -9 $PKG/usr/man/man?/*.? + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README* COPYING ChangeLog TODO doc/* examples tests mkrom.sh \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# now build dxa +tar xvf $CWD/dxa-$DXAVER.tar.gz +cd dxa-$DXAVER + +# These patches took a minute to figure out how to apply +patch -l < $CWD/dxa-valgrind-patch.txt +patch -p0 < $CWD/dxa-malloc-patch.txt + +# Can't see a disadvantage to enabling the --long-options +sed -i "s,-O6,$SLKCFLAGS -DLONG_OPTIONS," Makefile + +make +install -s -m0755 dxa $PKG/usr/bin +gzip -9c < dxa.1 > $PKG/usr/man/man1/dxa.1.gz + +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:-tgz} diff --git a/development/xa/xa.info b/development/xa/xa.info new file mode 100644 index 000000000000..c0f36acb269d --- /dev/null +++ b/development/xa/xa.info @@ -0,0 +1,16 @@ +PRGNAM="xa" +VERSION="2.3.5" +HOMEPAGE="http://www.floodgap.com/retrotech/xa/" +DOWNLOAD="http://www.floodgap.com/retrotech/xa/dists/xa-2.3.5.tar.gz \ + http://www.floodgap.com/retrotech/xa/dists/dxa-0.1.3.tar.gz \ + http://www.floodgap.com/retrotech/xa/dxa-malloc-patch.txt \ + http://www.floodgap.com/retrotech/xa/dxa-valgrind-patch.txt" +DOWNLOAD_x86_64="" +MD5SUM="edd15aa8674fb86225faf34e56d5cab2 \ + 4fb88a7eda5939472b3a1d1c48b057fc \ + 95988ec879a3b6fd757c830fba7831f4 \ + 689c05e1b8f2e5c84e0e229f2cdc61c9" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" |