--- /dev/null
+###############################################################################
+# 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
--- /dev/null
+--- 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
--- /dev/null
+--- 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, ':');