]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/commitdiff
dev86: Make package work on x86_64.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Jan 2012 16:24:32 +0000 (17:24 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Jan 2012 16:24:51 +0000 (17:24 +0100)
dev86/dev86-64bit.patch [new file with mode: 0644]
dev86/dev86.nm
dev86/patches/dev86-long.patch [new file with mode: 0644]
dev86/patches/dev86-nostrip.patch [new file with mode: 0644]

diff --git a/dev86/dev86-64bit.patch b/dev86/dev86-64bit.patch
new file mode 100644 (file)
index 0000000..01fa549
--- /dev/null
@@ -0,0 +1,20 @@
+--- dev86-0.16.17/bcc/bcc.c.fix        2005-01-03 23:41:55.000000000 +0100
++++ dev86-0.16.17/bcc/bcc.c    2006-12-27 16:32:57.000000000 +0100
+@@ -226,12 +226,12 @@
+    } else {
+       /* Relative paths to normal PREFIX directory */
+-      default_include = build_libpath("-I", "/lib/bcc/include", "");
+-      default_libdir  = build_libpath("-L", "/lib/bcc", libdir_suffix);
+-      optim_rules     = build_libpath("-d", "/lib/bcc", libdir_suffix);
++      default_include = build_libpath("-I", "/lib64/bcc/include", "");
++      default_libdir  = build_libpath("-L", "/lib64/bcc", libdir_suffix);
++      optim_rules     = build_libpath("-d", "/lib64/bcc", libdir_suffix);
+-      build_prefix("/lib/bcc", libdir_suffix, "");
+-      build_prefix("/lib/bcc", "", "");
++      build_prefix("/lib64/bcc", libdir_suffix, "");
++      build_prefix("/lib64/bcc", "", "");
+    }
+    build_prefix("/bin", "", "");
index a0679992ddae1f7d212982af41a2c498f200fb57..ce9f8b6b82ed3266d079eba6bf9e440d047d05ec 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = dev86
 version    = 0.16.18
-release    = 2
+release    = 3
 
 maintainer = Ben Schweikert <ben.schweikert@ipfire.org>
 groups     = Development/Languages
@@ -27,6 +27,12 @@ build
                ncurses-devel
        end
 
+       prepare_cmds
+               if [ "$(uname -m)" = "x86_64" ]; then
+                       patch -Np1 -i %{DIR_SOURCE}/dev86-64bit.patch
+               fi
+       end
+
        build
                make bcc86 unproto copt as86 ld86 CFLAGS="%{CFLAGS}"
                make -C cpp CFLAGS="%{CFLAGS}" %{PARALLELISMFLAGS}
@@ -40,7 +46,7 @@ build
        make_install_targets = \
                DIST=%{BUILDROOT} \
                MANDIR=/usr/share/man \
-               LIBDIR=/usr/lib/bcc \
+               LIBDIR=%{libdir}/bcc \
                INCLDIR=/usr/include/bcc \
                LOCLAPREFIX=/usr \
                install install-man
diff --git a/dev86/patches/dev86-long.patch b/dev86/patches/dev86-long.patch
new file mode 100644 (file)
index 0000000..34cde19
--- /dev/null
@@ -0,0 +1,17 @@
+diff -up dev86-0.16.17/ld/x86_aout.h.long dev86-0.16.17/ld/x86_aout.h
+--- dev86-0.16.17/ld/x86_aout.h.long   2003-01-28 23:17:14.000000000 +0100
++++ dev86-0.16.17/ld/x86_aout.h        2009-02-19 11:37:10.000000000 +0100
+@@ -11,10 +11,11 @@
+ /* If the host isn't an x86 all bets are off, use chars. */
+ #if defined(i386) || defined(__BCC__) || defined(MSDOS)
+ typedef long Long;
+-#define __OUT_OK 1
+ #else
+-typedef char Long[4];
++#include <stdint.h>
++typedef int32_t Long;
+ #endif
++#define __OUT_OK 1
+ struct        exec {                  /* a.out header */
+   unsigned char       a_magic[2];     /* magic number */
diff --git a/dev86/patches/dev86-nostrip.patch b/dev86/patches/dev86-nostrip.patch
new file mode 100644 (file)
index 0000000..b26169a
--- /dev/null
@@ -0,0 +1,11 @@
+--- dev86-0.16.17/makefile.in.nostrip  2007-01-30 14:28:38.000000000 +0100
++++ dev86-0.16.17/makefile.in  2007-01-30 14:40:56.000000000 +0100
+@@ -78,7 +78,7 @@
+ # Install files with the userid of the currently running process.
+ INDAT=-m 644
+-INEXE=-m 755 -s
++INEXE=-m 755
+ INSCR=-m 755
+ #ifdef __CYGWIN__