pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/clojure Import clojure-1.4.0 as lang/clojure.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/08cec92546a5
branches:  trunk
changeset: 603336:08cec92546a5
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Fri May 04 11:51:30 2012 +0000

description:
Import clojure-1.4.0 as lang/clojure.

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.

diffstat:

 lang/clojure/DESCR        |  20 ++++++++++++
 lang/clojure/MESSAGE      |   6 +++
 lang/clojure/Makefile     |  59 ++++++++++++++++++++++++++++++++++++
 lang/clojure/PLIST        |  76 +++++++++++++++++++++++++++++++++++++++++++++++
 lang/clojure/distinfo     |   5 +++
 lang/clojure/files/clj.sh |  36 ++++++++++++++++++++++
 6 files changed, 202 insertions(+), 0 deletions(-)

diffs (226 lines):

diff -r e0d5f5d7661b -r 08cec92546a5 lang/clojure/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/clojure/DESCR        Fri May 04 11:51:30 2012 +0000
@@ -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 -r e0d5f5d7661b -r 08cec92546a5 lang/clojure/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/clojure/MESSAGE      Fri May 04 11:51:30 2012 +0000
@@ -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 -r e0d5f5d7661b -r 08cec92546a5 lang/clojure/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/clojure/Makefile     Fri May 04 11:51:30 2012 +0000
@@ -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@localhost
+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 -r e0d5f5d7661b -r 08cec92546a5 lang/clojure/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/clojure/PLIST        Fri May 04 11:51:30 2012 +0000
@@ -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 -r e0d5f5d7661b -r 08cec92546a5 lang/clojure/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/clojure/distinfo     Fri May 04 11:51:30 2012 +0000
@@ -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 -r e0d5f5d7661b -r 08cec92546a5 lang/clojure/files/clj.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/clojure/files/clj.sh Fri May 04 11:51:30 2012 +0000
@@ -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



Home | Main Index | Thread Index | Old Index