Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
114837d5eb | ||
|
|
42fe883652 | ||
| 8dfe9c6fe2 | |||
| 4610ef006a |
7 changed files with 158 additions and 21 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
xa-2.3.5.tar.gz
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: xa
|
||||
# $Id$
|
||||
NAME := xa
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
1
sources
1
sources
|
|
@ -0,0 +1 @@
|
|||
edd15aa8674fb86225faf34e56d5cab2 xa-2.3.5.tar.gz
|
||||
30
xa-2.3.5-getline.patch
Normal file
30
xa-2.3.5-getline.patch
Normal file
|
|
@ -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;
|
||||
|
||||
48
xa-2.3.5-make.patch
Normal file
48
xa-2.3.5-make.patch
Normal file
|
|
@ -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
|
||||
78
xa.spec
Normal file
78
xa.spec
Normal file
|
|
@ -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 <dan[at]danny.cz> - 2.3.5-3
|
||||
- move the INSTALL override to "make install"
|
||||
- comment the patches
|
||||
|
||||
* Tue Mar 31 2009 Dan Horák <dan[at]danny.cz> - 2.3.5-2
|
||||
- don't use hardcoded /usr
|
||||
- preserve timestamps when using "install"
|
||||
|
||||
* Sat Feb 21 2009 Dan Horák <dan[at]danny.cz> - 2.3.5-1
|
||||
- initial Fedora version
|
||||
Loading…
Add table
Add a link
Reference in a new issue