summary refs log tree commit diff
path: root/gnu/packages/version-control.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/version-control.scm')
-rw-r--r--gnu/packages/version-control.scm66
1 files changed, 39 insertions, 27 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 49b53789f9..d528a08e63 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -44,6 +44,7 @@
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
+;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -789,7 +790,7 @@ to GitHub contributions calendar.")
 (define-public libgit2
   (package
     (name "libgit2")
-    (version "1.3.0")
+    (version "1.4.3")
     (source (origin
               ;; Since v1.1.1, release artifacts are no longer offered (see:
               ;; https://github.com/libgit2/libgit2/discussions/5932#discussioncomment-1682729).
@@ -800,18 +801,18 @@ to GitHub contributions calendar.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0vgpb2175a5dhqiy1iwywwppahgqhi340i8bsvafjpvkw284vazd"))
+                "02x1a4zrzpzjd0yxnsi8njh5hgihc1iy1v4r0fnl8m4ckcgp6x2s"))
               (modules '((guix build utils)))
               (snippet
                '(begin
                   (delete-file-recursively "deps")
 
                   ;; The "refs:revparse::date" test is time-dependent: it
-                  ;; assumes "HEAD@{10 years ago}" doesn't match anything,
-                  ;; which is no longer true.  Adjust that test.
+                  ;; assumes "HEAD@{10 years ago}" matches a specific commit.
+                  ;; See <https://github.com/libgit2/libgit2/pull/6299>.
                   (substitute* "tests/refs/revparse.c"
-                    (("10 years ago")
-                     "100 years ago"))))))
+                    (("test_object.*10 years ago.*" all)
+                     (string-append "// " all "\n")))))))
     (build-system cmake-build-system)
     (outputs '("out" "debug"))
     (arguments
@@ -819,6 +820,7 @@ to GitHub contributions calendar.")
        (list "-DUSE_NTLMCLIENT=OFF" ;TODO: package this
              "-DREGEX_BACKEND=pcre2"
              "-DUSE_HTTP_PARSER=system"
+             "-DUSE_SSH=ON" ; cmake fails to find libssh if this is missing
              ,@(if (%current-target-system)
                    `((string-append
                       "-DPKG_CONFIG_EXECUTABLE="
@@ -829,18 +831,11 @@ to GitHub contributions calendar.")
                    '()))
        #:phases
        (modify-phases %standard-phases
-         (add-after 'unpack 'fix-hardcoded-paths
-           (lambda _
-             (substitute* "tests/repo/init.c"
-               (("#!/bin/sh") (string-append "#!" (which "sh"))))
-             (substitute* "tests/clar/fs.h"
-               (("/bin/cp") (which "cp"))
-               (("/bin/rm") (which "rm")))))
          ;; Run checks more verbosely, unless we are cross-compiling.
          (replace 'check
            (lambda* (#:key (tests? #t) #:allow-other-keys)
              (if tests?
-                 (invoke "./libgit2_clar" "-v" "-Q")
+                 (invoke "./libgit2_tests" "-v" "-Q")
                  ;; Tests may be disabled if cross-compiling.
                  (format #t "Test suite not run.~%")))))))
     (inputs
@@ -859,12 +854,39 @@ write native speed custom Git applications in any language with bindings.")
     ;; GPLv2 with linking exception
     (license license:gpl2)))
 
-(define-public libgit2-1.1
+(define-public libgit2-1.3
   (package
     (inherit libgit2)
-    (name "libgit2")
+    (version "1.3.0")
+    (source (origin
+              (inherit (package-source libgit2))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/libgit2/libgit2")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name "libgit2" version))
+              (sha256
+               (base32
+                "0vgpb2175a5dhqiy1iwywwppahgqhi340i8bsvafjpvkw284vazd"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments libgit2)
+       ((#:phases _ '%standard-phases)
+        `(modify-phases %standard-phases
+           ;; Run checks more verbosely, unless we are cross-compiling.
+           (replace 'check
+             (lambda* (#:key (tests? #t) #:allow-other-keys)
+               (if tests?
+                   (invoke "./libgit2_clar" "-v" "-Q")
+                   ;; Tests may be disabled if cross-compiling.
+                   (format #t "Test suite not run.~%"))))))))))
+
+(define-public libgit2-1.1
+  (package
+    (inherit libgit2-1.3)
     (version "1.1.0")
     (source (origin
+              (inherit (package-source libgit2-1.3))
+              (file-name #f)                      ;use the default name
               (method url-fetch)
               (uri (string-append "https://github.com/libgit2/libgit2/"
                                   "releases/download/v" version
@@ -872,17 +894,7 @@ write native speed custom Git applications in any language with bindings.")
               (sha256
                (base32
                 "1fjdglkh04qv3b4alg621pxa689i0wlf8m7nf2755zawjr2zhwxd"))
-              (patches (search-patches "libgit2-mtime-0.patch"))
-              (snippet '(begin
-                          (delete-file-recursively "deps")
-
-                          ;; The "refs:revparse::date" test is time-dependent: it
-                          ;; assumes "HEAD@{10 years ago}" doesn't match anything,
-                          ;; which is no longer true.  Adjust that test.
-                          (substitute* "tests/refs/revparse.c"
-                            (("10 years ago")
-                             "100 years ago"))))
-              (modules '((guix build utils)))))))
+              (patches (search-patches "libgit2-mtime-0.patch"))))))
 
 (define-public git-crypt
   (package