File asl-buildfixes.patch of Package asl
diff -Nurp asl-current.orig/doc_DE/as.tex asl-current.work/doc_DE/as.tex
--- asl-current.orig/doc_DE/as.tex 2010-12-12 00:00:21.000000000 +0100
+++ asl-current.work/doc_DE/as.tex 2011-03-30 14:50:25.308293373 +0200
@@ -3154,7 +3154,7 @@ Instruktionen. Es ist zu beachten, da"s
aufw"artskompatibel ist!
%%-----------
\begin{quote}
-ah) MICO8_05, MICO8_V3, MICO8_V31
+ah) MICO8\_05, MICO8\_V3, MICO8\_V31
\end{quote}
Leider hat Lattice die Maschinencodes des Mico8 mehrfach ge"andert, so
da"s verschiedene Targets notwendig wurden, um auch alte Designs weiter
diff -Nurp asl-current.orig/doc_EN/as.tex asl-current.work/doc_EN/as.tex
--- asl-current.orig/doc_EN/as.tex 2010-12-12 00:00:34.000000000 +0100
+++ asl-current.work/doc_EN/as.tex 2011-03-30 14:53:39.631372071 +0200
@@ -3071,7 +3071,7 @@ offers a larger address space and some a
it is not binary upward-compatible!
%%-----------
\begin{quote}
-ah) MICO8_05, MICO8_V3, MICO8_V31
+ah) MICO8\_05, MICO8\_V3, MICO8\_V31
\end{quote}
Lattice unfortunately changed the machine instructions more than once, so
different targets became necessary to provide continued support for older
diff -Nurp asl-current.orig/install.sh asl-current.work/install.sh
--- asl-current.orig/install.sh 2006-05-01 12:31:10.000000000 +0200
+++ asl-current.work/install.sh 2011-03-30 16:02:22.784958550 +0200
@@ -10,7 +10,7 @@ BINPATH=${PREFIX}$1
INCPATH=${PREFIX}$2
MANPATH=${PREFIX}$3
LIBPATH=${PREFIX}$4
-DOCPATH=${PREFIX}$5
+DOCPATH=$5
# this is not a perfect solution, but I don't know a better one at the moment:
@@ -31,7 +31,6 @@ if [ "${BINPATH}" != "" ]; then
chmod 755 ${BINPATH}
for i in asl plist alink pbind p2hex p2bin; do
echo ${BINPATH}/$i
- strip $i
cp $i ${BINPATH}
chmod 755 ${BINPATH}/$i
done
@@ -73,9 +72,9 @@ if [ "${DOCPATH}" != "" ]; then
chmod 755 ${DOCPATH}
for i in DE EN; do
echo ${DOCPATH}/as-$i.doc
- cp doc_$i/as.doc ${DOCPATH}/as-$i.doc
+ cp doc_$i/as.doc ${DOCPATH}/as-$i.txt
echo ${DOCPATH}/as-$i.tex
- cp doc_$i/as.tex ${DOCPATH}/as-$i.tex
+ cp doc_$i/as.html ${DOCPATH}/as-$i.html
if [ -f doc_$i/as.html ]; then
echo ${DOCPATH}/as-$i.html
cp doc_$i/as.html ${DOCPATH}/as-$i.html
@@ -94,6 +93,9 @@ if [ "${DOCPATH}" != "" ]; then
fi
chmod 644 ${DOCPATH}/as-$i.*
done
+ for i in README README.LANGS LICENSE BENCHES TODO ; do
+ cp $i $5/$i
+ done
cp doc_DE/taborg*.tex ${DOCPATH}
chmod 644 ${DOCPATH}/taborg*.tex
cp doc_DE/ps*.tex ${DOCPATH}
diff -Nurp asl-current.orig/Makefile asl-current.work/Makefile
--- asl-current.orig/Makefile 2006-04-10 20:06:56.000000000 +0200
+++ asl-current.work/Makefile 2011-03-30 14:46:15.040047193 +0200
@@ -10,7 +10,8 @@ include objdefs.unix
include makedefs.files
-ALLFLAGS = $(CFLAGS) -D$(CHARSET) -DSTDINCLUDES=\"$(INCDIR)\" -DLIBDIR=\"$(LIBDIR)\"
+# LDFLAGS = -DLIBDIR=\"$(LIBDIR)\"
+CPPFLAGS = -D$(CHARSET) -DSTDINCLUDES=\"$(INCDIR)\" -DLIBDIR=\"$(LIBDIR)\"
#---------------------------------------------------------------------------
# primary targets
diff -Nurp asl-current.orig/Makefile.def asl-current.work/Makefile.def
--- asl-current.orig/Makefile.def 1970-01-01 01:00:00.000000000 +0100
+++ asl-current.work/Makefile.def 2011-03-30 12:50:29.967581039 +0200
@@ -0,0 +1,25 @@
+# -------------------------------------------------------------------------
+# choose your compiler (must be ANSI-compliant!) and linker command, plus
+# any additionally needed flags
+
+CC = gcc
+LD = gcc
+CFLAGS = -O2 -Wall
+LDFLAGS =
+
+# -------------------------------------------------------------------------
+# directories where binaries, includes, and manpages should go during
+# installation
+
+BINDIR = /usr/bin
+INCDIR = /usr/include/asl
+MANDIR = /usr/share/man
+LIBDIR = /usr/lib/asl
+DOCDIR = doc
+
+# -------------------------------------------------------------------------
+# character encoding to use (choose one of them)
+
+# CHARSET = CHARSET_ASCII7
+# CHARSET = CHARSET_IBM437
+CHARSET = CHARSET_ISO8859_1
diff -Nurp asl-current.orig/nls.c asl-current.work/nls.c
--- asl-current.orig/nls.c 2010-08-27 16:52:43.000000000 +0200
+++ asl-current.work/nls.c 2011-03-30 12:50:29.968581097 +0200
@@ -358,12 +358,16 @@ BEGIN
case 'S': FmtBuffer+=1; break;
case 'M': FmtBuffer+=2; break;
case 'H': FmtBuffer+=3; break;
- case 'T': fflush(stdout);
+ case 'T': /* fflush(stdout);
fprintf(stderr, "\nwarning, detected non-ANSI time format specifier '%%T'\n");
- run = "H:%M:%S"; break;
- case 'R': fflush(stdout);
+ */
+ run = "H:%M:%S";
+ break;
+ case 'R': /* fflush(stdout);
fprintf(stderr, "\nwarning, detected non-ANSI time format specifier '%%R'\n");
- run = "H:%M"; break;
+ */
+ run = "H:%M";
+ break;
END
if (NLSInfo.TimeSep==Nil)
BEGIN
diff -Nurp asl-current.orig/sysdefs.h asl-current.work/sysdefs.h
--- asl-current.orig/sysdefs.h 2008-01-02 23:32:21.000000000 +0100
+++ asl-current.work/sysdefs.h 2011-03-30 13:31:47.999961925 +0200
@@ -104,6 +104,12 @@
# endif
#endif
+#ifdef __powerpc64__
+#ifndef _POWER64
+#define _POWER64
+#endif
+#endif
+
/*---------------------------------------------------------------------------*/
/* ditto for ARM platforms */
@@ -535,6 +541,29 @@ typedef unsigned long long Card64;
#define LOCALE_NLS
#endif
+/*---------------------------------------------------------------------------*/
+/* HP-PA 1.x with Linux: */
+
+#ifdef __linux__
+#define ARCHSYSNAME "unknown-linux"
+#define DEFSMADE
+#define OPENRDMODE "r"
+#define OPENWRMODE "w"
+#define OPENUPMODE "r+"
+#define IEEEFLOAT
+typedef signed char Integ8;
+typedef unsigned char Card8;
+typedef signed short Integ16;
+typedef unsigned short Card16;
+#define HAS16
+typedef signed int Integ32;
+typedef unsigned int Card32;
+typedef signed long long Integ64;
+typedef unsigned long long Card64;
+#define HAS64
+#define LOCALE_NLS
+#endif
+
#endif /* __hppa */
/*===========================================================================*/
@@ -613,9 +642,42 @@ typedef unsigned long long Card64;
#define NO_NLS
#endif
+#endif /* _POWER */
+
+/*===========================================================================*/
+/* POWER64 platforms */
+
+#ifdef _POWER64
+
+#define ARCHPRNAME "ppc64"
+
+/*---------------------------------------------------------------------------*/
+/* POWER with Linux */
+
+#ifdef __linux__
+#define ARCHSYSNAME "unknown-linux"
+#define DEFSMADE
+#define OPENRDMODE "r"
+#define OPENWRMODE "w"
+#define OPENUPMODE "r+"
+#define IEEEFLOAT
+typedef signed char Integ8;
+typedef unsigned char Card8;
+typedef signed short Integ16;
+typedef unsigned short Card16;
+#define HAS16
+typedef signed int Integ32;
+typedef unsigned int Card32;
+typedef signed long Integ64;
+typedef unsigned long Card64;
+#define HAS64
+#define LOCALE_NLS
+#endif
+
#endif /* _POWER */
/*===========================================================================*/
+
/* VAX platforms */
#ifdef __vax__
@@ -993,9 +1055,9 @@ typedef unsigned long Card32;
/*===========================================================================*/
/* AMD opteron/athlon64/k8 platforms */
-#ifdef __k8__
+#ifdef __x86_64__
-#define ARCHPRNAME "k8"
+#define ARCHPRNAME "x86_64"
/*---------------------------------------------------------------------------*/
/* x86-64 with Linux and GCC:
@@ -1023,7 +1085,101 @@ typedef unsigned long long Card64;
#define LOCALE_NLS
#endif
-#endif /* __k8__ */
+#endif /* __x86_64__ */
+
+#ifdef __ia64__
+
+#define ARCHPRNAME "ia64"
+
+/*---------------------------------------------------------------------------*/
+/* Intel ia64 with Linux and GCC: */
+
+
+#ifdef __linux__
+#define ARCHSYSNAME "unknown-linux"
+#define DEFSMADE
+#define OPENRDMODE "r"
+#define OPENWRMODE "w"
+#define OPENUPMODE "r+"
+#define IEEEFLOAT
+typedef signed char Integ8;
+typedef unsigned char Card8;
+typedef signed short Integ16;
+typedef unsigned short Card16;
+#define HAS16
+typedef signed int Integ32;
+typedef unsigned int Card32;
+typedef signed long long Integ64;
+typedef unsigned long long Card64;
+#define HAS64
+#define LOCALE_NLS
+#endif
+
+
+#endif /* __ia64__ */
+
+#if defined(__s390__) && !defined(__s390x__)
+
+#define ARCHPRNAME "S/390"
+
+/*---------------------------------------------------------------------------*/
+/* IBM S/390 with Linux and GCC: */
+
+
+#ifdef __linux__
+#define ARCHSYSNAME "unknown-linux"
+#define DEFSMADE
+#define OPENRDMODE "r"
+#define OPENWRMODE "w"
+#define OPENUPMODE "r+"
+#define IEEEFLOAT
+typedef signed char Integ8;
+typedef unsigned char Card8;
+typedef signed short Integ16;
+typedef unsigned short Card16;
+#define HAS16
+typedef signed int Integ32;
+typedef unsigned int Card32;
+typedef signed long long Integ64;
+typedef unsigned long long Card64;
+#define HAS64
+#define LOCALE_NLS
+#endif
+
+
+#endif /* __s390__ */
+
+/*---------------------------------------------------------------------------*/
+/* IBM zSeries (S/390 G7) with Linux and GCC: */
+
+#ifdef __s390x__
+
+#define ARCHPRNAME "IBM zSeries"
+
+#ifdef __linux__
+#define ARCHSYSNAME "unknown-linux"
+#define DEFSMADE
+#define OPENRDMODE "r"
+#define OPENWRMODE "w"
+#define OPENUPMODE "r+"
+#define IEEEFLOAT
+typedef signed char Integ8;
+typedef unsigned char Card8;
+typedef signed short Integ16;
+typedef unsigned short Card16;
+#define HAS16
+typedef signed int Integ32;
+typedef unsigned int Card32;
+typedef signed long Integ64;
+typedef unsigned long Card64;
+#define HAS64
+#define LOCALE_NLS
+#endif
+
+
+#endif /* __s390x__ */
+
+
/*===========================================================================*/
/* ARM platform */
diff -Nurp asl-current.orig/tex2doc.c asl-current.work/tex2doc.c
--- asl-current.orig/tex2doc.c 2010-08-27 16:52:43.000000000 +0200
+++ asl-current.work/tex2doc.c 2011-03-30 14:44:16.023259847 +0200
@@ -333,7 +333,7 @@ BEGIN
BEGIN
*c='\0'; strcpy(Dest,Src);
for (c++; *c==' '; c++);
- strcpy(Src,c);
+ strmov(Src,c);
END
END