aboutsummaryrefslogtreecommitdiff
path: root/lang/pure
diff options
context:
space:
mode:
authorWen Heping <wen@FreeBSD.org>2011-03-21 06:14:38 +0000
committerWen Heping <wen@FreeBSD.org>2011-03-21 06:14:38 +0000
commit250a152ffcd466ddc9c1588aa6c20b030c1f6866 (patch)
tree57feced376b2feca6729a0f42f6d67b472fba39a /lang/pure
parent8711f2eeccc9a3f34170b1046fd099b24630bce8 (diff)
Notes
Diffstat (limited to 'lang/pure')
-rw-r--r--lang/pure/Makefile76
-rw-r--r--lang/pure/distinfo4
-rw-r--r--lang/pure/files/patch-interpreter.cc32
-rw-r--r--lang/pure/files/pkg-message.in20
-rw-r--r--lang/pure/pkg-descr8
-rw-r--r--lang/pure/pkg-plist27
6 files changed, 167 insertions, 0 deletions
diff --git a/lang/pure/Makefile b/lang/pure/Makefile
new file mode 100644
index 000000000000..be859c280642
--- /dev/null
+++ b/lang/pure/Makefile
@@ -0,0 +1,76 @@
+# New ports collection makefile for: pure
+# Date created: 2011-03-17
+# Whom: Zhihao Yuan <lichray@gmail.com>
+#
+# $FreeBSD$
+#
+
+PORTNAME= pure
+PORTVERSION= 0.46
+CATEGORIES= lang
+MASTER_SITES= http://pure-lang.googlecode.com/files/
+DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.gz ${PORTNAME}-docs-${PORTVERSION}.tar.gz
+
+MAINTAINER= lichray@gmail.com
+COMMENT= A modern-style functional programming language
+
+LIB_DEPENDS+= gmp:${PORTSDIR}/math/gmp
+BUILD_DEPENDS+= llvm>=2.6:${PORTSDIR}/devel/llvm
+RUN_DEPENDS+= llvm>=2.6:${PORTSDIR}/devel/llvm
+
+MAN1= pure.1
+LICENSE= LGPL3
+SUB_FILES= pkg-message
+
+USE_GCC= 4.2+
+USE_AUTOTOOLS= libtool
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+MAKE_JOBS_SAFE= yes
+
+CONFIGURE_ARGS= --with-libgmp-prefix=${LOCALBASE} --enable-release
+
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == "amd64"
+CONFIGURE_TARGET= x86_64-portbld-freebsd
+.endif
+
+PORTDATA= *
+PORTEXAMPLES= *
+PORTDOCS= *
+
+.if !defined(NOPORTDATA)
+SUB_LIST+= ETC=""
+.else
+SUB_LIST+= ETC="@comment "
+.endif
+
+.if !defined(NOPORTDOCS)
+PLIST_SUB+= DOCS=""
+.else
+PLIST_SUB+= DOCS="@comment "
+.endif
+
+.include <bsd.port.pre.mk>
+
+post-install:
+.if !defined(NOPORTDATA)
+ @${MKDIR} ${DATADIR}/etc/
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} etc/ ${DATADIR}/)
+.endif
+
+.if !defined(NOPORTEXAMPLES)
+ @${MKDIR} ${EXAMPLESDIR}
+ (cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} \* ${EXAMPLESDIR})
+.endif
+
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+ (cd ${WRKDIR}/${PORTNAME}-docs-${PORTVERSION} && ${RM} -f Makefile && ${COPYTREE_SHARE} \* ${DOCSDIR})
+ ${LN} -fs ${DOCSDIR} ${PREFIX}/lib/${PORTNAME}/docs
+.endif
+
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/lang/pure/distinfo b/lang/pure/distinfo
new file mode 100644
index 000000000000..73cf0f8dda3c
--- /dev/null
+++ b/lang/pure/distinfo
@@ -0,0 +1,4 @@
+SHA256 (pure-0.46.tar.gz) = 172cd3196d5c44341ec4cfaff801b0350d36bb7f92b7fa93d361bedd34f83896
+SIZE (pure-0.46.tar.gz) = 900928
+SHA256 (pure-docs-0.46.tar.gz) = 3429e14445bfb05a3618c2bb7800a695d08aea347d9e6c3b908fe702b5ef0803
+SIZE (pure-docs-0.46.tar.gz) = 2560377
diff --git a/lang/pure/files/patch-interpreter.cc b/lang/pure/files/patch-interpreter.cc
new file mode 100644
index 000000000000..44d1716aa277
--- /dev/null
+++ b/lang/pure/files/patch-interpreter.cc
@@ -0,0 +1,32 @@
+--- interpreter.cc.orig 2010-11-08 02:57:58.000000000 -0600
++++ interpreter.cc 2011-03-19 02:01:57.145664585 -0500
+@@ -6709,6 +6709,11 @@ int interpreter::compiler(string out, li
+ // Compile and link, if requested.
+ if (target != out) {
+ assert(bc_target);
++ string cc = "gcc";
++ string cxx = "g++";
++ const char *env;
++ if (env = getenv("CC")) cc = env;
++ if (env = getenv("CXX")) cxx = env;
+ bool vflag = (verbose&verbosity::compiler) != 0;
+ string libs;
+ set<string> libset;
+@@ -6735,7 +6740,7 @@ int interpreter::compiler(string out, li
+ if (WIFEXITED(status) && WEXITSTATUS(status) == 0 && ext!=".s") {
+ // Assemble.
+ string obj = (ext==".o")?out:out+".o";
+- cmd = "gcc -c "+quote(asmfile)+" -o "+quote(obj);
++ cmd = cc+" -c "+quote(asmfile)+" -o "+quote(obj);
+ if (vflag) std::cerr << cmd << '\n';
+ status = system(cmd.c_str());
+ unlink(asmfile.c_str());
+@@ -6755,7 +6760,7 @@ int interpreter::compiler(string out, li
+ " -lpure";
+ if (ext != ".o") {
+ // Link.
+- cmd = "g++ -o "+quote(out)+" "+quote(libdir)+"pure_main.o "+linkopts;
++ cmd = cxx+" -o "+quote(out)+" "+quote(libdir)+"pure_main.o "+linkopts;
+ if (vflag) std::cerr << cmd << '\n';
+ status = system(cmd.c_str());
+ unlink(obj.c_str());
diff --git a/lang/pure/files/pkg-message.in b/lang/pure/files/pkg-message.in
new file mode 100644
index 000000000000..9f4e0365a099
--- /dev/null
+++ b/lang/pure/files/pkg-message.in
@@ -0,0 +1,20 @@
+====
+%%ETC%%Note that we installed a few Pure syntax highlighting
+%%ETC%%files for the code editors in %%DATADIR%%/etc/
+%%ETC%%
+A text-based browser, such as one of following
+
+lynx www/lynx
+w3m www/w3m
+
+is recommended to use the `help' command inside the
+interpreter. Check pure(1) for details.
+
+To enable the inline C/C++ code compilation, one of
+following is required:
+
+clang lang/clang
+llvm-gcc4 lang/llvm-gcc4
+
+Install them as needed.
+====
diff --git a/lang/pure/pkg-descr b/lang/pure/pkg-descr
new file mode 100644
index 000000000000..9f2a2cf2038a
--- /dev/null
+++ b/lang/pure/pkg-descr
@@ -0,0 +1,8 @@
+Pure is a modern-style functional programming language based on term
+rewriting. It offers equational definitions with pattern matching, full
+symbolic rewriting capabilities, dynamic typing, eager and lazy evaluation,
+lexical closures, built-in list and matrix support and an easy-to-use C
+interface. The interpreter uses LLVM as a backend to JIT-compile Pure
+programs to fast native code.
+
+WWW: https://code.google.com/p/pure-lang/
diff --git a/lang/pure/pkg-plist b/lang/pure/pkg-plist
new file mode 100644
index 000000000000..393c6ab0c503
--- /dev/null
+++ b/lang/pure/pkg-plist
@@ -0,0 +1,27 @@
+bin/pure
+include/pure/runtime.h
+lib/libpure.so
+lib/libpure.so.6
+lib/libpure.so.6.0
+lib/pure/array.pure
+lib/pure/avltrees.pure
+lib/pure/dict.pure
+lib/pure/faustui.pure
+lib/pure/getopt.pure
+lib/pure/heap.pure
+lib/pure/math.pure
+lib/pure/matrices.pure
+lib/pure/posix.pure
+lib/pure/prelude.pure
+lib/pure/primitives.pure
+lib/pure/pure_main.c
+lib/pure/pure_main.o
+lib/pure/quasiquote.pure
+lib/pure/quasiquote2.pure
+lib/pure/records.pure
+lib/pure/set.pure
+lib/pure/strings.pure
+lib/pure/system.pure
+%%DOCS%%lib/pure/docs
+@dirrm lib/pure
+@dirrm include/pure