aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm77
1 files changed, 76 insertions, 1 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 47dc89d373..51c21b68cc 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -52,7 +52,6 @@
#:use-module (gnu packages gettext)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gl)
- #:use-module (gnu packages gnuzilla) ;nss
#:use-module (gnu packages ghostscript) ;lcms
#:use-module (gnu packages gnome)
#:use-module (gnu packages groovy)
@@ -64,6 +63,7 @@
#:use-module (gnu packages libffi)
#:use-module (gnu packages linux) ;alsa
#:use-module (gnu packages maths)
+ #:use-module (gnu packages nss)
#:use-module (gnu packages onc-rpc)
#:use-module (gnu packages web)
#:use-module (gnu packages wget)
@@ -10970,3 +10970,78 @@ class/interface/method definitions from source files complete with JavaDoc
@code{@@tags}. It is designed to be used by active code generators or
documentation tools.")
(license license:asl2.0)))
+
+(define-public java-jgit
+ (package
+ (name "java-jgit")
+ (version "4.7.0.201704051617-r")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://repo1.maven.org/maven2/"
+ "org/eclipse/jgit/org.eclipse.jgit/"
+ version "/org.eclipse.jgit-"
+ version "-sources.jar"))
+ (sha256
+ (base32
+ "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f ; There are no tests to run.
+ #:jar-name "jgit.jar"
+ ;; JGit must be built with a JDK supporting Java 8.
+ #:jdk ,icedtea-8
+ ;; Target our older default JDK.
+ #:make-flags (list "-Dtarget=1.7")
+ #:phases
+ (modify-phases %standard-phases
+ ;; The jar file generated by the default build.xml does not include
+ ;; the text properties files, so we need to add them.
+ (add-after 'build 'add-properties
+ (lambda* (#:key jar-name #:allow-other-keys)
+ (with-directory-excursion "src"
+ (apply invoke "jar" "-uf"
+ (string-append "../build/jar/" jar-name)
+ (find-files "." "\\.properties$")))
+ #t)))))
+ (inputs
+ `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
+ ("java-javaewah" ,java-javaewah)
+ ("java-jsch" ,java-jsch)
+ ("java-slf4j-api" ,java-slf4j-api)))
+ (home-page "https://eclipse.org/jgit/")
+ (synopsis "Java library implementing the Git version control system")
+ (description "JGit is a lightweight, pure Java library implementing the
+Git version control system, providing repository access routines, support for
+network protocols, and core version control algorithms.")
+ (license license:edl1.0)))
+
+;; For axoloti. This package can still be built with icedtea-7, which is
+;; currently used as the default JDK.
+(define-public java-jgit-4.2
+ (package (inherit java-jgit)
+ (version "4.2.0.201601211800-r")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://repo1.maven.org/maven2/"
+ "org/eclipse/jgit/org.eclipse.jgit/"
+ version "/org.eclipse.jgit-"
+ version "-sources.jar"))
+ (sha256
+ (base32
+ "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
+ (build-system ant-build-system)
+ (arguments
+ (substitute-keyword-arguments (package-arguments java-jgit)
+ ;; Build for default JDK.
+ ((#:jdk _) icedtea-7)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'use-latest-javaewah-API
+ (lambda _
+ (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
+ (("wordinbits") "WORD_IN_BITS"))
+ #t))))))
+ (inputs
+ `(("java-javaewah" ,java-javaewah)
+ ("java-jsch" ,java-jsch)
+ ("java-slf4j-api" ,java-slf4j-api)))))