[44508] trunk/dports/lang/clojure

macsforever2000 at macports.org macsforever2000 at macports.org
Mon Dec 29 15:45:09 PST 2008


Revision: 44508
          http://trac.macports.org/changeset/44508
Author:   macsforever2000 at macports.org
Date:     2008-12-29 15:45:09 -0800 (Mon, 29 Dec 2008)
Log Message:
-----------
Maintainer update to version 20081217. Added readline variant. Added new launcher script clj-jline.sh. (#17498)

Modified Paths:
--------------
    trunk/dports/lang/clojure/Portfile

Added Paths:
-----------
    trunk/dports/lang/clojure/files/clj-jline.sh

Modified: trunk/dports/lang/clojure/Portfile
===================================================================
--- trunk/dports/lang/clojure/Portfile	2008-12-29 22:59:04 UTC (rev 44507)
+++ trunk/dports/lang/clojure/Portfile	2008-12-29 23:45:09 UTC (rev 44508)
@@ -1,9 +1,9 @@
 # $Id$
 
-PortSystem 1.0
+PortSystem          1.0
 
 name                clojure
-version             20080916
+version             20081217
 categories          lang java
 maintainers         cs.wm.edu:mpd
 description         The Clojure programming language
@@ -14,29 +14,40 @@
                     persistent data structures and a macro system.
 homepage            http://clojure.org/
 platforms           darwin
-master_sites        sourceforge:clojure
+distname            clojure_${version}
+master_sites        googlecode:clojure
 
-checksums           md5 289c08f9c8cab51615623704b65048cf \
-                    sha1 9df36441c3e2568c93608218cb4f6f13cd22bc95 \
-                    rmd160 aa581415707e133e656a157644b687b706e74f3d
+checksums           md5 cf0f4c27d30ae7cd675f401e169b17e7 \
+                    sha1 b05ada05a975d3f54fbd58e333417af773853c94 \
+                    rmd160 ed132b4b755f5fc14b11f491a0eb9acbd8d8dd45
 distname            ${name}_${version}
 use_zip             yes
 
 use_configure       no
 build               {}
 
+variant readline description {Use readline support} {
+    depends_run-append port:jline
+}
+
 destroot {
     set javadir ${destroot}${prefix}/share/java
     set clojuredir ${javadir}/clojure
     set clojurejar ${clojuredir}/lib/clojure.jar
     set clojurebin ${clojuredir}/bin/clj
+    set clojurelink ${prefix}/share/java/clojure/bin/clj
+    set clojuresh clj.sh
     set bindir ${destroot}${prefix}/bin
     
+    if {[variant_isset readline]} {
+        set clojuresh clj-jline.sh
+    }
+    
     xinstall -m 0755 -d ${javadir}
     xinstall -m 0755 -d ${clojuredir}
     xinstall -m 0755 -d ${clojuredir}/lib
     xinstall -m 0755 -d ${clojuredir}/bin
-    xinstall -m 0644 -W ${workpath} clojure.jar ${clojurejar}
-    xinstall -m 0755 -W ${filespath} clj.sh ${clojurebin}
-    ln -s ${prefix}/share/java/clojure/bin/clj ${bindir}/clj
+    xinstall -m 0644 -W ${workpath} ${name}/clojure.jar ${clojurejar}
+    xinstall -m 0755 -W ${filespath} ${clojuresh} ${clojurebin}
+    ln -s ${clojurelink} ${bindir}/clj
 }

Added: trunk/dports/lang/clojure/files/clj-jline.sh
===================================================================
--- trunk/dports/lang/clojure/files/clj-jline.sh	                        (rev 0)
+++ trunk/dports/lang/clojure/files/clj-jline.sh	2008-12-29 23:45:09 UTC (rev 44508)
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# clj - Clojure launcher script
+
+
+cljjar='lib/clojure.jar'
+cljclass='clojure.lang.Repl'
+jlineclass='jline.ConsoleRunner'
+
+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"
+jlinejar="$dir/../../jline.jar"
+
+exec java -classpath $jlinejar:$cljjar $jlineclass $cljclass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081229/111dd6af/attachment.html>


More information about the macports-changes mailing list