$OpenBSD: patch-lein-pkg,v 1.1 2011/11/29 17:42:17 jasper Exp $ --- lein-pkg.orig Tue Nov 29 18:07:40 2011 +++ lein-pkg Tue Nov 29 18:09:53 2011 @@ -1,4 +1,4 @@ -#!/bin/bash +#!${LOCALBASE}/bin/bash # This variant of the lein script is meant for downstream packagers. # It has all the cross-platform stuff stripped out as well as the @@ -27,7 +27,7 @@ done # Support $JAVA_OPTS for backwards-compatibility. JVM_OPTS=${JVM_OPTS:-"$JAVA_OPTS"} -JAVA_CMD=${JAVA_CMD:-"java"} +JAVA_CMD=$(javaPathHelper -c clojure) if [ "$LEIN_HOME" = "" ]; then if [ -d "$PWD/.lein" ] && [ "$PWD" != "$HOME" ]; then @@ -70,7 +70,7 @@ unique_user_plugins () { LEIN_PLUGIN_PATH="$(echo "$DEV_PLUGINS" | tr \\n :)" LEIN_USER_PLUGIN_PATH="$(echo "$(unique_user_plugins)" | tr \\n :)" CLASSPATH="$CLASSPATH:$LEIN_PLUGIN_PATH:$LEIN_USER_PLUGIN_PATH:test/:src/:resources/" -CLOJURE_JAR="/usr/share/java/clojure-1.2.jar:/usr/share/java/asm3.jar:/usr/share/java/asm3-commons.jar" +CLOJURE_JAR="${LOCALBASE}/clojure/clojure.jar:${MODJAVA_JAR_DIR}/asm.jar:${MODJAVA_JAR_DIR}/asm-commons.jar" NULL_DEVICE=/dev/null # apply context specific CLASSPATH entries @@ -78,7 +78,7 @@ if [ -f .lein-classpath ]; then CLASSPATH="`cat .lein-classpath`:$CLASSPATH" fi -SHARE_JARS="ant ant-launcher classworlds clojure-1.2 clojure-contrib \ +SHARE_JARS="ant ant-launcher classworlds clojure clojure-contrib \ lucene-memory maven-ant-tasks maven-artifact maven-artifact-manager \ maven-error-diagnostics maven-model maven-settings maven-project maven-profile \ maven-repository-metadata plexus-container-default-alpha plexus-interpolation \ @@ -86,7 +86,7 @@ plexus-utils wagon-file wagon-http-lightweight wagon-h xml-apis lucene-core lucene-highlighter clucy robert-hooke lancet \ backport-util-concurrent" # NFI why that last one is necessary for JAR in $SHARE_JARS; do - CLASSPATH="$CLASSPATH":"/usr/share/java/$JAR.jar" + CLASSPATH="$CLOJURE_JAR:$CLASSPATH":"${MODJAVA_JAR_DIR}/$JAR.jar" done # Do not use installed leiningen jar during self-compilation