From c8b2d8c562b02bd6498ea364bdf342b53e7b6507 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Mon, 27 Jun 2011 14:44:38 +0000 Subject: [PATCH] This module provides an interface to libffi which enables you to call C functions from Pure and vice versa. It extends and complements Pure's built-in C interface in that it also handles C structs and makes Pure functions callable from C without writing a single line of C code. WWW: http://docs.pure-lang.googlecode.com/hg/pure-ffi.html PR: ports/156103 Submitted by: Zhihao Yuan --- devel/Makefile | 1 + devel/pure-ffi/Makefile | 41 ++++++++++++++++++++++++++++++++++++++++ devel/pure-ffi/distinfo | 2 ++ devel/pure-ffi/pkg-descr | 6 ++++++ 4 files changed, 50 insertions(+) create mode 100644 devel/pure-ffi/Makefile create mode 100644 devel/pure-ffi/distinfo create mode 100644 devel/pure-ffi/pkg-descr diff --git a/devel/Makefile b/devel/Makefile index 8772c73d300c..f766a5b236a5 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -2801,6 +2801,7 @@ SUBDIR += pty SUBDIR += ptypes SUBDIR += publib + SUBDIR += pure-ffi SUBDIR += pure-gen SUBDIR += pushmi SUBDIR += pwlib diff --git a/devel/pure-ffi/Makefile b/devel/pure-ffi/Makefile new file mode 100644 index 000000000000..a89be8a27d9b --- /dev/null +++ b/devel/pure-ffi/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: pure-ffi +# Date created: 2011-03-18 +# Whom: Zhihao Yuan +# +# $FreeBSD$ +# + +PORTNAME= pure-ffi +PORTVERSION= 0.12 +CATEGORIES= devel +MASTER_SITES= http://pure-lang.googlecode.com/files/ + +MAINTAINER= lichray@gmail.com +COMMENT= Pure langauge interface to libffi + +LIB_DEPENDS+= pure.7:${PORTSDIR}/lang/pure \ + ffi:${PORTSDIR}/devel/libffi + +LICENSE_FILE= ${WRKSRC}/COPYING + +USE_GCC= 4.2+ +USE_GMAKE= yes + +PLIST_FILES= lib/pure/ffi.pure \ + lib/pure/ffi.so +MAKE_ARGS+= prefix=${PREFIX} \ + CPPFLAGS+=-I${LOCALBASE}/include \ + LDFLAGS+=-L${LOCALBASE}/lib \ + CFLAGS="${CFLAGS}" + +PORTEXAMPLES= * + +.include + +post-install: +.if !defined(NOPORTEXAMPLES) + @${MKDIR} ${EXAMPLESDIR} + (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}) +.endif + +.include diff --git a/devel/pure-ffi/distinfo b/devel/pure-ffi/distinfo new file mode 100644 index 000000000000..fb752eb0678e --- /dev/null +++ b/devel/pure-ffi/distinfo @@ -0,0 +1,2 @@ +SHA256 (pure-ffi-0.12.tar.gz) = 7aa9ce52ddc2154c22317352331afd42741830e3e00a80a7098bb7e155508282 +SIZE (pure-ffi-0.12.tar.gz) = 39555 diff --git a/devel/pure-ffi/pkg-descr b/devel/pure-ffi/pkg-descr new file mode 100644 index 000000000000..cd2e2628ac1d --- /dev/null +++ b/devel/pure-ffi/pkg-descr @@ -0,0 +1,6 @@ +This module provides an interface to libffi which enables you to call C +functions from Pure and vice versa. It extends and complements Pure's +built-in C interface in that it also handles C structs and makes Pure +functions callable from C without writing a single line of C code. + +WWW: http://docs.pure-lang.googlecode.com/hg/pure-ffi.html