summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel/libffi/Makefile30
-rw-r--r--devel/libffi/distinfo2
-rw-r--r--devel/libffi/files/patch-configure21
-rw-r--r--devel/libffi/files/patch-src_arm_sysv.S73
-rw-r--r--devel/libffi/pkg-descr6
-rw-r--r--devel/libffi/pkg-plist12
6 files changed, 144 insertions, 0 deletions
diff --git a/devel/libffi/Makefile b/devel/libffi/Makefile
new file mode 100644
index 000000000..168fb49e0
--- /dev/null
+++ b/devel/libffi/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for: libffi
+# Date created: 14, June, 1998
+# Whom: Horance Chou <horance@freedom.ie.cycu.edu.tw>
+#
+# $FreeBSD$
+#
+
+PORTNAME= libffi
+PORTVERSION= 3.0.9
+PORTREVISION= 1
+CATEGORIES= devel
+MASTER_SITES= ftp://sourceware.org/pub/libffi/
+
+MAINTAINER= bkoenig@alpha-tierchen.de
+COMMENT= Foreign Function Interface
+
+GNU_CONFIGURE= yes
+USE_LDCONFIG= yes
+USE_GNOME= gnomehack
+PLIST_SUB= PORTVERSION=${PORTVERSION}
+
+INFO= libffi
+
+MAN3= ffi.3 ffi_call.3 ffi_prep_cif.3
+
+post-install:
+ @${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffi.h ${PREFIX}/include/
+ @${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffitarget.h ${PREFIX}/include/
+
+.include <bsd.port.mk>
diff --git a/devel/libffi/distinfo b/devel/libffi/distinfo
new file mode 100644
index 000000000..fbc191518
--- /dev/null
+++ b/devel/libffi/distinfo
@@ -0,0 +1,2 @@
+SHA256 (libffi-3.0.9.tar.gz) = 589d25152318bc780cd8919b14670793f4971d9838dab46ed38c32b3ee92c452
+SIZE (libffi-3.0.9.tar.gz) = 731719
diff --git a/devel/libffi/files/patch-configure b/devel/libffi/files/patch-configure
new file mode 100644
index 000000000..dffd4235e
--- /dev/null
+++ b/devel/libffi/files/patch-configure
@@ -0,0 +1,21 @@
+--- configure.orig 2010-11-22 12:53:14.000000000 +0100
++++ configure 2010-11-22 12:53:26.000000000 +0100
+@@ -12231,6 +12231,9 @@
+ powerpc-*-freebsd*)
+ TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
+ ;;
++ powerpc64-*-freebsd*)
++ TARGET=POWERPC; TARGETDIR=powerpc
++ ;;
+ powerpc*-*-rtems*)
+ TARGET=POWERPC; TARGETDIR=powerpc
+ ;;
+@@ -14484,7 +14487,7 @@
+
+ libffi_cv_as_x86_pcrel=yes
+ echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
+- if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
++ if $CC -c conftest.s 2>&1 | grep -i warning > /dev/null; then
+ libffi_cv_as_x86_pcrel=no
+ fi
+
diff --git a/devel/libffi/files/patch-src_arm_sysv.S b/devel/libffi/files/patch-src_arm_sysv.S
new file mode 100644
index 000000000..ebdd68117
--- /dev/null
+++ b/devel/libffi/files/patch-src_arm_sysv.S
@@ -0,0 +1,73 @@
+--- src/arm/sysv.S.orig 2008-02-15 02:15:41.000000000 +0100
++++ src/arm/sysv.S 2008-04-01 13:25:02.000000000 +0200
+@@ -83,14 +83,6 @@
+ # define call_reg(x) mov lr, pc ; mov pc, x
+ #endif
+
+-/* Conditionally compile unwinder directives. */
+-#ifdef __ARM_EABI__
+-#define UNWIND
+-#else
+-#define UNWIND @
+-#endif
+-
+-
+ #if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
+ .macro ARM_FUNC_START name
+ .text
+@@ -101,7 +93,6 @@
+ bx pc
+ nop
+ .arm
+- UNWIND .fnstart
+ /* A hook to tell gdb that we've switched to ARM mode. Also used to call
+ directly from other local arm routines. */
+ _L__\name:
+@@ -112,7 +103,6 @@
+ .align 0
+ .arm
+ ENTRY(\name)
+- UNWIND .fnstart
+ .endm
+ #endif
+
+@@ -145,11 +135,8 @@
+ ARM_FUNC_START ffi_call_SYSV
+ @ Save registers
+ stmfd sp!, {r0-r3, fp, lr}
+- UNWIND .save {r0-r3, fp, lr}
+ mov fp, sp
+
+- UNWIND .setfp fp, sp
+-
+ @ Make room for all of the new args.
+ sub sp, fp, r2
+
+@@ -219,7 +206,6 @@
+ RETLDM "r0-r3,fp"
+
+ .ffi_call_SYSV_end:
+- UNWIND .fnend
+ .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
+
+ /*
+@@ -231,12 +217,9 @@
+ */
+
+ ARM_FUNC_START ffi_closure_SYSV
+- UNWIND .pad #16
+ add ip, sp, #16
+ stmfd sp!, {ip, lr}
+- UNWIND .save {r0, lr}
+ add r2, sp, #8
+- .pad #16
+ sub sp, sp, #16
+ str sp, [sp, #8]
+ add r1, sp, #8
+@@ -291,6 +274,5 @@
+ #endif
+
+ .ffi_closure_SYSV_end:
+- UNWIND .fnend
+ .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
+
diff --git a/devel/libffi/pkg-descr b/devel/libffi/pkg-descr
new file mode 100644
index 000000000..15514cb81
--- /dev/null
+++ b/devel/libffi/pkg-descr
@@ -0,0 +1,6 @@
+The libffi library provides a portable, high level programming
+interface to various calling conventions. This allows a programmer to
+call any function specified by a call interface description at run
+time.
+
+WWW: http://sources.redhat.com/libffi/
diff --git a/devel/libffi/pkg-plist b/devel/libffi/pkg-plist
new file mode 100644
index 000000000..f2c7f75e7
--- /dev/null
+++ b/devel/libffi/pkg-plist
@@ -0,0 +1,12 @@
+include/ffi.h
+include/ffitarget.h
+lib/libffi-%%PORTVERSION%%/include/ffi.h
+lib/libffi-%%PORTVERSION%%/include/ffitarget.h
+lib/libffi.a
+lib/libffi.la
+lib/libffi.so
+lib/libffi.so.5
+libdata/pkgconfig/libffi.pc
+@dirrmtry libdata/pkgconfig
+@dirrm lib/libffi-%%PORTVERSION%%/include
+@dirrm lib/libffi-%%PORTVERSION%%