diff --git a/devel/ffcall/Makefile b/devel/ffcall/Makefile index 3e146aa1d8a..5a05bfcc93b 100644 --- a/devel/ffcall/Makefile +++ b/devel/ffcall/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.14 2010/01/10 13:10:36 kili Exp $ +# $OpenBSD: Makefile,v 1.15 2010/08/23 14:16:09 jasper Exp $ # $FreeBSD: ports/devel/ffcall/Makefile,v 1.2 2001/08/31 14:20:18 sobomax Exp $ # Original From: jagapen@home.com @@ -9,6 +9,7 @@ NOT_FOR_ARCHS= arm m68k COMMENT= foreign function call libraries DISTNAME= ffcall-1.10 +REVISION = 0 SHARED_LIBS= avcall 1.0 \ callback 1.0 CATEGORIES= devel diff --git a/devel/ffcall/patches/patch-avcall_Makefile_in b/devel/ffcall/patches/patch-avcall_Makefile_in new file mode 100644 index 00000000000..7544590d480 --- /dev/null +++ b/devel/ffcall/patches/patch-avcall_Makefile_in @@ -0,0 +1,12 @@ +$OpenBSD: patch-avcall_Makefile_in,v 1.5 2010/08/23 14:16:09 jasper Exp $ +--- avcall/Makefile.in.orig Sun Jan 25 09:34:21 2004 ++++ avcall/Makefile.in Sat Apr 25 21:42:02 2009 +@@ -120,7 +120,7 @@ avcall-rs6000.lo : $(srcdir)/avcall-rs6000-aix.old.s $ + case "$(OS)" in \ + aix3*) syntax=aix.old;; \ + aix*) syntax=aix.new;; \ +- linux* | netbsd*) syntax=linux;; \ ++ linux* | netbsd* | openbsd*) syntax=linux;; \ + macos* | darwin*) syntax=macos;; \ + *) syntax=sysv4;; \ + esac; \ diff --git a/devel/ffcall/patches/patch-callback_trampoline_r_test1_c b/devel/ffcall/patches/patch-callback_trampoline_r_test1_c new file mode 100644 index 00000000000..68490bdd23e --- /dev/null +++ b/devel/ffcall/patches/patch-callback_trampoline_r_test1_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-callback_trampoline_r_test1_c,v 1.1 2010/08/23 14:16:09 jasper Exp $ +--- callback/trampoline_r/test1.c.orig Sun Apr 26 06:46:30 2009 ++++ callback/trampoline_r/test1.c Sun Apr 26 06:46:30 2009 +@@ -70,7 +70,7 @@ register void* env __asm__("%r29"); + register void* env __asm__("r12"); + #endif + #ifdef __rs6000__ +-#ifdef __NetBSD__ ++#if defined(__NetBSD__) || defined(__OpenBSD__) + register void* env __asm__("r13"); + #else + register void* env __asm__("r11"); diff --git a/devel/ffcall/patches/patch-callback_trampoline_r_trampoline_c b/devel/ffcall/patches/patch-callback_trampoline_r_trampoline_c index 990c77b20e1..0455326508c 100644 --- a/devel/ffcall/patches/patch-callback_trampoline_r_trampoline_c +++ b/devel/ffcall/patches/patch-callback_trampoline_r_trampoline_c @@ -1,6 +1,15 @@ -$OpenBSD: patch-callback_trampoline_r_trampoline_c,v 1.1 2010/02/23 20:11:15 jasper Exp $ ---- callback/trampoline_r/trampoline.c.orig Fri Feb 12 00:00:27 2010 -+++ callback/trampoline_r/trampoline.c Fri Feb 12 00:00:30 2010 +$OpenBSD: patch-callback_trampoline_r_trampoline_c,v 1.2 2010/08/23 14:16:09 jasper Exp $ +--- callback/trampoline_r/trampoline.c.orig Mon Jan 26 07:00:05 2004 ++++ callback/trampoline_r/trampoline.c Sat Jul 31 06:59:02 2010 +@@ -21,7 +21,7 @@ + #endif + #endif + #if defined(__rs6000__) +-#if defined(__NetBSD__) ++#if defined(__NetBSD__) || defined(__OpenBSD__) + #define __rs6000netbsd__ + #else + #if !defined(_AIX) @@ -196,8 +196,12 @@ extern RETGETPAGESIZETYPE getpagesize (); #ifdef linux #include diff --git a/devel/ffcall/patches/patch-callback_vacall_r_Makefile_in b/devel/ffcall/patches/patch-callback_vacall_r_Makefile_in new file mode 100644 index 00000000000..e0eca581c10 --- /dev/null +++ b/devel/ffcall/patches/patch-callback_vacall_r_Makefile_in @@ -0,0 +1,12 @@ +$OpenBSD: patch-callback_vacall_r_Makefile_in,v 1.3 2010/08/23 14:16:09 jasper Exp $ +--- callback/vacall_r/Makefile.in.orig Sun Jan 25 06:17:01 2004 ++++ callback/vacall_r/Makefile.in Sat Apr 25 21:44:58 2009 +@@ -120,7 +120,7 @@ vacall-rs6000.lo : $(srcdir)/vacall-rs6000-aix.old.s $ + case "$(OS)" in \ + aix3*) syntax=aix.old;; \ + aix*) syntax=aix.new;; \ +- linux*) syntax=linux;; \ ++ linux* | openbsd*) syntax=linux;; \ + macos* | darwin*) syntax=macos;; \ + *) syntax=sysv4;; \ + esac; \ diff --git a/devel/ffcall/patches/patch-callback_vacall_r_vacall-rs6000-linux_s b/devel/ffcall/patches/patch-callback_vacall_r_vacall-rs6000-linux_s new file mode 100644 index 00000000000..f5fc2a4d32a --- /dev/null +++ b/devel/ffcall/patches/patch-callback_vacall_r_vacall-rs6000-linux_s @@ -0,0 +1,17 @@ +$OpenBSD: patch-callback_vacall_r_vacall-rs6000-linux_s,v 1.1 2010/08/23 14:16:09 jasper Exp $ + +We're using %r13 like on NetBSD instead of %r11. + +--- callback/vacall_r/vacall-rs6000-linux.s.orig Mon Jan 29 13:55:18 2001 ++++ callback/vacall_r/vacall-rs6000-linux.s Sun Apr 26 07:01:24 2009 +@@ -35,8 +35,8 @@ __vacall_r: + stw 9,20(1) + addi 0,1,48 + stw 0,40(1) +- lwz 9,0(11) +- lwz 3,4(11) ++ lwz 9,0(13) ++ lwz 3,4(13) + addi 4,1,8 + mtlr 9 + blrl diff --git a/devel/ffcall/patches/patch-vacall_Makefile_in b/devel/ffcall/patches/patch-vacall_Makefile_in new file mode 100644 index 00000000000..3c6af85f12d --- /dev/null +++ b/devel/ffcall/patches/patch-vacall_Makefile_in @@ -0,0 +1,12 @@ +$OpenBSD: patch-vacall_Makefile_in,v 1.3 2010/08/23 14:16:09 jasper Exp $ +--- vacall/Makefile.in.orig Sun Jan 25 05:46:00 2004 ++++ vacall/Makefile.in Sat Apr 25 21:46:06 2009 +@@ -111,7 +111,7 @@ vacall-rs6000.o : $(srcdir)/vacall-rs6000-aix.old.s $( + case "$(OS)" in \ + aix3*) syntax=aix.old;; \ + aix*) syntax=aix.new;; \ +- linux* | netbsd*) syntax=linux;; \ ++ linux* | netbsd* | openbsd*) syntax=linux;; \ + macos* | darwin*) syntax=macos;; \ + *) syntax=sysv4;; \ + esac; \