mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
gnu: libgit2: Update to 1.4.3.
* gnu/packages/version-control.scm (libgit2): Update to 1.4.3. [source]: Adjust snippet to comment out the "10 years ago" test, which was changed in 1.4.3 but is still problematic. [arguments]: Add "-DUSE_SSH=ON". Remove 'fix-hardcoded-paths' phase. Adjust 'check' phase for new executable name. (libgit2-1.3): New variable. (libgit2-1.1): Inherit from 'libgit2-1.3'; inherit from its origin too. * gnu/packages/crates-io.scm (rust-git2-0.13)[inputs]: Use LIBGIT2-1.3. * gnu/packages/python-xyz.scm (python-pygit2)[propagated-inputs]: Likewise. Co-authored-by: Maxime Devos <maximedevos@telenet.be>
This commit is contained in:
parent
d24ad39491
commit
e764b89a52
3 changed files with 41 additions and 29 deletions
|
@ -25048,7 +25048,7 @@ (define-public rust-git2-0.13
|
|||
`(("pkg-config" ,pkg-config)
|
||||
("git" ,git-minimal))) ;for a single test
|
||||
(inputs
|
||||
(list libgit2 libssh2 openssl zlib))
|
||||
(list libgit2-1.3 libssh2 openssl zlib))
|
||||
(home-page "https://github.com/rust-lang/git2-rs")
|
||||
(synopsis "Rust bindings to libgit2")
|
||||
(description
|
||||
|
|
|
@ -6137,7 +6137,7 @@ (define-public python-pygit2
|
|||
(arguments
|
||||
'(#:tests? #f)) ; tests don't run correctly in our environment
|
||||
(propagated-inputs
|
||||
(list python-cached-property python-cffi libgit2))
|
||||
(list python-cached-property python-cffi libgit2-1.3))
|
||||
(native-inputs
|
||||
(list python-pytest))
|
||||
(home-page "https://github.com/libgit2/pygit2")
|
||||
|
|
|
@ -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 @@ (define-public git-cal
|
|||
(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 @@ (define-public libgit2
|
|||
(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 @@ (define-public libgit2
|
|||
(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 @@ (define-public libgit2
|
|||
'()))
|
||||
#: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 @@ (define-public libgit2
|
|||
;; 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 @@ (define-public libgit2-1.1
|
|||
(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
|
||||
|
|
Loading…
Reference in a new issue