as well as the classic centralized workflow.")
(license license:gpl2+)))
+(define git-cross-configure-flags
+ '("ac_cv_fread_reads_directories=yes"
+ "ac_cv_snprintf_returns_bogus=no"))
+
(define-public git
(package
(name "git")
;; XXX When updating Git, check if the special 'git-source' input to cgit
;; needs to be updated as well.
- (version "2.23.0")
+ (version "2.24.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://kernel.org/software/scm/git/git-"
version ".tar.xz"))
(sha256
(base32
- "0rv0y45gcd3h191isppn77acih695v4pipdj031jvs9rd1ds0kr3"))))
+ "0ql5z31vgl7b785gwrf00m129mg7zi9pa65n12ij3mpxx3f28gvj"))))
(build-system gnu-build-system)
(native-inputs
`(("native-perl" ,perl)
version ".tar.xz"))
(sha256
(base32
- "0sllhyl0w29v4n303hqfmcc3apafnwk4sk78anyjjhpzd0zl6n4m"))))
+ "1yzy5jikkv67ynp576j926kg8zdldh8j4b57l0ixcnjdcyr4lc17"))))
;; For subtree documentation.
("asciidoc" ,asciidoc)
("docbook-xsl" ,docbook-xsl)
;; a problem in 'patch-shebangs'; see <https://bugs.gnu.org/31952>.
("bash-for-tests" ,bash)
- ;; For 'gitweb.cgi'
+ ;; For PCRE support in git grep (USE_LIBPCRE2).
+ ("pcre" ,pcre2)
+
+ ;; For 'gitweb.cgi'.
("perl-cgi" ,perl-cgi)
;; For 'git-svn'.
("subversion" ,subversion)
("perl-term-readkey" ,perl-term-readkey)
- ;; For 'git-send-email'
+ ;; For 'git-send-email'.
("perl-authen-sasl" ,perl-authen-sasl)
("perl-net-smtp-ssl" ,perl-net-smtp-ssl)
("perl-io-socket-ssl" ,perl-io-socket-ssl)
(assoc-ref %build-inputs "bash-for-tests")
"/bin/bash")
+ "USE_LIBPCRE2=yes"
+
;; By default 'make install' creates hard links for
;; things in 'libexec/git-core', which leads to huge
;; nars; see <https://bugs.gnu.org/21949>.
;; absolute file name to 'wish'.
#:configure-flags (list (string-append "--with-tcltk="
(assoc-ref %build-inputs "tk")
- "/bin/wish8.6")) ; XXX
+ "/bin/wish8.6") ; XXX
+ ,@(if (%current-target-system)
+ git-cross-configure-flags
+ '()))
#:modules ((srfi srfi-1)
(srfi srfi-26)
(remove (cut string-prefix? bash-full <>) path)
":"))
#t)))
+ ;; Add cross curl-config script to PATH when cross-compiling.
+ ,@(if (%current-target-system)
+ '((add-before 'configure 'add-cross-curl-config
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "PATH"
+ (string-append (assoc-ref inputs "curl") "/bin:"
+ (getenv "PATH")))
+ #t)))
+ '())
(add-after 'configure 'patch-makefiles
(lambda _
(substitute* "Makefile"
(delete-file-recursively
(string-append out "/share/gitweb"))
#t)))))
+ ((#:make-flags flags)
+ `(delete "USE_LIBPCRE2=yes" ,flags))
((#:configure-flags flags)
- ''())
+ `(list
+ ,@(if (%current-target-system)
+ git-cross-configure-flags
+ '())))
((#:disallowed-references lst '())
`(,perl ,@lst))))
(outputs '("out"))
(define-public libgit2
(package
(name "libgit2")
- (version "0.28.3")
+ (version "0.28.4")
(source (origin
(method git-fetch)
(uri (git-reference
(file-name (git-file-name name version))
(sha256
(base32
- "07068flm9xi25wmcs65nyfg6a7ikgfv96i2nhgyj5gzs9gljqiz2"))
+ "171b25aym4q88bidc4c76y4l6jmdwifm3q9zjqsll0wjhlkycfy1"))
(patches (search-patches "libgit2-avoid-python.patch"
"libgit2-mtime-0.patch"))
(build-system cmake-build-system)
(outputs '("out" "debug"))
(arguments
- `(#:configure-flags '("-DUSE_SHA1DC=ON") ; SHA-1 collision detection
+ `(#:configure-flags
+ (list "-DUSE_SHA1DC=ON" ; SHA-1 collision detection
+ ,@(if (%current-target-system)
+ `((string-append
+ "-DPKG_CONFIG_EXECUTABLE="
+ (assoc-ref %build-inputs "pkg-config")
+ "/bin/" ,(%current-target-system) "-pkg-config"))
+ '()))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-hardcoded-paths
(lambda _
(for-each make-file-writable (find-files "."))
#t))
- ;; Run checks more verbosely.
+ ;; Run checks more verbosely, unless we are cross-compiling.
(replace 'check
- (lambda _ (invoke "./libgit2_clar" "-v" "-Q"))))))
+ (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.~%")))))))
(inputs
`(("libssh2" ,libssh2)
("http-parser" ,http-parser)))
,(origin
(method url-fetch)
;; XXX CGit is currently incompatible with Git > 2.18.
- (uri "mirror://kernel.org/software/scm/git/git-2.18.0.tar.xz")
+ (uri "mirror://kernel.org/software/scm/git/git-2.18.2.tar.xz")
(sha256
(base32
- "14hfwfkrci829a9316hnvkglnqqw1p03cw9k56p4fcb078wbwh4b"))))
+ "1gmcz5k8sa6phzhhv6zjl8izbyqnxcdb8ns8kd2czyak0g409vrq"))))
("openssl" ,openssl)
("groff" ,groff)
("python" ,python)