mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-18 12:47:33 -05:00
gnu: openjdk9: Build in parallel.
* gnu/packages/java.scm (openjdk9)[arguments]: Add phase "write-source-revision-file"; replace "build" phase; add make-flags; remove GUIX_LD_WRAPPER_ALLOW_IMPURITIES.
This commit is contained in:
parent
91cd6ba71b
commit
f3273e0f71
1 changed files with 11 additions and 5 deletions
|
@ -1815,6 +1815,7 @@ (define-public openjdk9
|
||||||
(outputs '("out" "jdk" "doc"))
|
(outputs '("out" "jdk" "doc"))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f; require jtreg
|
`(#:tests? #f; require jtreg
|
||||||
|
#:make-flags '("all")
|
||||||
#:imported-modules
|
#:imported-modules
|
||||||
((guix build syscalls)
|
((guix build syscalls)
|
||||||
,@%gnu-build-system-modules)
|
,@%gnu-build-system-modules)
|
||||||
|
@ -1839,14 +1840,20 @@ (define-public openjdk9
|
||||||
"--with-libjpeg=system"
|
"--with-libjpeg=system"
|
||||||
(string-append "--prefix=" (assoc-ref outputs "out")))
|
(string-append "--prefix=" (assoc-ref outputs "out")))
|
||||||
#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 make-flags parallel-build? #:allow-other-keys)
|
||||||
|
(apply invoke "make"
|
||||||
|
`(,@(if parallel-build?
|
||||||
|
(list (string-append "JOBS="
|
||||||
|
(number->string (parallel-job-count))))
|
||||||
|
'())
|
||||||
|
,@make-flags))))
|
||||||
;; Some of the libraries in the lib/ folder link to libjvm.so.
|
;; Some of the libraries in the lib/ folder link to libjvm.so.
|
||||||
;; But that shared object is located in the server/ folder, so it
|
;; But that shared object is located in the server/ folder, so it
|
||||||
;; cannot be found. This phase creates a symbolic link in the
|
;; cannot be found. This phase creates a symbolic link in the
|
||||||
|
@ -1919,8 +1926,7 @@ (define-public openjdk9
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("icedtea-8" ,icedtea-8)
|
`(("icedtea-8" ,icedtea-8)
|
||||||
("icedtea-8:jdk" ,icedtea-8 "jdk")
|
("icedtea-8:jdk" ,icedtea-8 "jdk")
|
||||||
;; XXX: The build system is not particularly parallel safe and
|
;; XXX: The build system fails with newer versions of GNU Make.
|
||||||
;; fails with newer versions of GNU Make.
|
|
||||||
("make@4.2" ,gnu-make-4.2)
|
("make@4.2" ,gnu-make-4.2)
|
||||||
("unzip" ,unzip)
|
("unzip" ,unzip)
|
||||||
("which" ,which)
|
("which" ,which)
|
||||||
|
|
Loading…
Reference in a new issue