From 828cfdc47e567d75b4629a7af7afed3a20adcf5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 16 Jul 2021 17:10:44 +0200 Subject: [PATCH] gnu: Use 'search-input-file' when looking for .jar files. * gnu/packages/bioinformatics.scm (java-picard-1.113): Use 'search-input-file' when looking for *.jar. (fastqc): Likewise. * gnu/packages/groovy.scm (groovy): Likewise. * gnu/packages/java.scm (ant-bootstrap): Likewise. (ecj-bootstrap): Likewise. (java-cisd-base): Likewise. (java-cisd-args4j): Likewise. (java-cisd-jhdf5): Likewise. (java-native-access): Likewise. (java-native-access-platform): Likewise. * gnu/packages/maths.scm (hdf-java): Likewise. --- gnu/packages/bioinformatics.scm | 20 ++++----- gnu/packages/groovy.scm | 2 +- gnu/packages/java.scm | 76 +++++++++++++++++---------------- gnu/packages/maths.scm | 3 +- 4 files changed, 49 insertions(+), 52 deletions(-) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 75668418f0..1719cf86ae 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -4379,9 +4379,7 @@ VCF.") (lambda* (#:key inputs #:allow-other-keys) (substitute* "build.xml" (("\\$\\{lib\\}/apache-ant-1.8.2-bzip2.jar") - (string-append (assoc-ref inputs "ant") - "/lib/ant.jar"))) - #t)) + (search-input-file inputs "/lib/ant.jar"))))) (add-after 'unpack 'make-test-target-independent (lambda* (#:key inputs #:allow-other-keys) (substitute* "build.xml" @@ -4478,15 +4476,13 @@ VCF.") (lambda* (#:key inputs #:allow-other-keys) (substitute* "build.xml" (("jbzip2-0.9.jar") - (string-append (assoc-ref inputs "java-jbzip2") - "/share/java/jbzip2.jar")) + (search-input-file inputs "/share/java/jbzip2.jar")) (("sam-1.103.jar") - (string-append (assoc-ref inputs "java-picard-1.113") - "/share/java/sam-1.112.jar")) + (search-input-file inputs + "/share/java/sam-1.112.jar")) (("cisd-jhdf5.jar") - (string-append (assoc-ref inputs "java-cisd-jhdf5") - "/share/java/sis-jhdf5.jar"))) - #t)) + (search-input-file inputs + "/share/java/sis-jhdf5.jar"))))) ;; There is no installation target (replace 'install (lambda* (#:key inputs outputs #:allow-other-keys) @@ -9137,8 +9133,8 @@ browser.") (substitute* "bin/linux/fseq" (("java") (which "java")) (("\\$REALDIR/../lib/commons-cli-1.1.jar") - (string-append (assoc-ref inputs "java-commons-cli") - "/share/java/commons-cli.jar")) + (search-input-file inputs + "/share/java/commons-cli.jar")) (("REALDIR=.*") (string-append "REALDIR=" bin "\n"))) (install-file "README.txt" doc) diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm index c44a17b59e..73a62e1045 100644 --- a/gnu/packages/groovy.scm +++ b/gnu/packages/groovy.scm @@ -827,7 +827,7 @@ and modify groovy's @dfn{Abstract Syntax Tree} (AST).")))) "java-jansi" "java-jline-2")) ;; antlr.jar is present twice in antlr2. Symlink doesn't like ;; it, so we symlink it here. - (symlink (string-append (assoc-ref inputs "antlr2") "/lib/antlr.jar") + (symlink (search-input-file inputs "/lib/antlr.jar") (string-append out-lib "/antlr.jar")) (for-each (lambda (tool) diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index fdfd044926..f4a426e559 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -382,8 +382,7 @@ JNI.") (setenv "JAVAC" (search-input-file inputs "/bin/jikes")) (setenv "CLASSPATH" - (string-append (assoc-ref inputs "jamvm") - "/lib/rt.jar")) + (search-input-file inputs "/lib/rt.jar")) ;; Ant complains if this file doesn't exist. (setenv "HOME" "/tmp") @@ -486,8 +485,7 @@ build process and its dependencies, whereas Make uses Makefile format.") (lambda* (#:key inputs #:allow-other-keys) (setenv "CLASSPATH" (string-join - (cons (string-append (assoc-ref inputs "jamvm") - "/lib/rt.jar") + (cons (search-input-file inputs "/lib/rt.jar") (find-files (string-append (assoc-ref inputs "ant-bootstrap") "/lib") @@ -3221,19 +3219,22 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" (lambda* (#:key inputs #:allow-other-keys) (substitute* "build/build.xml" (("\\$\\{lib\\}/testng/testng-jdk15.jar") - (string-append (assoc-ref inputs "java-testng") - "/share/java/java-testng.jar")) + (search-input-file inputs + "/share/java/java-testng.jar")) (("\\$\\{lib\\}/commons-lang/commons-lang.jar") - (string-append (assoc-ref inputs "java-commons-lang") - "/share/java/commons-lang-" - ,(package-version java-commons-lang) ".jar")) + (search-input-file inputs + (string-append + "/share/java/commons-lang-" + ,(package-version java-commons-lang) + ".jar"))) (("\\$\\{lib\\}/commons-io/commons-io.jar") - (string-append (assoc-ref inputs "java-commons-io") - "/lib/m2/commons-io/commons-io/" - ,(package-version java-commons-io) - "/commons-io-" - ,(package-version java-commons-io) - ".jar")) + (search-input-file inputs + (string-append + "/lib/m2/commons-io/commons-io/" + ,(package-version java-commons-io) + "/commons-io-" + ,(package-version java-commons-io) + ".jar"))) ;; Remove dependency on svn (("