Thursday, April 30, 2020

devel/leiningen binary package is broken, port works

Hello,

installing leiningen with pkg_add and then running

$ lein help

fails with

Error: Could not find or load main class clojure.main

but, installing from the ports tree works fine.

running the following with the binary packaged leiningen
reveals something that doesn't look quite right:

$ DEBUG=1 lein

Leiningen's classpath: :/usr/obj/ports/leiningen-2.9.1/fake-amd64/usr/local/share/leiningen/leiningen-2.9.1-standalone.zip
Error: Could not find or load main class clojure.main

with the ports version, we get:

$ DEBUG=1 lein

Leiningen's classpath: :/usr/ports/pobj/leiningen-2.9.1/fake-amd64/usr/local/share/leiningen/leiningen-2.9.1-standalone.zip
Applying task help to []
Leiningen is a tool for working with Clojure projects.
<snip>

the culprit seems to be related to patches/patch-bin_lein-pkg, excerpted
here:

@@ -43,7 +43,7 @@ LEIN_JVM_OPTS="${LEIN_JVM_OPTS:-'-Xms64m -Xmx512m'}"
# If you're not using an uberjar you'll need to list each dependency
# and add them individually to the classpath/bootclasspath as well.

-LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar
+LEIN_JAR=${LEIN_DIR}/${JAR_FILE}

LEIN_DIR is defined in the makefile as ${PREFIX}/share/leiningen

can anyone point me in the right direction for fixing this? I don't
exactly understand how the $PREFIX variable works in ports. the man page
says it's set to $LOCALBASE, but isn't that just "/usr/local/"?

Cheers,
Andrea

No comments:

Post a Comment