;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
(modules '((guix build utils)))
(snippet
`(begin
- (for-each delete-file (find-files "." ".*.bin$"))
- (for-each delete-file (find-files "." ".*.exe$"))
- (for-each delete-file (find-files "." ".*.jar$"))
+ (for-each delete-file
+ (find-files "." ".*.(bin|exe|jar)$"))
#t))))
(build-system gnu-build-system)
(outputs '("out" "jdk" "doc"))
(arguments
`(#:tests? #f; require jtreg
+ #:make-flags '("all")
#:imported-modules
((guix build syscalls)
,@%gnu-build-system-modules)
"--with-libjpeg=system"
(string-append "--prefix=" (assoc-ref outputs "out")))
#t))
- (replace 'build
+ (add-before 'build 'write-source-revision-file
(lambda _
(with-output-to-file ".src-rev"
(lambda _
(display ,version)))
- (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
- (invoke "make" "all")
#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.
;; But that shared object is located in the server/ folder, so it
;; cannot be found. This phase creates a symbolic link in the
(native-inputs
`(("icedtea-8" ,icedtea-8)
("icedtea-8:jdk" ,icedtea-8 "jdk")
- ;; XXX: The build system is not particularly parallel safe and
- ;; fails with newer versions of GNU Make.
+ ;; XXX: The build system fails with newer versions of GNU Make.
("make@4.2" ,gnu-make-4.2)
("unzip" ,unzip)
("which" ,which)
(modules '((guix build utils)))
(snippet
`(begin
- (for-each delete-file (find-files "." ".*.bin$"))
- (for-each delete-file (find-files "." ".*.exe$"))
- (for-each delete-file (find-files "." ".*.jar$"))
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
#t))))
(arguments
(substitute-keyword-arguments (package-arguments openjdk9)
(modules '((guix build utils)))
(snippet
`(begin
- (for-each delete-file (find-files "." ".*.bin$"))
- (for-each delete-file (find-files "." ".*.exe$"))
- (for-each delete-file (find-files "." ".*.jar$"))
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
#t))))
(build-system gnu-build-system)
(outputs '("out" "jdk" "doc"))
,@%gnu-build-system-modules)
#:tests? #f; requires 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
`("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
"--disable-warnings-as-errors"
(assoc-ref %build-inputs "freetype") "/include")
,(string-append "--with-freetype-lib="
(assoc-ref %build-inputs "freetype") "/lib"))
- ;; TODO
#:phases
(modify-phases %standard-phases
(add-after 'patch-source-shebangs 'fix-java-shebangs
(substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
(("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
#t))
- (replace 'build
+ (add-before 'build 'write-source-revision-file
(lambda _
(with-output-to-file ".src-rev"
(lambda _
(display ,version)))
- (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
- (invoke "make" "all")
#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
;; building it anyways
;; for further information see:
;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
(add-after 'build 'build-jre
- (lambda _
- (invoke "make" "legacy-jre-image")
- #t))
+ (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
+ (apply invoke "make" "legacy-jre-image"
+ `(,@(if parallel-build?
+ (list (string-append "JOBS="
+ (number->string (parallel-job-count))))
+ '())
+ ,@make-flags))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(modules '((guix build utils)))
(snippet
`(begin
- (for-each delete-file (find-files "." ".*.bin$"))
- (for-each delete-file (find-files "." ".*.exe$"))
- (for-each delete-file (find-files "." ".*.jar$"))
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
#t))))
(inputs
`(("alsa-lib" ,alsa-lib)