From: Michael Tremer Date: Sat, 7 Jan 2012 16:24:32 +0000 (+0100) Subject: dev86: Make package work on x86_64. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c4fd909065842b4cce786116db2d585ed4d29fc;p=people%2Famarx%2Fipfire-3.x.git dev86: Make package work on x86_64. --- diff --git a/dev86/dev86-64bit.patch b/dev86/dev86-64bit.patch new file mode 100644 index 000000000..01fa549b9 --- /dev/null +++ b/dev86/dev86-64bit.patch @@ -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", "", ""); diff --git a/dev86/dev86.nm b/dev86/dev86.nm index a0679992d..ce9f8b6b8 100644 --- a/dev86/dev86.nm +++ b/dev86/dev86.nm @@ -5,7 +5,7 @@ name = dev86 version = 0.16.18 -release = 2 +release = 3 maintainer = Ben Schweikert 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 index 000000000..34cde195b --- /dev/null +++ b/dev86/patches/dev86-long.patch @@ -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 ++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 index 000000000..b26169abb --- /dev/null +++ b/dev86/patches/dev86-nostrip.patch @@ -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__