mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-10 02:21:15 +02:00
create bsd12 branch
This commit is contained in:
28
devel/libffi/Makefile
Normal file
28
devel/libffi/Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
PORTNAME= libffi
|
||||
PORTVERSION= 3.0.13
|
||||
CATEGORIES= devel
|
||||
MASTER_SITES= ftp://sourceware.org/pub/libffi/
|
||||
|
||||
MAINTAINER= onborodin@gmail.com
|
||||
COMMENT= Foreign Function Interface
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USES+= gmake
|
||||
USE_LDCONFIG= yes
|
||||
CONFIGURE_ARGS+= --mandir=${PREFIX}/man
|
||||
CONFIGURE_ARGS+= --infodir=${PREFIX}/info
|
||||
CONFIGURE_ARGS+= --program-transform-name=''
|
||||
|
||||
INFO= libffi
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} -e 's|$$(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include|$$(prefix)/include|' \
|
||||
${WRKSRC}/Makefile.in ${WRKSRC}/*/Makefile.in ${WRKSRC}/*.pc.in
|
||||
${REINPLACE_CMD} -e 's|$${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include|$$(prefix)/include|' \
|
||||
${WRKSRC}/Makefile.in ${WRKSRC}/*/Makefile.in ${WRKSRC}/*.pc.in
|
||||
|
||||
.include <bsd.port.mk>
|
||||
#EOF
|
||||
2
devel/libffi/distinfo
Normal file
2
devel/libffi/distinfo
Normal file
@@ -0,0 +1,2 @@
|
||||
SHA256 (libffi-3.0.13.tar.gz) = 1dddde1400c3bcb7749d398071af88c3e4754058d2d4c0b3696c2f82dc5cf11c
|
||||
SIZE (libffi-3.0.13.tar.gz) = 845747
|
||||
13
devel/libffi/files/patch-configure
Normal file
13
devel/libffi/files/patch-configure
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git ./configure.orig ./configure
|
||||
index 4b04db7..0d94fbd 100755
|
||||
--- ./configure.orig
|
||||
+++ ./configure
|
||||
@@ -13428,7 +13428,7 @@ case "$host" in
|
||||
mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
|
||||
TARGET=MIPS; TARGETDIR=mips
|
||||
;;
|
||||
- mips*-*-linux* | mips*-*-openbsd*)
|
||||
+ mips*-*-linux* | mips*-*-openbsd* | mips*-*-freebsd*)
|
||||
# Support 128-bit long double for NewABI.
|
||||
HAVE_LONG_DOUBLE='defined(__mips64)'
|
||||
TARGET=MIPS; TARGETDIR=mips
|
||||
36
devel/libffi/files/patch-src__arm__ffi.c
Normal file
36
devel/libffi/files/patch-src__arm__ffi.c
Normal file
@@ -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 <stdlib.h>
|
||||
|
||||
+#if defined(__FreeBSD__) && defined(__arm__)
|
||||
+#include <sys/types.h>
|
||||
+#include <machine/sysarch.h>
|
||||
+#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); \
|
||||
29
devel/libffi/files/patch-src__mips__ffi.c
Normal file
29
devel/libffi/files/patch-src__mips__ffi.c
Normal file
@@ -0,0 +1,29 @@
|
||||
diff --git ./src/mips/ffi.c.orig ./src/mips/ffi.c
|
||||
index 03121e3..8b7881f 100644
|
||||
--- ./src/mips/ffi.c.orig
|
||||
+++ ./src/mips/ffi.c
|
||||
@@ -38,7 +38,9 @@
|
||||
#endif
|
||||
|
||||
#ifndef USE__BUILTIN___CLEAR_CACHE
|
||||
-# if defined(__OpenBSD__)
|
||||
+# if defined(__FreeBSD__)
|
||||
+# include <machine/sysarch.h>
|
||||
+# elif defined(__OpenBSD__)
|
||||
# include <mips64/sysarch.h>
|
||||
# else
|
||||
# include <sys/cachectl.h>
|
||||
@@ -729,11 +731,13 @@ ffi_prep_closure_loc (ffi_closure *closure,
|
||||
closure->fun = fun;
|
||||
closure->user_data = user_data;
|
||||
|
||||
+#if !defined(__FreeBSD__)
|
||||
#ifdef USE__BUILTIN___CLEAR_CACHE
|
||||
__builtin___clear_cache(clear_location, clear_location + FFI_TRAMPOLINE_SIZE);
|
||||
#else
|
||||
cacheflush (clear_location, FFI_TRAMPOLINE_SIZE, ICACHE);
|
||||
#endif
|
||||
+#endif /* ! __FreeBSD__ */
|
||||
return FFI_OK;
|
||||
}
|
||||
|
||||
13
devel/libffi/files/patch-src__mips__ffitarget.h
Normal file
13
devel/libffi/files/patch-src__mips__ffitarget.h
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git ./src/mips/ffitarget.h.orig ./src/mips/ffitarget.h
|
||||
index 717d659..5a0c2b1 100644
|
||||
--- ./src/mips/ffitarget.h.orig
|
||||
+++ ./src/mips/ffitarget.h
|
||||
@@ -41,7 +41,7 @@
|
||||
#define _MIPS_SIM_ABI32 1
|
||||
#define _MIPS_SIM_NABI32 2
|
||||
#define _MIPS_SIM_ABI64 3
|
||||
-#elif !defined(__OpenBSD__)
|
||||
+#elif !defined(__OpenBSD__) && !defined(__FreeBSD__)
|
||||
# include <sgidefs.h>
|
||||
#endif
|
||||
|
||||
20
devel/libffi/files/patch-x-src-arm-sysv.S
Normal file
20
devel/libffi/files/patch-x-src-arm-sysv.S
Normal file
@@ -0,0 +1,20 @@
|
||||
--- ./src/arm/sysv.S.orig 2013-03-16 11:19:39.000000000 +0000
|
||||
+++ ./src/arm/sysv.S 2016-01-28 10:52:59.261407000 +0000
|
||||
@@ -228,7 +228,7 @@
|
||||
#if defined(__SOFTFP__) || defined(__ARM_EABI__)
|
||||
cmpne r3, #FFI_TYPE_DOUBLE
|
||||
#endif
|
||||
- stmeqia r2, {r0, r1}
|
||||
+ stmiaeq r2, {r0, r1}
|
||||
|
||||
#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
|
||||
beq LSYM(Lepilogue)
|
||||
@@ -410,7 +410,7 @@
|
||||
beq LSYM(Lepilogue_vfp)
|
||||
|
||||
cmp r3, #FFI_TYPE_SINT64
|
||||
- stmeqia r2, {r0, r1}
|
||||
+ stmiaeq r2, {r0, r1}
|
||||
beq LSYM(Lepilogue_vfp)
|
||||
|
||||
cmp r3, #FFI_TYPE_FLOAT
|
||||
6
devel/libffi/pkg-descr
Normal file
6
devel/libffi/pkg-descr
Normal file
@@ -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/
|
||||
11
devel/libffi/pkg-plist
Normal file
11
devel/libffi/pkg-plist
Normal file
@@ -0,0 +1,11 @@
|
||||
include/ffi.h
|
||||
include/ffitarget.h
|
||||
lib/libffi.a
|
||||
lib/libffi.la
|
||||
lib/libffi.so
|
||||
lib/libffi.so.6
|
||||
lib/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
|
||||
Reference in New Issue
Block a user