File asl-buildfixes.patch of Package asl

Index: asl-current/install.sh
===================================================================
--- asl-current.orig/install.sh
+++ asl-current/install.sh
@@ -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
@@ -74,7 +73,7 @@ if [ "${DOCPATH}" != "" ]; then
  for i in DE EN; do
   if [ -f doc_$i/as.html ]; then
     echo ${DOCPATH}/as-$i.doc
-    cp doc_$i/as.doc ${DOCPATH}/as-$i.doc
+    cp doc_$i/as.doc ${DOCPATH}/as-$i.txt
   fi
   echo ${DOCPATH}/as-$i.tex
   cp doc_$i/as.tex ${DOCPATH}/as-$i.tex
@@ -96,6 +95,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}
Index: asl-current/Makefile
===================================================================
--- asl-current.orig/Makefile
+++ asl-current/Makefile
@@ -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
Index: asl-current/Makefile.def
===================================================================
--- /dev/null
+++ asl-current/Makefile.def
@@ -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
Index: asl-current/sysdefs.h
===================================================================
--- asl-current.orig/sysdefs.h
+++ asl-current/sysdefs.h
@@ -138,6 +138,12 @@
 # endif
 #endif
 
+#ifdef __powerpc64__
+#ifndef _POWER64
+#define _POWER64
+#endif
+#endif
+
 /*---------------------------------------------------------------------------*/
 /* ditto for ARM platforms */
 
@@ -602,6 +608,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 */ 
 
 /*===========================================================================*/
@@ -683,9 +712,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__
@@ -1190,7 +1252,102 @@ 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;
+#define PRIInteg32 "d"
+typedef unsigned int Card32;
+typedef signed long Integ64;
+typedef unsigned long Card64;
+#define HAS64
+#define LOCALE_NLS
+#endif
+
+
+#endif /* __s390x__ */
+
+
 
 /*===========================================================================*/
 /* Intel x86_64 platforms */
openSUSE Build Service is sponsored by