[72642] trunk/dports/devel/leiningen

ieure at macports.org ieure at macports.org
Thu Oct 21 10:26:47 PDT 2010


Revision: 72642
          http://trac.macports.org/changeset/72642
Author:   ieure at macports.org
Date:     2010-10-21 10:26:44 -0700 (Thu, 21 Oct 2010)
Log Message:
-----------
Upgrade Leiningen to 1.3.1.

Modified Paths:
--------------
    trunk/dports/devel/leiningen/Portfile
    trunk/dports/devel/leiningen/files/patch-bin-lein.diff

Modified: trunk/dports/devel/leiningen/Portfile
===================================================================
--- trunk/dports/devel/leiningen/Portfile	2010-10-21 17:13:03 UTC (rev 72641)
+++ trunk/dports/devel/leiningen/Portfile	2010-10-21 17:26:44 UTC (rev 72642)
@@ -3,8 +3,8 @@
 PortSystem          1.0
 
 name                leiningen
-version             1.1.0
-revision            2
+version             1.3.1
+revision            0
 categories          devel java
 maintainers         gmail.com:ian.eure
 platforms           darwin
@@ -14,10 +14,11 @@
 homepage            http://github.com/technomancy/${name}
 master_sites        http://download.github.com/
 
-distname            technomancy-${name}-0577148
-checksums           md5 f0c0ad3450c3979658aea443c560761a \
-                    sha1 ca88d74fb4c893eb083fa84f44d17c61f8186621 \
-                    rmd160 876414ab1bf1eb101ac7f1b82eb18a4e7cf9fb11
+distname            technomancy-${name}-${version}-0-g2ea4b63
+worksrcdir          technomancy-${name}-2ea4b63
+checksums           md5 707fb0da7b89b44d9d37a9bac2bf3b3f \
+    sha1 dc8d681f72f325f3b75e8c477bffc2cea52976d8 \
+    rmd160 e38ee084d46c09f8b622703e04a9e41acadbf531
 
 depends_build       port:clojure \
                     port:clojure-contrib \

Modified: trunk/dports/devel/leiningen/files/patch-bin-lein.diff
===================================================================
--- trunk/dports/devel/leiningen/files/patch-bin-lein.diff	2010-10-21 17:13:03 UTC (rev 72641)
+++ trunk/dports/devel/leiningen/files/patch-bin-lein.diff	2010-10-21 17:26:44 UTC (rev 72642)
@@ -1,88 +1,54 @@
---- a/bin/lein.orig	2010-02-20 15:51:26.000000000 -0500
-+++ b/bin/lein	2010-02-20 15:55:13.000000000 -0500
-@@ -2,51 +2,9 @@
+diff --git a/bin/lein b/bin/lein
+index 21eef64..26f655e 100755
+--- a/bin/lein
++++ b/bin/lein
+@@ -1,5 +1,6 @@
+ #!/bin/sh
  
- VERSION="1.1.0"
- 
--CLASSPATH="$(find lib/ -follow -mindepth 1 -maxdepth 1 -print0 2> /dev/null | tr \\0 \:)"
--LEIN_JAR="$HOME/.m2/repository/leiningen/leiningen/$VERSION/leiningen-$VERSION-standalone.jar"
--CLOJURE_JAR="$HOME/.m2/repository/org/clojure/clojure/1.1.0/clojure-1.1.0.jar"
--
--# normalize $0 on certain BSDs
--if [ "$(dirname $0)" = "." ]; then
--    SCRIPT="$(which $(basename $0))"
--else
--    SCRIPT="$0"
--fi
--
--# resolve symlinks to the script itself portably
--while [ -h "$SCRIPT" ] ; do
--    ls=`ls -ld "$SCRIPT"`
--    link=`expr "$ls" : '.*-> \(.*\)$'`
--    if expr "$link" : '/.*' > /dev/null; then
--        SCRIPT="$link"
--    else
--        SCRIPT="`dirname "$SCRIPT"`/$link"
--    fi
--done
--
--BIN_DIR="$(dirname "$SCRIPT")"
--
--if [ -r "$BIN_DIR/../src/leiningen/core.clj" ]; then
--    # Running from source checkout
--    LEIN_DIR="$(dirname "$BIN_DIR")"
--    LEIN_LIBS="$(find -H $LEIN_DIR/lib -mindepth 2> /dev/null 1 -maxdepth 1 -print0 | tr \\0 \:)"
--    CLASSPATH="$LEIN_DIR/src:$LEIN_LIBS:$CLASSPATH"
--
--    if [ "$LEIN_LIBS" = "" -a "$1" != "self-install" ]; then
--        echo "Your Leiningen development checkout is missing its dependencies."
--        echo "Please download a stable version of Leiningen to fetch the deps."
--        echo "See the \"Hacking\" section of the readme for details."
--        exit 1
--    fi
--else
--    # Not running from a checkout
--    CLASSPATH="$LEIN_JAR:$CLASSPATH"
--
--    if [ ! -r "$LEIN_JAR" -a "$1" != "self-install" ]; then
--        echo "Leiningen is not installed. Please run \"lein self-install\"."
--        exit 1
--    fi
--fi
 +PREFIX=__PREFIX__
