From 2ab0197006ed3c4af6f296cf213ee10ea37a5f6a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 23 Feb 2010 16:23:56 +0100 Subject: [PATCH] Added dev86-0.16.17 build template. --HG-- extra : convert_revision : 6638b11cb9380cc595b2eb8d6e6aa84bbf96f6ac --- srcpkgs/dev86/patches/dev86-pic.patch | 20 +++++++++++++++ srcpkgs/dev86/template | 37 +++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 srcpkgs/dev86/patches/dev86-pic.patch create mode 100644 srcpkgs/dev86/template diff --git a/srcpkgs/dev86/patches/dev86-pic.patch b/srcpkgs/dev86/patches/dev86-pic.patch new file mode 100644 index 0000000000..439c2648b7 --- /dev/null +++ b/srcpkgs/dev86/patches/dev86-pic.patch @@ -0,0 +1,20 @@ +--- elksemu/elks.c.orig 2005-11-04 01:35:37.000000000 +0100 ++++ 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/srcpkgs/dev86/template b/srcpkgs/dev86/template new file mode 100644 index 0000000000..8456c8ed5c --- /dev/null +++ b/srcpkgs/dev86/template @@ -0,0 +1,37 @@ +# Template file for 'dev86' +pkgname=dev86 +version=0.16.17 +distfiles="http://www.debath.co.uk/dev86/Dev86src-$version.tar.gz" +build_style=gnu_makefile +make_build_args="PREFIX=/usr DIST=$XBPS_DESTDIR/$pkgname-$version" +make_install_target="DIST=$XBPS_DESTDIR/$pkgname-$version install-all" +short_desc="8086 cross development compiler, assembler and linker" +maintainer="Juan RP " +checksum=52ed4980c0e4b68d2624aadb0ceb0339cb3fd8dd7c2175419d4f77a451846cbe +long_desc=" + This package provides a cross development C compiler, assembler and linker + environment for the production of 8086 executables (Optionally MSDOS COM)." + +nostrip=yes +disable_parallel_build=yes + +Add_dependency run glibc +Add_dependency build bin86 + +pre_build() +{ + if [ "${xbps_machine}" = "x86_64" ]; then + sed -i -e 's,alt-libs elksemu,alt-libs,' \ + -e 's,install-lib install-emu,install-lib,' \ + ${wrksrc}/makefile.in + fi +} + +post_install() +{ + install -d ${DESTDIR}/usr/share + mv ${DESTDIR}/usr/man ${DESTDIR}/usr/share + # Remove stuff supplied by bin86 + rm -f ${DESTDIR}/usr/bin/{as,ld,nm,objdump,size}86 + rm -f ${DESTDIR}/usr/share/man/man1/{as,ld}86.1 +}