summaryrefslogtreecommitdiff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm261
1 files changed, 161 insertions, 100 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index a404250d38..e53bb6b4b9 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
-;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2020, 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
@@ -17,6 +17,7 @@
;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2021 Mike Gerwitz <mtg@gnu.org>
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -42,6 +43,7 @@
#:use-module (guix svn-download)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix utils)
+ #:use-module (guix gexp)
#:use-module (guix build-system ant)
#:use-module (guix build-system gnu)
#:use-module (guix build-system maven)
@@ -129,24 +131,11 @@
(base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
- #:phases (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key build target native-inputs inputs outputs
- (configure-flags '()) out-of-source? system
- #:allow-other-keys)
- (let ((configure (assoc-ref %standard-phases 'configure))
- (enable-64bit? (member system '("aarch64-linux"
- "x86_64-linux"
- "mips64el-linux"))))
- (configure #:build build #:target target
- #:native-inputs native-inputs
- #:inputs inputs #:outputs outputs
- #:configure-flags `(,(if enable-64bit?
- "--enable-64bit"
- '())
- ,@configure-flags)
- #:out-of-source? out-of-source?)))))))
+ `(#:configure-flags (list "--enable-debuginfo"
+ "--disable-static"
+ ,@(if (target-64bit?)
+ `("--enable-64bit")
+ '()))))
(synopsis "ANTLR C Library")
(description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
Tool for Language Recognition v3).")
@@ -197,7 +186,7 @@ and binary format defined in The Java Virtual Machine Specification.")
(delete 'configure)
(add-before 'install 'fix-wrapper
(lambda* (#:key inputs #:allow-other-keys)
- (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
+ (let ((jps (search-input-file inputs "/bin/jps")))
(substitute* "bin/drip"
(("jps") jps)
(("brew update && brew upgrade drip") "guix pull && guix install drip")
@@ -242,13 +231,13 @@ only faster.")
(sha256
(base32
"0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
- (patches (search-patches "classpath-aarch64-support.patch"))))
+ (patches (search-patches "classpath-aarch64-support.patch"
+ "classpath-miscompilation.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
(list (string-append "JAVAC="
- (assoc-ref %build-inputs "jikes")
- "/bin/jikes")
+ (search-input-file %build-inputs "/bin/jikes"))
"--disable-Werror"
"--disable-gmp"
"--disable-gtk-peer"
@@ -259,17 +248,6 @@ only faster.")
"--disable-gjdoc")
#:phases
(modify-phases %standard-phases
- ;; XXX: This introduces a memory leak as we remove a call to free up
- ;; memory for the file name string. This was necessary because of a
- ;; runtime error that would have prevented us from building
- ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
- ;; for the gnarly details.
- (add-after 'unpack 'remove-call-to-free
- (lambda _
- (substitute* "native/jni/java-io/java_io_VMFile.c"
- (("result = cpio_isFileExists.*" m)
- (string-append m "\n//")))
- #t))
(add-after 'install 'install-data
(lambda _ (invoke "make" "install-data"))))))
(native-inputs
@@ -373,19 +351,15 @@ JNI.")
(modify-phases %standard-phases
(delete 'bootstrap)
(delete 'configure)
- (replace 'build
+ (add-before 'build 'define-java-environment-variables
(lambda* (#:key inputs #:allow-other-keys)
+ ;; First, set environment variables (eases debugging on -K).
(setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
- (setenv "JAVACMD"
- (string-append (assoc-ref inputs "jamvm")
- "/bin/jamvm"))
- (setenv "JAVAC"
- (string-append (assoc-ref inputs "jikes")
- "/bin/jikes"))
- (setenv "CLASSPATH"
- (string-append (assoc-ref inputs "jamvm")
- "/lib/rt.jar"))
-
+ (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
+ (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
+ (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
;; Ant complains if this file doesn't exist.
(setenv "HOME" "/tmp")
(with-output-to-file "/tmp/.ant.properties"
@@ -487,8 +461,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")
@@ -935,6 +908,33 @@ machine.")))
"patches/hotspot/hs23/drop_unlicensed_test.patch")
(("#!/bin/sh") (string-append "#!" (which "sh"))))
#t))
+ (add-after 'unpack 'fix-openjdk
+ (lambda _
+ (substitute* "openjdk/jdk/make/common/Defs-linux.gmk"
+ (("CFLAGS_COMMON = -fno-strict-aliasing" all)
+ (string-append all " -fcommon")))
+ (substitute* "openjdk/hotspot/src/share/vm/code/relocInfo.hpp"
+ (("inline friend relocInfo prefix_relocInfo\\(int datalen = 0\\);")
+ "inline friend relocInfo prefix_relocInfo(int datalen);"))
+ (substitute*
+ '("openjdk/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
+ "openjdk/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
+ (("#include <sys/sysctl.h>")
+ "#include <linux/sysctl.h>"))
+ ;; It looks like the "h = 31 * h + c" line of the jsum()
+ ;; function gets miscompiled. After a few iterations of the loop
+ ;; the result of "31 * h" is always 0x8000000000000000.
+ ;; Bad optimization maybe...
+ ;; Transform "31 * h + c" into a convoluted "32 * h + c - h"
+ ;; as a workaround.
+ (substitute* "openjdk/hotspot/src/share/vm/memory/dump.cpp"
+ (("h = 31 \\* h \\+ c;")
+ "jlong h0 = h;\nfor(int i = 0; i < 5; i++) h += h;\nh += c - h0;"))
+ ;; Our gcc version is higher than 4.3; replace the failing
+ ;; expression to test this by its result.
+ (substitute* "openjdk/jdk/make/sun/font/Makefile"
+ (("\"\\$\\(shell expr.*0\"")
+ "\"1\" \"0\""))))
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
;; buildtree.make generates shell scripts, so we need to replace
@@ -1103,6 +1103,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/")
(changeset "jdk6-b41")))
+ (file-name "jdk6-checkout")
(sha256
(base32
"14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
@@ -1112,6 +1113,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
(changeset "jdk6-b41")))
+ (file-name "jdk-checkout")
(sha256
(base32
"165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
@@ -1121,6 +1123,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
(changeset "jdk6-b41")))
+ (file-name "hotspot-checkout")
(sha256
(base32
"07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
@@ -1130,6 +1133,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
(changeset "jdk6-b41")))
+ (file-name "corba-checkout")
(sha256
(base32
"1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
@@ -1139,6 +1143,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
(changeset "jdk6-b41")))
+ (file-name "langtools-checkout")
(sha256
(base32
"1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
@@ -1148,6 +1153,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
(changeset "jdk6-b41")))
+ (file-name "jaxp-checkout")
(sha256
(base32
"0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
@@ -1157,6 +1163,7 @@ machine.")))
(uri (hg-reference
(url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
(changeset "jdk6-b41")))
+ (file-name "jaxws-checkout")
(sha256
(base32
"0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
@@ -1279,6 +1286,25 @@ bootstrapping purposes.")
"openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
(("attr/xattr.h") "sys/xattr.h"))
#t))
+ (add-after 'unpack 'fix-openjdk
+ (lambda _
+ (substitute* "openjdk.src/jdk/make/common/Defs-linux.gmk"
+ (("CFLAGS_COMMON = -fno-strict-aliasing" all)
+ (string-append all " -fcommon")))
+ (substitute*
+ '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
+ "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
+ (("#include <sys/sysctl.h>")
+ "#include <linux/sysctl.h>"))
+ ;; It looks like the "h = 31 * h + c" line of the jsum()
+ ;; function gets miscompiled. After a few iterations of the loop
+ ;; the result of "31 * h" is always 0x8000000000000000.
+ ;; Bad optimization maybe...
+ ;; Transform "31 * h + c" into a convoluted "32 * h + c - h"
+ ;; as a workaround.
+ (substitute* "openjdk.src/hotspot/src/share/vm/memory/dump.cpp"
+ (("h = 31 \\* h \\+ c;")
+ "jlong h0 = h;\nfor(int i = 0; i < 5; i++) h += h;\nh += c - h0;"))))
(add-after 'unpack 'fix-x11-extension-include-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
@@ -1572,8 +1598,8 @@ bootstrapping purposes.")
(add-after 'install 'install-keystore
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((keystore "cacerts")
- (certs-dir (string-append (assoc-ref inputs "nss-certs")
- "/etc/ssl/certs"))
+ (certs-dir (search-input-directory inputs
+ "etc/ssl/certs"))
(keytool (string-append (assoc-ref outputs "jdk")
"/bin/keytool")))
(define (extract-cert file target)
@@ -1754,7 +1780,7 @@ IcedTea build harness.")
(guix build syscalls)
,@%gnu-build-system-modules)
- #:disallowed-references ((,icedtea-7 "jdk"))
+ #:disallowed-references ,(list (gexp-input icedtea-7 "jdk"))
,@(substitute-keyword-arguments (package-arguments icedtea-7)
((#:modules modules)
@@ -1767,7 +1793,9 @@ IcedTea build harness.")
(srfi srfi-26)))
((#:configure-flags flags)
`(let ((jdk (assoc-ref %build-inputs "jdk")))
- `( ;;"--disable-bootstrap"
+ `("CFLAGS=-fcommon"
+ "CXXFLAGS=-fcommon"
+ ;;"--disable-bootstrap"
"--enable-bootstrap"
"--enable-nss"
,(string-append "--with-parallel-jobs="
@@ -1832,6 +1860,13 @@ new Date();"))
(find-files "openjdk.src/jdk/src/solaris/native"
"\\.c|\\.h"))
#t)))
+ (replace 'fix-openjdk
+ (lambda _
+ (substitute*
+ '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
+ "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
+ (("#include <sys/sysctl.h>")
+ "#include <linux/sysctl.h>"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((doc (string-append (assoc-ref outputs "doc")
@@ -1910,7 +1945,8 @@ new Date();"))
((guix build syscalls)
,@%gnu-build-system-modules)
- #:disallowed-references (,icedtea-8 (,icedtea-8 "jdk"))
+ #:disallowed-references ,(list (gexp-input icedtea-8)
+ (gexp-input icedtea-8 "jdk"))
#:phases
(modify-phases %standard-phases
@@ -1925,7 +1961,12 @@ new Date();"))
(lambda* (#:key inputs outputs #:allow-other-keys)
;; TODO: unbundle libpng and lcms
(invoke "bash" "./configure"
- (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
+ ;; Add flags for compilation with gcc >= 10
+ ,(string-append "--with-extra-cflags=-fcommon"
+ " -fno-delete-null-pointer-checks"
+ " -fno-lifetime-dse")
+ (string-append "--with-freetype="
+ (assoc-ref inputs "freetype"))
"--disable-freetype-bundling"
"--disable-warnings-as-errors"
"--disable-hotspot-gtest"
@@ -2099,17 +2140,28 @@ new Date();"))
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(invoke "bash" "./configure"
- (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
+ ;; Add flags for compilation with gcc >= 10
+ ,(string-append "--with-extra-cflags=-fcommon"
+ " -fno-delete-null-pointer-checks"
+ " -fno-lifetime-dse")
+ (string-append "--with-freetype="
+ (assoc-ref inputs "freetype"))
"--disable-freetype-bundling"
"--disable-warnings-as-errors"
"--disable-hotspot-gtest"
"--with-giflib=system"
"--with-libjpeg=system"
"--with-native-debug-symbols=zipped"
- (string-append "--prefix=" (assoc-ref outputs "out")))
- #t))))
+ (string-append "--prefix=" (assoc-ref outputs "out")))))
+ (add-after 'unpack 'disable-warnings-as-errors
+ (lambda _
+ ;; It looks like the "--disable-warnings-as-errors" option of
+ ;; the 'configure' phase is not working.
+ (substitute* "make/autoconf/generated-configure.sh"
+ (("-Werror") ""))))))
((#:disallowed-references _ '())
- `(,openjdk9 (,openjdk9 "jdk")))))
+ `(,(gexp-input openjdk9)
+ ,(gexp-input openjdk9 "jdk")))))
(native-inputs
`(("openjdk9" ,openjdk9)
("openjdk9:jdk" ,openjdk9 "jdk")
@@ -2140,12 +2192,17 @@ new Date();"))
`(#:imported-modules ((guix build syscalls)
,@%gnu-build-system-modules)
- #:disallowed-references (,openjdk10 (,openjdk10 "jdk"))
+ #:disallowed-references ,(list (gexp-input openjdk10)
+ (gexp-input openjdk10 "jdk"))
#:tests? #f; requires jtreg
;; TODO package jtreg
#:configure-flags
- `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
+ `(;; Add flags for compilation with gcc >= 10
+ ,(string-append "--with-extra-cflags=-fcommon"
+ " -fno-delete-null-pointer-checks"
+ " -fno-lifetime-dse")
+ "--disable-option-checking" ; --enable-fast-install default flag errors otherwise
"--disable-warnings-as-errors"
;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
"--with-native-debug-symbols=zipped"
@@ -2603,6 +2660,7 @@ new Date();"))
(substitute-keyword-arguments (package-arguments ant-bootstrap)
((#:phases phases)
`(modify-phases ,phases
+ (delete 'define-java-environment-variables)
(add-after 'unpack 'remove-scripts
;; Remove bat / cmd scripts for DOS as well as the antRun and runant
;; wrappers.
@@ -3040,9 +3098,9 @@ debugging, etc.")
#t))))
(arguments
`(#:make-flags ; bootstrap from javacc-4
- (list (string-append "-Dbootstrap-jar="
- (assoc-ref %build-inputs "javacc")
- "/share/java/javacc.jar"))
+ ,#~(list (string-append "-Dbootstrap-jar="
+ #$(this-package-native-input "javacc")
+ "/share/java/javacc.jar"))
#:test-target "test"
#:phases
(modify-phases %standard-phases
@@ -3219,19 +3277,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
(("<build-info.*") "")
(("\\$\\{revision.number\\}")
@@ -3404,8 +3465,7 @@ libraries from the SIS division at ETH Zurich like jHDF5.")
(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\\}")
@@ -3507,29 +3567,32 @@ libraries from the SIS division at ETH Zurich like 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")
@@ -3636,8 +3699,8 @@ HDF5 files, building on the libraries provided by the HDF Group.")
`(#:tests? #f ; there is no test target
#:build-target "compile"
#:make-flags
- (list "-Dbuild.compiler=javac1.8"
- (string-append "-Ddist=" (assoc-ref %outputs "out")))
+ ,#~(list "-Dbuild.compiler=javac1.8"
+ (string-append "-Ddist=" #$output))
#:phases
(modify-phases %standard-phases
(replace 'install
@@ -5389,7 +5452,7 @@ complex transformations and code analysis tools.")
(delete 'build)
(delete 'configure)
(replace 'install
- (install-pom-file (assoc-ref %build-inputs "source"))))))
+ ,#~(install-pom-file #$source)))))
(home-page "https://ow2.org")
(synopsis "Ow2.org parent pom")
(description "This package contains the parent pom for projects from ow2.org,
@@ -12920,7 +12983,7 @@ from ORO, Inc.")
(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\""))
@@ -12974,8 +13037,7 @@ Java method invocation.")
(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$")))
@@ -14170,8 +14232,7 @@ can be interpreted by IDEs and static analysis tools to improve code analysis.")
"/dist/" jar-name))
(java-cp (string-append share "/" jar-name))
(bin (string-append %output "/bin"))
- (java (string-append (assoc-ref inputs "jdk")
- "/bin/java")))
+ (java (search-input-file inputs "/bin/java")))
(install-file jar share)
(mkdir-p bin)
;; Generate wrapper scripts for bin/, which invoke common