mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 14:16:55 -05:00
gnu: openjdk11: Build in parallel.
* gnu/packages/java.scm (openjdk11)[arguments]: Remove #:parallel-build?, #:parallel-tests?, and #:make-flags options; add "write-source-revision-file"; replace "build" phase; do not set GUIX_LD_WRAPPER_ALLOW_IMPURITIES; pass JOBS variable to make in "build" and "build-jre" phases.
This commit is contained in:
parent
62d46ad613
commit
7b82e1cdbe
1 changed files with 16 additions and 12 deletions
|
@ -2013,11 +2013,6 @@ (define-public openjdk11
|
||||||
,@%gnu-build-system-modules)
|
,@%gnu-build-system-modules)
|
||||||
#:tests? #f; requires jtreg
|
#:tests? #f; requires jtreg
|
||||||
;; TODO package jtreg
|
;; TODO package jtreg
|
||||||
;; disable parallel builds, as the openjdk build system does not like -j
|
|
||||||
#:parallel-build? #f
|
|
||||||
#:parallel-tests? #f
|
|
||||||
;; reenable parallel builds and tests by adding the flags manually
|
|
||||||
#:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
|
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
`("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
|
`("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
|
||||||
"--disable-warnings-as-errors"
|
"--disable-warnings-as-errors"
|
||||||
|
@ -2034,7 +2029,6 @@ (define-public openjdk11
|
||||||
(assoc-ref %build-inputs "freetype") "/include")
|
(assoc-ref %build-inputs "freetype") "/include")
|
||||||
,(string-append "--with-freetype-lib="
|
,(string-append "--with-freetype-lib="
|
||||||
(assoc-ref %build-inputs "freetype") "/lib"))
|
(assoc-ref %build-inputs "freetype") "/lib"))
|
||||||
;; TODO
|
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'patch-source-shebangs 'fix-java-shebangs
|
(add-after 'patch-source-shebangs 'fix-java-shebangs
|
||||||
|
@ -2044,22 +2038,32 @@ (define-public openjdk11
|
||||||
(substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
|
(substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
|
||||||
(("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
|
(("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
|
||||||
#t))
|
#t))
|
||||||
(replace 'build
|
(add-before 'build 'write-source-revision-file
|
||||||
(lambda _
|
(lambda _
|
||||||
(with-output-to-file ".src-rev"
|
(with-output-to-file ".src-rev"
|
||||||
(lambda _
|
(lambda _
|
||||||
(display ,version)))
|
(display ,version)))
|
||||||
(setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
|
|
||||||
(invoke "make" "all")
|
|
||||||
#t))
|
#t))
|
||||||
|
(replace 'build
|
||||||
|
(lambda* (#:key parallel-build? make-flags #:allow-other-keys)
|
||||||
|
(apply invoke "make" "all"
|
||||||
|
`(,@(if parallel-build?
|
||||||
|
(list (string-append "JOBS="
|
||||||
|
(number->string (parallel-job-count))))
|
||||||
|
'())
|
||||||
|
,@make-flags))))
|
||||||
;; jdk 11 does not build jre by default any more
|
;; jdk 11 does not build jre by default any more
|
||||||
;; building it anyways
|
;; building it anyways
|
||||||
;; for further information see:
|
;; for further information see:
|
||||||
;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
|
;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
|
||||||
(add-after 'build 'build-jre
|
(add-after 'build 'build-jre
|
||||||
(lambda _
|
(lambda* (#:key parallel-build? make-flags #:allow-other-keys)
|
||||||
(invoke "make" "legacy-jre-image")
|
(apply invoke "make" "legacy-jre-image"
|
||||||
#t))
|
`(,@(if parallel-build?
|
||||||
|
(list (string-append "JOBS="
|
||||||
|
(number->string (parallel-job-count))))
|
||||||
|
'())
|
||||||
|
,@make-flags))))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let ((out (assoc-ref outputs "out"))
|
||||||
|
|
Loading…
Reference in a new issue