diff --git a/devel/libffi/Makefile b/devel/libffi/Makefile index b80cf62f2ff3..27cdf15322c9 100644 --- a/devel/libffi/Makefile +++ b/devel/libffi/Makefile @@ -3,6 +3,7 @@ PORTNAME= libffi PORTVERSION= 3.0.13 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= SOURCEWARE MASTER_SITE_SUBDIR= ${PORTNAME} @@ -10,32 +11,32 @@ MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= zeising@FreeBSD.org COMMENT= Foreign Function Interface +LICENSE= MIT + TEST_DEPENDS= runtest:${PORTSDIR}/misc/dejagnu +USES= pathfix pkgconfig +USE_LDCONFIG= yes +GNU_CONFIGURE= yes + OPTIONS_DEFINE= TESTS TESTS_DESC= Include tools for test suite -NO_STAGE= yes .include .if ${PORT_OPTIONS:MTESTS} BUILD_DEPENDS:= ${TEST_DEPENDS} .endif -GNU_CONFIGURE= yes -USE_LDCONFIG= yes -USES= pathfix pkgconfig -PLIST_SUB= PORTVERSION=${PORTVERSION} - +INSTALL_TARGET= install-strip INFO= libffi - -MAN3= ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_cif_var.3 +PLIST_SUB= PORTVERSION=${PORTVERSION} post-install: @${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffi.h \ - ${PREFIX}/include/ + ${STAGEDIR}${PREFIX}/include/ @${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffitarget.h \ - ${PREFIX}/include/ + ${STAGEDIR}${PREFIX}/include/ regression-test: build @cd ${WRKSRC} && ${MAKE} check diff --git a/devel/libffi/files/patch-src__arm__ffi.c b/devel/libffi/files/patch-src__arm__ffi.c new file mode 100644 index 000000000000..d3058a087101 --- /dev/null +++ b/devel/libffi/files/patch-src__arm__ffi.c @@ -0,0 +1,36 @@ +# Description: Fix abort() on ARM related to __clear_cache(). This is an issue +# for anything !apple that is using the libcompiler_rt provided by clang on ARM +# PR: ports/149167 ports/184517 +# Patch by: cognet@ (to be upstreamed @ LLVM) + +--- ./src/arm/ffi.c.orig 2013-03-16 22:19:39.000000000 +1100 ++++ ./src/arm/ffi.c 2013-12-03 19:30:58.440924300 +1100 +@@ -33,6 +33,11 @@ + + #include + ++#if defined(__FreeBSD__) && defined(__arm__) ++#include ++#include ++#endif ++ + /* Forward declares. */ + static int vfp_type_p (ffi_type *); + static void layout_vfp_args (ffi_cif *); +@@ -582,6 +587,16 @@ + + #else + ++#if defined(__FreeBSD__) && defined(__arm__) ++#define __clear_cache(start, end) do { \ ++ struct arm_sync_icache_args ua; \ ++ \ ++ ua.addr = (uintptr_t)(start); \ ++ ua.len = (char *)(end) - (char *)start; \ ++ sysarch(ARM_SYNC_ICACHE, &ua); \ ++ } while (0); ++#endif ++ + #define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \ + ({ unsigned char *__tramp = (unsigned char*)(TRAMP); \ + unsigned int __fun = (unsigned int)(FUN); \ diff --git a/devel/libffi/pkg-plist b/devel/libffi/pkg-plist index 03a26337d72f..5a6a68f18513 100644 --- a/devel/libffi/pkg-plist +++ b/devel/libffi/pkg-plist @@ -7,5 +7,9 @@ lib/libffi.la lib/libffi.so lib/libffi.so.6 libdata/pkgconfig/libffi.pc +man/man3/ffi.3.gz +man/man3/ffi_call.3.gz +man/man3/ffi_prep_cif.3.gz +man/man3/ffi_prep_cif_var.3.gz @dirrm lib/libffi-%%PORTVERSION%%/include @dirrm lib/libffi-%%PORTVERSION%%