Archived
1
0
Fork 0

gnu: icedtea-7: Bind INPUTS in 'patch-paths build phase.

* gnu/packages/java.scm (icedtea-7)[arguments]: Bind INPUTS in 'patch-paths
build phase to remove references to %build-inputs.
This commit is contained in:
Ricardo Wurmus 2021-12-17 22:19:17 +01:00
parent c2f80a61c1
commit 5c27e1f8a0
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -1413,18 +1413,18 @@ bootstrapping purposes.")
"/include/X11/extensions")) "/include/X11/extensions"))
(("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") "")))) (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))))
(add-after 'unpack 'patch-paths (add-after 'unpack 'patch-paths
(lambda _ (lambda* (#:key inputs #:allow-other-keys)
;; buildtree.make generates shell scripts, so we need to replace ;; buildtree.make generates shell scripts, so we need to replace
;; the generated shebang ;; the generated shebang
(substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make") (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
(("/bin/sh") (which "bash"))) (("/bin/sh") (which "bash")))
(let ((corebin (string-append (let ((corebin (string-append
(assoc-ref %build-inputs "coreutils") "/bin/")) (assoc-ref inputs "coreutils") "/bin/"))
(binbin (string-append (binbin (string-append
(assoc-ref %build-inputs "binutils") "/bin/")) (assoc-ref inputs "binutils") "/bin/"))
(grepbin (string-append (grepbin (string-append
(assoc-ref %build-inputs "grep") "/bin/"))) (assoc-ref inputs "grep") "/bin/")))
(substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk" (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
"openjdk.src/corba/make/common/shared/Defs-linux.gmk") "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
(("UNIXCOMMAND_PATH = /bin/") (("UNIXCOMMAND_PATH = /bin/")
@ -1435,7 +1435,7 @@ bootstrapping purposes.")
(string-append "DEVTOOLS_PATH = " corebin)) (string-append "DEVTOOLS_PATH = " corebin))
(("COMPILER_PATH *= */usr/bin/") (("COMPILER_PATH *= */usr/bin/")
(string-append "COMPILER_PATH = " (string-append "COMPILER_PATH = "
(assoc-ref %build-inputs "gcc") "/bin/")) (assoc-ref inputs "gcc") "/bin/"))
(("DEF_OBJCOPY *=.*objcopy") (("DEF_OBJCOPY *=.*objcopy")
(string-append "DEF_OBJCOPY = " (which "objcopy")))) (string-append "DEF_OBJCOPY = " (which "objcopy"))))
@ -1443,7 +1443,7 @@ bootstrapping purposes.")
(substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk" (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
(("ALSA_INCLUDE=/usr/include/alsa/version.h") (("ALSA_INCLUDE=/usr/include/alsa/version.h")
(string-append "ALSA_INCLUDE=" (string-append "ALSA_INCLUDE="
(assoc-ref %build-inputs "alsa-lib") (assoc-ref inputs "alsa-lib")
"/include/alsa/version.h"))) "/include/alsa/version.h")))
;; fix hard-coded utility paths ;; fix hard-coded utility paths