;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+;;; Copyright © 2019, 2020, 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
"01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
(modules '((guix build utils)))
(snippet
- `(begin
- (for-each delete-file
- (find-files "." ".*.(bin|exe|jar)$"))
- #t))))
+ `(begin
+ (for-each delete-file
+ (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
(build-system gnu-build-system)
(outputs '("out" "jdk" "doc"))
(arguments
(number->string (parallel-job-count))))
'())
,@make-flags))))
+ (add-after 'unpack 'patch-jni-libs
+ ;; Hardcode dynamically loaded libraries.
+ (lambda _
+ (let* ((library-path (search-path-as-string->list
+ (getenv "LIBRARY_PATH")))
+ (find-library (lambda (name)
+ (search-path
+ library-path
+ (string-append "lib" name ".so")))))
+ (for-each
+ (lambda (file)
+ (catch 'decoding-error
+ (lambda ()
+ (substitute* file
+ (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
+ _ name version)
+ (format #f "\"~a\"" (find-library name)))
+ (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
+ (format #f "\"~a\"" (find-library name)))))
+ (lambda _
+ ;; Those are safe to skip.
+ (format (current-error-port)
+ "warning: failed to substitute: ~a~%"
+ file))))
+ (find-files "."
+ "\\.c$|\\.h$"))
+ #t)))
;; Some of the libraries in the lib/ folder link to libjvm.so.
;; But that shared object is located in the server/ folder, so it
;; cannot be found. This phase creates a symbolic link in the
(add-after 'install 'install-libjvm
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((lib-out (string-append (assoc-ref outputs "out")
- "/lib"))
+ "/lib"))
(lib-jdk (string-append (assoc-ref outputs "jdk")
- "/lib")))
+ "/lib")))
(symlink (string-append lib-jdk "/server/libjvm.so")
(string-append lib-jdk "/libjvm.so"))
(symlink (string-append lib-out "/server/libjvm.so")
(unless (eq? (stat:type s) 'symlink)
(format #t "reset ~a~%" file)
(utime file 0 0 0 0))))
- (find-files dir #:directories? #t))
+ (find-files dir #:directories? #t))
(with-directory-excursion dir
(let ((files (find-files "." ".*" #:directories? #t)))
(apply invoke "zip" "-0" "-X" zip files)))))
- (find-files (assoc-ref outputs "doc") ".*.zip$"))
+ (find-files (assoc-ref outputs "doc") ".*.zip$"))
#t)))))
(inputs
`(("alsa-lib" ,alsa-lib)
"openjdk-10-idlj-reproducibility.patch"))
(modules '((guix build utils)))
(snippet
- `(begin
- (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
- #t))))
+ `(begin
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
(arguments
- (substitute-keyword-arguments (package-arguments openjdk9)
- ((#:phases phases)
- `(modify-phases ,phases
- (replace 'fix-java-shebangs
- (lambda _
- ;; This file was "fixed" by patch-source-shebangs, but it requires
- ;; this exact first line.
- (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
- (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
- #t))
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (invoke "bash" "./configure"
- (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
- "--disable-freetype-bundling"
- "--disable-warnings-as-errors"
- "--disable-hotspot-gtest"
- "--with-giflib=system"
- "--with-libjpeg=system"
- "--with-native-debug-symbols=zipped"
- (string-append "--prefix=" (assoc-ref outputs "out")))
- #t))))))
+ (substitute-keyword-arguments (package-arguments openjdk9)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'fix-java-shebangs
+ (lambda _
+ ;; This file was "fixed" by patch-source-shebangs, but it requires
+ ;; this exact first line.
+ (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
+ (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
+ #t))
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (invoke "bash" "./configure"
+ (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
+ "--disable-freetype-bundling"
+ "--disable-warnings-as-errors"
+ "--disable-hotspot-gtest"
+ "--with-giflib=system"
+ "--with-libjpeg=system"
+ "--with-native-debug-symbols=zipped"
+ (string-append "--prefix=" (assoc-ref outputs "out")))
+ #t))))))
(native-inputs
`(("openjdk9" ,openjdk9)
("openjdk9:jdk" ,openjdk9 "jdk")
"0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
(modules '((guix build utils)))
(snippet
- `(begin
- (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
- #t))))
+ `(begin
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
(build-system gnu-build-system)
(outputs '("out" "jdk" "doc"))
(arguments
- `(#:imported-modules
- ((guix build syscalls)
- (ice-9 binary-ports)
- (rnrs bytevectors)
- ,@%gnu-build-system-modules)
+ `(#:imported-modules ((guix build syscalls)
+ ,@%gnu-build-system-modules)
#:tests? #f; requires jtreg
;; TODO package jtreg
#:configure-flags
(substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
(("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
#t))
+ (add-after 'unpack 'patch-jni-libs
+ ;; Hardcode dynamically loaded libraries.
+ (lambda _
+ (let* ((library-path (search-path-as-string->list
+ (getenv "LIBRARY_PATH")))
+ (find-library (lambda (name)
+ (search-path
+ library-path
+ (string-append "lib" name ".so")))))
+ (for-each
+ (lambda (file)
+ (catch 'decoding-error
+ (lambda ()
+ (substitute* file
+ (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
+ _ name version)
+ (format #f "\"~a\"" (find-library name)))
+ (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
+ (format #f "\"~a\"" (find-library name)))))
+ (lambda _
+ ;; Those are safe to skip.
+ (format (current-error-port)
+ "warning: failed to substitute: ~a~%"
+ file))))
+ (find-files "."
+ "\\.c$|\\.h$"))
+ #t)))
(add-before 'build 'write-source-revision-file
(lambda _
(with-output-to-file ".src-rev"
(add-after 'install 'install-libjvm
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((lib-out (string-append (assoc-ref outputs "out")
- "/lib"))
+ "/lib"))
(lib-jdk (string-append (assoc-ref outputs "jdk")
- "/lib")))
+ "/lib")))
(symlink (string-append lib-jdk "/server/libjvm.so")
(string-append lib-jdk "/libjvm.so"))
(symlink (string-append lib-out "/server/libjvm.so")
(for-each (lambda (file)
(substitute* file
(((string-append "This file was generated "
- "AUTOMATICALLY from a template "
- "file.*"))
+ "AUTOMATICALLY from a template "
+ "file.*"))
(string-append "This file was generated "
"AUTOMATICALLY from a template "
"file"))))
(ice-9 binary-ports)
(rnrs bytevectors))
(letrec ((repack-archive
- (lambda (archive)
- (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
- (with-directory-excursion dir
- (invoke "unzip" archive))
- (delete-file archive)
- (for-each (compose repack-archive canonicalize-path)
- (find-files dir "(ct.sym|.*.jar)$"))
- (let ((reset-file-timestamp
- (lambda (file)
- (let ((s (lstat file)))
- (unless (eq? (stat:type s) 'symlink)
- (format #t "reset ~a~%" file)
- (utime file 0 0 0 0))))))
- (for-each reset-file-timestamp
- (find-files dir #:directories? #t)))
- (with-directory-excursion dir
- (let ((files (find-files "." ".*" #:directories? #t)))
- (apply invoke "zip" "-0" "-X" archive files)))))))
+ (lambda (archive)
+ (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
+ (with-directory-excursion dir
+ (invoke "unzip" archive))
+ (delete-file archive)
+ (for-each (compose repack-archive canonicalize-path)
+ (find-files dir "(ct.sym|.*.jar)$"))
+ (let ((reset-file-timestamp
+ (lambda (file)
+ (let ((s (lstat file)))
+ (unless (eq? (stat:type s) 'symlink)
+ (format #t "reset ~a~%" file)
+ (utime file 0 0 0 0))))))
+ (for-each reset-file-timestamp
+ (find-files dir #:directories? #t)))
+ (with-directory-excursion dir
+ (let ((files (find-files "." ".*" #:directories? #t)))
+ (apply invoke "zip" "-0" "-X" archive files)))))))
(for-each repack-archive
(find-files (assoc-ref outputs "doc") ".*.zip$"))
(for-each repack-archive
(content-length
(- (stat:size (stat file))
header-length)))
- (sendfile temp-file file content-length header-length)
- (delete-file file-name)
- (close-port temp-file)
- (repack-archive (canonicalize-path temp-filename))
- (call-with-output-file file-name
- (lambda (file)
- (put-bytevector file header)
- (call-with-input-file temp-filename
- (lambda (temp-file)
- (sendfile
- file temp-file
- (stat:size (stat temp-file)) 0)))))))))))))
+ (sendfile temp-file file content-length header-length)
+ (delete-file file-name)
+ (close-port temp-file)
+ (repack-archive (canonicalize-path temp-filename))
+ (call-with-output-file file-name
+ (lambda (file)
+ (put-bytevector file header)
+ (call-with-input-file temp-filename
+ (lambda (temp-file)
+ (sendfile
+ file temp-file
+ (stat:size (stat temp-file)) 0)))))))))))))
(for-each repack-jmod
(find-files (assoc-ref outputs "jdk") ".*.jmod$")))
- #t)))
+ #t)))
(add-after 'install 'remove-timestamp-from-api-summary
(lambda* (#:key outputs #:allow-other-keys)
(substitute* (string-append (assoc-ref outputs "doc")
(name "openjdk")
(version "13.0")
(source (origin
- (method url-fetch)
- (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
- (file-name (string-append name "-" version ".tar.bz2"))
- (sha256
- (base32
- "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
- (modules '((guix build utils)))
- (snippet
- `(begin
- (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
- #t))))
+ (method url-fetch)
+ (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
+ (file-name (string-append name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
(inputs
`(("alsa-lib" ,alsa-lib)
("cups" ,cups)
(name "openjdk")
(version "14.0")
(source (origin
- (method url-fetch)
- (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
- (file-name (string-append name "-" version ".tar.bz2"))
- (sha256
- (base32
- "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
- (modules '((guix build utils)))
- (snippet
- `(begin
+ (method url-fetch)
+ (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
+ (file-name (string-append name "-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
;; The m4 macro uses 'help' to search for builtins, which is
;; not available in bash-minimal
(substitute* "make/autoconf/basics.m4"
(("if help") "if command -v"))
- (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
- #t))))
+ (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
+ #t))))
(inputs
`(("alsa-lib" ,alsa-lib)
("cups" ,cups)
(define-public ant/java8
(package (inherit ant-bootstrap)
(name "ant")
- (version "1.10.8")
+ (version "1.10.9")
(source (origin
(method url-fetch)
(uri (string-append "mirror://apache/ant/source/apache-ant-"
version "-src.tar.gz"))
(sha256
(base32
- "066k2isig5xm70cihj9p73hkp5w7h5zbfqz5kxb6cwr9cb86xl2k"))
+ "0x78434q5ab193ma7ys27m9kwpdgrfzqj00hrf1szwcgk0lzw01z"))
(modules '((guix build utils)))
(snippet
'(begin
`(#:jar-name "java-openjfx-graphics.jar"
#:source-dir "modules/graphics/src/main/java"
#:tests? #f; require X
- #:test-dir "modules/graphics/src/test"))
+ #:test-dir "modules/graphics/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'copy-missing-file
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
+ (copy-file (assoc-ref inputs "JNativeSurface.c") target)
+ ;; XXX: looks like the missing file we found isn't *quite*
+ ;; compatible...
+ (substitute* target
+ (("case TYPE_INT_ARGB:") "")))))
+ (add-after 'build 'build-native
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((jdk (assoc-ref inputs "jdk"))
+ (class-file->class-name
+ (lambda (class-file)
+ (string-map (lambda (c)
+ (if (char=? c #\/) #\. c))
+ (string-drop-right class-file
+ (string-length ".class"))))))
+ (setenv "CPPFLAGS"
+ (string-append "-DINLINE=inline "
+ "-DLINUX "
+ "-I" jdk "/include "
+ "-I" jdk "/include/linux "
+ "-I " (getcwd) "/build/classes/include "
+ "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
+
+ ;; Instructions have been adapted from buildSrc/linux.gradle
+ (with-directory-excursion "build/classes"
+ ;; Build prism
+ (mkdir-p "include")
+
+ ;; Generate headers for prism
+ (apply invoke "javah" "-d" "include" "-cp" "."
+ (map class-file->class-name
+ (append (find-files "com/sun/prism/impl" "\\.class$")
+ (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
+
+ ;; ...then for prism_sw
+ (apply invoke "javah" "-d" "include" "-cp" "."
+ (map class-file->class-name
+ (find-files "com/sun/pisces" "\\.class$")))
+
+ ;; ...and for prism_es2
+ (apply invoke "javah" "-d" "include" "-cp" "."
+ (map class-file->class-name
+ (find-files "com/sun/prism/es2" "\\.class$")))))
+
+ (with-directory-excursion "netbeans/native-prism"
+ (invoke "make" "CONF=Release"))
+ (with-directory-excursion "netbeans/native-prism-sw"
+ (invoke "make" "CONF=Release"))
+ ;; TODO: This fails due to unknown EGL procedure names
+ #;
+ (with-directory-excursion "netbeans/native-prism-es2"
+ (invoke "make" "CONF=Release"))
+
+ (let* ((out (assoc-ref outputs "out"))
+ (dir ,(match (%current-system)
+ ("i686-linux"
+ "i386")
+ ((or "armhf-linux" "aarch64-linux")
+ "arm")
+ ((or "x86_64-linux")
+ "amd64")
+ (_ "unknown")))
+ (target (string-append out "/share/" dir "/")))
+ (mkdir-p target)
+ (for-each (lambda (file)
+ (let ((new-name
+ (string-append "lib"
+ (string-map
+ (lambda (c)
+ (if (char=? c #\-) #\_ c))
+ (string-drop (basename file)
+ (string-length "libnative-"))))))
+ (copy-file file
+ (string-append target new-name))))
+ (find-files "netbeans" "\\.so$"))))))))
(propagated-inputs
`(("java-openjfx-base" ,java-openjfx-base)
("java-swt" ,java-swt)))
+ ;; XXX: for unknown reasons
+ ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
+ ;; in this revision.
+ (native-inputs
+ `(("JNativeSurface.c"
+ ,(origin
+ (method url-fetch)
+ (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
+/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
+ (sha256
+ (base32
+ "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
(description "OpenJFX is a client application platform for desktop,
mobile and embedded systems built on Java. Its goal is to produce a
modern, efficient, and fully featured toolkit for developing rich client
applications. This package contains media-related classes for the
OpenJFX distribution.")))
+(define-public java-openjfx-controls
+ (package (inherit java-openjfx-build)
+ (name "java-openjfx-controls")
+ (propagated-inputs
+ `(("java-openjxf-graphics" ,java-openjfx-graphics)))
+ (arguments
+ `(#:jar-name "java-openjfx-controls.jar"
+ #:source-dir "modules/controls/src/main/java"
+ #:test-dir "modules/controls/src/test"
+ ;; TODO: tests require com.sun.javafx.pgstub,
+ ;; javafx.collections.MockSetObserver, and
+ ;; com.sun.javafx.binding.ExpressionHelperUtility
+ #:tests? #false
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'copy-resources
+ (lambda _
+ (copy-recursively "modules/controls/src/test/resources"
+ "build/test-classes")
+ (copy-recursively "modules/controls/src/main/resources"
+ "build/classes"))))))
+ (description "OpenJFX is a client application platform for desktop,
+mobile and embedded systems built on Java. Its goal is to produce a
+modern, efficient, and fully featured toolkit for developing rich client
+applications. This package contains UI control classes for the
+OpenJFX distribution.")))
+
(define-public javacc-4
(package
(name "javacc")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/javacc/javacc.git")
+ (url "https://github.com/javacc/javacc")
(commit "release_32")))
(file-name (string-append "javacc-" version "-checkout"))
(sha256
("java-cisd-args4j" ,java-cisd-args4j)
("java-commons-lang" ,java-commons-lang)
("java-commons-io" ,java-commons-io)
- ("hdf5" ,hdf5)
+ ("hdf5" ,hdf5-1.8)
("zlib" ,zlib)))
(native-inputs
`(("jdk" ,icedtea-8)
(copy-recursively "runtime/Java/src/main/dot"
"build/classes")
#t)))))
- (home-page "https://antlr.org")
+ (home-page "https://www.antlr.org")
(synopsis "ANTLR runtime library")
(description "This package contains the runtime library used with generated
sources by ANTLR.")
`(("junit" ,java-junit)
("hamcrest" ,java-hamcrest-core)))
(home-page "https://github.com/FasterXML/jackson-core")
- (synopsis "")
- (description "")
+ (synopsis "Low-level streaming parser and generator abstractions")
+ (description "This package contains core low-level incremental
+(streaming) parser and generator abstractions used by the Jackson Data
+Processor. It also includes the default implementation of handler types
+(parser, generator) that handle JSON format.")
(license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
(define-public java-fasterxml-jackson-databind
(name "java-woodstox-core")
(version "5.0.3")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
- "woodstox-core-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FasterXML/woodstox")
+ (commit (string-append "woodstox-core-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
+ "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "woodstox.jar"
(name "java-fasterxml-jackson-dataformat-xml")
(version "2.9.4")
(source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/FasterXML/"
- "jackson-dataformat-xml/archive/"
- "jackson-dataformat-xml-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FasterXML/jackson-dataformat-xml")
+ (commit (string-append "jackson-dataformat-xml-" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
+ "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "jackson-dataformat-xml.jar"
(define-public java-bouncycastle
(package
(name "java-bouncycastle")
- (version "1.60")
+ (version "1.67")
(source (origin
(method git-fetch)
(uri (git-reference
(file-name (git-file-name name version))
(sha256
(base32
- "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
+ "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
(modules '((guix build utils)))
(snippet
'(begin
(define-public abcl
(package
(name "abcl")
- (version "1.6.0")
+ (version "1.8.0")
(source
(origin
(method url-fetch)
version "/abcl-src-" version ".tar.gz"))
(sha256
(base32
- "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
+ "0zr5mmqyj484vza089l8vc88d07g0m8ymxzglvar3ydwyvi1x1qx"))
(patches
(search-patches
"abcl-fix-build-xml.patch"))))
library and the API is similar.")
(license license:bsd-3)))
+(define-public java-args4j
+ (package
+ (name "java-args4j")
+ (version "2.33")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kohsuke/args4j")
+ (commit (string-append "args4j-site-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "args4j.jar"
+ #:source-dir "args4j/src"
+ #:test-dir "args4j/test"
+ #:test-exclude
+ (list "**/ExampleTest.*"
+ "**/ExternalConfiguredTest.*" ; fails to find a file
+ ;; We still don't want to run abstract classes
+ "**/Abstract*.*")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'fix-test-dir
+ (lambda _
+ (substitute* "build.xml"
+ (("/java\">") "\">"))
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
+ (to-prefix "build/classes/org/kohsuke/args4j/"))
+ (for-each (lambda (f)
+ (install-file
+ (string-append from-prefix f)
+ (string-append to-prefix (dirname f))))
+ (list "Messages.properties"
+ "Messages_de.properties"
+ "Messages_en.properties"
+ "Messages_ru.properties"
+ "spi/Messages.properties"
+ "spi/Messages_de.properties"
+ "spi/Messages_en.properties"
+ "spi/Messages_ru.properties")))
+ #t)))))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (home-page "https://args4j.kohsuke.org/")
+ (synopsis "Command line parser library")
+ (description "Args4j is a small Java class library that makes it easy to
+parse command line options/arguments in your CUI application.")
+ (license license:expat)))
+
(define-public java-metadata-extractor
(package
(name "java-metadata-extractor")