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.
This commit is contained in:
Ludovic Courtès 2021-07-16 17:10:44 +02:00
parent 1ab95c2341
commit 828cfdc47e
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 49 additions and 52 deletions

View file

@ -4379,9 +4379,7 @@ (define-public java-picard-1.113
(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 @@ (define-public fastqc
(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 @@ (define-public f-seq
(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)

View file

@ -827,7 +827,7 @@ (define-public groovy
"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)

View file

@ -382,8 +382,7 @@ (define ant-bootstrap
(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 @@ (define ecj-bootstrap
(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 @@ (define-public java-cisd-base
(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
(("<build-info.*") "")
(("\\$\\{revision.number\\}")
@ -3406,8 +3407,7 @@ (define-public java-cisd-args4j
(rename-file "build-common.xml.new" "build-common.xml"))
(substitute* "build/build.xml"
(("\\$\\{lib\\}/cisd-base/cisd-base.jar")
(string-append (assoc-ref inputs "java-cisd-base")
"/share/java/sis-base.jar"))
(search-input-file inputs "/share/java/sis-base.jar"))
;; Remove dependency on svn
(("<build-info.*") "")
(("\\$\\{revision.number\\}")
@ -3509,29 +3509,32 @@ (define-public java-cisd-jhdf5
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "../build_resources/ant/build-common.xml"
(("../libraries/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")))
(substitute* "build/build.xml"
(("\\$\\{lib\\}/sis-base/sis-base.jar")
(string-append (assoc-ref inputs "java-cisd-base")
"/share/java/sis-base.jar"))
(search-input-file inputs
"/share/java/sis-base.jar"))
(("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
(string-append (assoc-ref inputs "java-cisd-args4j")
"/share/java/cisd-args4j.jar"))
(search-input-file inputs
"/share/java/cisd-args4j.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")))
(("\\$\\{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\\}/junit4/junit.jar")
(car (find-files (assoc-ref inputs "java-junit") "jar$")))
(("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
@ -12916,7 +12919,7 @@ (define-public java-native-access
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "build.xml"
;; Since we removed the bundled ant.jar, give the correct path
(("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
(("lib/ant.jar") (search-input-file inputs "/lib/ant.jar"))
;; We removed generated native libraries. We can only rebuild one
;; so don't fail if we can't find a native library for another architecture.
(("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
@ -12970,8 +12973,7 @@ (define-public java-native-access-platform
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "nbproject/project.properties"
(("../../build/jna.jar")
(string-append (assoc-ref inputs "java-native-access")
"/share/java/jna.jar"))
(search-input-file inputs "/share/java/jna.jar"))
(("../../lib/hamcrest-core-.*.jar")
(car (find-files (assoc-ref inputs "java-hamcrest-core")
"jar$")))

View file

@ -1347,8 +1347,7 @@ (define-public hdf-java
"hdf/hdf5lib/exceptions/Makefile.in"
"hdf/hdflib/Makefile.in")
(("\\$\\(TOP\\)/lib/slf4j-api-1\\.7\\.5\\.jar")
(string-append (assoc-ref inputs "slf4j-api")
"/share/java/slf4j-api.jar")))
(search-input-file inputs "/share/java/slf4j-api.jar")))
;; Replace outdated config.sub and config.guess:
(with-directory-excursion "config"
(for-each (lambda (file)