aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorwen <wen@FreeBSD.org>2011-04-12 10:24:37 +0800
committerwen <wen@FreeBSD.org>2011-04-12 10:24:37 +0800
commit4963a0a84e6c013864d941542602f067c651144e (patch)
treec0021b703008105cc1097824f416bdabc7ac4245 /devel
parent61dba3c1c3e9287eff2b395d89f39d57bfa67aff (diff)
downloadfreebsd-ports-gnome-4963a0a84e6c013864d941542602f067c651144e.tar.gz
freebsd-ports-gnome-4963a0a84e6c013864d941542602f067c651144e.tar.zst
freebsd-ports-gnome-4963a0a84e6c013864d941542602f067c651144e.zip
pure-gen is a C interface generator for the Pure language. It takes a C
header file as input and generates a corresponding Pure module with the constant definitions and extern declarations needed to use the C module from Pure. pure-gen can also generate FFI interfaces rather than externs (using the pure-ffi module, see below), and it can optionally create a C wrapper module which allows you to create interfaces to pretty much any code which can be called via C. Interfaces to C++ can be made using SWIG's new C language module which can wrap arbitrary C++ libraries in C. WWW: http://docs.pure-lang.googlecode.com/hg/pure-gen.html PR: ports/155872 Submitted by: Zhihao Yuan <lichray@gmail.com>
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/pure-gen/Makefile37
-rw-r--r--devel/pure-gen/distinfo2
-rw-r--r--devel/pure-gen/pkg-descr10
-rw-r--r--devel/pure-gen/pkg-plist3
5 files changed, 53 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 0b4ec8dc2254..aa9a91926769 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -2769,6 +2769,7 @@
SUBDIR += pty
SUBDIR += ptypes
SUBDIR += publib
+ SUBDIR += pure-gen
SUBDIR += pushmi
SUBDIR += pwlib
SUBDIR += py-AddOns
diff --git a/devel/pure-gen/Makefile b/devel/pure-gen/Makefile
new file mode 100644
index 000000000000..b4d11e0d568e
--- /dev/null
+++ b/devel/pure-gen/Makefile
@@ -0,0 +1,37 @@
+# New ports collection makefile for: pure-sql3
+# Date created: 2011-03-18
+# Whom: Zhihao Yuan <lichray@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= pure-gen
+PORTVERSION= 0.10
+CATEGORIES= devel
+MASTER_SITES= http://pure-lang.googlecode.com/files/
+
+MAINTAINER= lichray@gmail.com
+COMMENT= A C interface generator for the Pure language
+
+BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc \
+ ${LOCALBASE}/lib/language-c-0.3.2/:${PORTSDIR}/devel/hs-language-c
+LIB_DEPENDS= pure.7:${PORTSDIR}/lang/pure
+
+MAN1= pure-gen.1
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+USE_GMAKE= yes
+
+MAKE_ARGS+= prefix=${PREFIX} CPPFLAGS+=-I${LOCALBASE}/include LDFLAGS+=-L${LOCALBASE}/lib CFLAGS="${CFLAGS}" mandir=${PREFIX}/man
+
+PORTEXAMPLES= *
+
+.include <bsd.port.pre.mk>
+
+post-install:
+.if !defined(NOPORTEXAMPLES)
+ @${MKDIR} ${EXAMPLESDIR}
+ (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${EXAMPLESDIR})
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/pure-gen/distinfo b/devel/pure-gen/distinfo
new file mode 100644
index 000000000000..8d12fb60c2b9
--- /dev/null
+++ b/devel/pure-gen/distinfo
@@ -0,0 +1,2 @@
+SHA256 (pure-gen-0.10.tar.gz) = 4434eeef004b1d099f39c9d565cd5fc0e31955a6e7e785a5fc2af292fcc11473
+SIZE (pure-gen-0.10.tar.gz) = 52509
diff --git a/devel/pure-gen/pkg-descr b/devel/pure-gen/pkg-descr
new file mode 100644
index 000000000000..70f3b1f4fc95
--- /dev/null
+++ b/devel/pure-gen/pkg-descr
@@ -0,0 +1,10 @@
+pure-gen is a C interface generator for the Pure language. It takes a C
+header file as input and generates a corresponding Pure module with the
+constant definitions and extern declarations needed to use the C module
+from Pure. pure-gen can also generate FFI interfaces rather than externs
+(using the pure-ffi module, see below), and it can optionally create a C
+wrapper module which allows you to create interfaces to pretty much any
+code which can be called via C. Interfaces to C++ can be made using SWIG's
+new C language module which can wrap arbitrary C++ libraries in C.
+
+WWW: http://docs.pure-lang.googlecode.com/hg/pure-gen.html
diff --git a/devel/pure-gen/pkg-plist b/devel/pure-gen/pkg-plist
new file mode 100644
index 000000000000..c9b58028297b
--- /dev/null
+++ b/devel/pure-gen/pkg-plist
@@ -0,0 +1,3 @@
+bin/pure-gen
+lib/pure-gen/dump-ast
+@dirrm lib/pure-gen