]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/commitdiff
Merge remote-tracking branch 'stevee/xen-dev86'
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 15 Dec 2011 09:25:11 +0000 (10:25 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 15 Dec 2011 09:25:11 +0000 (10:25 +0100)
dev86/dev86.nm [new file with mode: 0644]
dev86/patches/01-dev86-pic.patch [new file with mode: 0644]
dev86/patches/02-dev86-0.16.17-fortify.patch [new file with mode: 0644]

diff --git a/dev86/dev86.nm b/dev86/dev86.nm
new file mode 100644 (file)
index 0000000..c31897e
--- /dev/null
@@ -0,0 +1,60 @@
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = dev86
+version    = 0.16.18
+release    = 1
+
+maintainer = Ben Schweikert <ben.schweikert@ipfire.org>
+groups     = Development/Languages
+url        = http://www.debath.co.uk/dev86/
+license    = GPL+
+summary    = Cross development C compiler.
+
+description
+       This is a cross development C compiler, assembler and linker
+       environment for the production of 8086 executables
+       (Optionally MSDOS COM)
+end
+
+source_dl = http://www.debath.co.uk/dev86/
+sources   = Dev86src-%{version}.tar.gz
+
+build
+       requires
+               ncurses-devel
+       end
+
+       build
+               make bcc86 unproto copt as86 ld86 CFLAGS="%{CFLAGS}"
+               make -C cpp CFLAGS="%{CFLAGS}" %{PARALLELISMFLAGS}
+               make -C ar CFLAGS="%{CFLAGS}" %{PARALLELISMFLAGS}
+               make -C ld CFLAGS="%{CFLAGS}" %{PARALLELISMFLAGS}
+
+               # ncc doesn't support gcc optflags and no parallel build
+               make
+       end
+
+       make_install_targets = \
+               DIST=%{BUILDROOT} \
+               MANDIR=/usr/share/man \
+               LIBDIR=/usr/lib/bcc \
+               INCLDIR=/usr/include/bcc \
+               LOCLAPREFIX=/usr \
+               install install-man
+
+       install_cmds
+               # Remove useless files.
+               rm -rf %{BUILDROOT}/usr/share/{applications,pixmaps}
+       end
+end
+
+packages
+       package %{name}
+
+       package %{name}-devel
+               template DEVEL
+       end
+end
diff --git a/dev86/patches/01-dev86-pic.patch b/dev86/patches/01-dev86-pic.patch
new file mode 100644 (file)
index 0000000..ec5d706
--- /dev/null
@@ -0,0 +1,20 @@
+--- dev86-0.16.18/elksemu/elks.c.orig  2005-11-04 01:35:37.000000000 +0100
++++ dev86-0.16.18/elksemu/elks.c       2005-11-04 01:45:28.000000000 +0100
+@@ -129,8 +129,17 @@
+ static inline int vm86_mine(struct vm86_struct* v86)
+ {
+       int __res;
++#ifndef __PIC__
+       __asm__ __volatile__("int $0x80\n"
+       :"=a" (__res):"a" ((int)OLD_SYS_vm86), "b" ((int)v86));
++#else
++      __asm__ __volatile__(
++              "movl   %%ebx,%%ecx\n\t"
++              "movl   %2,%%ebx\n\t"
++              "int    $0x80\n\t"
++              "movl   %%ecx,%%ebx\n\t"
++              :"=a" (__res):"a" ((int)OLD_SYS_vm86), "r" ((int)v86) : "ecx");
++#endif
+       return __res;
+ } 
+ #endif
diff --git a/dev86/patches/02-dev86-0.16.17-fortify.patch b/dev86/patches/02-dev86-0.16.17-fortify.patch
new file mode 100644 (file)
index 0000000..715d0c4
--- /dev/null
@@ -0,0 +1,43 @@
+--- dev86-0.16.17/bcc/bcc.c
++++ dev86-0.16.17/bcc/bcc.c
+@@ -19,6 +19,7 @@
+ #ifdef __STDC__
+ #include <stdlib.h>
+ #ifndef MSDOS
++#include <limits.h>
+ #include <unistd.h>
+ #endif
+ #else
+@@ -596,12 +597,17 @@
+    }
+ }
+-void
+-command_reset()
+-{
+ #ifndef MAXPATHLEN
++#ifdef PATH_MAX
++#define MAXPATHLEN PATH_MAX
++#else
+ #define MAXPATHLEN 1024
+ #endif
++#endif
++
++void
++command_reset()
++{
+    char buf[MAXPATHLEN];
+    char ** prefix;
+    char * saved_cmd;
+@@ -1308,11 +1314,7 @@
+       for(d=s=ptr; d && *s; s=d)
+       {
+-#ifdef MAXPATHLEN
+          char buf[MAXPATHLEN];
+-#else
+-         char buf[1024];
+-#endif
+        free(temp);
+          d=strchr(s, ':');