From b9c0662af30943052283f5f017a71dfcb2dcb098 Mon Sep 17 00:00:00 2001 From: Dan Horák Date: Apr 15 2009 07:42:01 +0000 Subject: initial import --- diff --git a/.cvsignore b/.cvsignore index e69de29..dcfb9f3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +xa-2.3.5.tar.gz diff --git a/sources b/sources index e69de29..03df594 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +edd15aa8674fb86225faf34e56d5cab2 xa-2.3.5.tar.gz diff --git a/xa-2.3.5-getline.patch b/xa-2.3.5-getline.patch new file mode 100644 index 0000000..92a1633 --- /dev/null +++ b/xa-2.3.5-getline.patch @@ -0,0 +1,30 @@ +diff -Nrup xa-2.3.5.orig/src/xa.c xa-2.3.5/src/xa.c +--- xa-2.3.5.orig/src/xa.c 2009-01-21 17:57:32.000000000 +0100 ++++ xa-2.3.5/src/xa.c 2009-03-31 16:47:33.000000000 +0200 +@@ -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 xgetline(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=xgetline(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 xgetline(char *s) + { + static int ec; + diff --git a/xa-2.3.5-make.patch b/xa-2.3.5-make.patch new file mode 100644 index 0000000..692394b --- /dev/null +++ b/xa-2.3.5-make.patch @@ -0,0 +1,48 @@ +diff -Nup xa-2.3.5.orig/Makefile xa-2.3.5/Makefile +--- xa-2.3.5.orig/Makefile 2009-02-08 07:49:30.000000000 +0100 ++++ xa-2.3.5/Makefile 2009-04-02 11:18:47.000000000 +0200 +@@ -15,11 +15,12 @@ LDFLAGS = -lc + #CFLAGS = + #LD = ld + +-DESTDIR = /usr/local ++DESTDIR = ++PREFIX = /usr/local + +-BINDIR = $(DESTDIR)/bin +-MANDIR = $(DESTDIR)/share/man/man1 +-DOCDIR = $(DESTDIR)/share/doc ++BINDIR = $(DESTDIR)$(PREFIX)/bin ++MANDIR = $(DESTDIR)$(PREFIX)/share/man/man1 ++DOCDIR = $(DESTDIR)$(PREFIX)/share/doc + + MKDIR = mkdir -p + INSTALL = install +@@ -27,13 +28,13 @@ INSTALL = install + all: xa uncpk + + xa: +- (cd src && LD=${LD} CC="${CC} ${CFLAGS}" ${MAKE}) ++ (cd src && LD=${LD} CC="${CC}" CFLAGS="${CFLAGS}" ${MAKE}) + + load: +- (cd loader && CC="${CC} ${CFLAGS}" ${MAKE}) ++ (cd loader && CC="${CC}" CFLAGS="${CFLAGS}" ${MAKE}) + + uncpk: +- (cd misc && CC="${CC} ${CFLAGS}" ${MAKE}) ++ (cd misc && CC="${CC}" CFLAGS="${CFLAGS}" ${MAKE}) + + dos: clean + (cd src && LD=gcc-go32 CC=gcc-go32 CFLAGS="-W -Wall -pedantic" ${MAKE}) +@@ -53,8 +54,8 @@ clean: + 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) ++ $(INSTALL) -m 0755 xa reloc65 ldo65 file65 printcbm uncpk $(BINDIR) ++ $(INSTALL) -m 0644 man/file65.1 man/ldo65.1 man/printcbm.1 man/reloc65.1 man/uncpk.1 man/xa.1 $(MANDIR) + #$(MKDIR) $(DOCDIR)/xa65 + + dist: clean diff --git a/xa.spec b/xa.spec new file mode 100644 index 0000000..c759efc --- /dev/null +++ b/xa.spec @@ -0,0 +1,78 @@ +Name: xa +Version: 2.3.5 +Release: 3%{?dist} +Summary: 6502/65816 cross-assembler + +Group: Development/Tools +License: GPLv2+ +URL: http://www.floodgap.com/retrotech/xa/ +Source0: http://www.floodgap.com/retrotech/%{name}/dists/%{name}-%{version}.tar.gz +# fix conflict with recent glibc, reported in private email +Patch0: %{name}-2.3.5-getline.patch +# update the build system, reported in private email +Patch1: %{name}-2.3.5-make.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + + +%description +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 amongst its 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 + + +%prep +%setup -q +%patch0 -p1 -b .getline +%patch1 -p1 -b .make + +# fix encoding +for f in ChangeLog +do + iconv -f ISO-8859-1 -t UTF-8 < $f > $f.new + touch -r $f $f.new + mv $f.new $f +done + + +%build +make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} INSTALL="install -p" + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc COPYING ChangeLog README.1st doc/xa.txt +%{_bindir}/* +%{_mandir}/man1/* + + +%changelog +* Tue Apr 14 2009 Dan Horák - 2.3.5-3 +- move the INSTALL override to "make install" +- comment the patches + +* Tue Mar 31 2009 Dan Horák - 2.3.5-2 +- don't use hardcoded /usr +- preserve timestamps when using "install" + +* Sat Feb 21 2009 Dan Horák - 2.3.5-1 +- initial Fedora version