gnu: gtk+-2: Split binaries.
[jackhill/guix/guix.git] / gnu / packages / version-control.scm
index b1fd019..cf60f02 100644 (file)
@@ -5,7 +5,7 @@
 ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2014, 2016, 2019 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015, 2018 Kyle Meyer <kyle@kyleam.com>
 ;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
@@ -141,19 +141,23 @@ changes to project files over time.  It supports both a distributed workflow
 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.22.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
-              "17zj6jwx3s6bybd290f1mj5iym1r64560rmnf0p63x4akxclp7hm"))))
+              "0ql5z31vgl7b785gwrf00m129mg7zi9pa65n12ij3mpxx3f28gvj"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("native-perl" ,perl)
@@ -166,7 +170,7 @@ as well as the classic centralized workflow.")
                 version ".tar.xz"))
           (sha256
            (base32
-            "0fpfqw0h4g4v478fscic8z714i0ls5w7946vzhmq31lf7nizsb2f"))))
+            "1yzy5jikkv67ynp576j926kg8zdldh8j4b57l0ixcnjdcyr4lc17"))))
       ;; For subtree documentation.
       ("asciidoc" ,asciidoc)
       ("docbook-xsl" ,docbook-xsl)
@@ -183,14 +187,17 @@ as well as the classic centralized workflow.")
       ;; 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)
@@ -216,6 +223,8 @@ as well as the classic centralized workflow.")
                                      (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>.
@@ -233,7 +242,10 @@ as well as the classic centralized workflow.")
       ;; 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)
@@ -250,6 +262,15 @@ as well as the classic centralized workflow.")
                               (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"
@@ -505,8 +526,13 @@ everything from small to very large projects with speed and efficiency.")
                  (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"))
@@ -524,7 +550,7 @@ everything from small to very large projects with speed and efficiency.")
 (define-public libgit2
   (package
     (name "libgit2")
-    (version "0.28.2")
+    (version "0.28.4")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -533,7 +559,7 @@ everything from small to very large projects with speed and efficiency.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0cm8fvs05rj0baigs2133q5a0sm3pa234y8h6hmwhl2bz9xq3k4b"))
+                "171b25aym4q88bidc4c76y4l6jmdwifm3q9zjqsll0wjhlkycfy1"))
               (patches (search-patches "libgit2-avoid-python.patch"
                                        "libgit2-mtime-0.patch"))
 
@@ -545,7 +571,14 @@ everything from small to very large projects with speed and efficiency.")
     (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
@@ -560,9 +593,13 @@ everything from small to very large projects with speed and efficiency.")
            (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)))
@@ -757,10 +794,10 @@ collaboration using typical untrusted file hosts or services.")
         ,(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)
@@ -1223,14 +1260,14 @@ control to Git repositories.")
 (define-public mercurial
   (package
     (name "mercurial")
-    (version "5.0.1")
+    (version "5.0.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://www.mercurial-scm.org/"
                                  "release/mercurial-" version ".tar.gz"))
              (sha256
               (base32
-               "1kk27radafw2q18khg9mk52vny3bmki5wf7pbsmgx5amrpjai62c"))))
+               "1y60hfc8gh4ha9sw650qs7hndqmvbn0qxpmqwpn4q18z5xwm1f19"))))
     (build-system python-build-system)
     (arguments
      `(;; Restrict to Python 2, as Python 3 would require
@@ -1301,7 +1338,7 @@ following features:
 (define-public subversion
   (package
     (name "subversion")
-    (version "1.10.4")
+    (version "1.10.6")
     (source (origin
              (method url-fetch)
              (uri
@@ -1312,7 +1349,7 @@ following features:
                                 "subversion-" version ".tar.bz2")))
              (sha256
               (base32
-               "18c1vdq32nil76w678lxmp73jsbqha3dmzgmfrj76nc0xjmywql2"))))
+               "19zc215mhpnm92mlyl5jbv57r5zqp6cavr3s2g9yglp6j4kfgj0q"))))
     (build-system gnu-build-system)
     (arguments
      '(#:phases
@@ -1390,6 +1427,15 @@ projects, from individuals to large-scale enterprise operations.")
              (patches (search-patches "rcs-5.9.4-noreturn.patch"))))
     (build-system gnu-build-system)
     (native-inputs `(("ed" ,ed)))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-before 'check 'disable-t810
+                    ;; See https://savannah.gnu.org/bugs/index.php?52288
+                    ;; Back-porting the fix is non-trivial, so disable for now.
+                    (lambda _
+                      (substitute* "tests/Makefile"
+                        ((" t810 \\\\\n") ""))
+                     #t)))))
     (home-page "https://www.gnu.org/software/rcs/")
     (synopsis "Per-file local revision control system")
     (description
@@ -1942,7 +1988,7 @@ by rclone usable with git-annex.")
     (inputs
      `(("openssl" ,openssl)
        ("zlib" ,zlib)
-       ("sqlite" ,sqlite-3.26.0)))
+       ("sqlite" ,sqlite)))
     (arguments
      `(#:configure-flags (list "--with-openssl=auto"
                                "--disable-internal-sqlite")