From c786dff09933e898254eff9ee17d6ce345dba327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 4 Apr 2019 14:28:34 +0200 Subject: gnu: java-jgit: Move to java.scm. * gnu/packages/version-control.scm (java-jgit, java-jgit-4.2): Move to... * gnu/packages/java.scm (java-jgit, java-jgit-4.2): ... here. --- gnu/packages/java.scm | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) (limited to 'gnu/packages/java.scm') diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 47dc89d373..69b4c9b684 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -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))))) -- cgit v1.2.3