summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@friendly-machines.com>2026-04-01 00:38:28 +0200
committerDanny Milosavljevic <dannym@friendly-machines.com>2026-05-03 02:30:25 +0200
commitca9d9602d603d18908118eb03603d8dc915e92fe (patch)
treeaee50e24658b0b1a6c0daa30f223f8acf0bac70a /gnu
parent7c6386a8cd397e8036a98ac501dd1b9178ca251b (diff)
gnu: Add java-jgit@7.
* gnu/packages/java.scm (java-jgit-7): New variable. Change-Id: I7576743ff1a44b7cf7392bf9dd089dabc8343d9a
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/java.scm85
1 files changed, 85 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index a522ba72a1f..892aa76916b 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -15645,6 +15645,91 @@ network protocols, and core version control algorithms.")
15645 (inputs 15645 (inputs
15646 (list java-javaewah java-jsch java-slf4j-api)))) 15646 (list java-javaewah java-jsch java-slf4j-api))))
15647 15647
15648(define-public java-jgit-7
15649 (package
15650 (name "java-jgit")
15651 (version "7.0.0.202409031743-r")
15652 (source (origin
15653 (method url-fetch)
15654 (uri (string-append "https://repo1.maven.org/maven2/"
15655 "org/eclipse/jgit/org.eclipse.jgit/"
15656 version "/org.eclipse.jgit-"
15657 version "-sources.jar"))
15658 (sha256
15659 (base32
15660 "0hdl11cbb6zy39zw4jpg0ip00nikilw7dajrqky6d3l18khjby5k"))))
15661 (build-system ant-build-system)
15662 (arguments
15663 `(#:tests? #f ; sources jar has no tests
15664 #:jar-name "jgit.jar"
15665 #:jdk ,openjdk17
15666 #:modules ((guix build ant-build-system)
15667 (guix build utils)
15668 (guix build java-utils)
15669 (srfi srfi-1))
15670 #:phases
15671 (modify-phases %standard-phases
15672 (add-after 'build 'add-properties
15673 (lambda* (#:key jar-name #:allow-other-keys)
15674 (with-directory-excursion "src"
15675 (apply invoke "jar" "-uf"
15676 (string-append "../build/jar/" jar-name)
15677 (find-files "." "\\.properties$")))
15678 (let* ((pkgs (delete-duplicates
15679 (filter-map
15680 (lambda (f)
15681 (let* ((d (dirname f))
15682 (d (if (string-prefix? "./" d)
15683 (substring d 2)
15684 d)))
15685 (and (not (string-null? d))
15686 (not (string=? d "."))
15687 (string-map
15688 (lambda (c)
15689 (if (char=? c #\/) #\. c))
15690 d))))
15691 (with-directory-excursion "build/classes"
15692 (find-files "." "\\.class$")))))
15693 (export-pkg (string-join (sort pkgs string<?) ",")))
15694 ;; Write manifest with continuation lines for long values.
15695 ;; Manifest spec: max 72 bytes per line, continuation
15696 ;; lines start with a single space.
15697 (call-with-output-file "osgi-manifest.mf"
15698 (lambda (port)
15699 (for-each
15700 (lambda (line)
15701 (let loop ((s line))
15702 (if (<= (string-length s) 70)
15703 (begin (display s port) (newline port))
15704 (begin (display (substring s 0 70) port)
15705 (newline port)
15706 (loop (string-append
15707 " " (substring s 70)))))))
15708 (list
15709 "Bundle-ManifestVersion: 2"
15710 "Bundle-SymbolicName: org.eclipse.jgit"
15711 (string-append "Bundle-Version: " ,version)
15712 (string-append "Export-Package: " export-pkg)
15713 (string-append
15714 "Import-Package: com.googlecode.javaewah,"
15715 "javax.crypto,javax.management,javax.net.ssl,"
15716 "org.apache.commons.codec.digest,"
15717 "org.slf4j,org.xml.sax,org.xml.sax.helpers")))
15718 (newline port))))
15719 (invoke "jar" "ufm" (string-append "build/jar/" jar-name)
15720 "osgi-manifest.mf")))
15721 (replace 'install
15722 (install-from-pom
15723 "src/META-INF/maven/org.eclipse.jgit/org.eclipse.jgit/pom.xml")))))
15724 (inputs
15725 (list java-commons-codec java-javaewah-1.2.3 java-slf4j-api))
15726 (home-page "https://eclipse.org/jgit/")
15727 (synopsis "Java library implementing the Git version control system")
15728 (description "JGit is a lightweight, pure Java library implementing the
15729Git version control system, providing repository access routines, support for
15730network protocols, and core version control algorithms.")
15731 (license license:edl1.0)))
15732
15648(define-public abcl 15733(define-public abcl
15649 (package 15734 (package
15650 (name "abcl") 15735 (name "abcl")