diff options
Diffstat (limited to 'lang/clojure')
-rw-r--r-- | lang/clojure/DESCR | 20 | ||||
-rw-r--r-- | lang/clojure/MESSAGE | 6 | ||||
-rw-r--r-- | lang/clojure/Makefile | 59 | ||||
-rw-r--r-- | lang/clojure/PLIST | 76 | ||||
-rw-r--r-- | lang/clojure/distinfo | 5 | ||||
-rw-r--r-- | lang/clojure/files/clj.sh | 36 |
6 files changed, 202 insertions, 0 deletions
diff --git a/lang/clojure/DESCR b/lang/clojure/DESCR new file mode 100644 index 00000000000..43f3600ae6f --- /dev/null +++ b/lang/clojure/DESCR @@ -0,0 +1,20 @@ +Clojure is a dynamic programming language that targets the Java +Virtual Machine (and the CLR, and JavaScript). It is designed to +be a general-purpose language, combining the approachability and +interactive development of a scripting language with an efficient +and robust infrastructure for multithreaded programming. Clojure +is a compiled language - it compiles directly to JVM bytecode, yet +remains completely dynamic. Every feature supported by Clojure is +supported at runtime. Clojure provides easy access to the Java +frameworks, with optional type hints and type inference, to ensure +that calls to Java can avoid reflection. + +Clojure is a dialect of Lisp, and shares with Lisp the code-as-data +philosophy and a powerful macro system. Clojure is predominantly +a functional programming language, and features a rich set of +immutable, persistent data structures. When mutable state is needed, +Clojure offers a software transactional memory system and reactive +Agent system that ensure clean, correct, multithreaded designs. + +I hope you find Clojure's combination of facilities elegant, +powerful, practical and fun to use. diff --git a/lang/clojure/MESSAGE b/lang/clojure/MESSAGE new file mode 100644 index 00000000000..2c6fa58b98e --- /dev/null +++ b/lang/clojure/MESSAGE @@ -0,0 +1,6 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2012/05/04 11:51:30 ryoon Exp $ + +To enable additional modules, you should create .clojure file +in your working directory, not in home directory. +=========================================================================== diff --git a/lang/clojure/Makefile b/lang/clojure/Makefile new file mode 100644 index 00000000000..329a76e52e4 --- /dev/null +++ b/lang/clojure/Makefile @@ -0,0 +1,59 @@ +# $NetBSD: Makefile,v 1.1.1.1 2012/05/04 11:51:30 ryoon Exp $ +# + +DISTNAME= clojure-1.4.0 +CATEGORIES= lang +MASTER_SITES= http://repo1.maven.org/maven2/org/clojure/clojure/1.4.0/ +EXTRACT_SUFX= .zip + +MAINTAINER= ryoon@NetBSD.org +HOMEPAGE= http://clojure.org/ +COMMENT= Dynamic programming language that targets the Java VM +LICENSE= epl-v1.0 + +PKG_DESTDIR_SUPPORT= user-destdir + +NO_BUILD= yes +USE_JAVA= run +USE_JAVA2= 1.5 +USE_LANGUAGES= # none +USE_TOOLS+= pax + +INSTALLATION_DIRS= bin \ + share/doc/${PKGNAME_NOREV} \ + lib/java/clojure \ + share/examples/${PKGNAME_NOREV} + +CLOJURE_DOCS= changes.md epl-v10.html readme.txt \ + doc/clojure/pprint/CommonLispFormat.markdown \ + doc/clojure/pprint/PrettyPrinting.markdown + +SUBST_CLASSES+= java +SUBST_STAGE.java= pre-install +SUBST_MESSAGE.java= Set Java +SUBST_FILES.java= clj.sh +SUBST_SED.java= -e 's,@JAVA_HOME@,${PKG_JAVA_HOME},g' +SUBST_SED.java+= -e 's,@SH@,${SH},' + +pre-patch: + ${INSTALL_DATA} ${FILESDIR}/clj.sh ${WRKSRC} + +do-install: + ${INSTALL_DATA} ${WRKSRC}/${PKGNAME_NOREV}.jar \ + ${DESTDIR}${PREFIX}/lib/java/clojure/clojure.jar + + cd ${WRKSRC}/test/clojure && pax -rw -pmp test_clojure \ + ${DESTDIR}${PREFIX}/share/examples/${PKGNAME_NOREV}/ + ${INSTALL_DATA} ${WRKSRC}/test/clojure/test_helper.clj \ + ${DESTDIR}${PREFIX}/share/examples/${PKGNAME_NOREV} + +.for f in ${CLOJURE_DOCS} + ${INSTALL_DATA} ${WRKSRC}/${f} \ + ${DESTDIR}${PREFIX}/share/doc/${PKGNAME_NOREV} +.endfor + + ${INSTALL_SCRIPT} ${WRKSRC}/clj.sh ${DESTDIR}${PREFIX}/bin/clj + +.include "../../mk/java-env.mk" +.include "../../mk/java-vm.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/lang/clojure/PLIST b/lang/clojure/PLIST new file mode 100644 index 00000000000..748e408a340 --- /dev/null +++ b/lang/clojure/PLIST @@ -0,0 +1,76 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2012/05/04 11:51:30 ryoon Exp $ +bin/clj +lib/java/clojure/clojure.jar +share/doc/${PKGNAME}/CommonLispFormat.markdown +share/doc/${PKGNAME}/PrettyPrinting.markdown +share/doc/${PKGNAME}/changes.md +share/doc/${PKGNAME}/epl-v10.html +share/doc/${PKGNAME}/readme.txt +share/examples/${PKGNAME}/test_clojure/agents.clj +share/examples/${PKGNAME}/test_clojure/annotations.clj +share/examples/${PKGNAME}/test_clojure/annotations/java_5.clj +share/examples/${PKGNAME}/test_clojure/annotations/java_6.clj +share/examples/${PKGNAME}/test_clojure/atoms.clj +share/examples/${PKGNAME}/test_clojure/clojure_set.clj +share/examples/${PKGNAME}/test_clojure/clojure_walk.clj +share/examples/${PKGNAME}/test_clojure/clojure_xml.clj +share/examples/${PKGNAME}/test_clojure/clojure_zip.clj +share/examples/${PKGNAME}/test_clojure/compilation.clj +share/examples/${PKGNAME}/test_clojure/control.clj +share/examples/${PKGNAME}/test_clojure/data.clj +share/examples/${PKGNAME}/test_clojure/data_structures.clj +share/examples/${PKGNAME}/test_clojure/def.clj +share/examples/${PKGNAME}/test_clojure/errors.clj +share/examples/${PKGNAME}/test_clojure/evaluation.clj +share/examples/${PKGNAME}/test_clojure/for.clj +share/examples/${PKGNAME}/test_clojure/genclass.clj +share/examples/${PKGNAME}/test_clojure/genclass/examples.clj +share/examples/${PKGNAME}/test_clojure/java/io.clj +share/examples/${PKGNAME}/test_clojure/java/javadoc.clj +share/examples/${PKGNAME}/test_clojure/java/shell.clj +share/examples/${PKGNAME}/test_clojure/java_interop.clj +share/examples/${PKGNAME}/test_clojure/keywords.clj +share/examples/${PKGNAME}/test_clojure/load.clj +share/examples/${PKGNAME}/test_clojure/load/cyclic0.clj +share/examples/${PKGNAME}/test_clojure/load/cyclic1.clj +share/examples/${PKGNAME}/test_clojure/load/cyclic2.clj +share/examples/${PKGNAME}/test_clojure/load/cyclic3.clj +share/examples/${PKGNAME}/test_clojure/load/cyclic4.clj +share/examples/${PKGNAME}/test_clojure/load/cyclic5.clj +share/examples/${PKGNAME}/test_clojure/load/cyclic6.clj +share/examples/${PKGNAME}/test_clojure/logic.clj +share/examples/${PKGNAME}/test_clojure/macros.clj +share/examples/${PKGNAME}/test_clojure/main.clj +share/examples/${PKGNAME}/test_clojure/metadata.clj +share/examples/${PKGNAME}/test_clojure/multimethods.clj +share/examples/${PKGNAME}/test_clojure/ns_libs.clj +share/examples/${PKGNAME}/test_clojure/numbers.clj +share/examples/${PKGNAME}/test_clojure/other_functions.clj +share/examples/${PKGNAME}/test_clojure/parallel.clj +share/examples/${PKGNAME}/test_clojure/pprint.clj +share/examples/${PKGNAME}/test_clojure/pprint/test_cl_format.clj +share/examples/${PKGNAME}/test_clojure/pprint/test_helper.clj +share/examples/${PKGNAME}/test_clojure/pprint/test_pretty.clj +share/examples/${PKGNAME}/test_clojure/predicates.clj +share/examples/${PKGNAME}/test_clojure/printer.clj +share/examples/${PKGNAME}/test_clojure/protocols.clj +share/examples/${PKGNAME}/test_clojure/protocols/examples.clj +share/examples/${PKGNAME}/test_clojure/protocols/hash_collisions.clj +share/examples/${PKGNAME}/test_clojure/protocols/more_examples.clj +share/examples/${PKGNAME}/test_clojure/reader.clj +share/examples/${PKGNAME}/test_clojure/reflect.clj +share/examples/${PKGNAME}/test_clojure/refs.clj +share/examples/${PKGNAME}/test_clojure/repl.clj +share/examples/${PKGNAME}/test_clojure/repl/example.clj +share/examples/${PKGNAME}/test_clojure/rt.clj +share/examples/${PKGNAME}/test_clojure/sequences.clj +share/examples/${PKGNAME}/test_clojure/serialization.clj +share/examples/${PKGNAME}/test_clojure/special.clj +share/examples/${PKGNAME}/test_clojure/string.clj +share/examples/${PKGNAME}/test_clojure/test.clj +share/examples/${PKGNAME}/test_clojure/test_fixtures.clj +share/examples/${PKGNAME}/test_clojure/transients.clj +share/examples/${PKGNAME}/test_clojure/try_catch.clj +share/examples/${PKGNAME}/test_clojure/vars.clj +share/examples/${PKGNAME}/test_clojure/vectors.clj +share/examples/${PKGNAME}/test_helper.clj diff --git a/lang/clojure/distinfo b/lang/clojure/distinfo new file mode 100644 index 00000000000..e3ad24a9bcf --- /dev/null +++ b/lang/clojure/distinfo @@ -0,0 +1,5 @@ +$NetBSD: distinfo,v 1.1.1.1 2012/05/04 11:51:30 ryoon Exp $ + +SHA1 (clojure-1.4.0.zip) = 34daf1bb035aba4c0e5ff3b4afef837d21700e72 +RMD160 (clojure-1.4.0.zip) = 0874a4271b35c450a9eb893d1ecf68476ef50980 +Size (clojure-1.4.0.zip) = 4553941 bytes diff --git a/lang/clojure/files/clj.sh b/lang/clojure/files/clj.sh new file mode 100644 index 00000000000..b6591c42f07 --- /dev/null +++ b/lang/clojure/files/clj.sh @@ -0,0 +1,36 @@ +#!@SH@ + +# clj - Clojure launcher script +# Borrowed from https://trac.macports.org/changeset/69628 + +cljjar='lib/java/clojure/clojure.jar' +cljclass='clojure.main' + +dir=$0 +while [ -h "$dir" ]; do + ls=`ls -ld "$dir"` + link=`expr "$ls" : '.*-> \(.*\)$'` + + if expr "$link" : '/.*' > /dev/null; then + dir="$link" + else + dir=`dirname "$dir"`"/$link" + fi +done + +dir=`dirname $dir` +dir=`cd "$dir" > /dev/null && pwd` +cljjar="$dir/../$cljjar" +cp="${PWD}:${cljjar}" + +# Add extra jars as specified by `.clojure` file +# Borrowed from <http://github.com/mreid/clojure-framework> +if [ -f .clojure ]; then + cp=$cp:`cat .clojure` +fi + +if [ -z "$1" ]; then + exec @JAVA_HOME@/bin/java -classpath $cp $cljclass +else + exec @JAVA_HOME@/bin/java -classpath $cp $cljclass $* +fi |