X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/6632fc2897287141d8982e7a3a03091fa20289de..c58274133676e429bfc1486e3b58762ff8659131:/gnu/packages/java.scm diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 7ad72f4fcf..c0ec683ebe 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017 Roel Janssen ;;; Copyright © 2017, 2019 Carlo Zancanaro @@ -11,9 +11,9 @@ ;;; Copyright © 2018 Chris Marusich ;;; Copyright © 2018, 2019, 2020 Efraim Flashner ;;; Copyright © 2019, 2020 Björn Höfling +;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Raghav Gururajan ;;; Copyright © 2020 Maxim Cournoyer - ;;; ;;; This file is part of GNU Guix. ;;; @@ -990,7 +990,7 @@ machine."))) ("grep" ,grep) ("jamvm" ,jamvm) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libnsl" ,libnsl) ("libpng" ,libpng) ("libtool" ,libtool) @@ -1610,7 +1610,7 @@ bootstrapping purposes.") ("libxi" ,libxi) ("libxinerama" ,libxinerama) ("libxrender" ,libxrender) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("mit-krb5" ,mit-krb5) ("nss" ,nss) @@ -1808,14 +1808,14 @@ new Date();")) (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) @@ -1840,14 +1840,20 @@ new Date();")) "--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 @@ -1907,7 +1913,7 @@ new Date();")) ("giflib" ,giflib) ("lcms" ,lcms) ("libelf" ,libelf) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libice" ,libice) ("libpng" ,libpng) ("libx11" ,libx11) @@ -1920,6 +1926,8 @@ new Date();")) (native-inputs `(("icedtea-8" ,icedtea-8) ("icedtea-8:jdk" ,icedtea-8 "jdk") + ;; XXX: The build system fails with newer versions of GNU Make. + ("make@4.2" ,gnu-make-4.2) ("unzip" ,unzip) ("which" ,which) ("zip" ,zip))) @@ -1946,9 +1954,7 @@ new Date();")) (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) @@ -1976,6 +1982,7 @@ new Date();")) (native-inputs `(("openjdk9" ,openjdk9) ("openjdk9:jdk" ,openjdk9 "jdk") + ("make@4.2" ,gnu-make-4.2) ("unzip" ,unzip) ("which" ,which) ("zip" ,zip))))) @@ -1994,9 +2001,7 @@ new Date();")) (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")) @@ -2008,11 +2013,6 @@ new Date();")) ,@%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" @@ -2029,7 +2029,6 @@ new Date();")) (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 @@ -2039,22 +2038,32 @@ new Date();")) (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")) @@ -2185,7 +2194,7 @@ new Date();")) ("freetype" ,freetype) ("giflib" ,giflib) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libx11" ,libx11) ("libxext" ,libxext) @@ -2196,6 +2205,7 @@ new Date();")) `(("autoconf" ,autoconf) ("openjdk10" ,openjdk10) ("openjdk10:jdk" ,openjdk10 "jdk") + ("make" ,gnu-make-4.2) ("pkg-config" ,pkg-config) ("unzip" ,unzip) ("which" ,which) @@ -2221,9 +2231,7 @@ new Date();")) (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) @@ -2232,7 +2240,7 @@ new Date();")) ("freetype" ,freetype) ("giflib" ,giflib) ("lcms" ,lcms) - ("libjpeg" ,libjpeg) + ("libjpeg" ,libjpeg-turbo) ("libpng" ,libpng) ("libx11" ,libx11) ("libxext" ,libxext) @@ -2244,6 +2252,7 @@ new Date();")) `(("autoconf" ,autoconf) ("openjdk11" ,openjdk11) ("openjdk11:jdk" ,openjdk11 "jdk") + ("make@4.2" ,gnu-make-4.2) ("pkg-config" ,pkg-config) ("unzip" ,unzip) ("which" ,which) @@ -9483,13 +9492,15 @@ algorithms and xxHash hashing algorithm.") (name "java-bouncycastle") (version "1.60") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/bcgit/bc-java/archive/r" - (substring version 0 1) "v" - (substring version 2 4) ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "http://git.bouncycastle.org/repositories/bc-java") + ;(url "https://github.com/bcgit/bc-java") + (commit (string-append "r1rv" (substring version 2 4))))) + (file-name (git-file-name name version)) (sha256 (base32 - "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv")) + "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb")) (modules '((guix build utils))) (snippet '(begin @@ -10216,7 +10227,8 @@ that is part of the SWT Tools project.") "linux32") ((or "x86_64-linux" "aarch64-linux" "mips64el-linux") - "linux64"))))) + "linux64") + (_ "unknown-kernel"))))) (install-file "src/main/native-package/src/libjansi.so" dir)) #t)) (add-after 'install 'install-native