[52097] trunk/dports/lang/clojure

macsforever2000 at macports.org macsforever2000 at macports.org
Tue Jun 9 19:55:15 PDT 2009


Revision: 52097
          http://trac.macports.org/changeset/52097
Author:   macsforever2000 at macports.org
Date:     2009-06-09 19:55:14 -0700 (Tue, 09 Jun 2009)
Log Message:
-----------
Maintainer update to allow enhanced use of the Java classpath. (#19798)

Modified Paths:
--------------
    trunk/dports/lang/clojure/Portfile
    trunk/dports/lang/clojure/files/clj-jline.sh
    trunk/dports/lang/clojure/files/clj-rlwrap.sh
    trunk/dports/lang/clojure/files/clj.sh

Modified: trunk/dports/lang/clojure/Portfile
===================================================================
--- trunk/dports/lang/clojure/Portfile	2009-06-10 01:53:42 UTC (rev 52096)
+++ trunk/dports/lang/clojure/Portfile	2009-06-10 02:55:14 UTC (rev 52097)
@@ -5,6 +5,7 @@
 name                clojure
 version             1.0.0
 epoch               20090504
+revision            1
 categories          lang java
 maintainers         gmail.com:mdippery
 description         The Clojure programming language
@@ -27,11 +28,11 @@
 use_configure       no
 build               {}
 
-variant readline description {Use readline support} {
+variant readline conflicts rlwrap description {Use readline support} {
     depends_run-append port:jline
 }
 
-variant rlwrap description {Use rlwrap support for tab completion, parenthesis matching} {
+variant rlwrap conflicts readline description {Use rlwrap support for tab completion, parenthesis matching} {
     depends_run-append port:rlwrap
 }
 

Modified: trunk/dports/lang/clojure/files/clj-jline.sh
===================================================================
--- trunk/dports/lang/clojure/files/clj-jline.sh	2009-06-10 01:53:42 UTC (rev 52096)
+++ trunk/dports/lang/clojure/files/clj-jline.sh	2009-06-10 02:55:14 UTC (rev 52097)
@@ -10,26 +10,31 @@
 
 dir=$0
 while [ -h "$dir" ]; do
-    ls=`ls -ld "$dir"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
+  ls=`ls -ld "$dir"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
 
-    if expr "$link" : '/.*' > /dev/null; then
-        dir="$link"
-    else
-        dir=`dirname "$dir"`"/$link"
-    fi
+  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"
+cp="${PWD}:${jlinejar}:${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 -classpath $jlinejar:$cljjar $jlineclass $cljclass
+  exec java -classpath $cp $jlineclass $cljclass
 else
   scriptname=$1
-  exec java -classpath $jlinejar:$cljjar $jlineclass $cljscript $scriptname --$*
+  exec java -classpath $cp $jlineclass $cljscript $scriptname --$*
 fi
-

Modified: trunk/dports/lang/clojure/files/clj-rlwrap.sh
===================================================================
--- trunk/dports/lang/clojure/files/clj-rlwrap.sh	2009-06-10 01:53:42 UTC (rev 52096)
+++ trunk/dports/lang/clojure/files/clj-rlwrap.sh	2009-06-10 02:55:14 UTC (rev 52097)
@@ -24,13 +24,19 @@
 dir=`dirname $dir`
 dir=`cd "$dir" > /dev/null && pwd`
 cljjar="$dir/../$cljjar"
+cp="${PWD}:${cljjar}"
 cljcompletions="$dir/../$cljcompletions"
 
+# 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 [ $# -eq 0 ]; then
-  rlwrap --remember -c -b $BREAK_CHARS -f $cljcompletions \
-           java -cp $cljjar $cljclass
+  rlwrap --remember -c -b $BREAK_CHARS -f $cljcompletions java -cp $cp $cljclass
 else
   scriptname=$1
-  exec java -classpath $cljjar $cljscript $scriptname --$*
+  exec java -classpath $cp $cljscript $scriptname --$*
 fi
 

Modified: trunk/dports/lang/clojure/files/clj.sh
===================================================================
--- trunk/dports/lang/clojure/files/clj.sh	2009-06-10 01:53:42 UTC (rev 52096)
+++ trunk/dports/lang/clojure/files/clj.sh	2009-06-10 02:55:14 UTC (rev 52097)
@@ -22,10 +22,17 @@
 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 -classpath $cljjar $cljclass
+  exec java -classpath $cp $cljclass
 else
   scriptname=$1
-  exec java -classpath $cljjar $cljscript $scriptname --$*
+  exec java -classpath $cp $cljscript $scriptname --$*
 fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090609/cff90688/attachment-0001.html>


More information about the macports-changes mailing list