;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
-;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
#:use-module (gnu packages gnuzilla) ;nss
#:use-module (gnu packages ghostscript) ;lcms
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages groovy)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux) ;alsa
#:use-module (gnu packages maths)
+ #:use-module (gnu packages onc-rpc)
#:use-module (gnu packages web)
#:use-module (gnu packages wget)
#:use-module (gnu packages pkg-config)
;;;
;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
-;; use it to build the SableVM standard library and virtual machine, which are
-;; written in a simpler dialect of Java and C, respectively. 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.
+;; 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 of GNU Classpath (0.99).
-;; Classpath (> 0.98) is a requirement for JamVM, a more modern implementation
-;; of the Java virtual machine.
-;;
-;; With JamVM we can build the latest development version of GNU Classpath,
-;; which has much more support for Java 1.6 than the latest release. Since
-;; the previous build of JamVM is limited by the use of GNU Classpath 0.99 we
-;; rebuild it with the latest development version of GNU Classpath.
-;;
-;; Finally, we use the bootstrap toolchain to build the OpenJDK with the
-;; Icedtea 1.x build framework. We then build the more recent JDKs Icedtea
-;; 2.x and Icedtea 3.x.
+;; 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 1.x
+;; build framework. We then build the more recent JDKs Icedtea 2.x and
+;; Icedtea 3.x.
(define jikes
(package
and binary format defined in The Java Virtual Machine Specification.")
(license license:ibmpl1.0)))
-(define sablevm-classpath
+;; This is the last version of GNU Classpath that can be built without ECJ.
+(define classpath-bootstrap
(package
- (name "sablevm-classpath")
- (version "1.13")
+ (name "classpath")
+ (version "0.93")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
- version "/sablevm-classpath-" version ".tar.gz"))
+ (uri (string-append "mirror://gnu/classpath/classpath-"
+ version ".tar.gz"))
(sha256
(base32
- "1qyhyfz8idghxdam16hdgpa24r2x4xbg9z8c8asa3chnd79h3zw2"))))
+ "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
+ (patches (search-patches "classpath-aarch64-support.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
- (list "--with-jikes"
+ (list (string-append "JAVAC="
+ (assoc-ref %build-inputs "jikes")
+ "/bin/jikes")
"--disable-Werror"
"--disable-gmp"
"--disable-gtk-peer"
+ "--disable-gconf-peer"
"--disable-plugin"
"--disable-dssi"
"--disable-alsa"
- "--disable-gjdoc")))
- (inputs
- `(("gconf" ,gconf)
- ("gtk+" ,gtk+-2)))
+ "--disable-gjdoc")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'install-data
+ (lambda _ (zero? (system* "make" "install-data")))))))
(native-inputs
`(("jikes" ,jikes)
("fastjar" ,fastjar)
+ ("libltdl" ,libltdl)
("pkg-config" ,pkg-config)))
- (home-page "http://sablevm.org/")
- (synopsis "Java Virtual Machine")
- (description "SableVM is a clean-room, highly portable and efficient Java
-virtual machine. Its goals are to be reasonably small, fast, and compliant
-with the various specifications (JVM specification, JNI, invocation interface,
-etc.). SableVM is no longer maintained.
-
-This package provides the classpath library.")
- (license license:lgpl2.1+)))
+ (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+)))
-(define sablevm
+;; 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 "sablevm")
- (version "1.13")
+ (name "jamvm")
+ (version "1.5.1")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://sourceforge/sablevm/sablevm/"
- version "/sablevm-" version ".tar.gz"))
+ (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
+ "JamVM%20" version "/jamvm-"
+ version ".tar.gz"))
(sha256
(base32
- "1jyg4bsym6igz94wps5443c7wiwlzinqzkchcw972nz4kf1cql6g"))))
+ "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
- (list "--with-threading=switch" ; slower but prevents segfault
- "--with-internal-libffi=no"
- "--with-internal-libpopt=no")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'remove-timestamp-for-reproducibility
- (lambda _
- (substitute* "src/sablevm/Makefile.in"
- (("\\$\\(SVMCOMPILETIME\\)") "(unknown)"))
- #t))
- (add-after 'unpack 'link-with-popt
- (lambda _
- (substitute* "src/sablevm/Makefile.in"
- (("\\$\\(SVMADD\\)" match)
- (string-append match " -lpopt")))
- #t))
- (add-after 'unpack 'patch-path-to-classpath
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "Makefile.in"
- (("@datadir@/sablevm-classpath")
- (string-append (assoc-ref inputs "classpath")
- "/share/sablevm-classpath")))
- (substitute* "src/libsablevm/Makefile.in"
- (("\\$\\(libdir\\)/sablevm-classpath")
- (string-append (assoc-ref inputs "classpath")
- "/lib/sablevm-classpath"))
- (("\\$\\(datadir\\)/sablevm-classpath")
- (string-append (assoc-ref inputs "classpath")
- "/share/sablevm-classpath")))
- #t)))))
+ (list (string-append "--with-classpath-install-dir="
+ (assoc-ref %build-inputs "classpath")))))
(inputs
- `(("classpath" ,sablevm-classpath)
+ `(("classpath" ,classpath-bootstrap)
("jikes" ,jikes)
- ("zlib" ,zlib)
- ("popt" ,popt)
- ("libffi" ,libffi)))
- (native-inputs
- `(("libltdl" ,libltdl)))
- (home-page "http://sablevm.org/")
- (synopsis "Java Virtual Machine")
- (description "SableVM is a clean-room, highly portable and efficient Java
-virtual machine. Its goals are to be reasonably small, fast, and compliant
-with the various specifications (JVM specification, JNI, invocation interface,
-etc.). SableVM is no longer maintained.
-
-This package provides the virtual machine.")
- (license license:lgpl2.1+)))
+ ("zlib" ,zlib)))
+ (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, but it cannot seem to be built with sablevm.
- (version "1.7.1")
+ ;; supported by Jikes.
+ (version "1.8.4")
(source (origin
(method url-fetch)
(uri (string-append "http://archive.apache.org/dist/"
version "-src.tar.bz2"))
(sha256
(base32
- "19pvqvgkxgpgsqm4lvbki5sm0z84kxmykdqicvfad47gc1r9mi2d"))))
+ "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
+ (delete 'bootstrap)
(delete 'configure)
(replace 'build
(lambda* (#:key inputs #:allow-other-keys)
- (setenv "JAVA_HOME"
- (string-append (assoc-ref inputs "sablevm")
- "/lib/sablevm"))
+ (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
(setenv "JAVACMD"
- (string-append (assoc-ref inputs "sablevm")
- "/bin/java-sablevm"))
+ (string-append (assoc-ref inputs "jamvm")
+ "/bin/jamvm"))
(setenv "JAVAC"
- (string-append (assoc-ref inputs "sablevm")
- "/bin/javac-sablevm"))
+ (string-append (assoc-ref inputs "jikes")
+ "/bin/jikes"))
+ (setenv "CLASSPATH"
+ (string-append (assoc-ref inputs "jamvm")
+ "/lib/rt.jar"))
+
+ ;; 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 <javac ...> tags in build.xml
(setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
;; interesting, so we silence them.
(setenv "$BOOTJAVAC_OPTS" "-nowarn")
+ ;; Without these JamVM options the build may freeze.
+ (substitute* "bootstrap.sh"
+ (("^\"\\$\\{JAVACMD\\}\" " m)
+ (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"
(delete 'install))))
(native-inputs
`(("jikes" ,jikes)
- ("sablevm" ,sablevm)))
+ ("jamvm" ,jamvm-1-bootstrap)))
(home-page "http://ant.apache.org")
(synopsis "Build tool for Java")
(description
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CLASSPATH"
(string-join
- (find-files (string-append (assoc-ref inputs "ant-bootstrap")
- "/lib")
- "\\.jar$")
+ (cons (string-append (assoc-ref inputs "jamvm")
+ "/lib/rt.jar")
+ (find-files (string-append
+ (assoc-ref inputs "ant-bootstrap")
+ "/lib")
+ "\\.jar$"))
":"))
#t))
(replace 'build
Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
;; Compile it all!
- (and (zero? (apply system* "javac-sablevm"
+ (and (zero? (apply system* "jikes"
(find-files "." "\\.java$")))
(zero? (system* "fastjar" "cvfm"
"ecj-bootstrap.jar" "manifest" ".")))))
(native-inputs
`(("ant-bootstrap" ,ant-bootstrap)
("unzip" ,unzip)
- ("sablevm" ,sablevm)
+ ("jikes" ,jikes)
+ ("jamvm" ,jamvm-1-bootstrap)
("fastjar" ,fastjar)))
(home-page "https://eclipse.org")
(synopsis "Eclipse Java development tools core batch compiler")
(arguments
`(#:modules ((guix build utils))
#:builder
- (let ((backend 'sablevm))
+ (begin
(use-modules (guix build utils))
(let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
(target (string-append bin "/javac"))
"/bin/guile"))
(ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
"/share/java/ecj-bootstrap.jar"))
- (java (case backend
- ((sablevm)
- (string-append (assoc-ref %build-inputs "sablevm")
- "/lib/sablevm/bin/java"))
- ((jamvm)
- (string-append (assoc-ref %build-inputs "jamvm")
- "/bin/jamvm"))))
- (bootcp (case backend
- ((sablevm)
- (let ((jvmlib (string-append
- (assoc-ref %build-inputs "sablevm-classpath")
- "/lib/sablevm")))
- (string-append jvmlib "/jre/lib/rt.jar")))
- ((jamvm)
- (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
- "/share/classpath")))
- (string-append jvmlib "/lib/glibj.zip:"
- jvmlib "/lib/tools.zip"))))))
+ (java (string-append (assoc-ref %build-inputs "jamvm")
+ "/bin/jamvm"))
+ (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
+ "/share/classpath")))
+ (string-append jvmlib "/glibj.zip:"
+ jvmlib "/tools.zip"))))
(mkdir-p bin)
(with-output-to-file target
(lambda _
(define (main args)
(let ((classpath (getenv "CLASSPATH")))
(setenv "CLASSPATH"
- (string-append ,ecj
- (if classpath
- (string-append ":" classpath)
- ""))))
+ (string-join (list ,ecj
+ ,(string-append (assoc-ref %build-inputs "jamvm")
+ "/lib/rt.jar")
+ (or classpath ""))
+ ":")))
(receive (vm-args other-args)
;; Separate VM arguments from arguments to ECJ.
(partition (cut string-prefix? "-J" <>)
args defaults))
(apply system* ,java
(append
+ (list "-Xnocompact" "-Xnoinlining")
;; Remove "-J" prefix
(map (cut string-drop <> 2) vm-args)
'("org.eclipse.jdt.internal.compiler.batch.Main")
(native-inputs
`(("guile" ,guile-2.2)
("ecj-bootstrap" ,ecj-bootstrap)
- ("sablevm" ,sablevm)
- ("sablevm-classpath" ,sablevm-classpath)))
+ ("jamvm" ,jamvm-1-bootstrap)
+ ("classpath" ,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.")))
-;; Note: All the tool wrappers (e.g. for javah, javac, etc) fail with
-;; java.lang.UnsupportedClassVersionError. They simply won't run on the old
-;; sablevm. We use Classpath 0.99 to build JamVM, on which the Classpath
-;; tools do run. Using these Classpath tools on JamVM we can then build the
-;; development version of GNU Classpath.
-(define classpath-on-sablevm
- (package
- (name "classpath")
+;; 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)
version ".tar.gz"))
(sha256
(base32
- "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))))
- (build-system gnu-build-system)
+ "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
+ (patches (search-patches "classpath-aarch64-support.patch"))))
(arguments
`(#:configure-flags
(list (string-append "--with-ecj-jar="
(assoc-ref %build-inputs "ecj-javac-wrapper")
"/bin/javac")
(string-append "JAVA="
- (assoc-ref %build-inputs "sablevm")
- "/bin/java-sablevm")
+ (assoc-ref %build-inputs "jamvm")
+ "/bin/jamvm")
"GCJ_JAVAC_TRUE=no"
"ac_cv_prog_java_works=yes" ; trust me
"--disable-Werror"
`(("ecj-bootstrap" ,ecj-bootstrap)
("ecj-javac-wrapper" ,ecj-javac-wrapper)
("fastjar" ,fastjar)
- ("sablevm" ,sablevm)
- ("sablevm-classpath" ,sablevm-classpath)
+ ("jamvm" ,jamvm-1-bootstrap)
+ ("classpath" ,classpath-bootstrap)
("libltdl" ,libltdl)
- ("pkg-config" ,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+)))
-
-(define jamvm-bootstrap
- (package
- (name "jamvm")
- (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"))))
- (build-system gnu-build-system)
- (arguments
- `(#:configure-flags
- (list (string-append "--with-classpath-install-dir="
- (assoc-ref %build-inputs "classpath")))))
- (inputs
- `(("classpath" ,classpath-on-sablevm)
- ("ecj-javac-wrapper" ,ecj-javac-wrapper)
- ("zlib" ,zlib)))
- (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+)))
+ ("pkg-config" ,pkg-config)))))
-;; We need this because the tools provided by the latest release of GNU
-;; Classpath don't actually work with sablevm.
+;; 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-on-sablevm)
+ (package (inherit classpath-0.99)
(name "classpath-jamvm-wrappers")
(source #f)
(build-system trivial-build-system)
(with-output-to-file (string-append bin tool)
(lambda _
(format #t "#!~a/bin/sh
-~a/bin/jamvm -classpath ~a/share/classpath/tools.zip \
+~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
gnu.classpath.tools.~a.~a $@"
bash jamvm classpath tool
(if (string=? "native2ascii" tool)
#t))))
(native-inputs
`(("bash" ,bash)
- ("jamvm" ,jamvm-bootstrap)
- ("classpath" ,classpath-on-sablevm)))
+ ("jamvm" ,jamvm-1-bootstrap)
+ ("classpath" ,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.")))
-(define ecj-javac-on-jamvm-wrapper
- (package (inherit ecj-javac-wrapper)
- (name "ecj-javac-on-jamvm-wrapper")
- (arguments
- `(#:modules ((guix build utils))
- #:builder
- ;; TODO: This builder is exactly the same as in ecj-javac-wrapper,
- ;; except that the backend is 'jamvm here. Can we reuse the same
- ;; builder somehow?
- (let ((backend 'jamvm))
- (use-modules (guix build utils))
- (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
- (target (string-append bin "/javac"))
- (guile (string-append (assoc-ref %build-inputs "guile")
- "/bin/guile"))
- (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
- "/share/java/ecj-bootstrap.jar"))
- (java (case backend
- ((sablevm)
- (string-append (assoc-ref %build-inputs "sablevm")
- "/lib/sablevm/bin/java"))
- ((jamvm)
- (string-append (assoc-ref %build-inputs "jamvm")
- "/bin/jamvm"))))
- (bootcp (case backend
- ((sablevm)
- (let ((jvmlib (string-append
- (assoc-ref %build-inputs "sablevm-classpath")
- "/lib/sablevm")))
- (string-append jvmlib "/jre/lib/rt.jar")))
- ((jamvm)
- (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
- "/share/classpath")))
- (string-append jvmlib "/lib/glibj.zip:"
- jvmlib "/lib/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-append ,ecj
- (if classpath
- (string-append ":" 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)
- #t))))
- (native-inputs
- `(("guile" ,guile-2.2)
- ("ecj-bootstrap" ,ecj-bootstrap)
- ("jamvm" ,jamvm-bootstrap)
- ("classpath" ,classpath-on-sablevm)))
- (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 tool runs on JamVM instead of SableVM.")))
-
;; 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-on-sablevm)
+ (package (inherit classpath-bootstrap)
(version (string-append "0.99-" revision "." (string-take commit 9)))
(source (origin
(method git-fetch)
"--disable-gjdoc")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'bootstrap
- (lambda _
- (zero? (system* "autoreconf" "-vif"))))
+ ;; 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$")
("texinfo" ,texinfo)
("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
("ecj-bootstrap" ,ecj-bootstrap)
- ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
+ ("ecj-javac-wrapper" ,ecj-javac-wrapper)
("fastjar" ,fastjar)
- ("jamvm" ,jamvm-bootstrap)
+ ("jamvm" ,jamvm-1-bootstrap)
("libltdl" ,libltdl)
("pkg-config" ,pkg-config))))))
-(define-public jamvm
- (package (inherit jamvm-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"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:configure-flags
+ (list (string-append "--with-classpath-install-dir="
+ (assoc-ref %build-inputs "classpath")))))
(inputs
`(("classpath" ,classpath-devel)
- ("ecj-javac-wrapper" ,ecj-javac-on-jamvm-wrapper)
+ ("ecj-javac-wrapper" ,ecj-javac-wrapper)
("zlib" ,zlib)))))
-(define ecj-javac-on-jamvm-wrapper-final
- (package (inherit ecj-javac-on-jamvm-wrapper)
+(define ecj-javac-wrapper-final
+ (package (inherit ecj-javac-wrapper)
(native-inputs
`(("guile" ,guile-2.2)
("ecj-bootstrap" ,ecj-bootstrap)
("classpath" ,classpath-devel)))))
;; The bootstrap JDK consisting of jamvm, classpath-devel,
-;; ecj-javac-on-jamvm-wrapper-final cannot build Icedtea 2.x directly, because
-;; it's written in Java 7. It can, however, build the unmaintained Icedtea
-;; 1.x, which uses Java 6 only.
+;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
+;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
+;; which uses Java 6 only.
(define-public icedtea-6
(package
(name "icedtea")
"0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
(modules '((guix build utils)))
(snippet
- '(substitute* "Makefile.in"
- ;; do not leak information about the build host
- (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
- "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
+ '(begin
+ (substitute* "Makefile.in"
+ ;; do not leak information about the build host
+ (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
+ "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
+ #t))))
(build-system gnu-build-system)
(outputs '("out" ; Java Runtime Environment
"jdk" ; Java Development Kit
#t))))
(add-after 'unpack 'use-classpath
(lambda* (#:key inputs #:allow-other-keys)
- (let ((jvmlib (assoc-ref inputs "classpath")))
+ (let ((jvmlib (assoc-ref inputs "classpath"))
+ (jamvm (assoc-ref inputs "jamvm")))
;; Classpath does not provide rt.jar.
(substitute* "Makefile.in"
(("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
;; Make sure we can find all classes.
(setenv "CLASSPATH"
(string-append jvmlib "/share/classpath/glibj.zip:"
- jvmlib "/share/classpath/tools.zip"))
+ jvmlib "/share/classpath/tools.zip:"
+ jamvm "/lib/rt.jar"))
(setenv "JAVACFLAGS"
(string-append "-cp "
jvmlib "/share/classpath/glibj.zip:"
("cpio" ,cpio)
("cups" ,cups)
("ecj" ,ecj-bootstrap)
- ("ecj-javac" ,ecj-javac-on-jamvm-wrapper-final)
+ ("ecj-javac" ,ecj-javac-wrapper-final)
("fastjar" ,fastjar)
("fontconfig" ,fontconfig)
("freetype" ,freetype)
+ ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
("gtk" ,gtk+-2)
("gawk" ,gawk)
("giflib" ,giflib)
("jamvm" ,jamvm)
("lcms" ,lcms)
("libjpeg" ,libjpeg)
+ ("libnsl" ,libnsl)
("libpng" ,libpng)
("libtool" ,libtool)
("libx11" ,libx11)
(license license:gpl2+)))
(define-public icedtea-7
- (let* ((version "2.6.12")
+ (let* ((version "2.6.13")
(drop (lambda (name hash)
(origin
(method url-fetch)
version ".tar.xz"))
(sha256
(base32
- "0s0zh0mj1sab99kb516lsgq3859vsc951phc565gwix4l5g9zppk"))
+ "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
(modules '((guix build utils)))
(snippet
- '(substitute* "Makefile.in"
- ;; do not leak information about the build host
- (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
- "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
+ '(begin
+ (substitute* "Makefile.in"
+ ;; do not leak information about the build host
+ (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
+ "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
+ #t))))
(build-system gnu-build-system)
(outputs '("out" ; Java Runtime Environment
"jdk" ; Java Development Kit
(native-inputs
`(("openjdk-src"
,(drop "openjdk"
- "15qf3nfidgnigh2zny6djfp8bhfwjnwk9i06mxs2jbq6na953ql2"))
+ "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
("corba-drop"
,(drop "corba"
- "1phvn8fyl5mw2n2sn97f17nm442k75xsz2023bfw4h66ywzkqhqy"))
+ "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
("jaxp-drop"
,(drop "jaxp"
- "0j4ms6lmnfa2cwfh9yfqdfg1bnn3fc40ay4x6k8zqa8yvspik5w5"))
+ "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
("jaxws-drop"
,(drop "jaxws"
- "09sddj73k7n29s39hvdk14r130mvlknbxkpd2w58f34sq5sgpdrg"))
+ "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
("jdk-drop"
,(drop "jdk"
- "0q896zz8wyswmksy225q1k27nz3v3l27052dcvvpv20ryykz8yp7"))
+ "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
("langtools-drop"
,(drop "langtools"
- "0niicyfccim4a9is4akh87jd7wbl8jrazdaab957mcv9l1x3bnqc"))
+ "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
("hotspot-drop"
,(drop "hotspot"
- "1jw42qhbm3wfavk39304m53lmqipcllrvjqiab2f42mjs10i8gfx"))
+ "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
("ant" ,ant-bootstrap)
("attr" ,attr)
("coreutils" ,coreutils)
("diffutils" ,diffutils) ;for tests
("gawk" ,gawk)
+ ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5
("grep" ,grep)
("libtool" ,libtool)
("pkg-config" ,pkg-config)
(license license:gpl2+))))
(define-public icedtea-8
- (let* ((version "3.6.0")
+ (let* ((version "3.7.0")
(drop (lambda (name hash)
(origin
(method url-fetch)
"/icedtea8/" version "/" name ".tar.xz"))
(sha256 (base32 hash))))))
(package (inherit icedtea-7)
- (version "3.6.0")
+ (version "3.7.0")
(source (origin
(method url-fetch)
(uri (string-append
version ".tar.xz"))
(sha256
(base32
- "0zj192zrrxqh6j1ywc3399gk2ycay9w8pvzcvvr2kvdkb37ak86h"))
+ "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
(modules '((guix build utils)))
(snippet
'(begin
- (substitute* "acinclude.m4"
+ (substitute* '("configure"
+ "acinclude.m4")
;; Do not embed build time
(("(DIST_ID=\"Custom build).*$" _ prefix)
(string-append prefix "\"\n"))
"DIST_NAME=\"guix\""))
#t))))
(arguments
- (substitute-keyword-arguments (package-arguments icedtea-7)
- ((#:configure-flags flags)
- `(let ((jdk (assoc-ref %build-inputs "jdk")))
- `(;;"--disable-bootstrap"
- "--enable-bootstrap"
- "--enable-nss"
- "--disable-downloading"
- "--disable-system-pcsc"
- "--disable-system-sctp"
- "--disable-tests" ;they are run in the check phase instead
- "--with-openjdk-src-dir=./openjdk.src"
- ,(string-append "--with-jdk-home=" jdk))))
- ((#:phases phases)
- `(modify-phases ,phases
- (delete 'fix-x11-extension-include-path)
- (delete 'patch-paths)
- (delete 'set-additional-paths)
- (delete 'patch-patches)
- (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 "openjdk.src/jdk/src/solaris/native"
- "\\.c|\\.h"))
- #t)))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((doc (string-append (assoc-ref outputs "doc")
- "/share/doc/icedtea"))
- (jre (assoc-ref outputs "out"))
- (jdk (assoc-ref outputs "jdk")))
- (copy-recursively "openjdk.build/docs" doc)
- (copy-recursively "openjdk.build/images/j2re-image" jre)
- (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
- ;; Install the nss.cfg file to JRE to enable SSL/TLS
- ;; support via NSS.
- (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
- (string-append jre "/lib/security/nss.cfg"))
- #t)))))))
+ `(#:imported-modules
+ ((guix build ant-build-system)
+ (guix build syscalls)
+ ,@%gnu-build-system-modules)
+ ,@(substitute-keyword-arguments (package-arguments icedtea-7)
+ ((#:modules modules)
+ `((guix build utils)
+ (guix build gnu-build-system)
+ ((guix build ant-build-system) #:prefix ant:)
+ (ice-9 match)
+ (ice-9 popen)
+ (srfi srfi-19)
+ (srfi srfi-26)))
+ ((#:configure-flags flags)
+ `(let ((jdk (assoc-ref %build-inputs "jdk")))
+ `( ;;"--disable-bootstrap"
+ "--enable-bootstrap"
+ "--enable-nss"
+ "--disable-downloading"
+ "--disable-system-pcsc"
+ "--disable-system-sctp"
+ "--disable-tests" ;they are run in the check phase instead
+ "--with-openjdk-src-dir=./openjdk.src"
+ ,(string-append "--with-jdk-home=" jdk))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'fix-x11-extension-include-path)
+ (delete 'patch-paths)
+ (delete 'set-additional-paths)
+ (delete 'patch-patches)
+ ;; Prevent the keytool from recording the current time when
+ ;; adding certificates at build time.
+ (add-after 'unpack 'patch-keystore
+ (lambda _
+ (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
+ (("date = new Date\\(\\);")
+ "\
+date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
+new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
+new Date();"))
+ #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 "openjdk.src/jdk/src/solaris/native"
+ "\\.c|\\.h"))
+ #t)))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((doc (string-append (assoc-ref outputs "doc")
+ "/share/doc/icedtea"))
+ (jre (assoc-ref outputs "out"))
+ (jdk (assoc-ref outputs "jdk")))
+ (copy-recursively "openjdk.build/docs" doc)
+ (copy-recursively "openjdk.build/images/j2re-image" jre)
+ (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
+ ;; Install the nss.cfg file to JRE to enable SSL/TLS
+ ;; support via NSS.
+ (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
+ (string-append jre "/lib/security/nss.cfg"))
+ #t)))
+ (add-after 'install 'strip-jar-timestamps
+ (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
(native-inputs
`(("jdk" ,icedtea-7 "jdk")
("openjdk-src"
,(drop "openjdk"
- "0mqxh81kq05z4wydkik0yrr81ibf84xmwsdcw9n2gfrzs4f5jxnb"))
+ "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
("aarch32-drop"
,(drop "aarch32"
- "0b207g2n6kn510zf5vwh58bsxgqrmkvrna4p20r74v9cwcwx83n2"))
+ "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
("corba-drop"
,(drop "corba"
- "0qinc1q4w01nkr9klhfyd8caxvyrrfxjrz32nd7kgyja2bj8x7dd"))
+ "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
("jaxp-drop"
,(drop "jaxp"
- "07azrp3g86vk2laybmr5xfn0yrljkxs0rlm1q48385br225bgdxi"))
+ "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
("jaxws-drop"
,(drop "jaxws"
- "018fd2hq57zp3pq06wlxy5pabqcyk36xi8hk0d6xk3a90wsjvyik"))
+ "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
("jdk-drop"
,(drop "jdk"
- "0vs488kq5j2cc6kplc78jbhfxwq4fn06l34xrbq4d6y17777arg8"))
+ "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
("langtools-drop"
,(drop "langtools"
- "04f6d1wvck5jrpvrcw5gsbzxnihcry9zrf1v85czdm959q21zv9c"))
+ "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
("hotspot-drop"
,(drop "hotspot"
- "1mfgpzyr6zzy9klf8nn3z6d41fydb9ghpfpqzjq3cl95axfbdl1g"))
+ "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
("nashorn-drop"
,(drop "nashorn"
- "1a26cmzbs50gkh4rmmmxls7zljx62vfp1wq02gsfd5jqs4xvlibj"))
+ "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
("shenandoah-drop"
,(drop "shenandoah"
- "11hmn9mwmvryfddcanzx3qffjm8bbiv18nwv3iy9cswrvxjy010f"))
+ "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
,@(fold alist-delete (package-native-inputs icedtea-7)
'("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
"jdk-drop" "langtools-drop" "hotspot-drop")))))))
complex transformations and code analysis tools.")
(license license:bsd-3)))
+(define java-asm-bootstrap
+ (package
+ (inherit java-asm)
+ (name "java-asm-bootstrap")
+ (arguments
+ (substitute-keyword-arguments (package-arguments java-asm)
+ ((#:tests? _) #f)))
+ (native-inputs `())
+ (propagated-inputs
+ `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
+ ("java-aqute-libg" ,java-aqute-libg-bootstrap)
+ ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
+ (delete `("java-aqute-libg", java-aqute-libg)
+ (package-inputs java-asm)))))))
+
(define-public java-cglib
(package
(name "java-cglib")
(package (inherit java-hamcrest-core)
(name "java-hamcrest-all")
(arguments
- (substitute-keyword-arguments (package-arguments java-hamcrest-core)
- ;; FIXME: a unit test fails because org.hamcrest.SelfDescribing is not
- ;; found, although it is part of the hamcrest-core library that has
- ;; just been built.
- ;;
- ;; Fixing this one test is insufficient, though, and upstream confirmed
- ;; that the latest hamcrest release fails its unit tests when built
- ;; with Java 7. See https://github.com/hamcrest/JavaHamcrest/issues/30
- ((#:tests? _) #f)
- ((#:build-target _) "bigjar")
- ((#:phases phases)
- `(modify-phases ,phases
- ;; Some build targets override the classpath, so we need to patch
- ;; the build.xml to ensure that required dependencies are on the
- ;; classpath.
- (add-after 'unpack 'patch-classpath-for-integration
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "build.xml"
- ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
- (string-join
- (cons line
- (append
- (find-files (assoc-ref inputs "java-hamcrest-core") "\\.jar$")
- (find-files (assoc-ref inputs "java-junit") "\\.jar$")
- (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
- (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
- ";")))
- #t))))))
+ `(#:jdk ,icedtea-8
+ ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
+ ((#:build-target _) "bigjar")
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; Some build targets override the classpath, so we need to patch
+ ;; the build.xml to ensure that required dependencies are on the
+ ;; classpath.
+ (add-after 'unpack 'patch-classpath-for-integration
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "build.xml"
+ ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
+ (string-join
+ (cons line
+ (append
+ (find-files (assoc-ref inputs "java-junit") "\\.jar$")
+ (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
+ (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
+ ";")))
+ #t)))))))
(inputs
`(("java-junit" ,java-junit)
("java-jmock" ,java-jmock-1)
("java-easymock" ,java-easymock)
- ("java-hamcrest-core" ,java-hamcrest-core)
,@(package-inputs java-hamcrest-core)))))
(define-public java-jopt-simple
@end itemize\n")
(license license:asl2.0)))
+(define-public java-commons-bsf
+ (package
+ (name "java-commons-bsf")
+ (version "2.4.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file
+ (find-files "." "\\.jar$"))
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:build-target "jar"
+ #:tests? #f; No test file
+ #:modules ((guix build ant-build-system)
+ (guix build utils)
+ (guix build java-utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'create-properties
+ (lambda _
+ ;; This file is missing from the distribution
+ (call-with-output-file "build-properties.xml"
+ (lambda (port)
+ (sxml->xml
+ `(project (@ (basedir ".") (name "build-properties") (default ""))
+ (property (@ (name "project.name") (value "bsf")))
+ (property (@ (name "source.level") (value "1.5")))
+ (property (@ (name "build.lib") (value "build/jar")))
+ (property (@ (name "src.dir") (value "src")))
+ (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
+ (property (@ (name "build.tests") (value "build/test-classes")))
+ (property (@ (name "build.dest") (value "build/classes"))))
+ port)))))
+ (replace 'install (install-jars "build")))))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (inputs
+ `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
+ (home-page "https://commons.apache.org/proper/commons-bsf")
+ (synopsis "Bean Scripting Framework")
+ (description "The Bean Scripting Framework (BSF) is a set of Java classes
+which provides scripting language support within Java applications, and access
+to Java objects and methods from scripting languages. BSF allows one to write
+JSPs in languages other than Java while providing access to the Java class
+library. In addition, BSF permits any Java application to be implemented in
+part (or dynamically extended) by a language that is embedded within it. This
+is achieved by providing an API that permits calling scripting language engines
+from within Java, as well as an object registry that exposes Java objects to
+these scripting language engines.")
+ (license license:asl2.0)))
+
+(define-public java-commons-jxpath
+ (package
+ (name "java-commons-jxpath")
+ (version "1.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/commons/jxpath/source/"
+ "commons-jxpath-" version "-src.tar.gz"))
+ (sha256
+ (base32
+ "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "commons-jxpath.jar"
+ ;; tests require more dependencies, including mockrunner which depends on old software
+ #:tests? #f
+ #:source-dir "src/java"))
+ (inputs
+ `(("java-tomcat" ,java-tomcat)
+ ("java-jdom" ,java-jdom)
+ ("java-commons-beanutils" ,java-commons-beanutils)))
+ (native-inputs
+ `(("java-junit" ,java-junit)))
+ (home-page "http://commons.apache.org/jxpath/")
+ (synopsis "Simple interpreter of an expression language called XPath.")
+ (description "The org.apache.commons.jxpath package defines a simple
+interpreter of an expression language called XPath. JXPath applies XPath
+expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
+contexts, DOM etc, including mixtures thereof.")
+ (license license:asl2.0)))
+
+(define-public java-jsr250
+ (package
+ (name "java-jsr250")
+ (version "1.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://repo1.maven.org/maven2/"
+ "javax/annotation/javax.annotation-api/"
+ version "/javax.annotation-api-"
+ version "-sources.jar"))
+ (sha256
+ (base32
+ "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f ; no tests included
+ #:jdk ,icedtea-8
+ #:jar-name "jsr250.jar"))
+ (home-page "https://jcp.org/en/jsr/detail?id=250")
+ (synopsis "Security-related annotations")
+ (description "This package provides annotations for security. It provides
+packages in the @code{javax.annotation} and @code{javax.annotation.security}
+namespaces.")
+ ;; either cddl or gpl2 only, with classpath exception
+ (license (list license:cddl1.0
+ license:gpl2))))
+
(define-public java-jsr305
(package
(name "java-jsr305")
(define-public java-commons-cli
(package
(name "java-commons-cli")
- (version "1.3.1")
+ (version "1.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://apache/commons/cli/source/"
"commons-cli-" version "-src.tar.gz"))
(sha256
(base32
- "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
+ "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
(build-system ant-build-system)
;; TODO: javadoc
(arguments
time.")
(license license:expat)))
+(define java-slf4j-api-bootstrap
+ (package
+ (inherit java-slf4j-api)
+ (name "java-slf4j-api-bootstrap")
+ (inputs `())
+ (arguments
+ (substitute-keyword-arguments (package-arguments java-slf4j-api)
+ ((#:tests? _ #f) #f)))))
+
(define-public java-slf4j-simple
(package
(name "java-slf4j-simple")
(lambda _
(display
(string-append "#!" (which "sh") "\n"
- "java -cp " jar "/antlr3-3.1-3.1.jar:"
+ "java -cp " jar "/antlr3-3.1.jar:"
(string-concatenate
(find-files (assoc-ref inputs "stringtemplate")
".*\\.jar"))
(define-public java-aqute-bnd-annotation
(package
(name "java-aqute-bnd-annotation")
- (version "3.4.0")
+ (version "3.5.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/bndtools/bnd/archive/"
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "09vgb6axikbz66zi9falijbnzh1qnp9ysfns123dmzdb01cbza9q"))))
+ "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "java-aqute-bnd-annotation.jar"
("java-osgi-cmpn" ,java-osgi-cmpn)
("osgi" ,java-osgi-core)))))
+(define java-aqute-libg-bootstrap
+ (package
+ (inherit java-aqute-libg)
+ (name "java-aqute-libg-bootstrap")
+ (inputs
+ `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
+ ,@(delete `("slf4j" ,java-slf4j-api)
+ (package-inputs java-aqute-libg))))))
+
(define-public java-aqute-bndlib
(package
(inherit java-aqute-bnd-annotation)
("promise" ,java-osgi-util-promise)
("osgi" ,java-osgi-core)))))
+(define java-aqute-bndlib-bootstrap
+ (package
+ (inherit java-aqute-bndlib)
+ (name "java-aqute-bndlib-bootstrap")
+ (inputs
+ `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
+ ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
+ ,@(delete `("slf4j" ,java-slf4j-api)
+ (delete `("java-aqute-libg" ,java-aqute-libg)
+ (package-inputs java-aqute-bndlib)))))))
+
(define-public java-ops4j-pax-tinybundles
(package
(name "java-ops4j-pax-tinybundles")
;; packaging. It uses the version referenced in pom.xml. We replace
;; it with our own version.
(substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
- (("2.4.0.201411031534") "3.4.0")))))))
+ (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
+ ,(package-version java-aqute-bndlib))))))))
(inputs
`(("lang" ,java-ops4j-base-lang)
("io" ,java-ops4j-base-io)
(method url-fetch)
(uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
"0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
(uri (git-reference
(url "https://github.com/neilalexander/jnacl.git")
(commit commit)))
+ (file-name (git-file-name name version))
(sha256
(base32
"1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
algorithms and xxHash hashing algorithm.")
(license license:asl2.0)))
-(define-public java-bouncycastle-bcprov
+(define-public java-bouncycastle
(package
- (name "java-bouncycastle-bcprov")
- (version "1.58")
+ (name "java-bouncycastle")
+ (version "1.59")
(source (origin
(method url-fetch)
- (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
+ (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
+ (substring version 0 1) "rv"
+ (substring version 2 4) ".tar.gz"))
(sha256
(base32
- "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
- (build-system ant-build-system)
- (arguments
- `(#:jar-name "bouncycastle-bcprov.jar"
- #:tests? #f; no tests
- #:source-dir "src"
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'unzip-src
- (lambda _
- (mkdir-p "src")
- (with-directory-excursion "src"
- (invoke "unzip" "../src.zip"))
- #t)))))
- (native-inputs
- `(("unzip" ,unzip)
- ("junit" ,java-junit)))
- (home-page "https://www.bouncycastle.org")
- (synopsis "Cryptographic library")
- (description "Bouncy Castle Provider (bcprov) is a cryptographic library
-for the Java programming language.")
- (license license:expat)))
-
-(define-public java-bouncycastle-bcpkix
- (package
- (name "java-bouncycastle-bcpkix")
- (version "1.58")
- (source (origin
- (method url-fetch)
- (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
- (sha256
- (base32
- "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
+ "1bwl499whlbq896w18idqw2dkp8v0wp0npv9g71i5fgf8xjh0k3q"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file
+ (find-files "." "\\.jar$"))
+ #t))))
(build-system ant-build-system)
(arguments
- `(#:jar-name "bouncycastle-bcpkix.jar"
- #:tests? #f; no tests
- #:source-dir "src"
+ `(#:jdk ,icedtea-8
#:phases
(modify-phases %standard-phases
- (add-before 'configure 'unzip-src
+ (replace 'build
(lambda _
- (mkdir-p "src")
- (with-directory-excursion "src"
- (invoke "unzip" "../src.zip"))
- #t)))))
+ (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
+ (invoke "ant" "-f" "ant/jdk15+.xml" "build")
+ #t))
+ (replace 'check
+ (lambda _
+ (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
+ (replace 'install
+ (install-jars "build/artifacts/jdk1.5/jars")))))
+ (inputs
+ `(("java-javax-mail" ,java-javax-mail)))
(native-inputs
`(("unzip" ,unzip)
- ("junit" ,java-junit)))
- (inputs
- `(("bcprov" ,java-bouncycastle-bcprov)))
+ ("junit" ,java-junit)
+ ("java-native-access" ,java-native-access)
+ ("java-native-access-platform" ,java-native-access-platform)))
(home-page "https://www.bouncycastle.org")
(synopsis "Cryptographic library")
- (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
-CMP, and CRMF.")
+ (description "Bouncy Castle is a cryptographic library for the Java
+programming language.")
(license license:expat)))
(define-public java-lmax-disruptor
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32
- "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))))
+ "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
+ (patches (search-patches "java-jeromq-fix-tests.patch"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "java-jeromq.jar"
;; Failures
"**/DealerSpecTest.java"
"**/CustomDecoderTest.java"
- "**/CustomEncoderTest.java")))
+ "**/CustomEncoderTest.java"
+ "**/ConnectRidTest.java"
+ "**/ReqSpecTest.java"
+ "**/PushPullSpecTest.java"
+ "**/PubSubHwmTest.java"
+ "**/RouterSpecTest.java"
+ "**/ProxyTest.java")))
(inputs
`(("java-jnacl" ,java-jnacl)))
(native-inputs
("powermock-junit4-common" ,java-powermock-modules-junit4-common)
("powermock-junit4" ,java-powermock-modules-junit4)
("powermock-support" ,java-powermock-api-support)
- ("bouncycastle" ,java-bouncycastle-bcprov)
- ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
+ ("java-bouncycastle" ,java-bouncycastle)))
(home-page "https://kafka.apache.org")
(synopsis "Distributed streaming platform")
(description "Kafka is a distributed streaming platform, which means:
features that bring it on par with the Z shell line editor.")
(license license:bsd-3)))
+(define-public java-jline-2
+ (package
+ (inherit java-jline)
+ (version "2.14.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/jline/jline2/archive/jline-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
+ (arguments
+ `(#:jdk ,icedtea-8
+ ,@(package-arguments java-jline)))
+ (inputs
+ `(("java-jansi" ,java-jansi)
+ ("java-jansi-native" ,java-jansi-native)))
+ (native-inputs
+ `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
+ ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
+ ("java-powermock-api-easymock" ,java-powermock-api-easymock)
+ ("java-powermock-api-support" ,java-powermock-api-support)
+ ("java-powermock-core" ,java-powermock-core)
+ ("java-powermock-reflect" ,java-powermock-reflect)
+ ("java-easymock" ,java-easymock)
+ ("java-jboss-javassist" ,java-jboss-javassist)
+ ("java-objenesis" ,java-objenesis)
+ ("java-asm" ,java-asm)
+ ("java-hamcrest-core" ,java-hamcrest-core)
+ ("java-cglib" ,java-cglib)
+ ("java-junit" ,java-junit)
+ ("java-hawtjni" ,java-hawtjni)))))
+
(define-public java-xmlunit
(package
(name "java-xmlunit")
features an assortment of graph styles, including advanced scatter plots, bar
graphs, and pie charts.")
(license license:lgpl2.1+)))
+
+(define-public java-commons-httpclient
+ (package
+ (name "java-commons-httpclient")
+ (version "3.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
+ "commons-httpclient/source/commons-httpclient-"
+ version "-src.tar.gz"))
+ (sha256
+ (base32
+ "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:build-target "compile"
+ #:test-target "test"
+ #:tests? #f; requires junit-textui (junit 3)
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-accent
+ (lambda _
+ (for-each (lambda (file)
+ (with-fluids ((%default-port-encoding "ISO-8859-1"))
+ (substitute* file
+ (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
+ '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
+ "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
+ "src/test/org/apache/commons/httpclient/TestHttps.java"
+ "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (invoke "ant" "dist"
+ (string-append "-Ddist.home=" (assoc-ref outputs "out")
+ "/share/java"))
+ #t)))))
+ (propagated-inputs
+ `(("java-commons-logging" ,java-commons-logging-minimal)
+ ("java-commons-codec" ,java-commons-codec)))
+ (home-page "https://hc.apache.org")
+ (synopsis "HTTP/1.1 compliant HTTP agent implementation")
+ (description "This package contains an HTTP/1.1 compliant HTTP agent
+implementation. It also provides reusable components for client-side
+authentication, HTTP state management, and HTTP connection management.")
+ (license license:asl2.0)))
+
+(define-public java-commons-vfs
+ (package
+ (name "java-commons-vfs")
+ (version "2.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/commons/vfs/source/"
+ "commons-vfs2-distribution-" version "-src.tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file
+ (find-files "." "\\.jar$"))
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "commons-vfs.jar"
+ #:source-dir "commons-vfs2/src/main/java"
+ #:test-dir "commons-vfs2/src/test"
+ ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'remove-hadoop-and-webdav
+ ; Remove these files as they are not required and depend on difficult
+ ; packages.
+ (lambda _
+ (for-each delete-file-recursively
+ '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
+ "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")))))))
+ (inputs
+ `(("java-commons-collections4" ,java-commons-collections4)
+ ("java-commons-compress" ,java-commons-compress)
+ ("java-commons-httpclient" ,java-commons-httpclient)
+ ("java-commons-logging-minimal" ,java-commons-logging-minimal)
+ ("java-commons-net" ,java-commons-net)
+ ("java-jsch" ,java-jsch)))
+ (home-page "http://commons.apache.org/proper/commons-vfs/")
+ (synopsis "Java filesystem library")
+ (description "Commons VFS provides a single API for accessing various
+different file systems. It presents a uniform view of the files from various
+different sources, such as the files on local disk, on an HTTP server, or
+inside a Zip archive.")
+ (license license:asl2.0)))
+
+(define-public java-jakarta-oro
+ (package
+ (name "java-jakarta-oro")
+ (version "2.0.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
+ "jakarta-oro-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ (delete-file (string-append "jakarta-oro-" ,version ".jar"))
+ #t))))
+ (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 ,(string-append "jakarta-oro-" version))))))
+ (home-page "https://jakarta.apache.org/oro/")
+ (synopsis "Text-processing for Java")
+ (description "The Jakarta-ORO Java classes are a set of text-processing
+Java classes that provide Perl5 compatible regular expressions, AWK-like
+regular expressions, glob expressions, and utility classes for performing
+substitutions, splits, filtering filenames, etc. This library is the successor
+of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
+from ORO, Inc.")
+ (license license:asl1.1)))
+
+(define-public java-native-access
+ (package
+ (name "java-native-access")
+ (version "4.5.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/java-native-access/jna/"
+ "archive/" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
+ (modules '((guix build utils)))
+ (snippet
+ `(begin
+ (for-each delete-file (find-files "." ".*.jar"))
+ (delete-file-recursively "native/libffi")
+ (delete-file-recursively "dist")
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f; FIXME: tests require reflections.jar
+ #:test-target "test"
+ #:make-flags (list "-Ddynlink.native=true")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-build.xml
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "build.xml"
+ ;; Since we removed the bundled ant.jar, give the correct path
+ (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
+ ;; We removed generated native libraries. We can only rebuild one
+ ;; so don't fail if we can't find a native library for another architecture.
+ (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
+ ;; Copy test dependencies
+ (copy-file (string-append (assoc-ref inputs "java-junit")
+ "/share/java/junit.jar")
+ "lib/junit.jar")
+ (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
+ "/share/java/hamcrest-core.jar")
+ "lib/hamcrest-core.jar")
+ ;; FIXME: once reflections.jar is built, copy it to lib/test.
+ #t))
+ (add-before 'build 'build-native
+ (lambda _
+ (invoke "ant" "-Ddynlink.native=true" "native")
+ #t))
+ (replace 'install
+ (install-jars "build")))))
+ (inputs
+ `(("libffi" ,libffi)
+ ("libx11" ,libx11)
+ ("libxt" ,libxt)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("java-hamcrest-core" ,java-hamcrest-core)))
+ (home-page "https://github.com/java-native-access/jna")
+ (synopsis "Access to native shared libraries from Java")
+ (description "JNA provides Java programs easy access to native shared
+libraries without writing anything but Java code - no JNI or native code is
+required. JNA allows you to call directly into native functions using natural
+Java method invocation.")
+ ;; Java Native Access project (JNA) is dual-licensed under 2
+ ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
+ (license (list
+ license:asl2.0
+ license:lgpl2.1+))))
+
+(define-public java-native-access-platform
+ (package
+ (inherit java-native-access)
+ (name "java-native-access-platform")
+ (arguments
+ `(#:test-target "test"
+ #:tests? #f; require jna-test.jar
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'chdir
+ (lambda _
+ (chdir "contrib/platform")
+ #t))
+ (add-after 'chdir 'fix-ant
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "nbproject/project.properties"
+ (("../../build/jna.jar")
+ (string-append (assoc-ref inputs "java-native-access")
+ "/share/java/jna.jar"))
+ (("../../lib/hamcrest-core-.*.jar")
+ (string-append (assoc-ref inputs "java-hamcrest-core")
+ "/share/java/hamcrest-core.jar"))
+ (("../../lib/junit.jar")
+ (string-append (assoc-ref inputs "java-junit")
+ "/share/java/junit.jar")))
+ #t))
+ (replace 'install
+ (install-jars "dist")))))
+ (inputs
+ `(("java-native-access" ,java-native-access)))
+ (synopsis "Cross-platform mappings for jna")
+ (description "java-native-access-platfrom has cross-platform mappings
+and mappings for a number of commonly used platform functions, including a
+large number of Win32 mappings as well as a set of utility classes that
+simplify native access.")))
+
+(define-public java-jsch-agentproxy-core
+ (package
+ (name "java-jsch-agentproxy-core")
+ (version "0.0.8")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "jsch-agentproxy-core.jar"
+ #:source-dir "jsch-agent-proxy-core/src/main/java"
+ #:tests? #f)); no tests
+ (home-page "https://github.com/ymnk/jsch-agent-proxy")
+ (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
+ (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
+and Pageant included Putty. It will be easily integrated into JSch, and users
+will be allowed to use these programs for authentication.")
+ (license license:bsd-3)))
+
+(define-public java-jsch-agentproxy-sshagent
+ (package
+ (inherit java-jsch-agentproxy-core)
+ (name "java-jsch-agentproxy-sshagent")
+ (arguments
+ `(#:jar-name "jsch-agentproxy-sshagent.jar"
+ #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
+ #:tests? #f)); no tests
+ (inputs
+ `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
+ (synopsis "Proxy to ssh-agent")
+ (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
+and Pageant included in Putty. This component contains the code for a proxy to
+ssh-agent.")))
+
+(define-public java-jsch-agentproxy-usocket-jna
+ (package
+ (inherit java-jsch-agentproxy-core)
+ (name "java-jsch-agentproxy-usocket-jna")
+ (arguments
+ `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
+ #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
+ #:tests? #f)); no tests
+ (inputs
+ `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
+ ("java-native-access" ,java-native-access)))
+ (synopsis "USocketFactory implementation using JNA")
+ (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
+and Pageant included in Putty. This component contains an implementation of
+USocketFactory using @dfn{JNA} (Java Native Access).")))
+
+(define-public java-jsch-agentproxy-pageant
+ (package
+ (inherit java-jsch-agentproxy-core)
+ (name "java-jsch-agentproxy-pageant")
+ (arguments
+ `(#:jar-name "jsch-agentproxy-pageant.jar"
+ #:source-dir "jsch-agent-proxy-pageant/src/main/java"
+ #:tests? #f)); no tests
+ (inputs
+ `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
+ ("java-native-access" ,java-native-access)
+ ("java-native-access-platform" ,java-native-access-platform)))
+ (synopsis "Proxy to pageant")
+ (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
+and Pageant included in Putty. This component contains the code for a proxy to
+pageant.")))
+
+(define-public java-jsch-agentproxy-usocket-nc
+ (package
+ (inherit java-jsch-agentproxy-core)
+ (name "java-jsch-agentproxy-usocket-nc")
+ (arguments
+ `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
+ #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
+ #:tests? #f)); no tests
+ (inputs
+ `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
+ (synopsis "USocketFactory implementation using netcat")
+ (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
+and Pageant included in Putty. This component contains an implementation of
+USocketFactory using netcat.")))
+
+(define-public java-jsch-agentproxy-connector-factory
+ (package
+ (inherit java-jsch-agentproxy-core)
+ (name "java-jsch-agentproxy-connector-factory")
+ (arguments
+ `(#:jar-name "jsch-agentproxy-connector-factory.jar"
+ #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
+ #:tests? #f)); no tests
+ (inputs
+ `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
+ ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
+ ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
+ ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
+ ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
+ (synopsis "Connector factory for jsch agent proxy")
+ (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
+and Pageant included in Putty. This component contains a connector factory.")))
+
+(define-public java-jsch-agentproxy-jsch
+ (package
+ (inherit java-jsch-agentproxy-core)
+ (name "java-jsch-agentproxy-jsch")
+ (arguments
+ `(#:jar-name "jsch-agentproxy-jsch.jar"
+ #:source-dir "jsch-agent-proxy-jsch/src/main/java"
+ #:tests? #f)); no tests
+ (inputs
+ `(("java-jsch" ,java-jsch)
+ ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
+ (synopsis "JSch integration library for agentproxy")
+ (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
+and Pageant included in Putty. This component contains a library to use
+jsch-agent-proxy with JSch.")))
+
+(define-public java-apache-ivy
+ (package
+ (name "java-apache-ivy")
+ (version "2.4.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache//ant/ivy/" version
+ "/apache-ivy-" version "-src.tar.gz"))
+ (sha256
+ (base32
+ "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
+ (patches
+ (search-patches
+ "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "ivy.jar"
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'remove-example
+ (lambda _
+ (delete-file-recursively "src/example")
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (with-directory-excursion "src/java"
+ (for-each (lambda (file)
+ (install-file file (string-append "../../build/classes/" (dirname file))))
+ (append
+ (find-files "." ".*.css")
+ (find-files "." ".*.ent")
+ (find-files "." ".*.html")
+ (find-files "." ".*.properties")
+ (find-files "." ".*.xsd")
+ (find-files "." ".*.xsl")
+ (find-files "." ".*.xml"))))))
+ (add-before 'build 'fix-vfs
+ (lambda _
+ (substitute*
+ '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
+ "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
+ (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
+ #t))
+ (add-before 'install 'copy-manifest
+ (lambda _
+ (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
+ #t))
+ (add-before 'install 'repack
+ (lambda _
+ (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
+ "-C" "build/classes" ".")
+ #t))
+ (add-after 'install 'install-bin
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
+ (ivy (string-append bin "/ivy"))
+ (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
+ (mkdir-p bin)
+ (with-output-to-file ivy
+ (lambda _
+ (display (string-append
+ "#!" (which "sh") "\n"
+ "if [[ -z $CLASSPATH ]]; then\n"
+ " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
+ "else\n"
+ " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
+ "fi\n"
+ (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
+ (chmod ivy #o755)
+ #t))))))
+ (inputs
+ `(("java-bouncycastle" ,java-bouncycastle)
+ ("java-commons-cli" ,java-commons-cli)
+ ("java-commons-collections" ,java-commons-collections)
+ ("java-commons-httpclient" ,java-commons-httpclient)
+ ("java-commons-lang" ,java-commons-lang)
+ ("java-commons-vfs" ,java-commons-vfs)
+ ("java-jakarta-oro" ,java-jakarta-oro)
+ ("java-jsch" ,java-jsch)
+ ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
+ ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
+ ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
+ ("java-junit" ,java-junit)))
+ (home-page "https://ant.apache.org/ivy")
+ (synopsis "Dependency manager for the Java programming language")
+ (description "Ivy is a tool for managing (recording, tracking, resolving
+and reporting) project dependencies. It is characterized by the following:
+
+@itemize
+@item flexibility and configurability - Ivy is essentially process agnostic
+ and is not tied to any methodology or structure. Instead it provides the
+ necessary flexibility and configurability to be adapted to a broad range
+ of dependency management and build processes.
+@item tight integration with Apache Ant - while available as a standalone tool,
+ Ivy works particularly well with Apache Ant providing a number of
+ powerful Ant tasks ranging from dependency resolution to dependency
+ reporting and publication.
+@end itemize")
+ (license license:asl2.0)))
+
+(define-public java-eclipse-sisu-inject
+ (package
+ (name "java-eclipse-sisu-inject")
+ (version "0.3.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/eclipse/sisu.inject/"
+ "archive/releases/" version ".tar.gz"))
+ (sha256
+ (base32
+ "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "eclipse-sisu-inject.jar"
+ #:source-dir "org.eclipse.sisu.inject/src"
+ #:jdk ,icedtea-8
+ #:tests? #f)); no tests
+ (inputs
+ `(("java-guice" ,java-guice)
+ ("java-guice-servlet" ,java-guice-servlet)
+ ("java-javax-inject" ,java-javax-inject)
+ ("java-tomcat" ,java-tomcat)
+ ("java-junit" ,java-junit)
+ ("java-slf4j-api" ,java-slf4j-api)
+ ("java-jsr305" ,java-jsr305)
+ ("java-jsr250" ,java-jsr250)
+ ("java-cdi-api" ,java-cdi-api)
+ ("java-osgi-framework" ,java-osgi-framework)
+ ("java-osgi-util-tracker" ,java-osgi-util-tracker)
+ ("java-testng" ,java-testng)))
+ (home-page "https://www.eclipse.org/sisu/")
+ (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
+ (description "Sisu is a modular JSR330-based container that supports
+classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
+Google-Guice to perform dependency injection and provide the core JSR330
+support, but removes the need to write explicit bindings in Guice modules.
+Integration with other containers via the Eclipse Extension Registry and the
+OSGi Service Registry is a goal of this project.")
+ (license license:epl1.0)))
+
+(define-public java-eclipse-sisu-plexus
+ (package
+ (name "java-eclipse-sisu-plexus")
+ (version "0.3.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/eclipse/sisu.plexus/"
+ "archive/releases/" version ".tar.gz"))
+ (sha256
+ (base32
+ "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file (find-files "." ".*.jar"))
+ (rename-file "org.eclipse.sisu.plexus.tests/src"
+ "org.eclipse.sisu.plexus.tests/java")
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "eclipse-sisu-plexus.jar"
+ #:source-dir "org.eclipse.sisu.plexus/src"
+ #:test-dir "org.eclipse.sisu.plexus.tests"
+ #:test-exclude
+ (list
+ ;; This test fails probably because we can't generate the necessary
+ ;; meta-inf files.
+ "**/PlexusLoggingTest.*"
+ ;; FIXME: This test fails because of some injection error
+ "**/PlexusRequirementTest.*")
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
+ "build/classes/META-INF/plexus")
+ #t))
+ (add-before 'check 'build-test-jar
+ (lambda _
+ (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
+ (mkdir "build")
+ (with-directory-excursion "java"
+ (apply invoke "javac" "-cp"
+ (string-append (getenv "CLASSPATH")
+ ":../../../../../build/classes")
+ (find-files "." ".*.java"))
+ (for-each (lambda (file) (install-file file (string-append "../build/" file)))
+ (find-files "." ".*.jar")))
+ (mkdir-p "build/META-INF/plexus")
+ (copy-file "resources/META-INF/plexus/components.xml"
+ "build/META-INF/plexus/components.xml")
+ (with-directory-excursion "build"
+ (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
+ (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
+ (copy-recursively "META-INF" "../build/test-classes/META-INF")
+ (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
+ (("resources/component-jar")
+ "org.eclipse.sisu.plexus.tests/resources/component-jar")))
+ #t)))))
+ (inputs
+ `(("java-plexus-classworlds" ,java-plexus-classworlds)
+ ("java-plexus-util" ,java-plexus-utils)
+ ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+ ("java-osgi-framework" ,java-osgi-framework)
+ ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
+ ("java-guice" ,java-guice)
+ ("java-javax-inject" ,java-javax-inject)
+ ("java-slf4j-api" ,java-slf4j-api)
+ ("java-junit" ,java-junit)))
+ (native-inputs
+ `(("java-guava" ,java-guava)
+ ("java-aopalliance" ,java-aopalliance)
+ ("java-cglib" ,java-cglib)
+ ("java-asm" ,java-asm)))
+ (home-page "https://www.eclipse.org/sisu/")
+ (synopsis "Plexus support for the sisu container")
+ (description "Sisu is a modular JSR330-based container that supports
+classpath scanning, auto-binding, and dynamic auto-wiring. This package
+adds Plexus support to the Sisu-Inject container.")
+ (license license:epl1.0)))
+
+(define-public java-commons-compiler
+ (package
+ (name "java-commons-compiler")
+ (version "3.0.8")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/janino-compiler/janino")
+ (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
+ (file-name (string-append name "-" version))
+ (sha256
+ (base32
+ "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file
+ (find-files "." "\\.jar$"))
+ #t))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "commons-compiler.jar"
+ #:source-dir "commons-compiler/src/main"
+ #:tests? #f)); no tests
+ (home-page "https://github.com/janino-compiler/janino")
+ (synopsis "Java compiler")
+ (description "Commons-compiler contains an API for janino, including the
+@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
+and @code{ISimpleCompiler} interfaces.")
+ (license license:bsd-3)))
+
+(define-public java-janino
+ (package
+ (inherit java-commons-compiler)
+ (name "java-janino")
+ (arguments
+ `(#:jar-name "janino.jar"
+ #:source-dir "src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "janino"))))))
+ (inputs
+ `(("java-commons-compiler" ,java-commons-compiler)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("java-hamcrest-core" ,java-hamcrest-core)))
+ (description "Janino is a Java compiler. Janino can compile a set of
+source files to a set of class files like @code{javac}, but also compile a
+Java expression, block, class body or source file in memory, load the bytecode
+and execute it directly in the same JVM. @code{janino} can also be used for
+static code analysis or code manipulation.")))
+
+(define-public java-logback-core
+ (package
+ (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"))
+ (sha256
+ (base32
+ "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
+ (modules '((guix build utils)))
+ (snippet
+ '(delete-file-recursively "logback-access/lib"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "logback.jar"
+ #:source-dir "src/main/java"
+ #:test-dir "src/test"
+ #:test-exclude
+ ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
+ ;; which creates FastClasses
+ (list "**/AllCoreTest.*"
+ "**/AutoFlushingObjectWriterTest.*"
+ "**/PackageTest.*"
+ "**/ResilientOutputStreamTest.*"
+ ;; And we still don't want to run abstract classes
+ "**/Abstract*.*")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "logback-core")
+ #t)))))
+ (inputs
+ `(("java-javax-mail" ,java-javax-mail)
+ ("java-tomcat" ,java-tomcat)
+ ("java-commons-compiler" ,java-commons-compiler)
+ ("java-janino" ,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)))
+ (home-page "https://logback.qos.ch")
+ (synopsis "Logging for java")
+ (description "Logback is intended as a successor to the popular log4j project.
+This module lays the groundwork for the other two modules.")
+ ;; Either epl1.0 or lgpl2.1
+ (license (list license:epl1.0
+ license:lgpl2.1))))
+
+(define-public java-logback-classic
+ (package
+ (inherit java-logback-core)
+ (name "java-logback-classic")
+ (arguments
+ `(#:jar-name "logback-classic.jar"
+ #:source-dir "src/main/java"
+ #:test-dir "src/test"
+ #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
+ #:jdk ,icedtea-8
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ (chdir "logback-classic")
+ #t))
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir-p "build/classes")
+ (setenv "CLASSPATH"
+ (string-join
+ (apply append (map (lambda (input)
+ (find-files (assoc-ref inputs input)
+ ".*.jar"))
+ '("java-logback-core" "java-slf4j-api"
+ "java-commons-compiler" "java-tomcat"
+ "groovy")))
+ ":"))
+ (apply invoke "groovyc" "-d" "build/classes" "-j"
+ (find-files "src/main/" ".*\\.(groovy|java)$"))
+ (invoke "ant" "jar")
+ #t)))))
+ (inputs
+ `(("java-logback-core" ,java-logback-core)
+ ("java-slf4j-api" ,java-slf4j-api)
+ ,@(package-inputs java-logback-core)))
+ (native-inputs
+ `(("groovy" ,groovy)))
+ (description "Logback is intended as a successor to the popular log4j project.
+This module can be assimilated to a significantly improved version of log4j.
+Moreover, @code{logback-classic} natively implements the slf4j API so that you
+can readily switch back and forth between logback and other logging frameworks
+such as log4j or @code{java.util.logging} (JUL).")))