-+CLASSPATH="$(find -H $PREFIX -name \*.jar 2> /dev/null -print0 | tr \\0 \:)"
-+CLOJURE_JAR="$PREFIX/local/share/java/clojure/lib/clojure.jar"
+ export LEIN_VERSION="1.3.1"
  
- if [ $DEBUG ]; then
-     echo $CLASSPATH
-@@ -58,11 +16,6 @@
-   ESCAPED_ARGS="$ESCAPED_ARGS"' "'$(echo $ARG | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g')'"'
+ case $LEIN_VERSION in
+@@ -31,14 +32,15 @@ do
  done
  
--HTTP_CLIENT="wget -O"
--if type -p curl >/dev/null 2>&1; then
--    HTTP_CLIENT="curl -L -o"
--fi
--
- if [ "$1" = "repl" ]; then
-     if [ -r project.clj ]; then
-         echo "Warning: the repl task currently doesn't honor some project.clj"
-@@ -72,43 +25,6 @@
-         echo
-     fi
-     $RLWRAP java -client $JAVA_OPTS -cp "src/:classes/:$CLASSPATH" jline.ConsoleRunner clojure.main ${@:2}
--elif [ "$1" = "self-install" ]; then
--    if [[ $VERSION == *SNAPSHOT ]]; then
--        echo "The self-install task is only meant for stable releases."
--        echo "See the \"Hacking\" section of the README."
+ if [ "$LEIN_HOME" = "" ]; then
+-    LEIN_HOME="$HOME/.lein"
++    LEIN_HOME="$PREFIX/share/java/leiningen"
+ fi
+ 
++CLASSPATH="$(find -H $PREFIX -name \*.jar 2> /dev/null -print0 | tr \\0 \:)"
+ LEIN_PLUGINS="$(ls -1 lib/dev/*jar 2> /dev/null | tr \\n \:)"
+ LEIN_USER_PLUGINS="$(ls -1 $LEIN_HOME/plugins/*jar 2> /dev/null | tr \\n \:)"
+ CLASSPATH=$LEIN_USER_PLUGINS:$LEIN_PLUGINS:src/:$CLASSPATH
+ LEIN_JAR="$HOME/.m2/repository/leiningen/leiningen/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.jar"
+-CLOJURE_JAR="$HOME/.m2/repository/org/clojure/clojure/1.2.0/clojure-1.2.0.jar"
++CLOJURE_JAR="$PREFIX/share/java/clojure/lib/clojure.jar"
+ NULL_DEVICE=/dev/null
+ 
+ # normalize $0 on certain BSDs
+@@ -87,82 +89,38 @@ fi
+ 
+ JAVA_CMD=${JAVA_CMD:-"java"}
+ 
+-# If you're packaging this for a package manager (.deb, homebrew, etc)
+-# you need to remove the self-install and upgrade functionality.
+-if [ "$1" = "self-install" ]; then
+-    echo "Downloading Leiningen now..."
+-    LEIN_DIR=`dirname "$LEIN_JAR"`
+-    mkdir -p "$LEIN_DIR"
+-    LEIN_URL="http://github.com/downloads/technomancy/leiningen/leiningen-$LEIN_VERSION-standalone.jar"
+-    $HTTP_CLIENT "$LEIN_JAR" "$LEIN_URL"
+-    if [ $? != 0 ]; then
+-        echo "Failed to download $LEIN_URL"
+-        if [ $SNAPSHOT = "YES" ]; then
+-            echo "See README.md for SNAPSHOT build instructions."
+-        fi
+-        rm $LEIN_JAR
 -        exit 1
 -    fi
--    echo "Downloading Leiningen now..."
--    mkdir -p `dirname "$LEIN_JAR"`
--    LEIN_URL="http://github.com/downloads/technomancy/leiningen/leiningen-$VERSION-standalone.jar"
--    exec $HTTP_CLIENT "$LEIN_JAR" "$LEIN_URL"
 -elif [ "$1" = "upgrade" ]; then
--    if [[ $VERSION == *SNAPSHOT ]]; then
+-    if [ $SNAPSHOT = "YES" ]; then
 -        echo "The upgrade task is only meant for stable releases."
 -        echo "See the \"Hacking\" section of the README."
 -        exit 1
@@ -108,6 +74,69 @@
 -                exit 1;;
 -        esac
 -    fi
- else
-     exec java -Xbootclasspath/a:"$CLOJURE_JAR" -client $JAVA_OPTS -cp "$CLASSPATH" -Dleiningen.version="$VERSION" clojure.main -e "(use 'leiningen.core)(-main $ESCAPED_ARGS)"
+-else
+-    if [ "$OSTYPE" = "cygwin" ]; then
+-        # When running on Cygwin, use Windows-style paths for java
+-        CLOJURE_JAR=`cygpath -w "$CLOJURE_JAR"`
+-        CLASSPATH=`cygpath -wp "$CLASSPATH"`
+-        NULL_DEVICE=NUL
+-    fi
++if [ "$OSTYPE" = "cygwin" ]; then
++    # When running on Cygwin, use Windows-style paths for java
++    CLOJURE_JAR=`cygpath -w "$CLOJURE_JAR"`
++    CLASSPATH=`cygpath -wp "$CLASSPATH"`
++    NULL_DEVICE=NUL
++fi
+ 
+-    if [ $DEBUG ]; then
+-        echo $CLASSPATH
+-        echo $CLOJURE_JAR
+-    fi
++if [ $DEBUG ]; then
++    echo $CLASSPATH
++    echo $CLOJURE_JAR
++fi
+ 
+-    if ([ "$1" = "repl" ] || [ "$1" = "interactive" ] || [ "$1" = "int" ]) &&
+-        [ -z $INSIDE_EMACS ] && [ "$TERM" != "dumb" ]; then
+-        # Use rlwrap if it's available, otherwise fall back to JLine
+-        RLWRAP=`which rlwrap`
+-        if [ $? -eq 1 ]; then
+-            JLINE=jline.ConsoleRunner
+-            if [ "$OSTYPE" = "cygwin" ]; then
+-		JLINE="-Djline.terminal=jline.UnixTerminal jline.ConsoleRunner"
+-		CYGWIN_JLINE=y
+-            fi
++if ([ "$1" = "repl" ] || [ "$1" = "interactive" ] || [ "$1" = "int" ]) &&
++    [ -z $INSIDE_EMACS ] && [ "$TERM" != "dumb" ]; then
++    # Use rlwrap if it's available, otherwise fall back to JLine
++    RLWRAP=`which rlwrap`
++    if [ $? -eq 1 ]; then
++        JLINE=jline.ConsoleRunner
++        if [ "$OSTYPE" = "cygwin" ]; then
++    JLINE="-Djline.terminal=jline.UnixTerminal jline.ConsoleRunner"
++    CYGWIN_JLINE=y
+         fi
+     fi
+-
+-    # The -Xbootclasspath argument is optional here: if the jar
+-    # doesn't exist everything will still work, it will just have a
+-    # slower JVM boot.
+-    # TODO: add more to the boot classpath
+-    test $CYGWIN_JLINE && stty -icanon min 1 -echo
+-    exec $RLWRAP $JAVA_CMD -Xbootclasspath/a:"$CLOJURE_JAR" -client $JAVA_OPTS \
+-        -cp "$CLASSPATH" $JLINE clojure.main -e "(use 'leiningen.core)(-main)" \
+-        $NULL_DEVICE $@
+-    test $CYGWIN_JLINE && stty icanon echo
  fi
++
++# The -Xbootclasspath argument is optional here: if the jar
++# doesn't exist everything will still work, it will just have a
++# slower JVM boot.
++# TODO: add more to the boot classpath
++test $CYGWIN_JLINE && stty -icanon min 1 -echo
++exec $RLWRAP $JAVA_CMD -Xbootclasspath/a:"$CLOJURE_JAR" -client $JAVA_OPTS \
++    -cp "$CLASSPATH" $JLINE clojure.main -e "(use 'leiningen.core)(-main)" \
++    $NULL_DEVICE $@
++test $CYGWIN_JLINE && stty icanon echo
++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101021/d4e37725/attachment.html>


More information about the macports-changes mailing list