From cd7f674010321230998e824ff7bee9fab90f6898 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sun, 16 Oct 2022 10:08:36 +0200 Subject: gnu: Add java-ow-util-ant-tasks. * gnu/packages/java.scm (java-ow-util-ant-tasks): New variable. --- gnu/packages/java.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 3ab324cce9..97dedae58f 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -5197,6 +5197,42 @@ every feature for every plugin."))) (description "The modello XPP3 plugin generates XML readers and writers based on the XPP3 API (XML Pull Parser)."))) +(define-public java-ow-util-ant-tasks + (package + (name "java-ow-util-ant-tasks") + (version "1.3.2") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://debian/pool/main/o/ow-util-ant-tasks/" + "ow-util-ant-tasks_" version ".orig.tar.gz")) + (sha256 + (base32 + "1y5ln1g36aligwcadqksdj18i5ghqnxn523wjbzy2zyd7w58fgy5")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "ow-util-ant-tasks.jar" + #:tests? #f; no tests + #:phases + (modify-phases %standard-phases + (add-before 'build 'delete-cyclic-dependency + (lambda _ + ;; This file depends on asm-3, which depends on this package + (delete-file "src/org/objectweb/util/ant/DependencyAnalyzer.java") + ;; This file depends on xalan + (delete-file "src/org/objectweb/util/ant/Xalan2Liaison.java"))) + (add-before 'build 'fix-new-ant + (lambda _ + (substitute* "src/org/objectweb/util/ant/MultipleCopy.java" + ((", destFile.getAbsolutePath\\(\\)") + ", new String[] { destFile.getAbsolutePath() }"))))))) + (home-page "https://packages.debian.org/source/stretch/ow-util-ant-tasks") + (synopsis "Replacement for base ant tasks") + (description "This library is used in the legacy build process of several +key frameworks developed by ObjectWeb, among them legacy versions of the +ObjectWeb ASM bytecode manipulation framework.") + (license license:lgpl2.0+))) + (define-public java-asm (package (name "java-asm") -- cgit v1.2.3 From eaf4441b620df4902bf91f1404aa6d8b006d8dbe Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 15 Oct 2022 22:06:13 +0200 Subject: gnu: Add java-asm-3. * gnu/packages/java.scm (java-asm): New variable. --- gnu/packages/java.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 97dedae58f..4de62a782c 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -5332,6 +5332,31 @@ including java-asm.") ((#:tests? _) #f))) (native-inputs `()))) +(define-public java-asm-3 + (package + (inherit java-asm) + (version "3.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.ow2.org/asm/asm") + (commit "ASM_3_1"))) + (file-name (git-file-name "java-asm" version)) + (sha256 + (base32 + "0xbyf2sl8j6mrvfpg2da0vjdp906rac62l66gkk82x5cn3vc30h4")) + (modules '((guix build utils))) + (snippet `(for-each delete-file (find-files "." "\\.jar$"))))) + (arguments + `(#:build-target "jar" + #:test-target "test" + #:tests? #f; require legacy test software + #:phases + (modify-phases %standard-phases + (replace 'install (install-jars "output/dist")) + (delete 'generate-jar-indices)))) + (native-inputs (list java-ow-util-ant-tasks)))) + (define-public java-asm-8 (package (inherit java-asm) -- cgit v1.2.3 From 622042110c30fbf28d88940758e8b444b985de4a Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 15 Oct 2022 22:47:32 +0200 Subject: gnu: java-commons-compress: Update to 1.21. * gnu/packages/java.scm (java-commons-compress): Update to 1.21. (java-osgi-annotation, java-osgi-core): Create pom file and install from it. * gnu/packages/maven.scm (java-surefire-parent-pom): Fix pom fixing. --- gnu/packages/java.scm | 45 ++++++++++++++++++++++----------------------- gnu/packages/maven.scm | 3 +-- 2 files changed, 23 insertions(+), 25 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 4de62a782c..da39d92d9b 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -6828,40 +6828,29 @@ programs.") (define-public java-commons-compress (package (name "java-commons-compress") - (version "1.13") + (version "1.21") (source (origin (method url-fetch) (uri (string-append "mirror://apache/commons/compress/source/" "commons-compress-" version "-src.tar.gz")) (sha256 (base32 - "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8")))) + "1rkpb6xcyly1wnbx4q6iq6p5hrr0h1d0ppb5r07psc75cbmizjry")))) (build-system ant-build-system) (arguments `(#:jar-name "commons-compress.jar" + #:source-dir "src/main/java" + #:tests? #f; requires java-mockito-3 #:phases (modify-phases %standard-phases - (add-after 'unpack 'delete-bad-tests - (lambda _ - (with-directory-excursion "src/test/java/org/apache/commons/compress/" - ;; FIXME: These tests really should not fail. Maybe they are - ;; indicative of problems with our Java packaging work. - - ;; This test fails with a null pointer exception. - (delete-file "archivers/sevenz/SevenZOutputFileTest.java") - ;; This test fails to open test resources. - (delete-file "archivers/zip/ExplodeSupportTest.java") - - ;; FIXME: This test adds a dependency on powermock, which is hard to - ;; package at this point. - ;; https://github.com/powermock/powermock - (delete-file "archivers/sevenz/SevenZNativeHeapTest.java")) - #t)) (replace 'install (install-from-pom "pom.xml"))))) (propagated-inputs - (list java-xz apache-commons-parent-pom-41)) - (native-inputs - (list java-junit java-mockito-1)) + (list java-asm-3 + java-brotli + java-osgi-core + java-xz + java-zstd + apache-commons-parent-pom-52)) (home-page "https://commons.apache.org/proper/commons-compress/") (synopsis "Java library for working with compressed files") (description "The Apache Commons Compress library defines an API for @@ -6923,7 +6912,12 @@ Custom formats can be created using a fluent style API.") (build-system ant-build-system) (arguments `(#:tests? #f ; no tests - #:jar-name "osgi-annotation.jar")) + #:jar-name "osgi-annotation.jar" + #:phases + (modify-phases %standard-phases + (add-before 'install 'create-pom + (generate-pom.xml "pom.xml" "osgi" "osgi-annotation" ,version)) + (replace 'install (install-from-pom "pom.xml"))))) (home-page "https://www.osgi.org") (synopsis "Annotation module of OSGi framework") (description @@ -6948,7 +6942,12 @@ components.") (build-system ant-build-system) (arguments `(#:tests? #f ; no tests - #:jar-name "osgi-core.jar")) + #:jar-name "osgi-core.jar" + #:phases + (modify-phases %standard-phases + (add-before 'install 'create-pom + (generate-pom.xml "pom.xml" "org.osgi" "org.osgi.core" ,version)) + (replace 'install (install-from-pom "pom.xml"))))) (inputs (list java-osgi-annotation)) (home-page "https://www.osgi.org") diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index b7794c4e89..d3e5677669 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -3462,8 +3462,7 @@ internal to the SureFire Logger API. It is designed to have no dependency.") (add-before 'install 'fix-pom-dependency-versions (lambda _ (substitute* "pom.xml" - (("1.11") ,(package-version java-commons-compress)) - (("1.13") ,(package-version java-commons-codec))) + (("1.11") ,(package-version java-commons-codec))) (substitute* "pom.xml" (("commonsLang3Version>.*") (string-append -- cgit v1.2.3 From 10c82778abb26267a3d3e6a3c34da1989bd2ea7b Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sat, 15 Oct 2022 23:32:07 +0200 Subject: gnu: java-commons-jcs: Update to 3.1. * gnu/packages/java.scm (java-commons-jcs): Update to 3.1. (josm)[arguments]: Remove now unneeded phase. --- gnu/packages/geo.scm | 9 --------- gnu/packages/java.scm | 26 +++++++++++--------------- 2 files changed, 11 insertions(+), 24 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index faec60ebcc..0ab711c501 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -1756,15 +1756,6 @@ to the OSM opening hours specification.") "1970-01-01 00:00:00 +0000" "")))) #t)) - (add-before 'build 'fix-jcs - (lambda _ - ;; This version of JOSM uses an unreleased version of commons-jcs, - ;; which has renamed its classes to another namespace. Rename them - ;; back so they can be used with our version of jcs. - (substitute* (find-files "." ".*.java$") - (("jcs3") "jcs") - (("ICache.NAME_COMPONENT_DELIMITER") "\":\"")) - #t)) (add-before 'build 'fix-classpath (lambda* (#:key inputs #:allow-other-keys) (setenv "CLASSPATH" diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index da39d92d9b..2f70413356 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -6369,14 +6369,14 @@ reduce that load.") (define-public java-commons-jcs (package (name "java-commons-jcs") - (version "2.2.1") + (version "3.1") (source (origin (method url-fetch) (uri (string-append "mirror://apache/commons/jcs/source/" - "commons-jcs-dist-" version "-src.tar.gz")) + "commons-jcs3-dist-" version "-src.tar.gz")) (sha256 (base32 - "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q")))) + "0y1lm1xnsj99bf7y9mkvbzqfy8dr7ac8zcbkpsjgzb9vhabfsbac")))) (build-system ant-build-system) (arguments `(#:jar-name "commons-jcs.jar" @@ -6385,20 +6385,16 @@ reduce that load.") #:tests? #f; requires hsqldb #:phases (modify-phases %standard-phases - (add-before 'build 'prepare + (add-before 'build 'copy-resources (lambda _ - (with-directory-excursion - "commons-jcs-core/src/main/java/org/apache/commons/jcs" - (substitute* - "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java" - (("commons.dbcp") "commons.dbcp2") - ((".*\\.setMaxActive.*") "")) - ;;; Remove dependency on velocity-tools - (delete-file "admin/servlet/JCSAdminServlet.java")) - #t))))) + (copy-recursively "commons-jcs-core/src/main/resources" + "build/classes")))))) (propagated-inputs - (list java-classpathx-servletapi java-commons-logging-minimal - java-commons-httpclient java-commons-dbcp)) + (list java-classpathx-servletapi + java-commons-dbcp + java-httpcomponents-httpclient + java-httpcomponents-httpcore + java-log4j-api)) (native-inputs (list java-junit)) (home-page "https://commons.apache.org/proper/commons-jcs/") -- cgit v1.2.3 From d899e9351df7658a1284b598e505f8b26d69204a Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 3 Nov 2022 20:46:52 +0100 Subject: gnu: OpenJDK: Avoid usage of (guix build syscalls). * gnu/packages/java.scm (ant-bootstrap)[arguments]: Use MKDTEMP instead of MKDTEMP! from (guix build syscalls). (icedtea-8, openjdk9, openjdk11, antlr2): Likewise. --- gnu/packages/java.scm | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 2f70413356..f80406cab9 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -252,12 +252,9 @@ JNI.") "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx")))) (build-system gnu-build-system) (arguments - `(#:imported-modules ((guix build syscalls) - ,@%gnu-build-system-modules) - #:modules ((srfi srfi-1) + `(#:modules ((srfi srfi-1) (guix build gnu-build-system) - (guix build utils) - (guix build syscalls)) + (guix build utils)) #:tests? #f ; no "check" target #:phases (modify-phases %standard-phases @@ -302,7 +299,7 @@ JNI.") (add-after 'build 'strip-jar-timestamps ;based on ant-build-system (lambda* (#:key outputs #:allow-other-keys) (define (repack-archive jar) - (let* ((dir (mkdtemp! "jar-contents.XXXXXX")) + (let* ((dir (mkdtemp "jar-contents.XXXXXX")) (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) (with-directory-excursion dir (invoke "unzip" jar)) @@ -1375,7 +1372,6 @@ IcedTea build harness.") (arguments `(#:imported-modules ((guix build ant-build-system) - (guix build syscalls) ,@%gnu-build-system-modules) #:disallowed-references ,(list (gexp-input icedtea-7 "jdk")) @@ -1538,10 +1534,6 @@ new Date();")) (arguments `(#:tests? #f; require jtreg #:make-flags '("all") - #:imported-modules - ((guix build syscalls) - ,@%gnu-build-system-modules) - #:disallowed-references ,(list (gexp-input icedtea-8) (gexp-input icedtea-8 "jdk")) @@ -1655,9 +1647,8 @@ new Date();")) #t)) (add-after 'install 'strip-zip-timestamps (lambda* (#:key outputs #:allow-other-keys) - (use-modules (guix build syscalls)) (for-each (lambda (zip) - (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) + (let ((dir (mkdtemp "zip-contents.XXXXXX"))) (with-directory-excursion dir (invoke "unzip" zip)) (delete-file zip) @@ -1786,8 +1777,6 @@ new Date();")) (outputs '("out" "jdk" "doc")) (arguments (list - #:imported-modules `((guix build syscalls) - ,@%gnu-build-system-modules) #:modules `((guix build gnu-build-system) (guix build utils) (ice-9 match) @@ -1918,9 +1907,8 @@ new Date();")) (string-append lib-out "/libjvm.so"))))) (add-after 'install 'strip-character-data-timestamps (lambda _ - (use-modules (guix build syscalls)) (let ((archive (string-append #$output:jdk "/lib/src.zip")) - (dir (mkdtemp! "zip-contents.XXXXXX"))) + (dir (mkdtemp "zip-contents.XXXXXX"))) (with-directory-excursion dir (invoke "unzip" archive)) (delete-file archive) @@ -1952,12 +1940,11 @@ new Date();")) outputs))))) (add-after 'remove-diz-file 'strip-archive-timestamps (lambda _ - (use-modules (guix build syscalls) - (ice-9 binary-ports) + (use-modules (ice-9 binary-ports) (rnrs bytevectors)) (letrec ((repack-archive (lambda (archive) - (let ((dir (mkdtemp! "zip-contents.XXXXXX"))) + (let ((dir (mkdtemp "zip-contents.XXXXXX"))) (with-directory-excursion dir (invoke "unzip" archive)) (delete-file archive) @@ -8171,7 +8158,6 @@ discards all logging messages.") (arguments `(#:tests? #f ; no test target #:imported-modules ((guix build ant-build-system) - (guix build syscalls) ,@%gnu-build-system-modules) #:modules (((guix build ant-build-system) #:prefix ant:) (guix build gnu-build-system) -- cgit v1.2.3 From f667aeb642c5deab342fe42f3744eb9a7fccc003 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Mon, 12 Dec 2022 21:19:32 +0000 Subject: gnu: openjdk11: Update to 11.0.17. * gnu/packages/java.scm (openjdk11): Update to 11.0.17. [source]: Fix source file-name. [native-inputs]: Add bash. Signed-off-by: Efraim Flashner --- gnu/packages/java.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index f80406cab9..fa4d2d3bd0 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1761,15 +1761,15 @@ new Date();")) (define-public openjdk11 (package (name "openjdk") - (version "11.0.15") + (version "11.0.17") (source (origin (method url-fetch) (uri (string-append "https://openjdk-sources.osci.io/openjdk11/openjdk-" version "-ga.tar.xz")) - (file-name (string-append name "-" version ".tar.bz2")) + (file-name (string-append name "-" version ".tar.xz")) (sha256 (base32 - "0di91nnms2iq1svgq72r5y17am17r4vh2lq43k0bkcwpc84d6nd8")) + "1prvqy0ysz0999wrhsrbz6vrknpqfihl9l74l16ph93g89dqi5ia")) (modules '((guix build utils))) (snippet '(for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))))) @@ -2019,6 +2019,7 @@ new Date();")) libxtst)) (native-inputs (list autoconf + bash ; not bash-minimal, needs ulimit openjdk10 `(,openjdk10 "jdk") gnu-make-4.2 -- cgit v1.2.3 From c8ebfa0dd9514affbc30ca56f9f8cce0fc7550dc Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 19 Dec 2022 16:00:23 +0200 Subject: gnu: openjdk11: Fix find-files syntax. * gnu/packages/java.scm (openjdk11)[source]: Remove extra characters from find-files invocation. [arguments]: Remove extra characters from find-files invocations in multiple phases. --- gnu/packages/java.scm | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index fa4d2d3bd0..e06020eedf 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1772,7 +1772,7 @@ new Date();")) "1prvqy0ysz0999wrhsrbz6vrknpqfihl9l74l16ph93g89dqi5ia")) (modules '((guix build utils))) (snippet - '(for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))))) + '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))))) (build-system gnu-build-system) (outputs '("out" "jdk" "doc")) (arguments @@ -1851,8 +1851,7 @@ new Date();")) (format (current-error-port) "warning: failed to substitute: ~a~%" file)))) - (find-files "." - "\\.c$|\\.h$"))))) + (find-files "." "\\.c$|\\.h$"))))) (add-before 'build 'write-source-revision-file (lambda _ (with-output-to-file ".src-rev" @@ -1879,7 +1878,7 @@ new Date();")) ,@make-flags)))) (replace 'install (lambda _ - (let ((images (car (find-files "build" ".*-server-release" + (let ((images (car (find-files "build" "-server-release" #:directories? #t)))) (copy-recursively (string-append images "/images/jdk") #$output:jdk) @@ -1913,7 +1912,7 @@ new Date();")) (invoke "unzip" archive)) (delete-file archive) (with-directory-excursion dir - (let ((char-data-files (find-files "." "CharacterData.*"))) + (let ((char-data-files (find-files "." "CharacterData"))) (for-each (lambda (file) (substitute* file (((string-append "This file was generated " @@ -1924,7 +1923,7 @@ new Date();")) "file")))) char-data-files))) (with-directory-excursion dir - (let ((files (find-files "." ".*" #:directories? #t))) + (let ((files (find-files "." #:directories? #t))) (apply invoke "zip" "-0" "-X" archive files)))))) (add-after 'strip-character-data-timestamps 'remove-extraneous-files (lambda* (#:key outputs #:allow-other-keys) @@ -1949,7 +1948,7 @@ new Date();")) (invoke "unzip" archive)) (delete-file archive) (for-each (compose repack-archive canonicalize-path) - (find-files dir "(ct.sym|\\.jar)$")) + (find-files dir "(ct\\.sym|\\.jar)$")) (let ((reset-file-timestamp (lambda (file) (let ((s (lstat file))) @@ -1959,7 +1958,7 @@ new Date();")) (for-each reset-file-timestamp (find-files dir #:directories? #t))) (with-directory-excursion dir - (let ((files (find-files "." ".*" #:directories? #t))) + (let ((files (find-files "." #:directories? #t))) (apply invoke "zip" "-0" "-X" archive files))))))) (for-each repack-archive (find-files #$output:doc "\\.zip$")) -- cgit v1.2.3 From 8a6316ef9ea9e993f0c46cbda2a9ae2aaf26a4d2 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Mon, 12 Dec 2022 21:19:33 +0000 Subject: gnu: openjdk13: Update to 13.0.13. * gnu/packages/java.scm (openjdk13): Update to 13.0.13. Signed-off-by: Efraim Flashner --- gnu/packages/java.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index e06020eedf..e71c70753d 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2100,8 +2100,8 @@ blacklisted.certs.pem" "#! java BlacklistedCertsConverter SHA-256\n")))))))))) (define-public openjdk13 - (make-openjdk openjdk12 "13.0.7" - "0wrrr0d7lz1v8qqm752mn4gz5l2vpl2kmx4ac3ysvk4mljc924hp")) + (make-openjdk openjdk12 "13.0.13" + "0pxf4dlig61k0pg7amg4mi919hzam7nzwckry01avgq1wj8ambji")) (define-public openjdk14 (make-openjdk -- cgit v1.2.3 From 0175b93199b0e0e863e7d6037c3581b4025c22ac Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Mon, 12 Dec 2022 21:19:34 +0000 Subject: gnu: openjdk15: Update to 15.0.9. * gnu/packages/java.scm (openjdk15): Update to 15.0.9. Signed-off-by: Efraim Flashner --- gnu/packages/java.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index e71c70753d..04c16ba2e9 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2119,8 +2119,8 @@ blacklisted.certs.pem" (define-public openjdk15 (make-openjdk - openjdk14 "15.0.3" - "168cr08nywp0q3vyj8njkhsmmnyd8rz9r58hk4xhzdzc6bdfkl1i" + openjdk14 "15.0.9" + "1k3x06fv89l84ysjsyw8s89q8blghq85m6xjzv373x6297ln8n7a" (source (origin (inherit (package-source base)) (modules '()) -- cgit v1.2.3 From 7cf6e66548615c5debee71351b214af7783610c7 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Mon, 12 Dec 2022 21:19:35 +0000 Subject: gnu: openjdk16: Update to 16.0.2. * gnu/packages/java.scm (openjdk16): Update to 16.0.2. Signed-off-by: Efraim Flashner --- gnu/packages/java.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 04c16ba2e9..97e4eb2c31 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2137,8 +2137,8 @@ blacklisted.certs.pem" (append `(,openjdk14 "jdk")))))) (define-public openjdk16 - (make-openjdk openjdk15 "16.0.1" - "1ggddsbsar4dj2fycfqqqagqil7prhb30afvq6933rz7pa9apm2f")) + (make-openjdk openjdk15 "16.0.2" + "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz")) (define-public openjdk17 (make-openjdk -- cgit v1.2.3 From a49e4087a14125923dd39e847f8a7eb0978e2370 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Mon, 12 Dec 2022 21:19:36 +0000 Subject: gnu: openjdk17: Update to 17.0.5. * gnu/packages/java.scm (openjdk17): Update to 17.0.5. Signed-off-by: Efraim Flashner --- gnu/packages/java.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 97e4eb2c31..a5a0495916 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2142,8 +2142,8 @@ blacklisted.certs.pem" (define-public openjdk17 (make-openjdk - openjdk16 "17.0.3" - "0slmd6ww947gxpp4yr2wmr5z975bg86qh7zqfp2radf2q77ql65b" + openjdk16 "17.0.5" + "1asnysg6kxdkrmb88y6qihdr12ljsyxv0mg6hlcs7cwxgsdlqkfs" (arguments (substitute-keyword-arguments (package-arguments openjdk16) ((#:phases phases) -- cgit v1.2.3 From fc4eef75067747696d1f9c3104e5f725b1434351 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Mon, 12 Dec 2022 21:19:37 +0000 Subject: gnu: openjdk18: Update to 18.0.2. * gnu/packages/java.scm (openjdk18): Update to 18.0.2. Signed-off-by: Efraim Flashner --- gnu/packages/java.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index a5a0495916..fc7ea120a8 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2155,8 +2155,8 @@ blacklisted.certs.pem" (("^#!.*") "#! java BlockedCertsConverter SHA-256\n")))))))))) (define-public openjdk18 - (make-openjdk openjdk17 "18" - "1bv6bdhkmwvn10l0xy8yi9xibds640hs5zsvx0jp7wrxa3qw4qy8")) + (make-openjdk openjdk17 "18.0.2" + "1yimfdkwpinhg5cf1mcrzk9xvjwnray3cx762kypb9jcwbranjwx")) ;;; Convenience alias to point to the latest version of OpenJDK. (define-public openjdk openjdk18) -- cgit v1.2.3 From 74e527516791210bef54983fa2af3ec01275e6c4 Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Sat, 3 Dec 2022 10:29:50 +0100 Subject: gnu: Add java-antlr4-runtime-python. * gnu/packages/java.scm (java-antlr4-runtime-python): New variable. --- gnu/packages/java.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index fc7ea120a8..eb550c9234 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -49,6 +49,7 @@ #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system maven) + #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages attr) @@ -8694,6 +8695,26 @@ sources by ANTLR.") (description "This package contains the C++ runtime library used with C++ generated sources by ANTLR."))) +(define-public java-antlr4-runtime-python + (package + (inherit java-antlr4-runtime) + (name "java-antlr4-runtime-python") + (outputs '("out")) + (build-system python-build-system) + (arguments + (list + #:tests? #f ; tests require antlr + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ + (chdir "runtime/Python3")))))) + (native-inputs (list pkg-config)) + (inputs (list `(,util-linux "lib"))) ; libuuid + (synopsis "ANTLR Python runtime library") + (description "This package contains the Python runtime library used with +Python generated sources by ANTLR."))) + (define-public antlr4 (package (inherit java-antlr4-runtime) -- cgit v1.2.3 From a4d9ce54880dc0d299e4489a168398440c9e7c33 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 8 Jan 2023 22:57:35 +0100 Subject: gnu: Move Java XML packages to new module. * gnu/packages/xml.scm (java-simple-xml, java-jaxp, java-apache-xml-commons-resolver, java-jaxen, java-xom, java-xsdlib, java-xpp3, java-xmlpull2, java-xmlpull-api-v1, java-dom4j, java-kxml2, java-stax, java-jettison, java-jdom2, java-xstream, java-mxparser): Move these variables from here... * gnu/packages/java-xml.scm: ...to this new file. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new file. * gnu/packages/axoloti.scm, gnu/packages/batik.scm, gnu/packages/bioinformatics.scm, gnu/packages/groovy.scm, gnu/packages/java.scm, gnu/packages/maven.scm: Adjust module imports. --- gnu/local.mk | 1 + gnu/packages/axoloti.scm | 4 +- gnu/packages/batik.scm | 4 +- gnu/packages/bioinformatics.scm | 1 + gnu/packages/groovy.scm | 1 + gnu/packages/java-xml.scm | 688 ++++++++++++++++++++++++++++++++++++++++ gnu/packages/java.scm | 1 + gnu/packages/maven.scm | 2 +- gnu/packages/xml.scm | 642 ------------------------------------- 9 files changed, 697 insertions(+), 647 deletions(-) create mode 100644 gnu/packages/java-xml.scm (limited to 'gnu/packages/java.scm') diff --git a/gnu/local.mk b/gnu/local.mk index eba4fc2d01..3ed5fa2f22 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -341,6 +341,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/java-compression.scm \ %D%/packages/java-graphics.scm \ %D%/packages/java-maths.scm \ + %D%/packages/java-xml.scm \ %D%/packages/javascript.scm \ %D%/packages/jemalloc.scm \ %D%/packages/jrnl.scm \ diff --git a/gnu/packages/axoloti.scm b/gnu/packages/axoloti.scm index 63bfa8db8c..e0dd22c627 100644 --- a/gnu/packages/axoloti.scm +++ b/gnu/packages/axoloti.scm @@ -33,11 +33,11 @@ #:use-module (gnu packages flashing-tools) #:use-module (gnu packages java) #:use-module (gnu packages java-graphics) + #:use-module (gnu packages java-xml) #:use-module (gnu packages libusb) #:use-module (gnu packages pkg-config) #:use-module (gnu packages textutils) - #:use-module (gnu packages version-control) - #:use-module (gnu packages xml)) + #:use-module (gnu packages version-control)) ;; XXX The patch does not apply to libusb 1.0.24. ;; See https://github.com/axoloti/axoloti/issues/464 diff --git a/gnu/packages/batik.scm b/gnu/packages/batik.scm index 2072dd467c..7f159010a5 100644 --- a/gnu/packages/batik.scm +++ b/gnu/packages/batik.scm @@ -27,8 +27,8 @@ #:use-module (gnu packages) #:use-module (gnu packages compression) #:use-module (gnu packages java) - #:use-module (gnu packages textutils) - #:use-module (gnu packages xml)) + #:use-module (gnu packages java-xml) + #:use-module (gnu packages textutils)) (define-public java-w3c-smil-3.0 (package diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index c3ede81a59..08d9d83471 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -110,6 +110,7 @@ #:use-module (gnu packages imagemagick) #:use-module (gnu packages java) #:use-module (gnu packages java-compression) + #:use-module (gnu packages java-xml) #:use-module (gnu packages jemalloc) #:use-module (gnu packages jupyter) #:use-module (gnu packages libffi) diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm index ecbd0cb0bd..b4f7438929 100644 --- a/gnu/packages/groovy.scm +++ b/gnu/packages/groovy.scm @@ -26,6 +26,7 @@ #:use-module (guix build-system ant) #:use-module (gnu packages) #:use-module (gnu packages java) + #:use-module (gnu packages java-xml) #:use-module (gnu packages xml)) (define java-groovy-bootstrap diff --git a/gnu/packages/java-xml.scm b/gnu/packages/java-xml.scm new file mode 100644 index 0000000000..5b16806e27 --- /dev/null +++ b/gnu/packages/java-xml.scm @@ -0,0 +1,688 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017, 2021, 2023 Ricardo Wurmus +;;; Copyright © 2017, 2018, 2021 Julien Lepiller +;;; Copyright © 2018 Gábor Boskovits +;;; Copyright © 2019, 2021 Tobias Geerinckx-Rice +;;; Copyright © 2020 Vincent Legoll +;;; Copyright © 2021 Léo Le Bouter +;;; Copyright © 2022 Christopher Baines +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages java-xml) + #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages check) + #:use-module (gnu packages compression) + #:use-module (gnu packages gtk) + #:use-module (gnu packages java) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system ant) + #:use-module (guix utils)) + +(define-public java-simple-xml + (package + (name "java-simple-xml") + (version "2.7.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/simple/simple-xml-" + version ".zip")) + (sha256 + (base32 + "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5")) + (patches (search-patches "java-simple-xml-fix-tests.patch")))) + (build-system ant-build-system) + (arguments + `(#:build-target "build" + #:test-target "test" + #:phases + (modify-phases %standard-phases + (replace 'install (install-jars "jar")) + (add-before 'check 'disable-failing-test + (lambda _ + ;; This test sometimes fails with an out of memory exception + (delete-file + "test/src/org/simpleframework/xml/core/NoAnnotationsRequiredTest.java")))))) + (native-inputs + (list unzip)) + (home-page "http://simple.sourceforge.net/") + (synopsis "XML serialization framework for Java") + (description "Simple is a high performance XML serialization and +configuration framework for Java. Its goal is to provide an XML framework +that enables rapid development of XML configuration and communication systems. +This framework aids the development of XML systems with minimal effort and +reduced errors. It offers full object serialization and deserialization, +maintaining each reference encountered.") + (license license:asl2.0))) + +;; TODO: Debian builds several jars out of this: jaxp-1.4.jar, +;; xml-apis.jar and xml-apis-1.4.01.jar. +(define-public java-jaxp + (package + (name "java-jaxp") + (version "1.4.01") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://apache/xerces/xml-commons/source/" + "xml-commons-external-" version "-src.tar.gz")) + (sha256 + (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "jaxp.jar" + #:jdk ,icedtea-8 + #:source-dir ".." + #:tests? #f)); no tests + (home-page "http://xerces.apache.org/xml-commons/") + (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)") + (description "Jaxp from the Apache XML Commons project is used by +the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs: + +@itemize +@item Document Object Model (DOM) +@item Simple API for XML (SAX) +@item Java APIs for XML Processing (JAXP) +@item Transformation API for XML (TrAX) +@item Document Object Model (DOM) Load and Save +@item JSR 206 Java API for XML Processing +@end itemize") + (license (list license:asl2.0 + license:w3c ;; Files under org.w3c + license:public-domain)))) ;; org.xml.sax + +(define-public java-apache-xml-commons-resolver + (package + (name "java-apache-xml-commons-resolver") + (version "1.2") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://apache/xerces/xml-commons/" + "xml-commons-resolver-" version ".tar.gz")) + (sha256 + (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm")) + (modules '((guix build utils))) + (snippet + '(begin + (for-each delete-file (find-files "." ".*\\.(jar|zip)")) + #t)))) + (build-system ant-build-system) + (arguments + `(#:jar-name (string-append "xml-resolver.jar") + #:tests? #f)); no tests + (inputs + (list java-junit)) + (home-page "http://xerces.apache.org/xml-commons/") + (synopsis "Catalog-based entity and URI resolution") + (description "The resolver class implements the full semantics of OASIS Technical +Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug +2001 Committee Specification of OASIS XML Catalogs. + +It also includes a framework of classes designed to read catalog files +in a number of formats: + +@itemize +@item The plain-text flavor described by TR9401. +@item The XCatalog XML format defined by John Cowan +@item The XML Catalog format defined by the OASIS Entity Resolution + Technical Committee. +@end itemize") + (license license:asl2.0))) + +;; Jaxen requires java-dom4j and java-xom that in turn require jaxen. +;; This package is a bootstrap version without dependencies on dom4j and xom. +(define java-jaxen-bootstrap + (package + (name "java-jaxen-bootstrap") + (version "1.1.6") + (source (origin + (method url-fetch) + ;; No release on github + (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/" + version "/jaxen-" version "-sources.jar")) + (sha256 + (base32 + "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "jaxen.jar" + #:source-dir "src" + #:tests? #f; no tests + #:phases + (modify-phases %standard-phases + (add-before 'build 'remove-dom4j + (lambda _ + (delete-file-recursively "src/org/jaxen/dom4j") + (delete-file-recursively "src/org/jaxen/xom") + #t))))) + (inputs + `(("java-jdom" ,java-jdom))) + (home-page "https://github.com/jaxen-xpath/jaxen") + (synopsis "XPath library") + (description "Jaxen is an XPath library written in Java. It is adaptable +to many different object models, including DOM, XOM, dom4j, and JDOM. It is +also possible to write adapters that treat non-XML trees such as compiled +Java byte code or Java beans as XML, thus enabling you to query these trees +with XPath too.") + (license license:bsd-3))) + +(define-public java-jaxen + (package + (inherit java-jaxen-bootstrap) + (name "java-jaxen") + (inputs + (list java-jdom java-xom java-dom4j)))) + +(define-public java-xom + (package + (name "java-xom") + (version "127") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/elharo/xom") + (commit (string-append "XOM_" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq")) + (modules '((guix build utils))) + (snippet + '(begin + (for-each delete-file + (find-files "." "\\.jar$")) + #t)))) + (build-system ant-build-system) + (arguments + `(#:jar-name "xom.jar" + #:jdk ,icedtea-8 + #:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'make-git-checkout-writable + (lambda _ + (for-each make-file-writable (find-files ".")) + #t)) + (add-before 'configure 'fix-tagsoup-dep + (lambda _ + ;; FIXME: Where is tagsoup source? + (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java") + #t))))) + (inputs + (list java-jdom java-junit java-classpathx-servletapi + java-jaxen-bootstrap java-xerces)) + (home-page "https://xom.nu/") + (synopsis "XML Object Model") + (description "XOM is a new XML Object Model for processing XML with Java +that strives for correctness and simplicity.") + ;; 2.1 only + (license license:lgpl2.1))) + +(define-public java-xsdlib + (package + (name "java-xsdlib") + (version "2013.2") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/" + "datatype/xsd/xsdlib/" version "/xsdlib-" + version "-sources.jar")) + (sha256 + (base32 + "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f; no tests + #:jar-name "xsdlib.jar" + #:jdk ,icedtea-8)) + (inputs + (list java-xerces)) + (home-page (string-append "https://web.archive.org/web/20161127144537/" + "https://msv.java.net//")) + (synopsis "Sun Multi-Schema Validator") + (description "Xsdlib contains an implementation of sun.com.msv, an XML +validator.") + (license license:bsd-2))) + +(define-public java-xpp3 + (package + (name "java-xpp3") + (version "1.1.4") + (source (origin + (method url-fetch) + (uri (string-append + "https://ci.guix.gnu.org/file/" + "xpp3-1.1.4_src.tgz" + "/sha256/" + "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p")) + (file-name (string-append name "-" version "_src.tgz")) + (sha256 + (base32 + "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p")) + (modules '((guix build utils))) + (snippet + '(begin ;; Delete bundled jar archives. + (for-each delete-file (find-files "." ".*\\.jar")) + #t)))) + (build-system ant-build-system) + (arguments + `(#:tests? #f; no tests + #:build-target "jar" + #:phases + (modify-phases %standard-phases + (replace 'install (install-jars "build"))))) + (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/") + (synopsis "Streaming pull XML parser") + (description "Xml Pull Parser (in short XPP) is a streaming pull XML +parser and should be used when there is a need to process quickly and +efficiently all input elements (for example in SOAP processors). This +package is a stable XmlPull parsing engine that is based on ideas from XPP +and in particular XPP2 but completely revised and rewritten to take the best +advantage of JIT JVMs.") + (license (license:non-copyleft "file://LICENSE.txt")))) + +(define-public java-xmlpull2 + (package + (name "java-xmlpull2") + (version "2.1.10") + (source (origin + (method url-fetch) + ;; Unfortunately, archive.org does not have a copy of this file. + (uri (string-append "https://ftp.fau.de/gentoo/distfiles/" + "PullParser" version ".tgz")) + (sha256 + (base32 + "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md")) + (modules '((guix build utils))) + (snippet + '(begin ;; Delete bundled jar archives. + (for-each delete-file (find-files "." ".*\\.jar")) + #t)))) + (build-system ant-build-system) + (arguments + `(#:tests? #f; no tests + #:build-target "impl" + #:phases + (modify-phases %standard-phases + (replace 'install (install-jars "build/lib"))))) + (home-page (string-append "https://web.archive.org/web/20210225153105/" + "https://www.extreme.indiana.edu/")) + (synopsis "Streaming pull XML parser") + (description "Xml Pull Parser (in short XPP) is a streaming pull XML +parser and should be used when there is a need to process quickly and +efficiently all input elements (for example in SOAP processors). This +package is in maintenance mode.") + (license (license:non-copyleft "file:///LICENSE.txt")))) + +(define-public java-xmlpull-api-v1 + (package + (name "java-xmlpull-api-v1") + (version "1.1.3.4b") + (source (origin + ;; The package is originally from Extreme! Lab, but the website + ;; is now gone. This repositories contains the sources of the + ;; latest version. + (method git-fetch) + (uri (git-reference + (url "https://github.com/aslom/xmlpull-api-v1") + ;; No releases, this is the latest commit + (commit "abeaa4aa87b2625af70c32f658f44e11355fe568"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "15bdqxfncnakskna4m9gsh4f9iczxy83qxn2anqiqd15z406a5ih")) + (modules '((guix build utils))) + (snippet + `(begin + (delete-file-recursively "lib") + (mkdir-p "lib") + ;; prevents a failure in "dist_lite" + (substitute* "build.xml" + (("README.html") "README.md")))))) + (build-system ant-build-system) + (arguments + `(#:test-target "junit" + #:build-target "dist" + #:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (string-append out "/share/doc/" ,name "-" ,version)) + (java (string-append out "/share/java")) + (project (string-append + "xmlpull_" + ,(string-join (string-split version #\.) "_")))) + (mkdir-p doc) + (copy-recursively (string-append "build/dist/" project "/doc/") + doc) + (mkdir-p java) + (copy-file (string-append "build/dist/" project "/" project ".jar") + (string-append java "/" project ".jar"))) + ))))) + (home-page "https://github.com/aslom/xmlpull-api-v1") + (synopsis "XML pull parsing API") + (description "XmlPull v1 API is a simple to use XML pull parsing API. XML +pull parsing allows incremental (sometimes called streaming) parsing of XML +where application is in control - the parsing can be interrupted at any given +moment and resumed when application is ready to consume more input.") + (license license:public-domain))) + +(define-public java-dom4j + (package + (name "java-dom4j") + (version "2.1.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dom4j/dom4j") + (commit (string-append "version-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl")) + (modules '((guix build utils))) + (snippet + '(begin ;; Delete bundled jar archives. + (for-each delete-file (find-files "." ".*\\.jar")) + #t)))) + (build-system ant-build-system) + (arguments + `(#:jar-name "dom4j.jar" + #:jdk ,icedtea-8 + #:source-dir "src/main/java" + ;; FIXME: Requires xalan, but xalan depends on java-cup which has a + ;; dependency on itself through jflex. + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-before 'build 'copy-jaxen-sources + ;; java-jaxen-bootstrap is not enough. These files have a circular + ;; dependency and there is no subset of dom4j that would allow + ;; breaking the circle. + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "jaxen-sources") + (with-directory-excursion "jaxen-sources" + (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources"))) + (mkdir-p "src/main/java/org/jaxen/dom4j") + (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java" + "src/main/java/org/jaxen/dom4j/DocumentNavigator.java") + (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java" + "src/main/java/org/jaxen/dom4j/Dom4jXPath.java") + #t)) + (add-before 'build 'fix-old-xpp2 + (lambda _ + ;; This package normally depends on xpp2 2.0, but version 2.1.10 + ;; is the only version whose source code is published. + (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java" + (("public void resetStartTag") + "public boolean removeAttributeByRawName(String name) {\n + return false;\n +}\n +public boolean removeAttributeByName(String name, String name2) {\n + return false;\n +}\n\npublic void resetStartTag") + (("Atttribute") "Attribute")) + #t))))) + (inputs + `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap) + ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap)) + ("java-xmlpull2" ,java-xmlpull2) + ("java-xpp3" ,java-xpp3) + ("java-xsdlib" ,java-xsdlib))) + (native-inputs + (list java-testng java-xerces)) + (home-page "https://dom4j.github.io/") + (synopsis "Flexible XML framework for Java") + (description "Dom4j is a flexible XML framework for Java. DOM4J works +with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very +low memory footprint.") + ;; some BSD-like 5-clause license + (license (license:non-copyleft "file://LICENSE")))) + +(define-public java-kxml2 + (package + (name "java-kxml2") + (version "2.4.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stefanhaustein/kxml2") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "kxml2.jar" + #:source-dir "src/main/java" + #:test-include (list "TestWb.java") + ;; Test failure: it was expected to get an XML entity but got the + ;; equivalent Unicode character instead. + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'make-git-checkout-writable + (lambda _ + (for-each make-file-writable (find-files ".")) + #t)) + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "src/main/resources" "build/classes") + #t))))) + (inputs + (list java-xpp3)) + (native-inputs + (list java-junit)) + (home-page "http://kxml.org") + (synopsis "XML pull parser") + (description "kXML is a small XML pull parser, specially designed for +constrained environments such as Applets, Personal Java or devices compliant +with the Mobile Information Device Profile (MIDP).") + (license license:expat))) + +(define-public java-stax + (package + (name "java-stax") + (version "1.2.0") + (source (origin + (method url-fetch) + (uri (string-append "https://repo1.maven.org/maven2/stax/stax/" + version "/stax-" version "-sources.jar")) + (sha256 + (base32 + "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "stax.jar" + #:tests? #f; no tests + #:phases + (modify-phases %standard-phases + (add-before 'configure 'fix-utf8 + (lambda _ + ;; This file is ISO-8859-1 but java expects UTF-8. + ;; Remove special characters in comments. + (with-fluids ((%default-port-encoding "ISO-8859-1")) + (substitute* "src/com/wutka/dtd/Scanner.java" + (("//.*") "\n"))) + #t))))) + (home-page "https://repo1.maven.org/maven2/stax/stax/") + (synopsis "Streaming API for XML") + (description "This package provides the reference implementation of the +@dfn{Streaming API for XML} (StAX). It is used for streaming XML data to +and from a Java application. It provides a standard pull parser interface.") + (license license:asl2.0))) + +(define-public java-jettison + (package + (name "java-jettison") + (version "1.3.7") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/codehaus/jettison") + (commit (string-append "jettison-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "jettison.jar" + #:source-dir "src/main/java" + #:test-exclude (list "**/Abstract*.java" + ;; Abstract classes + "**/DOMTest.java" + "**/BadgerFishDOMTest.java" + "**/MappedDOMTest.java"))) + (native-inputs + (list java-junit)) + (home-page "https://github.com/codehaus/jettison") + (synopsis "StAX implementation for JSON") + (description "Jettison is a Java library for converting XML to JSON and +vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It +implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports +@code{Mapped} and @code{BadgerFish} conventions.") + (license license:asl2.0))) + +(define-public java-jdom2 + (package + (name "java-jdom") + (version "2.0.6.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hunterhacker/jdom") + (commit (string-append "JDOM-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1r4pwl0z7hm45v9l2wbq3fjmqi13zmwzbrggyqizrwv31kghhx56")))) + (build-system ant-build-system) + (arguments + `(#:build-target "package" + #:tests? #f ; tests are run as part of the build process + #:phases + (modify-phases %standard-phases + (replace 'install + (install-jars "build"))))) + (home-page "http://jdom.org/") + (synopsis "Access, manipulate, and output XML data") + (description "Jdom is a Java-based solution for accessing, manipulating, and +outputting XML data from Java code.") + (license license:bsd-4))) + +(define-public java-xstream + (package + (name "java-xstream") + (version "1.4.16") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/x-stream/xstream") + (commit (string-append + "XSTREAM_" + (string-map (lambda (x) (if (eq? x #\.) #\_ x)) + version))))) + (file-name (git-file-name name version)) + (sha256 + (base32 "16k2mc63h2fw7lxv74qmhg4p8q9hfrw114daa6nxwnpv08cnq755")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "xstream.jar" + ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system. + #:tests? #f + #:jdk ,icedtea-8 + #:source-dir "xstream/src/java")) + (inputs + `(("java-jdom" ,java-jdom) + ("java-jdom2" ,java-jdom2) + ("java-cglib" ,java-cglib) + ("java-joda-time" ,java-joda-time) + ("java-jettison" ,java-jettison) + ("java-xom" ,java-xom) + ("java-mxparser" ,java-mxparser) + ("java-xpp3" ,java-xpp3) + ("java-dom4j" ,java-dom4j) + ("java-stax2-api" ,java-stax2-api) + ("java-woodstox-core" ,java-woodstox-core) + ("java-kxml2" ,java-kxml2) + ("java-stax" ,java-stax))) + (home-page "https://x-stream.github.io") + (synopsis "XML serialization library") + (description "XStream is a simple library to serialize Java objects to XML +and back again.") + (license license:bsd-3))) + +(define-public java-mxparser + (package + (name "java-mxparser") + (version "1.2.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/x-stream/mxparser") + (commit (string-append "v-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0i3jrjbz4hgf62fm1ix7nlcmhi4kcv4flqsfvh7a3l2v7nsp5ryb")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "mxparser.jar" + #:source-dir "src/main/java" + #:test-dir "src/test" + #:phases + (modify-phases %standard-phases + (add-before 'build 'copy-resources + (lambda _ + (copy-recursively "src/main/resources" "build/classes") + #t))))) + (propagated-inputs + (list java-xmlpull-api-v1)) + (native-inputs + (list java-junit)) + (home-page "https://github.com/x-stream/mxparser") + (synopsis "Streaming pull XML parser forked from @code{java-xpp3}") + (description "Xml Pull Parser (in short XPP) is a streaming pull XML +parser and should be used when there is a need to process quickly and +efficiently all input elements (for example in SOAP processors). This +package is a stable XmlPull parsing engine that is based on ideas from XPP +and in particular XPP2 but completely revised and rewritten to take the best +advantage of JIT JVMs. + +MXParser is a fork of xpp3_min 1.1.7 containing only the parser with merged +changes of the Plexus fork. It is an implementation of the XMLPULL V1 API +(parser only).") + (license (license:non-copyleft "file://LICENSE.txt")))) + + + + + + + + + + diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index eb550c9234..84f654fe99 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -74,6 +74,7 @@ #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages java-compression) + #:use-module (gnu packages java-xml) #:use-module (gnu packages libffi) #:use-module (gnu packages linux) ;alsa #:use-module (gnu packages maths) diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index b73fef79ba..fc3a63c263 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -32,9 +32,9 @@ #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages java) + #:use-module (gnu packages java-xml) #:use-module (gnu packages maven-parent-pom) #:use-module (gnu packages web) - #:use-module (gnu packages xml) #:use-module (ice-9 match)) (define-public maven-resolver-api diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 770bac3670..b5065f9f30 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -64,7 +64,6 @@ #:use-module (gnu packages gnupg) #:use-module (gnu packages graphviz) #:use-module (gnu packages gtk) - #:use-module (gnu packages java) #:use-module (gnu packages nss) #:use-module (gnu packages perl) #:use-module (gnu packages perl-check) @@ -76,7 +75,6 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) - #:use-module (guix build-system ant) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) @@ -1544,42 +1542,6 @@ Excel(TM) since version 2007.") (home-page "https://github.com/brechtsanders/xlsxio") (license license:expat))) -(define-public java-simple-xml - (package - (name "java-simple-xml") - (version "2.7.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/simple/simple-xml-" - version ".zip")) - (sha256 - (base32 - "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5")) - (patches (search-patches "java-simple-xml-fix-tests.patch")))) - (build-system ant-build-system) - (arguments - `(#:build-target "build" - #:test-target "test" - #:phases - (modify-phases %standard-phases - (replace 'install (install-jars "jar")) - (add-before 'check 'disable-failing-test - (lambda _ - ;; This test sometimes fails with an out of memory exception - (delete-file - "test/src/org/simpleframework/xml/core/NoAnnotationsRequiredTest.java")))))) - (native-inputs - (list unzip)) - (home-page "http://simple.sourceforge.net/") - (synopsis "XML serialization framework for Java") - (description "Simple is a high performance XML serialization and -configuration framework for Java. Its goal is to provide an XML framework -that enables rapid development of XML configuration and communication systems. -This framework aids the development of XML systems with minimal effort and -reduced errors. It offers full object serialization and deserialization, -maintaining each reference encountered.") - (license license:asl2.0))) - (define-public perl-xml-xpathengine (package (name "perl-xml-xpathengine") @@ -1735,610 +1697,6 @@ XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM support.") (license license:perl-license))) -;; TODO: Debian builds several jars out of this: jaxp-1.4.jar, -;; xml-apis.jar and xml-apis-1.4.01.jar. -(define-public java-jaxp - (package - (name "java-jaxp") - (version "1.4.01") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://apache/xerces/xml-commons/source/" - "xml-commons-external-" version "-src.tar.gz")) - (sha256 - (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk")))) - (build-system ant-build-system) - (arguments - `(#:jar-name "jaxp.jar" - #:jdk ,icedtea-8 - #:source-dir ".." - #:tests? #f)); no tests - (home-page "http://xerces.apache.org/xml-commons/") - (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)") - (description "Jaxp from the Apache XML Commons project is used by -the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs: - -@itemize -@item Document Object Model (DOM) -@item Simple API for XML (SAX) -@item Java APIs for XML Processing (JAXP) -@item Transformation API for XML (TrAX) -@item Document Object Model (DOM) Load and Save -@item JSR 206 Java API for XML Processing -@end itemize") - (license (list license:asl2.0 - license:w3c ;; Files under org.w3c - license:public-domain)))) ;; org.xml.sax - -(define-public java-apache-xml-commons-resolver - (package - (name "java-apache-xml-commons-resolver") - (version "1.2") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://apache/xerces/xml-commons/" - "xml-commons-resolver-" version ".tar.gz")) - (sha256 - (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm")) - (modules '((guix build utils))) - (snippet - '(begin - (for-each delete-file (find-files "." ".*\\.(jar|zip)")) - #t)))) - (build-system ant-build-system) - (arguments - `(#:jar-name (string-append "xml-resolver.jar") - #:tests? #f)); no tests - (inputs - (list java-junit)) - (home-page "http://xerces.apache.org/xml-commons/") - (synopsis "Catalog-based entity and URI resolution") - (description "The resolver class implements the full semantics of OASIS Technical -Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug -2001 Committee Specification of OASIS XML Catalogs. - -It also includes a framework of classes designed to read catalog files -in a number of formats: - -@itemize -@item The plain-text flavor described by TR9401. -@item The XCatalog XML format defined by John Cowan -@item The XML Catalog format defined by the OASIS Entity Resolution - Technical Committee. -@end itemize") - (license license:asl2.0))) - -;; Jaxen requires java-dom4j and java-xom that in turn require jaxen. -;; This package is a bootstrap version without dependencies on dom4j and xom. -(define java-jaxen-bootstrap - (package - (name "java-jaxen-bootstrap") - (version "1.1.6") - (source (origin - (method url-fetch) - ;; No release on github - (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/" - version "/jaxen-" version "-sources.jar")) - (sha256 - (base32 - "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx")))) - (build-system ant-build-system) - (arguments - `(#:jar-name "jaxen.jar" - #:source-dir "src" - #:tests? #f; no tests - #:phases - (modify-phases %standard-phases - (add-before 'build 'remove-dom4j - (lambda _ - (delete-file-recursively "src/org/jaxen/dom4j") - (delete-file-recursively "src/org/jaxen/xom") - #t))))) - (inputs - `(("java-jdom" ,java-jdom))) - (home-page "https://github.com/jaxen-xpath/jaxen") - (synopsis "XPath library") - (description "Jaxen is an XPath library written in Java. It is adaptable -to many different object models, including DOM, XOM, dom4j, and JDOM. It is -also possible to write adapters that treat non-XML trees such as compiled -Java byte code or Java beans as XML, thus enabling you to query these trees -with XPath too.") - (license license:bsd-3))) - -(define-public java-jaxen - (package - (inherit java-jaxen-bootstrap) - (name "java-jaxen") - (inputs - (list java-jdom java-xom java-dom4j)))) - -(define-public java-xom - (package - (name "java-xom") - (version "127") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/elharo/xom") - (commit (string-append "XOM_" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq")) - (modules '((guix build utils))) - (snippet - '(begin - (for-each delete-file - (find-files "." "\\.jar$")) - #t)))) - (build-system ant-build-system) - (arguments - `(#:jar-name "xom.jar" - #:jdk ,icedtea-8 - #:tests? #f ; no tests - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'make-git-checkout-writable - (lambda _ - (for-each make-file-writable (find-files ".")) - #t)) - (add-before 'configure 'fix-tagsoup-dep - (lambda _ - ;; FIXME: Where is tagsoup source? - (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java") - #t))))) - (inputs - (list java-jdom java-junit java-classpathx-servletapi - java-jaxen-bootstrap java-xerces)) - (home-page "https://xom.nu/") - (synopsis "XML Object Model") - (description "XOM is a new XML Object Model for processing XML with Java -that strives for correctness and simplicity.") - ;; 2.1 only - (license license:lgpl2.1))) - -(define-public java-xsdlib - (package - (name "java-xsdlib") - (version "2013.2") - (source (origin - (method url-fetch) - (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/" - "datatype/xsd/xsdlib/" version "/xsdlib-" - version "-sources.jar")) - (sha256 - (base32 - "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim")))) - (build-system ant-build-system) - (arguments - `(#:tests? #f; no tests - #:jar-name "xsdlib.jar" - #:jdk ,icedtea-8)) - (inputs - (list java-xerces)) - (home-page (string-append "https://web.archive.org/web/20161127144537/" - "https://msv.java.net//")) - (synopsis "Sun Multi-Schema Validator") - (description "Xsdlib contains an implementation of sun.com.msv, an XML -validator.") - (license license:bsd-2))) - -(define-public java-xpp3 - (package - (name "java-xpp3") - (version "1.1.4") - (source (origin - (method url-fetch) - (uri (string-append - "https://ci.guix.gnu.org/file/" - "xpp3-1.1.4_src.tgz" - "/sha256/" - "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p")) - (file-name (string-append name "-" version "_src.tgz")) - (sha256 - (base32 - "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p")) - (modules '((guix build utils))) - (snippet - '(begin ;; Delete bundled jar archives. - (for-each delete-file (find-files "." ".*\\.jar")) - #t)))) - (build-system ant-build-system) - (arguments - `(#:tests? #f; no tests - #:build-target "jar" - #:phases - (modify-phases %standard-phases - (replace 'install (install-jars "build"))))) - (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/") - (synopsis "Streaming pull XML parser") - (description "Xml Pull Parser (in short XPP) is a streaming pull XML -parser and should be used when there is a need to process quickly and -efficiently all input elements (for example in SOAP processors). This -package is a stable XmlPull parsing engine that is based on ideas from XPP -and in particular XPP2 but completely revised and rewritten to take the best -advantage of JIT JVMs.") - (license (license:non-copyleft "file://LICENSE.txt")))) - -(define-public java-xmlpull2 - (package - (name "java-xmlpull2") - (version "2.1.10") - (source (origin - (method url-fetch) - ;; Unfortunately, archive.org does not have a copy of this file. - (uri (string-append "https://ftp.fau.de/gentoo/distfiles/" - "PullParser" version ".tgz")) - (sha256 - (base32 - "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md")) - (modules '((guix build utils))) - (snippet - '(begin ;; Delete bundled jar archives. - (for-each delete-file (find-files "." ".*\\.jar")) - #t)))) - (build-system ant-build-system) - (arguments - `(#:tests? #f; no tests - #:build-target "impl" - #:phases - (modify-phases %standard-phases - (replace 'install (install-jars "build/lib"))))) - (home-page (string-append "https://web.archive.org/web/20210225153105/" - "https://www.extreme.indiana.edu/")) - (synopsis "Streaming pull XML parser") - (description "Xml Pull Parser (in short XPP) is a streaming pull XML -parser and should be used when there is a need to process quickly and -efficiently all input elements (for example in SOAP processors). This -package is in maintenance mode.") - (license (license:non-copyleft "file:///LICENSE.txt")))) - -(define-public java-xmlpull-api-v1 - (package - (name "java-xmlpull-api-v1") - (version "1.1.3.4b") - (source (origin - ;; The package is originally from Extreme! Lab, but the website - ;; is now gone. This repositories contains the sources of the - ;; latest version. - (method git-fetch) - (uri (git-reference - (url "https://github.com/aslom/xmlpull-api-v1") - ;; No releases, this is the latest commit - (commit "abeaa4aa87b2625af70c32f658f44e11355fe568"))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "15bdqxfncnakskna4m9gsh4f9iczxy83qxn2anqiqd15z406a5ih")) - (modules '((guix build utils))) - (snippet - `(begin - (delete-file-recursively "lib") - (mkdir-p "lib") - ;; prevents a failure in "dist_lite" - (substitute* "build.xml" - (("README.html") "README.md")))))) - (build-system ant-build-system) - (arguments - `(#:test-target "junit" - #:build-target "dist" - #:phases - (modify-phases %standard-phases - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (doc (string-append out "/share/doc/" ,name "-" ,version)) - (java (string-append out "/share/java")) - (project (string-append - "xmlpull_" - ,(string-join (string-split version #\.) "_")))) - (mkdir-p doc) - (copy-recursively (string-append "build/dist/" project "/doc/") - doc) - (mkdir-p java) - (copy-file (string-append "build/dist/" project "/" project ".jar") - (string-append java "/" project ".jar"))) - ))))) - (home-page "https://github.com/aslom/xmlpull-api-v1") - (synopsis "XML pull parsing API") - (description "XmlPull v1 API is a simple to use XML pull parsing API. XML -pull parsing allows incremental (sometimes called streaming) parsing of XML -where application is in control - the parsing can be interrupted at any given -moment and resumed when application is ready to consume more input.") - (license license:public-domain))) - -(define-public java-dom4j - (package - (name "java-dom4j") - (version "2.1.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/dom4j/dom4j") - (commit (string-append "version-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl")) - (modules '((guix build utils))) - (snippet - '(begin ;; Delete bundled jar archives. - (for-each delete-file (find-files "." ".*\\.jar")) - #t)))) - (build-system ant-build-system) - (arguments - `(#:jar-name "dom4j.jar" - #:jdk ,icedtea-8 - #:source-dir "src/main/java" - ;; FIXME: Requires xalan, but xalan depends on java-cup which has a - ;; dependency on itself through jflex. - #:tests? #f - #:phases - (modify-phases %standard-phases - (add-before 'build 'copy-jaxen-sources - ;; java-jaxen-bootstrap is not enough. These files have a circular - ;; dependency and there is no subset of dom4j that would allow - ;; breaking the circle. - (lambda* (#:key inputs #:allow-other-keys) - (mkdir-p "jaxen-sources") - (with-directory-excursion "jaxen-sources" - (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources"))) - (mkdir-p "src/main/java/org/jaxen/dom4j") - (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java" - "src/main/java/org/jaxen/dom4j/DocumentNavigator.java") - (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java" - "src/main/java/org/jaxen/dom4j/Dom4jXPath.java") - #t)) - (add-before 'build 'fix-old-xpp2 - (lambda _ - ;; This package normally depends on xpp2 2.0, but version 2.1.10 - ;; is the only version whose source code is published. - (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java" - (("public void resetStartTag") - "public boolean removeAttributeByRawName(String name) {\n - return false;\n -}\n -public boolean removeAttributeByName(String name, String name2) {\n - return false;\n -}\n\npublic void resetStartTag") - (("Atttribute") "Attribute")) - #t))))) - (inputs - `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap) - ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap)) - ("java-xmlpull2" ,java-xmlpull2) - ("java-xpp3" ,java-xpp3) - ("java-xsdlib" ,java-xsdlib))) - (native-inputs - (list java-testng java-xerces)) - (home-page "https://dom4j.github.io/") - (synopsis "Flexible XML framework for Java") - (description "Dom4j is a flexible XML framework for Java. DOM4J works -with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very -low memory footprint.") - ;; some BSD-like 5-clause license - (license (license:non-copyleft "file://LICENSE")))) - -(define-public java-kxml2 - (package - (name "java-kxml2") - (version "2.4.2") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/stefanhaustein/kxml2") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg")))) - (build-system ant-build-system) - (arguments - `(#:jar-name "kxml2.jar" - #:source-dir "src/main/java" - #:test-include (list "TestWb.java") - ;; Test failure: it was expected to get an XML entity but got the - ;; equivalent Unicode character instead. - #:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'make-git-checkout-writable - (lambda _ - (for-each make-file-writable (find-files ".")) - #t)) - (add-before 'build 'copy-resources - (lambda _ - (copy-recursively "src/main/resources" "build/classes") - #t))))) - (inputs - (list java-xpp3)) - (native-inputs - (list java-junit)) - (home-page "http://kxml.org") - (synopsis "XML pull parser") - (description "kXML is a small XML pull parser, specially designed for -constrained environments such as Applets, Personal Java or devices compliant -with the Mobile Information Device Profile (MIDP).") - (license license:expat))) - -(define-public java-stax - (package - (name "java-stax") - (version "1.2.0") - (source (origin - (method url-fetch) - (uri (string-append "https://repo1.maven.org/maven2/stax/stax/" - version "/stax-" version "-sources.jar")) - (sha256 - (base32 - "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z")))) - (build-system ant-build-system) - (arguments - `(#:jar-name "stax.jar" - #:tests? #f; no tests - #:phases - (modify-phases %standard-phases - (add-before 'configure 'fix-utf8 - (lambda _ - ;; This file is ISO-8859-1 but java expects UTF-8. - ;; Remove special characters in comments. - (with-fluids ((%default-port-encoding "ISO-8859-1")) - (substitute* "src/com/wutka/dtd/Scanner.java" - (("//.*") "\n"))) - #t))))) - (home-page "https://repo1.maven.org/maven2/stax/stax/") - (synopsis "Streaming API for XML") - (description "This package provides the reference implementation of the -@dfn{Streaming API for XML} (StAX). It is used for streaming XML data to -and from a Java application. It provides a standard pull parser interface.") - (license license:asl2.0))) - -(define-public java-jettison - (package - (name "java-jettison") - (version "1.3.7") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/codehaus/jettison") - (commit (string-append "jettison-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw")))) - (build-system ant-build-system) - (arguments - `(#:jar-name "jettison.jar" - #:source-dir "src/main/java" - #:test-exclude (list "**/Abstract*.java" - ;; Abstract classes - "**/DOMTest.java" - "**/BadgerFishDOMTest.java" - "**/MappedDOMTest.java"))) - (native-inputs - (list java-junit)) - (home-page "https://github.com/codehaus/jettison") - (synopsis "StAX implementation for JSON") - (description "Jettison is a Java library for converting XML to JSON and -vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It -implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports -@code{Mapped} and @code{BadgerFish} conventions.") - (license license:asl2.0))) - -(define-public java-jdom2 - (package - (name "java-jdom") - (version "2.0.6.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/hunterhacker/jdom") - (commit (string-append "JDOM-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1r4pwl0z7hm45v9l2wbq3fjmqi13zmwzbrggyqizrwv31kghhx56")))) - (build-system ant-build-system) - (arguments - `(#:build-target "package" - #:tests? #f ; tests are run as part of the build process - #:phases - (modify-phases %standard-phases - (replace 'install - (install-jars "build"))))) - (home-page "http://jdom.org/") - (synopsis "Access, manipulate, and output XML data") - (description "Jdom is a Java-based solution for accessing, manipulating, and -outputting XML data from Java code.") - (license license:bsd-4))) - -(define-public java-xstream - (package - (name "java-xstream") - (version "1.4.16") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/x-stream/xstream") - (commit (string-append - "XSTREAM_" - (string-map (lambda (x) (if (eq? x #\.) #\_ x)) - version))))) - (file-name (git-file-name name version)) - (sha256 - (base32 "16k2mc63h2fw7lxv74qmhg4p8q9hfrw114daa6nxwnpv08cnq755")))) - (build-system ant-build-system) - (arguments - `(#:jar-name "xstream.jar" - ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system. - #:tests? #f - #:jdk ,icedtea-8 - #:source-dir "xstream/src/java")) - (inputs - `(("java-jdom" ,java-jdom) - ("java-jdom2" ,java-jdom2) - ("java-cglib" ,java-cglib) - ("java-joda-time" ,java-joda-time) - ("java-jettison" ,java-jettison) - ("java-xom" ,java-xom) - ("java-mxparser" ,java-mxparser) - ("java-xpp3" ,java-xpp3) - ("java-dom4j" ,java-dom4j) - ("java-stax2-api" ,java-stax2-api) - ("java-woodstox-core" ,java-woodstox-core) - ("java-kxml2" ,java-kxml2) - ("java-stax" ,java-stax))) - (home-page "https://x-stream.github.io") - (synopsis "XML serialization library") - (description "XStream is a simple library to serialize Java objects to XML -and back again.") - (license license:bsd-3))) - -(define-public java-mxparser - (package - (name "java-mxparser") - (version "1.2.1") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/x-stream/mxparser") - (commit (string-append "v-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0i3jrjbz4hgf62fm1ix7nlcmhi4kcv4flqsfvh7a3l2v7nsp5ryb")))) - (build-system ant-build-system) - (arguments - `(#:jar-name "mxparser.jar" - #:source-dir "src/main/java" - #:test-dir "src/test" - #:phases - (modify-phases %standard-phases - (add-before 'build 'copy-resources - (lambda _ - (copy-recursively "src/main/resources" "build/classes") - #t))))) - (propagated-inputs - (list java-xmlpull-api-v1)) - (native-inputs - (list java-junit)) - (home-page "https://github.com/x-stream/mxparser") - (synopsis "Streaming pull XML parser forked from @code{java-xpp3}") - (description "Xml Pull Parser (in short XPP) is a streaming pull XML -parser and should be used when there is a need to process quickly and -efficiently all input elements (for example in SOAP processors). This -package is a stable XmlPull parsing engine that is based on ideas from XPP -and in particular XPP2 but completely revised and rewritten to take the best -advantage of JIT JVMs. - -MXParser is a fork of xpp3_min 1.1.7 containing only the parser with merged -changes of the Plexus fork. It is an implementation of the XMLPULL V1 API -(parser only).") - (license (license:non-copyleft "file://LICENSE.txt")))) - (define-public xmlrpc-c (package (name "xmlrpc-c") -- cgit v1.2.3 From aac0605de312ccc854928959530fd77d68723154 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:01:04 +0100 Subject: gnu: Move Java bootstrap packages to separate module. * gnu/packages/java.scm (ant/java8): Do not inherit from ant-bootstrap. (ant)[arguments]: Replace to avoid rebuilding. (jikes, classpath-bootstrap, jamvm-1-bootstrap, ant-bootstrap, ecj-bootstrap, ecj-javac-wrapper, classpath-0.99, classpath-jamvm-wrappers, classpath-devel, jamvm, ecj-javac-wrapper-final, ecj4-bootstrap, ecj4-javac-wrapper, jamvm-with-ecj4): Move these packages from here... * gnu/packages/java-bootstrap.scm: ...to this new file. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new file. --- gnu/local.mk | 1 + gnu/packages/java-bootstrap.scm | 724 +++++++++++++++++++++++++++++++++ gnu/packages/java.scm | 857 ++++++++-------------------------------- 3 files changed, 891 insertions(+), 691 deletions(-) create mode 100644 gnu/packages/java-bootstrap.scm (limited to 'gnu/packages/java.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 3ed5fa2f22..597254f831 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -338,6 +338,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/iso-codes.scm \ %D%/packages/jami.scm \ %D%/packages/java.scm \ + %D%/packages/java-bootstrap.scm \ %D%/packages/java-compression.scm \ %D%/packages/java-graphics.scm \ %D%/packages/java-maths.scm \ diff --git a/gnu/packages/java-bootstrap.scm b/gnu/packages/java-bootstrap.scm new file mode 100644 index 0000000000..3a3df2bcb0 --- /dev/null +++ b/gnu/packages/java-bootstrap.scm @@ -0,0 +1,724 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2021 Ricardo Wurmus +;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2017 Leo Famulari +;;; Copyright © 2017, 2022 Marius Bakke +;;; Copyright © 2018, 2020 Efraim Flashner +;;; Copyright © 2018 Gábor Boskovits +;;; Copyright © 2018 Mark H Weaver +;;; Copyright © 2019 Andrius Štikonas +;;; Copyright © 2020 Simon South +;;; Copyright © 2021 Guillaume Le Vaillant +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages java-bootstrap) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (guix build-system gnu) + #:use-module (guix build-system trivial) + #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages bash) + #:use-module (gnu packages compression) + #:use-module (gnu packages gettext) + #:use-module (gnu packages guile) + #:use-module (gnu packages libffi) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages texinfo) + #:export (classpath-devel + ecj4-javac-wrapper + jamvm-with-ecj4 + ant-bootstrap)) + + +;;; +;;; Java bootstrap toolchain. +;;; + +;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We +;; use it to build a simple version of GNU Classpath, the Java standard +;; library. We chose version 0.93 because it is the last version that can be +;; built with Jikes. With Jikes and this version of GNU Classpath we can +;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is +;; the last version of JamVM that works with a version of GNU classpath that +;; does not require ECJ. These three packages make up the bootstrap JDK. + +;; This is sufficient to build an older version of Ant, which is needed to +;; build an older version of ECJ, an incremental Java compiler, both of which +;; are written in Java. +;; +;; ECJ is needed to build the latest release (0.99) and the development +;; version of GNU Classpath. The development version of GNU Classpath has +;; much more support for Java 1.6 than the latest release, but we need to +;; build 0.99 first to get a working version of javah. ECJ, the development +;; version of GNU Classpath, and the latest version of JamVM make up the +;; second stage JDK with which we can build the OpenJDK with the Icedtea 2.x +;; build framework. We then build the more recent JDK Icedtea 3.x, and all +;; other versions of OpenJDK. + +(define jikes + (package + (name "jikes") + (version "1.22") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/jikes/Jikes/" + version "/jikes-" version ".tar.bz2")) + (sha256 + (base32 + "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c")))) + (build-system gnu-build-system) + (home-page "http://jikes.sourceforge.net/") + (synopsis "Compiler for the Java language") + (description "Jikes is a compiler that translates Java source files as +defined in The Java Language Specification into the bytecoded instruction set +and binary format defined in The Java Virtual Machine Specification.") + (license license:ibmpl1.0))) + +;; This is the last version of GNU Classpath that can be built without ECJ. +(define classpath-bootstrap + (package + (name "classpath") + (version "0.93") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/classpath/classpath-" + version ".tar.gz")) + (sha256 + (base32 + "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz")) + (patches (search-patches "classpath-aarch64-support.patch" + "classpath-miscompilation.patch")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list (string-append "JAVAC=" + (search-input-file %build-inputs "/bin/jikes")) + "--disable-Werror" + "--disable-gmp" + "--disable-gtk-peer" + "--disable-gconf-peer" + "--disable-plugin" + "--disable-dssi" + "--disable-alsa" + "--disable-gjdoc") + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-data + (lambda _ (invoke "make" "install-data")))))) + (native-inputs + (list jikes fastjar libltdl pkg-config)) + (home-page "https://www.gnu.org/software/classpath/") + (synopsis "Essential libraries for Java") + (description "GNU Classpath is a project to create core class libraries +for use with runtimes, compilers and tools for the Java programming +language.") + ;; GPLv2 or later, with special linking exception. + (license license:gpl2+))) + +;; This is the last version of JamVM that works with a version of GNU +;; classpath that does not require ECJ. +(define jamvm-1-bootstrap + (package + (name "jamvm") + (version "1.5.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/jamvm/jamvm/" + "JamVM%20" version "/jamvm-" + version ".tar.gz")) + (patches (search-patches "jamvm-1.5.1-aarch64-support.patch" + "jamvm-1.5.1-armv7-support.patch")) + (sha256 + (base32 + "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36")) + ;; Remove precompiled software. + (snippet + '(delete-file "lib/classes.zip")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list (string-append "--with-classpath-install-dir=" + (assoc-ref %build-inputs "classpath")) + "--disable-int-caching" + "--enable-runtime-reloc-checks" + "--enable-ffi") + #:phases + ,(if (string-prefix? "aarch64" (or (%current-system) + (%current-target-system))) + ;; Makefiles and the configure script need to be regenerated to + ;; incorporate support for AArch64. + '(modify-phases %standard-phases + (replace 'bootstrap + (lambda _ (invoke "autoreconf" "-vif")))) + '%standard-phases))) + (inputs + (list classpath-bootstrap jikes libffi + zip zlib)) + (native-inputs + (if (string-prefix? "aarch64" (or (%current-system) + (%current-target-system))) + ;; Additional packages needed for autoreconf. + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool)) + '())) + (home-page "http://jamvm.sourceforge.net/") + (synopsis "Small Java Virtual Machine") + (description "JamVM is a Java Virtual Machine conforming to the JVM +specification edition 2 (blue book). It is extremely small. However, unlike +other small VMs it supports the full spec, including object finalisation and +JNI.") + (license license:gpl2+))) + +(define ant-bootstrap + (package + (name "ant-bootstrap") + ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which + ;; are not supported. The 1.8.x series is the last to use only features + ;; supported by Jikes. + (version "1.8.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://apache/" + "ant/source/apache-ant-" + version "-src.tar.bz2")) + (sha256 + (base32 + "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((srfi srfi-1) + (guix build gnu-build-system) + (guix build utils)) + #:tests? #f ; no "check" target + #:phases + (modify-phases %standard-phases + (delete 'bootstrap) + (delete 'configure) + (add-before 'build 'define-java-environment-variables + (lambda* (#:key inputs #:allow-other-keys) + ;; First, set environment variables (eases debugging on -K). + (setenv "JAVA_HOME" (assoc-ref inputs "jamvm")) + (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm")) + (setenv "JAVAC" (search-input-file inputs "/bin/jikes")) + (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar")))) + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Ant complains if this file doesn't exist. + (setenv "HOME" "/tmp") + (with-output-to-file "/tmp/.ant.properties" + (lambda _ (display ""))) + + ;; Use jikes instead of javac for tags in build.xml + (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") + + ;; jikes produces lots of warnings, but they are not very + ;; interesting, so we silence them. + (setenv "$BOOTJAVAC_OPTS" "-nowarn") + + ;; Without these JamVM options the build may freeze. + (substitute* "bootstrap.sh" + (("^\"\\$\\{JAVACMD\\}\" " m) + ,@(if (string-prefix? "armhf" (or (%current-system) + (%current-target-system))) + `((string-append m "-Xnocompact ")) + `((string-append m "-Xnocompact -Xnoinlining "))))) + + ;; Disable tests because we are bootstrapping and thus don't have + ;; any of the dependencies required to build and run the tests. + (substitute* "build.xml" + (("depends=\"jars,test-jar\"") "depends=\"jars\"")) + (invoke "bash" "bootstrap.sh" + (string-append "-Ddist.dir=" + (assoc-ref outputs "out"))))) + (add-after 'build 'strip-jar-timestamps ;based on ant-build-system + (lambda* (#:key outputs #:allow-other-keys) + (define (repack-archive jar) + (let* ((dir (mkdtemp "jar-contents.XXXXXX")) + (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) + (with-directory-excursion dir + (invoke "unzip" jar)) + (delete-file jar) + ;; XXX: copied from (gnu build install) + (for-each (lambda (file) + (let ((s (lstat file))) + (unless (eq? (stat:type s) 'symlink) + (utime file 0 0 0 0)))) + (find-files dir #:directories? #t)) + ;; It is important that the manifest appears first. + (with-directory-excursion dir + (let* ((files (find-files "." ".*" #:directories? #t)) + ;; To ensure that the reference scanner can + ;; detect all store references in the jars + ;; we disable compression with the "-0" option. + (command (if (file-exists? manifest) + `("zip" "-0" "-X" ,jar ,manifest + ,@files) + `("zip" "-0" "-X" ,jar ,@files)))) + (apply invoke command))))) + (for-each repack-archive + (find-files + (string-append (assoc-ref %outputs "out") "/lib") + "\\.jar$")))) + (delete 'install)))) + (native-inputs + (list jikes jamvm-1-bootstrap unzip zip)) + (home-page "https://ant.apache.org") + (synopsis "Build tool for Java") + (description + "Ant is a platform-independent build tool for Java. It is similar to +make but is implemented using the Java language, requires the Java platform, +and is best suited to building Java projects. Ant uses XML to describe the +build process and its dependencies, whereas Make uses Makefile format.") + (license license:asl2.0))) + +;; Version 3.2.2 is the last version without a dependency on a full-fledged +;; compiler for Java 1.5. +(define ecj-bootstrap + (package + (name "ecj-bootstrap") + (version "3.2.2") + (source (origin + (method url-fetch) + (uri (string-append "http://archive.eclipse.org/eclipse/" + "downloads/drops/R-" version + "-200702121330/ecjsrc.zip")) + (sha256 + (base32 + "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307")))) + ;; It would be so much easier if we could use the ant-build-system, but we + ;; cannot as we don't have ant at this point. We use ecj for + ;; bootstrapping the JDK. + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; there are no tests + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs #:allow-other-keys) + (setenv "CLASSPATH" + (string-join + (cons (search-input-file inputs "/lib/rt.jar") + (find-files (string-append + (assoc-ref inputs "ant-bootstrap") + "/lib") + "\\.jar$")) + ":")))) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + ;; The unpack phase enters the "org" directory by mistake. + (chdir "..") + + ;; Create a simple manifest to make ecj executable. + (with-output-to-file "manifest" + (lambda _ + (display "Manifest-Version: 1.0 +Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"))) + + ;; Compile it all! + (and (apply invoke "jikes" + (find-files "." "\\.java$")) + (invoke "fastjar" "cvfm" + "ecj-bootstrap.jar" "manifest" ".")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((share (string-append (assoc-ref outputs "out") + "/share/java/"))) + (mkdir-p share) + (install-file "ecj-bootstrap.jar" share))))))) + (native-inputs + (list ant-bootstrap + unzip + jikes + jamvm-1-bootstrap + fastjar)) + (home-page "https://eclipse.org") + (synopsis "Eclipse Java development tools core batch compiler") + (description "This package provides the Eclipse Java core batch compiler +for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a +requirement for all GNU Classpath releases after version 0.93.") + (license license:epl1.0))) + +(define ecj-javac-wrapper + (package (inherit ecj-bootstrap) + (name "ecj-javac-wrapper") + (source #f) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + ,#~(begin + (use-modules (guix build utils)) + (let* ((bin (string-append #$output "/bin")) + (target (string-append bin "/javac")) + (guile (string-append (assoc-ref %build-inputs "guile") + "/bin/guile")) + (ecj (string-append #$(this-package-native-input "ecj-bootstrap") + "/share/java/ecj-bootstrap.jar")) + (java (string-append #$(this-package-native-input "jamvm") + "/bin/jamvm")) + (bootcp (let ((jvmlib (string-append + #$(this-package-native-input "classpath") + "/share/classpath"))) + (string-append jvmlib "/glibj.zip:" + jvmlib "/tools.zip")))) + (mkdir-p bin) + (with-output-to-file target + (lambda _ + (format #t "#!~a --no-auto-compile\n!#\n" guile) + (write + `(begin (use-modules (ice-9 match) + (ice-9 receive) + (ice-9 hash-table) + (srfi srfi-1) + (srfi srfi-26)) + (define defaults + '(("-bootclasspath" ,bootcp) + ("-source" "1.5") + ("-target" "1.5") + ("-cp" "."))) + (define (main args) + (let ((classpath (getenv "CLASSPATH"))) + (setenv "CLASSPATH" + (string-join (list ,ecj (or classpath "")) + ":"))) + (receive (vm-args other-args) + ;; Separate VM arguments from arguments to ECJ. + (partition (cut string-prefix? "-J" <>) + (fold (lambda (default acc) + (if (member (first default) acc) + acc (append default acc))) + args defaults)) + (apply system* ,java + (append + ;; Remove "-J" prefix + (map (cut string-drop <> 2) vm-args) + '("org.eclipse.jdt.internal.compiler.batch.Main") + (cons "-nowarn" other-args))))) + ;; Entry point + (let ((args (cdr (command-line)))) + (if (null? args) + (format (current-error-port) "javac: no arguments given!\n") + (main args))))))) + (chmod target #o755))))) + (native-inputs + (list guile-3.0 ecj-bootstrap jamvm-1-bootstrap classpath-bootstrap)) + (description "This package provides a wrapper around the @dfn{Eclipse +compiler for Java} (ecj) with a command line interface that is compatible with +the standard javac executable."))) + +;; The classpath-bootstrap was built without a virtual machine, so it does not +;; provide a wrapper for javah. We cannot build the development version of +;; Classpath without javah. +(define classpath-0.99 + (package (inherit classpath-bootstrap) + (version "0.99") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/classpath/classpath-" + version ".tar.gz")) + (sha256 + (base32 + "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr")) + (patches (search-patches "classpath-aarch64-support.patch")))) + (arguments + `(#:configure-flags + (list (string-append "--with-ecj-jar=" + (assoc-ref %build-inputs "ecj-bootstrap") + "/share/java/ecj-bootstrap.jar") + (string-append "JAVAC=" + (assoc-ref %build-inputs "ecj-javac-wrapper") + "/bin/javac") + (string-append "JAVA=" + (assoc-ref %build-inputs "jamvm") + "/bin/jamvm") + "GCJ_JAVAC_TRUE=no" + "ac_cv_prog_java_works=yes" ; trust me + "--disable-Werror" + "--disable-gmp" + "--disable-gtk-peer" + "--disable-gconf-peer" + "--disable-plugin" + "--disable-dssi" + "--disable-alsa" + "--disable-gjdoc") + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-data + (lambda _ (invoke "make" "install-data")))))) + (native-inputs + (list classpath-bootstrap + ecj-bootstrap ecj-javac-wrapper + fastjar jamvm-1-bootstrap + libltdl pkg-config)))) + +;; We need this because classpath-bootstrap does not provide all of the tools +;; we need to build classpath-devel. +(define classpath-jamvm-wrappers + (package (inherit classpath-0.99) + (name "classpath-jamvm-wrappers") + (source #f) + (build-system trivial-build-system) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let ((bash #$(this-package-native-input "bash-minimal")) + (jamvm #$(this-package-native-input "jamvm")) + (classpath #$(this-package-native-input "classpath")) + (bin (string-append #$output "/bin/"))) + (mkdir-p bin) + (for-each (lambda (tool) + (with-output-to-file (string-append bin tool) + (lambda _ + #$@(if (string-prefix? "armhf" (or (%current-system) + (%current-target-system))) + `((format #t "#!~a/bin/sh +~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \ +gnu.classpath.tools.~a.~a $@" + bash jamvm classpath tool + (if (string=? "native2ascii" tool) + "Native2ASCII" "Main"))) + `((format #t "#!~a/bin/sh +~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \ +gnu.classpath.tools.~a.~a $@" + bash jamvm classpath tool + (if (string=? "native2ascii" tool) + "Native2ASCII" "Main")))))) + (chmod (string-append bin tool) #o755)) + (list "javah" + "rmic" + "rmid" + "orbd" + "rmiregistry" + "native2ascii")))))) + (native-inputs + (list bash-minimal jamvm-1-bootstrap classpath-0.99)) + (inputs '()) + (synopsis "Executables from GNU Classpath") + (description "This package provides wrappers around the tools provided by +the GNU Classpath library. They are executed by the JamVM virtual +machine."))) + +;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since +;; then Classpath has gained much more support for Java 1.6. +(define classpath-devel + (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103") + (revision "1")) + (package (inherit classpath-bootstrap) + (version (string-append "0.99-" revision "." (string-take commit 9))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/classpath.git") + (commit commit))) + (file-name (string-append "classpath-" version "-checkout")) + (sha256 + (base32 + "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4")) + (patches (search-patches "classpath-aarch64-support.patch")))) + (arguments + `(#:make-flags + ;; Ensure that the initial heap size is smaller than the maximum + ;; size. By default only Xmx is set, which can lead to invalid + ;; memory settings on some machines with a lot of memory. + '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M") + #:configure-flags + (list (string-append "--with-ecj-jar=" + (assoc-ref %build-inputs "ecj-bootstrap") + "/share/java/ecj-bootstrap.jar") + (string-append "--with-javac=" + (assoc-ref %build-inputs "ecj-javac-wrapper") + "/bin/javac") + (string-append "JAVA=" + (assoc-ref %build-inputs "jamvm") + "/bin/jamvm") + "GCJ_JAVAC_TRUE=no" + "ac_cv_prog_java_works=yes" ; trust me + "--disable-Werror" + "--disable-gmp" + "--disable-gtk-peer" + "--disable-gconf-peer" + "--disable-plugin" + "--disable-dssi" + "--disable-alsa" + "--disable-gjdoc") + #:phases + (modify-phases %standard-phases + ;; XXX The bootstrap phase executes autogen.sh, which fails after + ;; complaining about the lack of gettext. + (replace 'bootstrap + (lambda _ (invoke "autoreconf" "-vif"))) + (add-after 'unpack 'remove-unsupported-annotations + (lambda _ + (substitute* (find-files "java" "\\.java$") + (("@Override") "")))) + (add-after 'install 'install-data + (lambda _ (invoke "make" "install-data")))))) + (native-inputs + (list autoconf automake libltdl libtool gettext-minimal texinfo + pkg-config + classpath-jamvm-wrappers ;for javah + ecj-bootstrap ecj-javac-wrapper fastjar + jamvm-1-bootstrap))))) + +(define jamvm + (package (inherit jamvm-1-bootstrap) + (version "2.0.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/jamvm/jamvm/" + "JamVM%20" version "/jamvm-" + version ".tar.gz")) + (sha256 + (base32 + "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn")) + (patches + (search-patches "jamvm-2.0.0-disable-branch-patching.patch" + "jamvm-2.0.0-opcode-guard.patch" + "jamvm-2.0.0-aarch64-support.patch")) + ;; Remove precompiled software. + (snippet + '(delete-file "src/classlib/gnuclasspath/lib/classes.zip")))) + (build-system gnu-build-system) + (arguments + (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap) + ((#:configure-flags _) + '(list (string-append "--with-classpath-install-dir=" + (assoc-ref %build-inputs "classpath")))))) + (inputs + `(("classpath" ,classpath-devel) + ("ecj-javac-wrapper" ,ecj-javac-wrapper) + ("zip" ,zip) + ("zlib" ,zlib))))) + +(define ecj-javac-wrapper-final + (package (inherit ecj-javac-wrapper) + (native-inputs + (list guile-3.0 ecj-bootstrap jamvm classpath-devel)))) + +;; We jump ahead by patching the sources of ECJ 4.2.1 so that our bootstrap +;; JDK can build it. ECJ 4 allows us to skip the build of the first version +;; of icedtea and build icedtea 2.x directly. +(define ecj4-bootstrap + (package + (name "ecj-bootstrap") + (version "4.2.1") + (source (origin + (method url-fetch) + (uri (string-append "http://archive.eclipse.org/eclipse/" + "downloads/drops4/R-" version + "-201209141800/ecjsrc-" version ".jar")) + (sha256 + (base32 + "1x281p87m14zylvinkiz6gc23ss7pzlx419qjbql11jriwav4qfj")))) + ;; It would be so much easier if we could use the ant-build-system, but we + ;; cannot as we don't have ant at this point. We use ecj for + ;; bootstrapping the JDK. + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; there are no tests + #:phases + (modify-phases %standard-phases + (replace 'unpack + (lambda* (#:key source #:allow-other-keys) + (mkdir "src") + (with-directory-excursion "src" + (invoke "gjar" "-xf" source)) + (chdir "src"))) + (replace 'configure + (lambda* (#:key inputs #:allow-other-keys) + (setenv "CLASSPATH" + (string-join + (cons (search-input-file inputs "/lib/rt.jar") + (find-files (string-append + (assoc-ref inputs "ant-bootstrap") + "/lib") + "\\.jar$")) + ":")) + ;; This directive is not supported by our simple bootstrap JDK. + (substitute* (find-files "." "\\.java$") + (("@Override") "")))) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + ;; We can't compile these yet, but we don't need them at this + ;; point anyway. + (delete-file "org/eclipse/jdt/core/JDTCompilerAdapter.java") + (delete-file-recursively "org/eclipse/jdt/internal/antadapter") + + ;; Create a simple manifest to make ecj executable. + (mkdir-p "META-INF") + (with-output-to-file "META-INF/MANIFESTS.MF" + (lambda _ + (display "Manifest-Version: 1.0 +Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"))) + + ;; Compile it all! + (apply invoke "javac" + (find-files "." "\\.java$")) + + ;; Pack it all up! We don't use "jar" here, because + ;; it doesn't produce reproducible zip archives. + ;; XXX: copied from (gnu build install) + (for-each (lambda (file) + (let ((s (lstat file))) + (unless (eq? (stat:type s) 'symlink) + (utime file 0 0 0 0)))) + (find-files "." #:directories? #t)) + + ;; It is important that the manifest appears first. + (apply invoke "zip" "-0" "-X" "ecj-bootstrap.jar" + "META-INF/MANIFESTS.MF" + (delete "./META-INF/MANIFESTS.MF" + (find-files "." ".*" #:directories? #t))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((share (string-append (assoc-ref outputs "out") + "/share/java/"))) + (mkdir-p share) + (install-file "ecj-bootstrap.jar" share))))))) + (native-inputs + (list ant-bootstrap classpath-devel ecj-javac-wrapper-final jamvm + unzip zip)) + (home-page "https://eclipse.org") + (synopsis "Eclipse Java development tools core batch compiler") + (description "This package provides the Eclipse Java core batch compiler +for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a +requirement for all GNU Classpath releases after version 0.93. This version +supports sufficient parts of Java 7 to build Icedtea 2.x.") + (license license:epl1.0))) + +(define ecj4-javac-wrapper + (package + (inherit ecj-javac-wrapper) + (native-inputs + (list guile-3.0 ecj4-bootstrap jamvm classpath-devel)))) + +(define jamvm-with-ecj4 + (package + (inherit jamvm) + (inputs + (modify-inputs (package-inputs jamvm) + (replace "ecj-javac-wrapper" ecj4-javac-wrapper))))) + diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 84f654fe99..655f524f92 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -50,7 +50,6 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system maven) #:use-module (guix build-system python) - #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages attr) #:use-module (gnu packages autotools) @@ -73,6 +72,7 @@ #:use-module (gnu packages guile) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) + #:use-module (gnu packages java-bootstrap) #:use-module (gnu packages java-compression) #:use-module (gnu packages java-xml) #:use-module (gnu packages libffi) @@ -97,675 +97,6 @@ #:use-module (srfi srfi-11) #:use-module (ice-9 match)) - -;;; -;;; Java bootstrap toolchain. -;;; - -;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We -;; use it to build a simple version of GNU Classpath, the Java standard -;; library. We chose version 0.93 because it is the last version that can be -;; built with Jikes. With Jikes and this version of GNU Classpath we can -;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is -;; the last version of JamVM that works with a version of GNU classpath that -;; does not require ECJ. These three packages make up the bootstrap JDK. - -;; This is sufficient to build an older version of Ant, which is needed to -;; build an older version of ECJ, an incremental Java compiler, both of which -;; are written in Java. -;; -;; ECJ is needed to build the latest release (0.99) and the development -;; version of GNU Classpath. The development version of GNU Classpath has -;; much more support for Java 1.6 than the latest release, but we need to -;; build 0.99 first to get a working version of javah. ECJ, the development -;; version of GNU Classpath, and the latest version of JamVM make up the -;; second stage JDK with which we can build the OpenJDK with the Icedtea 2.x -;; build framework. We then build the more recent JDK Icedtea 3.x, and all -;; other versions of OpenJDK. - -(define jikes - (package - (name "jikes") - (version "1.22") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/jikes/Jikes/" - version "/jikes-" version ".tar.bz2")) - (sha256 - (base32 - "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c")))) - (build-system gnu-build-system) - (home-page "http://jikes.sourceforge.net/") - (synopsis "Compiler for the Java language") - (description "Jikes is a compiler that translates Java source files as -defined in The Java Language Specification into the bytecoded instruction set -and binary format defined in The Java Virtual Machine Specification.") - (license license:ibmpl1.0))) - -;; This is the last version of GNU Classpath that can be built without ECJ. -(define classpath-bootstrap - (package - (name "classpath") - (version "0.93") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/classpath/classpath-" - version ".tar.gz")) - (sha256 - (base32 - "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz")) - (patches (search-patches "classpath-aarch64-support.patch" - "classpath-miscompilation.patch")))) - (build-system gnu-build-system) - (arguments - `(#:configure-flags - (list (string-append "JAVAC=" - (search-input-file %build-inputs "/bin/jikes")) - "--disable-Werror" - "--disable-gmp" - "--disable-gtk-peer" - "--disable-gconf-peer" - "--disable-plugin" - "--disable-dssi" - "--disable-alsa" - "--disable-gjdoc") - #:phases - (modify-phases %standard-phases - (add-after 'install 'install-data - (lambda _ (invoke "make" "install-data")))))) - (native-inputs - (list jikes fastjar libltdl pkg-config)) - (home-page "https://www.gnu.org/software/classpath/") - (synopsis "Essential libraries for Java") - (description "GNU Classpath is a project to create core class libraries -for use with runtimes, compilers and tools for the Java programming -language.") - ;; GPLv2 or later, with special linking exception. - (license license:gpl2+))) - -;; This is the last version of JamVM that works with a version of GNU -;; classpath that does not require ECJ. -(define jamvm-1-bootstrap - (package - (name "jamvm") - (version "1.5.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/jamvm/jamvm/" - "JamVM%20" version "/jamvm-" - version ".tar.gz")) - (patches (search-patches "jamvm-1.5.1-aarch64-support.patch" - "jamvm-1.5.1-armv7-support.patch")) - (sha256 - (base32 - "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36")) - ;; Remove precompiled software. - (snippet - '(delete-file "lib/classes.zip")))) - (build-system gnu-build-system) - (arguments - `(#:configure-flags - (list (string-append "--with-classpath-install-dir=" - (assoc-ref %build-inputs "classpath")) - "--disable-int-caching" - "--enable-runtime-reloc-checks" - "--enable-ffi") - #:phases - ,(if (string-prefix? "aarch64" (or (%current-system) - (%current-target-system))) - ;; Makefiles and the configure script need to be regenerated to - ;; incorporate support for AArch64. - '(modify-phases %standard-phases - (replace 'bootstrap - (lambda _ (invoke "autoreconf" "-vif")))) - '%standard-phases))) - (inputs - (list classpath-bootstrap jikes libffi zip zlib)) - (native-inputs - (if (string-prefix? "aarch64" (or (%current-system) - (%current-target-system))) - ;; Additional packages needed for autoreconf. - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("libtool" ,libtool)) - '())) - (home-page "http://jamvm.sourceforge.net/") - (synopsis "Small Java Virtual Machine") - (description "JamVM is a Java Virtual Machine conforming to the JVM -specification edition 2 (blue book). It is extremely small. However, unlike -other small VMs it supports the full spec, including object finalisation and -JNI.") - (license license:gpl2+))) - -(define ant-bootstrap - (package - (name "ant-bootstrap") - ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which - ;; are not supported. The 1.8.x series is the last to use only features - ;; supported by Jikes. - (version "1.8.4") - (source (origin - (method url-fetch) - (uri (string-append "mirror://apache/" - "ant/source/apache-ant-" - version "-src.tar.bz2")) - (sha256 - (base32 - "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx")))) - (build-system gnu-build-system) - (arguments - `(#:modules ((srfi srfi-1) - (guix build gnu-build-system) - (guix build utils)) - #:tests? #f ; no "check" target - #:phases - (modify-phases %standard-phases - (delete 'bootstrap) - (delete 'configure) - (add-before 'build 'define-java-environment-variables - (lambda* (#:key inputs #:allow-other-keys) - ;; First, set environment variables (eases debugging on -K). - (setenv "JAVA_HOME" (assoc-ref inputs "jamvm")) - (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm")) - (setenv "JAVAC" (search-input-file inputs "/bin/jikes")) - (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar")))) - (replace 'build - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Ant complains if this file doesn't exist. - (setenv "HOME" "/tmp") - (with-output-to-file "/tmp/.ant.properties" - (lambda _ (display ""))) - - ;; Use jikes instead of javac for tags in build.xml - (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") - - ;; jikes produces lots of warnings, but they are not very - ;; interesting, so we silence them. - (setenv "$BOOTJAVAC_OPTS" "-nowarn") - - ;; Without these JamVM options the build may freeze. - (substitute* "bootstrap.sh" - (("^\"\\$\\{JAVACMD\\}\" " m) - ,@(if (string-prefix? "armhf" (or (%current-system) - (%current-target-system))) - `((string-append m "-Xnocompact ")) - `((string-append m "-Xnocompact -Xnoinlining "))))) - - ;; Disable tests because we are bootstrapping and thus don't have - ;; any of the dependencies required to build and run the tests. - (substitute* "build.xml" - (("depends=\"jars,test-jar\"") "depends=\"jars\"")) - (invoke "bash" "bootstrap.sh" - (string-append "-Ddist.dir=" - (assoc-ref outputs "out"))))) - (add-after 'build 'strip-jar-timestamps ;based on ant-build-system - (lambda* (#:key outputs #:allow-other-keys) - (define (repack-archive jar) - (let* ((dir (mkdtemp "jar-contents.XXXXXX")) - (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) - (with-directory-excursion dir - (invoke "unzip" jar)) - (delete-file jar) - ;; XXX: copied from (gnu build install) - (for-each (lambda (file) - (let ((s (lstat file))) - (unless (eq? (stat:type s) 'symlink) - (utime file 0 0 0 0)))) - (find-files dir #:directories? #t)) - ;; It is important that the manifest appears first. - (with-directory-excursion dir - (let* ((files (find-files "." ".*" #:directories? #t)) - ;; To ensure that the reference scanner can - ;; detect all store references in the jars - ;; we disable compression with the "-0" option. - (command (if (file-exists? manifest) - `("zip" "-0" "-X" ,jar ,manifest - ,@files) - `("zip" "-0" "-X" ,jar ,@files)))) - (apply invoke command))))) - (for-each repack-archive - (find-files - (string-append (assoc-ref %outputs "out") "/lib") - "\\.jar$")))) - (delete 'install)))) - (native-inputs - (list jikes jamvm-1-bootstrap unzip zip)) - (home-page "https://ant.apache.org") - (synopsis "Build tool for Java") - (description - "Ant is a platform-independent build tool for Java. It is similar to -make but is implemented using the Java language, requires the Java platform, -and is best suited to building Java projects. Ant uses XML to describe the -build process and its dependencies, whereas Make uses Makefile format.") - (license license:asl2.0))) - -;; Version 3.2.2 is the last version without a dependency on a full-fledged -;; compiler for Java 1.5. -(define ecj-bootstrap - (package - (name "ecj-bootstrap") - (version "3.2.2") - (source (origin - (method url-fetch) - (uri (string-append "http://archive.eclipse.org/eclipse/" - "downloads/drops/R-" version - "-200702121330/ecjsrc.zip")) - (sha256 - (base32 - "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307")))) - ;; It would be so much easier if we could use the ant-build-system, but we - ;; cannot as we don't have ant at this point. We use ecj for - ;; bootstrapping the JDK. - (build-system gnu-build-system) - (arguments - `(#:tests? #f ; there are no tests - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key inputs #:allow-other-keys) - (setenv "CLASSPATH" - (string-join - (cons (search-input-file inputs "/lib/rt.jar") - (find-files (string-append - (assoc-ref inputs "ant-bootstrap") - "/lib") - "\\.jar$")) - ":")))) - (replace 'build - (lambda* (#:key inputs #:allow-other-keys) - ;; The unpack phase enters the "org" directory by mistake. - (chdir "..") - - ;; Create a simple manifest to make ecj executable. - (with-output-to-file "manifest" - (lambda _ - (display "Manifest-Version: 1.0 -Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"))) - - ;; Compile it all! - (and (apply invoke "jikes" - (find-files "." "\\.java$")) - (invoke "fastjar" "cvfm" - "ecj-bootstrap.jar" "manifest" ".")))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((share (string-append (assoc-ref outputs "out") - "/share/java/"))) - (mkdir-p share) - (install-file "ecj-bootstrap.jar" share))))))) - (native-inputs - (list ant-bootstrap unzip jikes jamvm-1-bootstrap fastjar)) - (home-page "https://eclipse.org") - (synopsis "Eclipse Java development tools core batch compiler") - (description "This package provides the Eclipse Java core batch compiler -for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a -requirement for all GNU Classpath releases after version 0.93.") - (license license:epl1.0))) - -(define ecj-javac-wrapper - (package (inherit ecj-bootstrap) - (name "ecj-javac-wrapper") - (source #f) - (build-system trivial-build-system) - (arguments - `(#:modules ((guix build utils)) - #:builder - ,#~(begin - (use-modules (guix build utils)) - (let* ((bin (string-append #$output "/bin")) - (target (string-append bin "/javac")) - (guile (string-append (assoc-ref %build-inputs "guile") - "/bin/guile")) - (ecj (string-append #$(this-package-native-input "ecj-bootstrap") - "/share/java/ecj-bootstrap.jar")) - (java (string-append #$(this-package-native-input "jamvm") - "/bin/jamvm")) - (bootcp (let ((jvmlib (string-append - #$(this-package-native-input "classpath") - "/share/classpath"))) - (string-append jvmlib "/glibj.zip:" - jvmlib "/tools.zip")))) - (mkdir-p bin) - (with-output-to-file target - (lambda _ - (format #t "#!~a --no-auto-compile\n!#\n" guile) - (write - `(begin (use-modules (ice-9 match) - (ice-9 receive) - (ice-9 hash-table) - (srfi srfi-1) - (srfi srfi-26)) - (define defaults - '(("-bootclasspath" ,bootcp) - ("-source" "1.5") - ("-target" "1.5") - ("-cp" "."))) - (define (main args) - (let ((classpath (getenv "CLASSPATH"))) - (setenv "CLASSPATH" - (string-join (list ,ecj (or classpath "")) - ":"))) - (receive (vm-args other-args) - ;; Separate VM arguments from arguments to ECJ. - (partition (cut string-prefix? "-J" <>) - (fold (lambda (default acc) - (if (member (first default) acc) - acc (append default acc))) - args defaults)) - (apply system* ,java - (append - ;; Remove "-J" prefix - (map (cut string-drop <> 2) vm-args) - '("org.eclipse.jdt.internal.compiler.batch.Main") - (cons "-nowarn" other-args))))) - ;; Entry point - (let ((args (cdr (command-line)))) - (if (null? args) - (format (current-error-port) "javac: no arguments given!\n") - (main args))))))) - (chmod target #o755))))) - (native-inputs - (list guile-3.0 ecj-bootstrap jamvm-1-bootstrap classpath-bootstrap)) - (description "This package provides a wrapper around the @dfn{Eclipse -compiler for Java} (ecj) with a command line interface that is compatible with -the standard javac executable."))) - -;; The classpath-bootstrap was built without a virtual machine, so it does not -;; provide a wrapper for javah. We cannot build the development version of -;; Classpath without javah. -(define classpath-0.99 - (package (inherit classpath-bootstrap) - (version "0.99") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/classpath/classpath-" - version ".tar.gz")) - (sha256 - (base32 - "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr")) - (patches (search-patches "classpath-aarch64-support.patch")))) - (arguments - `(#:configure-flags - (list (string-append "--with-ecj-jar=" - (assoc-ref %build-inputs "ecj-bootstrap") - "/share/java/ecj-bootstrap.jar") - (string-append "JAVAC=" - (assoc-ref %build-inputs "ecj-javac-wrapper") - "/bin/javac") - (string-append "JAVA=" - (assoc-ref %build-inputs "jamvm") - "/bin/jamvm") - "GCJ_JAVAC_TRUE=no" - "ac_cv_prog_java_works=yes" ; trust me - "--disable-Werror" - "--disable-gmp" - "--disable-gtk-peer" - "--disable-gconf-peer" - "--disable-plugin" - "--disable-dssi" - "--disable-alsa" - "--disable-gjdoc") - #:phases - (modify-phases %standard-phases - (add-after 'install 'install-data - (lambda _ (invoke "make" "install-data")))))) - (native-inputs - (list classpath-bootstrap - ecj-bootstrap ecj-javac-wrapper - fastjar jamvm-1-bootstrap - libltdl pkg-config)))) - -;; We need this because classpath-bootstrap does not provide all of the tools -;; we need to build classpath-devel. -(define classpath-jamvm-wrappers - (package (inherit classpath-0.99) - (name "classpath-jamvm-wrappers") - (source #f) - (build-system trivial-build-system) - (arguments - (list - #:modules '((guix build utils)) - #:builder - #~(begin - (use-modules (guix build utils)) - (let ((bash #$(this-package-native-input "bash-minimal")) - (jamvm #$(this-package-native-input "jamvm")) - (classpath #$(this-package-native-input "classpath")) - (bin (string-append #$output "/bin/"))) - (mkdir-p bin) - (for-each (lambda (tool) - (with-output-to-file (string-append bin tool) - (lambda _ - #$@(if (string-prefix? "armhf" (or (%current-system) - (%current-target-system))) - `((format #t "#!~a/bin/sh -~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \ -gnu.classpath.tools.~a.~a $@" - bash jamvm classpath tool - (if (string=? "native2ascii" tool) - "Native2ASCII" "Main"))) - `((format #t "#!~a/bin/sh -~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \ -gnu.classpath.tools.~a.~a $@" - bash jamvm classpath tool - (if (string=? "native2ascii" tool) - "Native2ASCII" "Main")))))) - (chmod (string-append bin tool) #o755)) - (list "javah" - "rmic" - "rmid" - "orbd" - "rmiregistry" - "native2ascii")))))) - (native-inputs - (list bash-minimal jamvm-1-bootstrap classpath-0.99)) - (inputs '()) - (synopsis "Executables from GNU Classpath") - (description "This package provides wrappers around the tools provided by -the GNU Classpath library. They are executed by the JamVM virtual -machine."))) - -;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since -;; then Classpath has gained much more support for Java 1.6. -(define-public classpath-devel - (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103") - (revision "1")) - (package (inherit classpath-bootstrap) - (version (string-append "0.99-" revision "." (string-take commit 9))) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://git.savannah.gnu.org/git/classpath.git") - (commit commit))) - (file-name (string-append "classpath-" version "-checkout")) - (sha256 - (base32 - "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4")) - (patches (search-patches "classpath-aarch64-support.patch")))) - (arguments - `(#:make-flags - ;; Ensure that the initial heap size is smaller than the maximum - ;; size. By default only Xmx is set, which can lead to invalid - ;; memory settings on some machines with a lot of memory. - '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M") - #:configure-flags - (list (string-append "--with-ecj-jar=" - (assoc-ref %build-inputs "ecj-bootstrap") - "/share/java/ecj-bootstrap.jar") - (string-append "--with-javac=" - (assoc-ref %build-inputs "ecj-javac-wrapper") - "/bin/javac") - (string-append "JAVA=" - (assoc-ref %build-inputs "jamvm") - "/bin/jamvm") - "GCJ_JAVAC_TRUE=no" - "ac_cv_prog_java_works=yes" ; trust me - "--disable-Werror" - "--disable-gmp" - "--disable-gtk-peer" - "--disable-gconf-peer" - "--disable-plugin" - "--disable-dssi" - "--disable-alsa" - "--disable-gjdoc") - #:phases - (modify-phases %standard-phases - ;; XXX The bootstrap phase executes autogen.sh, which fails after - ;; complaining about the lack of gettext. - (replace 'bootstrap - (lambda _ (invoke "autoreconf" "-vif"))) - (add-after 'unpack 'remove-unsupported-annotations - (lambda _ - (substitute* (find-files "java" "\\.java$") - (("@Override") "")))) - (add-after 'install 'install-data - (lambda _ (invoke "make" "install-data")))))) - (native-inputs - (list autoconf automake libltdl libtool gettext-minimal texinfo - pkg-config - classpath-jamvm-wrappers ;for javah - ecj-bootstrap ecj-javac-wrapper fastjar - jamvm-1-bootstrap))))) - -(define jamvm - (package (inherit jamvm-1-bootstrap) - (version "2.0.0") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/jamvm/jamvm/" - "JamVM%20" version "/jamvm-" - version ".tar.gz")) - (sha256 - (base32 - "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn")) - (patches - (search-patches "jamvm-2.0.0-disable-branch-patching.patch" - "jamvm-2.0.0-opcode-guard.patch" - "jamvm-2.0.0-aarch64-support.patch")) - ;; Remove precompiled software. - (snippet - '(delete-file "src/classlib/gnuclasspath/lib/classes.zip")))) - (build-system gnu-build-system) - (arguments - (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap) - ((#:configure-flags _) - '(list (string-append "--with-classpath-install-dir=" - (assoc-ref %build-inputs "classpath")))))) - (inputs - `(("classpath" ,classpath-devel) - ("ecj-javac-wrapper" ,ecj-javac-wrapper) - ("zip" ,zip) - ("zlib" ,zlib))))) - -(define ecj-javac-wrapper-final - (package (inherit ecj-javac-wrapper) - (native-inputs - (list guile-3.0 ecj-bootstrap jamvm classpath-devel)))) - -;; We jump ahead by patching the sources of ECJ 4.2.1 so that our bootstrap -;; JDK can build it. ECJ 4 allows us to skip the build of the first version -;; of icedtea and build icedtea 2.x directly. -(define-public ecj4-bootstrap - (package - (name "ecj-bootstrap") - (version "4.2.1") - (source (origin - (method url-fetch) - (uri (string-append "http://archive.eclipse.org/eclipse/" - "downloads/drops4/R-" version - "-201209141800/ecjsrc-" version ".jar")) - (sha256 - (base32 - "1x281p87m14zylvinkiz6gc23ss7pzlx419qjbql11jriwav4qfj")))) - ;; It would be so much easier if we could use the ant-build-system, but we - ;; cannot as we don't have ant at this point. We use ecj for - ;; bootstrapping the JDK. - (build-system gnu-build-system) - (arguments - `(#:tests? #f ; there are no tests - #:phases - (modify-phases %standard-phases - (replace 'unpack - (lambda* (#:key source #:allow-other-keys) - (mkdir "src") - (with-directory-excursion "src" - (invoke "gjar" "-xf" source)) - (chdir "src"))) - (replace 'configure - (lambda* (#:key inputs #:allow-other-keys) - (setenv "CLASSPATH" - (string-join - (cons (search-input-file inputs "/lib/rt.jar") - (find-files (string-append - (assoc-ref inputs "ant-bootstrap") - "/lib") - "\\.jar$")) - ":")) - ;; This directive is not supported by our simple bootstrap JDK. - (substitute* (find-files "." "\\.java$") - (("@Override") "")))) - (replace 'build - (lambda* (#:key inputs #:allow-other-keys) - ;; We can't compile these yet, but we don't need them at this - ;; point anyway. - (delete-file "org/eclipse/jdt/core/JDTCompilerAdapter.java") - (delete-file-recursively "org/eclipse/jdt/internal/antadapter") - - ;; Create a simple manifest to make ecj executable. - (mkdir-p "META-INF") - (with-output-to-file "META-INF/MANIFESTS.MF" - (lambda _ - (display "Manifest-Version: 1.0 -Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"))) - - ;; Compile it all! - (apply invoke "javac" - (find-files "." "\\.java$")) - - ;; Pack it all up! We don't use "jar" here, because - ;; it doesn't produce reproducible zip archives. - ;; XXX: copied from (gnu build install) - (for-each (lambda (file) - (let ((s (lstat file))) - (unless (eq? (stat:type s) 'symlink) - (utime file 0 0 0 0)))) - (find-files "." #:directories? #t)) - - ;; It is important that the manifest appears first. - (apply invoke "zip" "-0" "-X" "ecj-bootstrap.jar" - "META-INF/MANIFESTS.MF" - (delete "./META-INF/MANIFESTS.MF" - (find-files "." ".*" #:directories? #t))))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((share (string-append (assoc-ref outputs "out") - "/share/java/"))) - (mkdir-p share) - (install-file "ecj-bootstrap.jar" share))))))) - (native-inputs - (list ant-bootstrap classpath-devel ecj-javac-wrapper-final jamvm - unzip zip)) - (home-page "https://eclipse.org") - (synopsis "Eclipse Java development tools core batch compiler") - (description "This package provides the Eclipse Java core batch compiler -for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a -requirement for all GNU Classpath releases after version 0.93. This version -supports sufficient parts of Java 7 to build Icedtea 2.x.") - (license license:epl1.0))) - -(define ecj4-javac-wrapper - (package - (inherit ecj-javac-wrapper) - (native-inputs - (list guile-3.0 ecj4-bootstrap jamvm classpath-devel)))) - -(define jamvm-with-ecj4 - (package - (inherit jamvm) - (inputs - (modify-inputs (package-inputs jamvm) - (replace "ecj-javac-wrapper" ecj4-javac-wrapper))))) - (define-public icedtea-7 (let* ((version "2.6.13") (drop (lambda (name hash) @@ -1514,6 +845,8 @@ new Date();")) "jdk-drop" "langtools-drop" "hotspot-drop" "classpath" "ecj4-javac-wrapper" "jamvm" "fastjar"))))))) +(define-public icedtea icedtea-8) + (define-public openjdk9 (package (name "openjdk") @@ -2163,11 +1496,9 @@ blacklisted.certs.pem" ;;; Convenience alias to point to the latest version of OpenJDK. (define-public openjdk openjdk18) -(define-public icedtea icedtea-8) - (define-public ant/java8 - (package (inherit ant-bootstrap) + (package (name "ant") (version "1.10.10") (source (origin @@ -2183,8 +1514,169 @@ blacklisted.certs.pem" (for-each delete-file (find-files "lib/optional" "\\.jar$")) #t)))) + (build-system gnu-build-system) (arguments - (substitute-keyword-arguments (package-arguments ant-bootstrap) + (list + #:modules '((srfi srfi-1) + (guix build gnu-build-system) + (guix build utils)) + #:tests? #f ;no "check" target + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-scripts + ;; Remove bat / cmd scripts for DOS as well as the antRun and runant + ;; wrappers. + (lambda _ + (for-each delete-file + (find-files "src/script" + "(.*\\.(bat|cmd)|runant.*|antRun.*)")))) + (delete 'bootstrap) + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) + + ;; Disable tests to avoid dependency on hamcrest-core, which needs + ;; Ant to build. This is necessary in addition to disabling the + ;; "check" phase, because the dependency on "test-jar" would always + ;; result in the tests to be run. + (substitute* "build.xml" + (("depends=\"jars,test-jar") "depends=\"jars")) + (invoke "bash" "bootstrap.sh" + (string-append "-Ddist.dir=" #$output)))) + (add-after 'build 'strip-jar-timestamps ;based on ant-build-system + (lambda _ + (define (repack-archive jar) + (let* ((dir (mkdtemp "jar-contents.XXXXXX")) + (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) + (with-directory-excursion dir + (invoke "unzip" jar)) + (delete-file jar) + ;; XXX: copied from (gnu build install) + (for-each (lambda (file) + (let ((s (lstat file))) + (unless (eq? (stat:type s) 'symlink) + (utime file 0 0 0 0)))) + (find-files dir #:directories? #t)) + ;; It is important that the manifest appears first. + (with-directory-excursion dir + (let* ((files (find-files "." ".*" #:directories? #t)) + ;; To ensure that the reference scanner can + ;; detect all store references in the jars + ;; we disable compression with the "-0" option. + (command (if (file-exists? manifest) + `("zip" "-0" "-X" ,jar ,manifest + ,@files) + `("zip" "-0" "-X" ,jar ,@files)))) + (apply invoke command))))) + (for-each repack-archive + (find-files + (string-append #$output "/lib") + "\\.jar$")))) + (delete 'install)))) + (native-inputs + `(("jdk" ,icedtea-8 "jdk") + ("zip" ,zip) + ("unzip" ,unzip))) + (home-page "https://ant.apache.org") + (synopsis "Build tool for Java") + (description + "Ant is a platform-independent build tool for Java. It is similar to +make but is implemented using the Java language, requires the Java platform, +and is best suited to building Java projects. Ant uses XML to describe the +build process and its dependencies, whereas Make uses Makefile format.") + (license license:asl2.0))) + +;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series +;; requires Java 8. +(define-public ant + (package (inherit ant/java8) + (version "1.9.15") + (source (origin + (method url-fetch) + (uri (string-append "mirror://apache/ant/source/apache-ant-" + version "-src.tar.gz")) + (sha256 + (base32 + "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd")))) + ;; XXX: we do this to avoid a rebuild. This mess will be cleaned up + ;; later. + (arguments + (substitute-keyword-arguments + `(#:modules ((srfi srfi-1) + (guix build gnu-build-system) + (guix build utils)) + #:tests? #f ; no "check" target + #:phases + (modify-phases %standard-phases + (delete 'bootstrap) + (delete 'configure) + (add-before 'build 'define-java-environment-variables + (lambda* (#:key inputs #:allow-other-keys) + ;; First, set environment variables (eases debugging on -K). + (setenv "JAVA_HOME" (assoc-ref inputs "jamvm")) + (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm")) + (setenv "JAVAC" (search-input-file inputs "/bin/jikes")) + (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar")))) + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; Ant complains if this file doesn't exist. + (setenv "HOME" "/tmp") + (with-output-to-file "/tmp/.ant.properties" + (lambda _ (display ""))) + + ;; Use jikes instead of javac for tags in build.xml + (setenv "ANT_OPTS" "-Dbuild.compiler=jikes") + + ;; jikes produces lots of warnings, but they are not very + ;; interesting, so we silence them. + (setenv "$BOOTJAVAC_OPTS" "-nowarn") + + ;; Without these JamVM options the build may freeze. + (substitute* "bootstrap.sh" + (("^\"\\$\\{JAVACMD\\}\" " m) + ,@(if (string-prefix? "armhf" (or (%current-system) + (%current-target-system))) + `((string-append m "-Xnocompact ")) + `((string-append m "-Xnocompact -Xnoinlining "))))) + + ;; Disable tests because we are bootstrapping and thus don't have + ;; any of the dependencies required to build and run the tests. + (substitute* "build.xml" + (("depends=\"jars,test-jar\"") "depends=\"jars\"")) + (invoke "bash" "bootstrap.sh" + (string-append "-Ddist.dir=" + (assoc-ref outputs "out"))))) + (add-after 'build 'strip-jar-timestamps ;based on ant-build-system + (lambda* (#:key outputs #:allow-other-keys) + (define (repack-archive jar) + (let* ((dir (mkdtemp "jar-contents.XXXXXX")) + (manifest (string-append dir "/META-INF/MANIFESTS.MF"))) + (with-directory-excursion dir + (invoke "unzip" jar)) + (delete-file jar) + ;; XXX: copied from (gnu build install) + (for-each (lambda (file) + (let ((s (lstat file))) + (unless (eq? (stat:type s) 'symlink) + (utime file 0 0 0 0)))) + (find-files dir #:directories? #t)) + ;; It is important that the manifest appears first. + (with-directory-excursion dir + (let* ((files (find-files "." ".*" #:directories? #t)) + ;; To ensure that the reference scanner can + ;; detect all store references in the jars + ;; we disable compression with the "-0" option. + (command (if (file-exists? manifest) + `("zip" "-0" "-X" ,jar ,manifest + ,@files) + `("zip" "-0" "-X" ,jar ,@files)))) + (apply invoke command))))) + (for-each repack-archive + (find-files + (string-append (assoc-ref %outputs "out") "/lib") + "\\.jar$")))) + (delete 'install))) ((#:phases phases) `(modify-phases ,phases (delete 'define-java-environment-variables) @@ -2209,23 +1701,6 @@ blacklisted.certs.pem" (invoke "bash" "bootstrap.sh" (string-append "-Ddist.dir=" (assoc-ref outputs "out"))))))))) - (native-inputs - `(("jdk" ,icedtea-8 "jdk") - ("zip" ,zip) - ("unzip" ,unzip))))) - -;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series -;; requires Java 8. -(define-public ant - (package (inherit ant/java8) - (version "1.9.15") - (source (origin - (method url-fetch) - (uri (string-append "mirror://apache/ant/source/apache-ant-" - version "-src.tar.gz")) - (sha256 - (base32 - "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd")))) (native-inputs `(("jdk" ,icedtea-7 "jdk") ("zip" ,zip) -- cgit v1.2.3 From f2066829038e2943fb4726534c1daa621d14457e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:25:34 +0100 Subject: gnu: java-jgit-4.2: Do not build with icedtea-7. * gnu/packages/java.scm (java-jgit-4.2)[arguments]: Do not override JDK. --- gnu/packages/java.scm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 655f524f92..9c069f788f 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -13142,8 +13142,7 @@ Git version control system, providing repository access routines, support for network protocols, and core version control algorithms.") (license license:edl1.0))) -;; For axoloti. This package can still be built with icedtea-7, which is -;; currently used as the default JDK. +;; For axoloti. (define-public java-jgit-4.2 (package (inherit java-jgit) (version "4.2.0.201601211800-r") @@ -13159,8 +13158,6 @@ network protocols, and core version control algorithms.") (build-system ant-build-system) (arguments (substitute-keyword-arguments (package-arguments java-jgit) - ;; Build for default JDK. - ((#:jdk _) icedtea-7) ((#:phases phases) `(modify-phases ,phases (add-after 'unpack 'use-latest-javaewah-API -- cgit v1.2.3 From d977bb8d6bb996b8e51331f0af1b181d92c1b33b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:26:15 +0100 Subject: gnu: java-jgit-4.2: Remove trailing #T from build phase. * gnu/packages/java.scm (java-jgit-4.2)[arguments]: Remove trailing #T from build phase. --- gnu/packages/java.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 9c069f788f..6f357675f9 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -13163,8 +13163,7 @@ network protocols, and core version control algorithms.") (add-after 'unpack 'use-latest-javaewah-API (lambda _ (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java" - (("wordinbits") "WORD_IN_BITS")) - #t)))))) + (("wordinbits") "WORD_IN_BITS")))))))) (inputs (list java-javaewah java-jsch java-slf4j-api)))) -- cgit v1.2.3 From 84543eae0604176ff5fc2e1affa01ff24b7d4524 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:32:28 +0100 Subject: gnu: java-cisd-args4j: Remove trailing #T from build phase. * gnu/packages/java.scm (java-cisd-args4j)[arguments]: Remove trailing #T from build phase. --- gnu/packages/java.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 6f357675f9..49ec741997 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2553,8 +2553,7 @@ libraries from the SIS division at ETH Zurich like jHDF5.") (("\\$\\{version.number\\}") ,base-version) ;; Don't use custom ant tasks. (("recursive-jar") "jar") - ((" Date: Mon, 9 Jan 2023 00:33:02 +0100 Subject: gnu: java-cisd-args4j: Use later version of ECJ. * gnu/packages/java.scm (java-cisd-args4j)[native-inputs]: Replace java-ecj-3.5 with java-ecj. --- gnu/packages/java.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 49ec741997..469393a2f1 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2558,7 +2558,7 @@ libraries from the SIS division at ETH Zurich like jHDF5.") (inputs (list java-cisd-base)) (native-inputs - `(("ecj" ,java-ecj-3.5) + `(("ecj" ,java-ecj) ("build-resources" ,(origin (method svn-fetch) -- cgit v1.2.3 From 2703b6feef74b1b22eb2c2a2ceda612ad9c00ceb Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:33:39 +0100 Subject: gnu: java-cisd-args4j: Do not build with icedtea-7. * gnu/packages/java.scm (java-cisd-args4j)[arguments]: Do not override JDK. --- gnu/packages/java.scm | 4 ---- 1 file changed, 4 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 469393a2f1..226fb88d7b 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2493,10 +2493,6 @@ libraries from the SIS division at ETH Zurich like jHDF5.") (arguments `(#:make-flags '("-file" "build/build.xml") #:tests? #f ; there are no tests - ;; There are weird build failures with JDK8, such as: "The type - ;; java.io.ObjectInputStream cannot be resolved. It is indirectly - ;; referenced from required .class files" - #:jdk ,icedtea-7 #:modules ((guix build ant-build-system) (guix build utils) (guix build java-utils) -- cgit v1.2.3 From 649ea550e754d05825d7bc96e3034b165d04b305 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:34:41 +0100 Subject: gnu: Remove java-ecj-3.5. * gnu/packages/java.scm (java-ecj-3.5): Remove variable. --- gnu/packages/java.scm | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 226fb88d7b..2fad09750a 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2246,38 +2246,6 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" (description "This package provides the Eclipse Java core batch compiler.") (license license:epl1.0))) -;; This is needed for java-cisd-args4j -(define-public java-ecj-3.5 - (package (inherit java-ecj-3) - (version "3.5.1") - (source (origin - (method url-fetch/zipbomb) - (uri (string-append "http://archive.eclipse.org/eclipse/" - "downloads/drops/R-" version - "-200909170800/ecjsrc-" version ".zip")) - (sha256 - (base32 - "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7")))) - (build-system ant-build-system) - (arguments - `(#:tests? #f ; none included - #:jdk ,icedtea-7 ; doesn't build with JDK8+ - #:build-target "build" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-manifest - (lambda _ - ;; Record the main class to make ecj executable. - (with-atomic-file-replacement "META-INF/MANIFEST.MF" - (lambda (in out) - (dump-port in out) - (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" - out))) - #t)) - (replace 'install (install-jars "."))))) - (native-inputs - (list unzip)))) - (define-public java-ecj (package (inherit java-ecj-3) (version "4.6.3") -- cgit v1.2.3 From 3b62c2804c5ca8c02de00802619766fa8fdf6948 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:38:15 +0100 Subject: gnu: java-ecj: Do not inherit from java-ecj-3. * gnu/packages/java.scm (java-ecj): Do not inherit fields from java-ecj-3. [arguments]: Merge build phases 'fix-build.xml and 'fix-prop; remove trailing #T. --- gnu/packages/java.scm | 70 ++++++++++++++++++++++++--------------------------- 1 file changed, 33 insertions(+), 37 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 2fad09750a..7c35f146a7 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2247,43 +2247,39 @@ Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" (license license:epl1.0))) (define-public java-ecj - (package (inherit java-ecj-3) - (version "4.6.3") - (source - (origin - (method url-fetch) - (uri (string-append - "http://archive.eclipse.org/eclipse/downloads/drops4/R-" - version - "-201703010400/ecjsrc-" - version - ".jar")) - (sha256 - (base32 - "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl")))) - (arguments - `(#:tests? #f ; none included - #:build-target "build" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-build.xml - (lambda _ - (substitute* "src/build.xml" - (("^.*MANIFEST.*$") - "")) - #t)) - (add-after 'unpack 'fix-prop - (lambda _ - (substitute* "src/build.xml" - (("^.*properties.*$") - " - ")) - #t)) - (add-before 'build 'chdir - (lambda _ - (chdir "src") - #t)) - (replace 'install (install-jars "."))))))) + (package + (name "java-ecj") + (version "4.6.3") + (source + (origin + (method url-fetch) + (uri (string-append "http://archive.eclipse.org/eclipse/" + "downloads/drops4/R-" version "-201703010400/" + "ecjsrc-" version ".jar")) + (sha256 + (base32 + "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl")))) + (build-system ant-build-system) + (arguments + `(#:tests? #f ; none included + #:build-target "build" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-build.xml + (lambda _ + (substitute* "src/build.xml" + (("^.*MANIFEST.*$") + "") + (("^.*properties.*$") + " + ")))) + (add-before 'build 'chdir + (lambda _ (chdir "src"))) + (replace 'install (install-jars "."))))) + (home-page "https://eclipse.org") + (synopsis "Eclipse Java development tools core batch compiler") + (description "This package provides the Eclipse Java core batch compiler.") + (license license:epl1.0))) (define-public java-cisd-base (let ((revision 38938) -- cgit v1.2.3 From a4eb83fee76e5e3002d22441b09c1c833ff801e6 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:39:43 +0100 Subject: gnu: java-cisd-jhdf5: Remove trailing #T. * gnu/packages/java.scm (java-cisd-jhdf5)[source]: Remove trailing #T from snippet. [arguments]: Remove trailing #T from build phases. --- gnu/packages/java.scm | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 7c35f146a7..6595fb5ae4 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2565,8 +2565,7 @@ libraries from the SIS division at ETH Zurich like jHDF5.") ;; Delete included gradle jar (delete-file-recursively "gradle/wrapper") ;; Delete pre-built native libraries - (delete-file-recursively "libs") - #t)))) + (delete-file-recursively "libs"))))) (build-system ant-build-system) (arguments `(#:make-flags '("-file" "build/build.xml") @@ -2582,8 +2581,7 @@ libraries from the SIS division at ETH Zurich like jHDF5.") (lambda _ (substitute* "build/build.xml" (("\"jar-test\" depends=\"clean, ") - "\"jar-test\" depends=\"")) - #t)) + "\"jar-test\" depends=\"")))) (add-after 'unpack 'unpack-build-resources (lambda* (#:key inputs #:allow-other-keys) (copy-recursively (assoc-ref inputs "build-resources") @@ -2600,8 +2598,7 @@ libraries from the SIS division at ETH Zurich like jHDF5.") (("string revision)) - (("\\$\\{version.number\\}") ,base-version)) - #t)) + (("\\$\\{version.number\\}") ,base-version)))) (add-after 'unpack-build-resources 'fix-dependencies (lambda* (#:key inputs #:allow-other-keys) (substitute* "../build_resources/ant/build-common.xml" @@ -2651,8 +2648,7 @@ libraries from the SIS division at ETH Zurich like jHDF5.") ;; Remove leftovers from removing @Friend (substitute* "h5ar/HDF5ArchiverTest.java" (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)") - ""))) - #t)) + ""))))) (add-before 'configure 'build-native-library (lambda* (#:key inputs #:allow-other-keys) (let ((jdk (assoc-ref inputs "jdk")) @@ -2677,14 +2673,12 @@ libraries from the SIS division at ETH Zurich like jHDF5.") ,(string-append hdf5 "/lib/libhdf5.a") "-o" "libjhdf5.so" "-lz"))) (install-file "source/c/libjhdf5.so" - (string-append "libs/native/jhdf5/" dir)) - #t))) + (string-append "libs/native/jhdf5/" dir))))) ;; In the "check" phase we only build the test executable. (add-after 'check 'run-tests (lambda _ (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar") - (delete-file "targets/dist/sis-jhdf5-test.jar") - #t)) + (delete-file "targets/dist/sis-jhdf5-test.jar"))) (replace 'install (install-jars "targets/dist"))))) (inputs -- cgit v1.2.3 From 882baf4b7da4510af9113bb1b602da4793137013 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:40:19 +0100 Subject: gnu: java-cisd-jhdf5: Do not override default JDK. * gnu/packages/java.scm (java-cisd-jhdf5)[arguments]: Remove override for JDK. --- gnu/packages/java.scm | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 6595fb5ae4..c81b889431 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2571,7 +2571,6 @@ libraries from the SIS division at ETH Zurich like jHDF5.") `(#:make-flags '("-file" "build/build.xml") #:build-target "jar-all" #:test-target "jar-test" - #:jdk ,icedtea-8 #:phases (modify-phases %standard-phases ;; FIXME: this build phase fails. -- cgit v1.2.3 From f05d22847275f1d226a42dc044e31ba73e0a68c4 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:44:26 +0100 Subject: gnu: ant-apache-bcel: Fix inheritance by using gexp. * gnu/packages/java.scm (ant-apache-bcel)[arguments]: Use gexp; also remove trailing #T from build phases. --- gnu/packages/java.scm | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index c81b889431..0124491fa6 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1713,27 +1713,24 @@ build process and its dependencies, whereas Make uses Makefile format.") (arguments (substitute-keyword-arguments (package-arguments ant/java8) ((#:phases phases) - `(modify-phases ,phases - (add-after 'unpack 'link-bcel - (lambda* (#:key inputs #:allow-other-keys) - (for-each (lambda (file) - (symlink file - (string-append "lib/optional/" - (basename file)))) - (find-files (assoc-ref inputs "java-commons-bcel") - "\\.jar$")) - #t)) - (add-after 'build 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (share (string-append out "/share/java")) - (bin (string-append out "/bin")) - (lib (string-append out "/lib"))) - (mkdir-p share) - (install-file (string-append lib "/ant-apache-bcel.jar") share) - (delete-file-recursively bin) - (delete-file-recursively lib) - #t))))))) + #~(modify-phases #$phases + (add-after 'unpack 'link-bcel + (lambda* (#:key inputs #:allow-other-keys) + (for-each (lambda (file) + (symlink file + (string-append "lib/optional/" + (basename file)))) + (find-files (assoc-ref inputs "java-commons-bcel") + "\\.jar$")))) + (add-after 'build 'install + (lambda _ + (let ((share (string-append #$output "/share/java")) + (bin (string-append #$output "/bin")) + (lib (string-append #$output "/lib"))) + (mkdir-p share) + (install-file (string-append lib "/ant-apache-bcel.jar") share) + (delete-file-recursively bin) + (delete-file-recursively lib)))))))) (inputs (modify-inputs (package-inputs ant/java8) (prepend java-commons-bcel))))) -- cgit v1.2.3 From 9e14a7b4d20c98b78789975d0232f8f0524b9d8a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:45:06 +0100 Subject: gnu: ant-junit: Fix inheritance by using gexp. * gnu/packages/java.scm (ant-junit)[arguments]: Use gexp; also remove trailing #T from build phases. --- gnu/packages/java.scm | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 0124491fa6..775840d026 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1742,27 +1742,24 @@ build process and its dependencies, whereas Make uses Makefile format.") (arguments (substitute-keyword-arguments (package-arguments ant/java8) ((#:phases phases) - `(modify-phases ,phases - (add-after 'unpack 'link-junit - (lambda* (#:key inputs #:allow-other-keys) - (for-each (lambda (file) - (symlink file - (string-append "lib/optional/" - (basename file)))) - (find-files (assoc-ref inputs "java-junit") - "\\.jar$")) - #t)) - (add-after 'build 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (share (string-append out "/share/java")) - (bin (string-append out "/bin")) - (lib (string-append out "/lib"))) - (mkdir-p share) - (install-file (string-append lib "/ant-junit.jar") share) - (delete-file-recursively bin) - (delete-file-recursively lib) - #t))))))) + #~(modify-phases #$phases + (add-after 'unpack 'link-junit + (lambda* (#:key inputs #:allow-other-keys) + (for-each (lambda (file) + (symlink file + (string-append "lib/optional/" + (basename file)))) + (find-files (assoc-ref inputs "java-junit") + "\\.jar$")))) + (add-after 'build 'install + (lambda _ + (let ((share (string-append #$output "/share/java")) + (bin (string-append #$output "/bin")) + (lib (string-append #$output "/lib"))) + (mkdir-p share) + (install-file (string-append lib "/ant-junit.jar") share) + (delete-file-recursively bin) + (delete-file-recursively lib)))))))) (inputs (modify-inputs (package-inputs ant/java8) (prepend java-junit))))) -- cgit v1.2.3 From 2463e9f1fe10a1d7e02dff76f200da69cd3f24d1 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 9 Jan 2023 00:50:29 +0100 Subject: gnu: Remove java-ecj-3. * gnu/packages/java.scm (java-ecj-3): Remove variable. --- gnu/packages/java.scm | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 775840d026..a2650b1826 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -2204,42 +2204,6 @@ debugging, etc.") (native-inputs (list javacc-4)))) -;; This is the last 3.x release of ECJ -(define-public java-ecj-3 - (package - (name "java-ecj") - (version "3.8.2") - (source (origin - (method url-fetch) - (uri (string-append "http://archive.eclipse.org/eclipse/" - "downloads/drops/R-" version - "-201301310800/ecjsrc-" version ".jar")) - (sha256 - (base32 - "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04")))) - (build-system ant-build-system) - (arguments - `(#:tests? #f ; none included - #:jdk ,icedtea-7 ; doesn't build with JDK8+ - #:make-flags (list "-f" "src/build.xml") - #:build-target "build" - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-manifest - (lambda _ - ;; Record the main class to make ecj executable. - (with-atomic-file-replacement "src/META-INF/MANIFEST.MF" - (lambda (in out) - (display "Manifest-Version: 1.0 -Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n" - out))) - #t)) - (replace 'install (install-jars "."))))) - (home-page "https://eclipse.org") - (synopsis "Eclipse Java development tools core batch compiler") - (description "This package provides the Eclipse Java core batch compiler.") - (license license:epl1.0))) - (define-public java-ecj (package (name "java-ecj") -- cgit v1.2.3 From 1f1c769c11fcbe97dbf2df3b2b726532ff0f8f4a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 14 Jan 2023 23:35:23 +0100 Subject: gnu: java-logback-core: Drop input labels. * gnu/packages/java.scm (java-logback-core)[inputs]: Drop labels. [native-inputs]: Drop labels. --- gnu/packages/java.scm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index a2650b1826..19bfc9b7dc 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -12947,18 +12947,18 @@ static code analysis or code manipulation."))) (chdir "logback-core") #t))))) (inputs - `(("java-javax-mail" ,java-javax-mail) - ("servlet" ,java-javaee-servletapi) - ("java-commons-compiler" ,java-commons-compiler) - ("java-janino" ,java-janino))) + (list java-javax-mail + java-javaee-servletapi + java-commons-compiler + java-janino)) (native-inputs - `(("java-junit" ,java-junit) - ("java-hamcrest-core" ,java-hamcrest-core) - ("java-mockito-1" ,java-mockito-1) - ("java-cglib" ,java-cglib) - ("java-asm" ,java-asm) - ("java-objenesis" ,java-objenesis) - ("java-joda-time" ,java-joda-time))) + (list java-junit + java-hamcrest-core + java-mockito-1 + java-cglib + java-asm + java-objenesis + java-joda-time)) (home-page "https://logback.qos.ch") (synopsis "Logging for java") (description "Logback is intended as a successor to the popular log4j project. -- cgit v1.2.3 From acc5725902f7b80479a18cb2bf926ee26c33e02c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 14 Jan 2023 23:35:39 +0100 Subject: gnu: java-logback-core: Fetch source from git. * gnu/packages/java.scm (java-logback-core)[source]: Fetch with git instead of using generated tarball at archive URL; simplify snippet. --- gnu/packages/java.scm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 19bfc9b7dc..6c6a9411a6 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, 2020, 2021 Ricardo Wurmus +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2023 Ricardo Wurmus ;;; Copyright © 2016 Leo Famulari ;;; Copyright © 2016, 2017 Roel Janssen ;;; Copyright © 2017, 2019, 2021 Carlo Zancanaro @@ -12914,18 +12914,17 @@ static code analysis or code manipulation."))) (name "java-logback-core") (version "1.2.3") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/qos-ch/logback/archive/v_" - version ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/qos-ch/logback/") + (commit (string-append "v_" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi")) + "055jbfpg3l5qw7pw2snkdag0gjkb4vcxfg9110cqqyc40k2nd17z")) (modules '((guix build utils))) (snippet - '(begin - (delete-file-recursively "logback-access/lib") - #t)))) + '(delete-file-recursively "logback-access/lib")))) (build-system ant-build-system) (arguments `(#:jar-name "logback.jar" -- cgit v1.2.3 From c94708a5b4820c9253ef5774a1022fc106e7ae9a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 14 Jan 2023 23:36:30 +0100 Subject: gnu: java-logback-core: Drop trailing #T. * gnu/packages/java.scm (java-logback-core)[arguments]: Drop trailing #T from 'chdir phase. --- gnu/packages/java.scm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 6c6a9411a6..0d0f3129bc 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -12942,9 +12942,7 @@ static code analysis or code manipulation."))) #:phases (modify-phases %standard-phases (add-before 'configure 'chdir - (lambda _ - (chdir "logback-core") - #t))))) + (lambda _ (chdir "logback-core")))))) (inputs (list java-javax-mail java-javaee-servletapi -- cgit v1.2.3 From e4db832a0ec8e3d9d4f01843e4bb7d92c458199e Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Mon, 12 Dec 2022 21:19:38 +0000 Subject: gnu: openjdk: Update to 19. * gnu/packages/java.scm (openjdk): Update to 19. (openjdk19): New variable. Signed-off-by: Efraim Flashner --- gnu/packages/java.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 0d0f3129bc..15a4e62de1 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -1493,8 +1493,25 @@ blacklisted.certs.pem" (make-openjdk openjdk17 "18.0.2" "1yimfdkwpinhg5cf1mcrzk9xvjwnray3cx762kypb9jcwbranjwx")) +(define-public openjdk19 + (make-openjdk openjdk18 "19.0.1" + "0kyalb391znw6idmfn3dsx6c2mal1hl63f0bwa4mlnsxfl380bi1" + (arguments + (substitute-keyword-arguments (package-arguments openjdk18) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'fix-java-shebangs + (lambda _ + ;; Update file path. + (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem" + (("^#!.*") "#! java BlockedCertsConverter SHA-256\n")))) + (add-before 'configure 'define-java-environment-variables + (lambda* (#:key inputs #:allow-other-keys) + ;; Fix for "valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z". + (setenv "SOURCE_DATE_EPOCH" "1234567890"))))))))) + ;;; Convenience alias to point to the latest version of OpenJDK. -(define-public openjdk openjdk18) +(define-public openjdk openjdk19) (define-public ant/java8 -- cgit v1.2.3 From 0d169401cbc9e1a418290d4d6cb03dac8babcde3 Mon Sep 17 00:00:00 2001 From: Arne Babenhauserheide Date: Thu, 19 Jan 2023 20:53:37 +0100 Subject: gnu: java-logback-classic: Fix build. * gnu/packages/java.scm (java-logback-classic)[arguments]: Use input name "java-javaee-servletapi" instead of "servlet". Signed-off-by: Ricardo Wurmus --- gnu/packages/java.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 15a4e62de1..e55684d2a3 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -13006,7 +13006,7 @@ This module lays the groundwork for the other two modules.") (find-files (assoc-ref inputs input) ".*.jar")) '("java-logback-core" "java-slf4j-api" - "java-commons-compiler" "servlet" + "java-commons-compiler" "java-javaee-servletapi" "groovy"))) ":")) (apply invoke "groovyc" "-d" "build/classes" "-j" -- cgit v1.2.3