View | Details | Raw Unified | Return to bug 184517
Collapse All | Expand All

(-)./Makefile (-11 / +9 lines)
Lines 1-8 Link Here
1
# Created by: Horance Chou <horance@freedom.ie.cycu.edu.tw>
1
# Created by: Horance Chou <horance@freedom.ie.cycu.edu.tw>
2
# $FreeBSD: devel/libffi/Makefile 327724 2013-09-20 17:13:42Z bapt $
2
# $FreeBSD: head/devel/libffi/Makefile 327724 2013-09-20 17:13:42Z bapt $
3
3
4
PORTNAME=	libffi
4
PORTNAME=	libffi
5
PORTVERSION=	3.0.13
5
PORTVERSION=	3.0.13
6
PORTREVISION=	1
6
CATEGORIES=	devel
7
CATEGORIES=	devel
7
MASTER_SITES=	SOURCEWARE
8
MASTER_SITES=	SOURCEWARE
8
MASTER_SITE_SUBDIR=	${PORTNAME}
9
MASTER_SITE_SUBDIR=	${PORTNAME}
Lines 12-41 Link Here
12
13
13
TEST_DEPENDS=	runtest:${PORTSDIR}/misc/dejagnu
14
TEST_DEPENDS=	runtest:${PORTSDIR}/misc/dejagnu
14
15
16
USES=		pathfix pkgconfig
17
USE_LDCONFIG=	yes
18
GNU_CONFIGURE=	yes
19
15
OPTIONS_DEFINE=	TESTS
20
OPTIONS_DEFINE=	TESTS
16
TESTS_DESC=	Include tools for test suite
21
TESTS_DESC=	Include tools for test suite
17
22
18
NO_STAGE=	yes
19
.include <bsd.port.options.mk>
23
.include <bsd.port.options.mk>
20
24
21
.if ${PORT_OPTIONS:MTESTS}
25
.if ${PORT_OPTIONS:MTESTS}
22
BUILD_DEPENDS:=	${TEST_DEPENDS}
26
BUILD_DEPENDS:=	${TEST_DEPENDS}
23
.endif
27
.endif
24
28
25
GNU_CONFIGURE=	yes
26
USE_LDCONFIG=	yes
27
USES=	pathfix pkgconfig
28
PLIST_SUB=	PORTVERSION=${PORTVERSION}
29
30
INFO=		libffi
29
INFO=		libffi
31
30
PLIST_SUB=	PORTVERSION=${PORTVERSION}
32
MAN3=		ffi.3 ffi_call.3 ffi_prep_cif.3 ffi_prep_cif_var.3
33
31
34
post-install:
32
post-install:
35
	@${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffi.h \
33
	@${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffi.h \
36
	    ${PREFIX}/include/
34
	    ${STAGEDIR}${PREFIX}/include/
37
	@${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffitarget.h \
35
	@${LN} -sf ../lib/libffi-${PORTVERSION}/include/ffitarget.h \
38
	    ${PREFIX}/include/
36
	    ${STAGEDIR}${PREFIX}/include/
39
37
40
regression-test: build
38
regression-test: build
41
	@cd ${WRKSRC} && ${MAKE} check
39
	@cd ${WRKSRC} && ${MAKE} check
(-)./files/patch-src__arm__ffi.c (+35 lines)
Line 0 Link Here
1
# Description: Fix _ctypes abort on import for FreeBSD/ARM
2
# PR: ports/149167
3
# Patch by: cognet@
4
5
--- ./src/arm/ffi.c.orig	2013-03-16 22:19:39.000000000 +1100
6
+++ ./src/arm/ffi.c	2013-12-03 19:30:58.440924300 +1100
7
@@ -33,6 +33,11 @@
8
 
9
 #include <stdlib.h>
10
 
11
+#if defined(__FreeBSD__) && defined(__arm__)
12
+#include <sys/types.h>
13
+#include <machine/sysarch.h>
14
+#endif
15
+
16
 /* Forward declares. */
17
 static int vfp_type_p (ffi_type *);
18
 static void layout_vfp_args (ffi_cif *);
19
@@ -582,6 +587,16 @@
20
 
21
 #else
22
 
23
+#if defined(__FreeBSD__) && defined(__arm__)
24
+#define __clear_cache(start, end) do { \
25
+		struct arm_sync_icache_args ua; 		\
26
+								\
27
+		ua.addr = (uintptr_t)(start);			\
28
+		ua.len = (char *)(end) - (char *)start;		\
29
+		sysarch(ARM_SYNC_ICACHE, &ua);			\
30
+	} while (0);
31
+#endif
32
+
33
 #define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX)				\
34
 ({ unsigned char *__tramp = (unsigned char*)(TRAMP);			\
35
    unsigned int  __fun = (unsigned int)(FUN);				\
(-)./pkg-plist (+4 lines)
Lines 7-11 Link Here
7
lib/libffi.so
7
lib/libffi.so
8
lib/libffi.so.6
8
lib/libffi.so.6
9
libdata/pkgconfig/libffi.pc
9
libdata/pkgconfig/libffi.pc
10
man/man3/ffi.3.gz
11
man/man3/ffi_call.3.gz
12
man/man3/ffi_prep_cif.3.gz
13
man/man3/ffi_prep_cif_var.3.gz
10
@dirrm lib/libffi-%%PORTVERSION%%/include
14
@dirrm lib/libffi-%%PORTVERSION%%/include
11
@dirrm lib/libffi-%%PORTVERSION%%
15
@dirrm lib/libffi-%%PORTVERSION%%

Return to bug 184517