Wed Dec 12 13:16:02 2012 UTC ()
Import xa65-2.3.5 as devel/xa65, packaged for wip by Moritz Wilhelmy.

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.

Key features:
* C-like preprocessor (and understands cpp for additional feature support)
* rich expression syntax and pseudo-op vocabulary
* multiple character sets
* binary linking
* supports o65 relocatable objects with a full linker and relocation suite, as
  well as "bare" plain binary object files
* block structure for label scoping


(wiz)
diff -r0 -r1.1 pkgsrc/devel/xa65/DESCR
diff -r0 -r1.1 pkgsrc/devel/xa65/Makefile
diff -r0 -r1.1 pkgsrc/devel/xa65/PLIST
diff -r0 -r1.1 pkgsrc/devel/xa65/distinfo
diff -r0 -r1.1 pkgsrc/devel/xa65/patches/patch-Makefile
diff -r0 -r1.1 pkgsrc/devel/xa65/patches/patch-src_xa.c

File Added: pkgsrc/devel/xa65/DESCR
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.

Key features:
* C-like preprocessor (and understands cpp for additional feature support)
* rich expression syntax and pseudo-op vocabulary
* multiple character sets
* binary linking
* supports o65 relocatable objects with a full linker and relocation suite, as
  well as "bare" plain binary object files
* block structure for label scoping

File Added: pkgsrc/devel/xa65/Makefile
# $NetBSD: Makefile,v 1.1 2012/12/12 13:16:02 wiz Exp $

DISTNAME=		xa-2.3.5
PKGNAME=		${DISTNAME:S/xa/&65/}
CATEGORIES=		devel
MASTER_SITES=		http://www.floodgap.com/retrotech/xa/dists/

MAINTAINER=		mwilhelmy@users.sourceforge.net
HOMEPAGE=		http://www.floodgap.com/retrotech/xa/
COMMENT=		Cross assembler for MOS Technologies 6502
LICENSE=		gnu-gpl-v2

NO_CONFIGURE=		yes

.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/devel/xa65/PLIST
@comment $NetBSD: PLIST,v 1.1 2012/12/12 13:16:02 wiz Exp $
bin/file65
bin/ldo65
bin/printcbm
bin/reloc65
bin/uncpk
bin/xa
man/man1/file65.1
man/man1/ldo65.1
man/man1/printcbm.1
man/man1/reloc65.1
man/man1/uncpk.1
man/man1/xa.1
share/doc/xa65/README
share/doc/xa65/c64def.def
share/doc/xa65/fileformat.txt
share/doc/xa65/pack.doc
share/doc/xa65/pack_eng.a65
share/doc/xa65/pack_ger.a65
share/doc/xa65/peng.l
share/doc/xa65/xa-de.log
share/doc/xa65/xa-de.txt
share/doc/xa65/xa.html
share/doc/xa65/xa.log
share/doc/xa65/xa.txt
share/doc/xa65/xaannounce

File Added: pkgsrc/devel/xa65/distinfo
$NetBSD: distinfo,v 1.1 2012/12/12 13:16:02 wiz Exp $

SHA1 (xa-2.3.5.tar.gz) = d8f4564953adfcee69faacfa300b954875fabe21
RMD160 (xa-2.3.5.tar.gz) = 7b03a1b217dc855064f7b2b952bdb3762bfed014
Size (xa-2.3.5.tar.gz) = 132551 bytes
SHA1 (patch-Makefile) = d66b210b479135d876bfd5fe2ec8316f63238e10
SHA1 (patch-src_xa.c) = 1c42a07c14cfb4771d29a7f2774368fa57edb5b8

File Added: pkgsrc/devel/xa65/patches/patch-Makefile
$NetBSD: patch-Makefile,v 1.1 2012/12/12 13:16:02 wiz Exp $

Install documentation, fix Makefile variables

--- Makefile.orig	2009-02-08 06:49:30.000000000 +0000
+++ Makefile
@@ -15,11 +15,11 @@ LDFLAGS = -lc
 #CFLAGS =
 #LD = ld
 
-DESTDIR = /usr/local
+PREFIX?= /usr/local
 
-BINDIR = $(DESTDIR)/bin
-MANDIR = $(DESTDIR)/share/man/man1
-DOCDIR = $(DESTDIR)/share/doc
+BINDIR = $(PREFIX)/bin
+MANDIR = $(PREFIX)/man/man1
+DOCDIR = $(PREFIX)/share/doc
 
 MKDIR = mkdir -p
 INSTALL = install
@@ -51,11 +51,29 @@ clean:
 	rm -f xa *.exe *.o65
 
 install: xa uncpk
-	$(MKDIR) $(BINDIR)
-	$(MKDIR) $(MANDIR)
-	$(INSTALL) xa reloc65 ldo65 file65 printcbm uncpk $(BINDIR)
-	$(INSTALL) man/file65.1 man/ldo65.1 man/printcbm.1 man/reloc65.1 man/uncpk.1 man/xa.1 $(MANDIR)
-	#$(MKDIR) $(DOCDIR)/xa65
+	$(MKDIR) $(DESTDIR)$(BINDIR)
+	$(MKDIR) $(DESTDIR)$(MANDIR)
+	$(MKDIR) $(DESTDIR)$(DOCDIR)/xa65
+.for prg in xa reloc65 ldo65 file65 printcbm uncpk
+	$(BSD_INSTALL_PROGRAM) $(prg) $(DESTDIR)$(BINDIR)
+	$(BSD_INSTALL_DATA) man/$(prg).1 $(DESTDIR)$(MANDIR)
+.endfor	
+.for doc in	examples/c64def.def   \
+		examples/pack.doc     \
+		examples/pack_eng.a65 \
+		examples/pack_ger.a65 \
+		examples/peng.l       \
+		doc/fileformat.txt    \
+		doc/README            \
+	     	doc/xaannounce        \
+		doc/xa-de.log         \
+		doc/xa-de.txt         \
+		doc/xa.html           \
+		doc/xa.log            \
+		doc/xa.txt
+
+	$(BSD_INSTALL_DATA) $(doc) $(DESTDIR)$(DOCDIR)/xa65
+.endfor
 
 dist: clean
 	#cd .. ; tar cvf xa-2.3.5A.tar xa-2.3.5 ; gzip xa-2.3.5A.tar

File Added: pkgsrc/devel/xa65/patches/Attic/patch-src_xa.c
$NetBSD: patch-src_xa.c,v 1.1 2012/12/12 13:16:02 wiz Exp $

Rename internal getline so it doesn't conflict with libc's

--- src/xa.c.orig	2009-01-21 16:57:32.000000000 +0000
+++ src/xa.c
@@ -87,7 +87,7 @@ static int pass2(void);
 static int puttmp(int);
 static int puttmps(signed char *, int);
 static void chrput(int);
-static int getline(char *);
+static int xagetline(char *);
 static void lineout(void);
 static long ga_p1(void);
 static long gm_p1(void);
@@ -763,7 +763,7 @@ static int pass1(void)
 	temp_er = 0;
 
 /*FIXIT*/
-     while(!(er=getline(s)))
+     while(!(er=xagetline(s)))
      {         
           er=t_p1((signed char*)s,o,&l,&al);
 	  switch(segment) {
@@ -1002,7 +1002,7 @@ static int puttmps(signed char *s, int l
 
 static char l[MAXLINE];
 
-static int getline(char *s)
+static int xagetline(char *s)
 {
      static int ec;