~ruther/guix-local

329b2dca076c7df4f3e53bfd29e5d486c8f12bd9 — Ludovic Courtès 2 months ago 7fd60bf
gnu: git: Define ‘PATH_MAX’ on GNU/Hurd.

Fixes a regression introduced in 04e9e4a4623391bb225dcc0dd3003a0d3300f16d.

* gnu/packages/patches/git-clar-path-max.patch: New file.
* gnu/packages/version-control.scm (git-minimal): Use it.
* gnu/local.mk (dist_patch_DATA): Add it.

Change-Id: I7b1eb519952674cf66b745bd0a71bbe3395d3bdc
3 files changed, 19 insertions(+), 1 deletions(-)

M gnu/local.mk
A gnu/packages/patches/git-clar-path-max.patch
M gnu/packages/version-control.scm
M gnu/local.mk => gnu/local.mk +1 -0
@@ 1439,6 1439,7 @@ dist_patch_DATA =						\
  %D%/packages/patches/ghostscript-no-header-creationdate.patch \
  %D%/packages/patches/gimp-fix-metadata-editor.patch		\
  %D%/packages/patches/gimp-fix-tiff-load.patch			\
  %D%/packages/patches/git-clar-path-max.patch			\
  %D%/packages/patches/git-filter-repo-generate-doc.patch	\
  %D%/packages/patches/gklib-suitesparse.patch			\
  %D%/packages/patches/glib-appinfo-watch.patch			\

A gnu/packages/patches/git-clar-path-max.patch => gnu/packages/patches/git-clar-path-max.patch +16 -0
@@ 0,0 1,16 @@
On GNU/Hurd, 'PATH_MAX' is undefined.  Provide a reasonable default value.
Adapted from <https://github.com/libgit2/libgit2/pull/7100>.

diff --git a/tests/clar/clar.h b/tests/clar/clar.h
index ca72292ae91..98e2b14e880 100644
--- a/t/unit-tests/clar/clar.h
+++ b/t/unit-tests/clar/clar.h
@@ -14,6 +14,8 @@
 # define CLAR_MAX_PATH 4096
 #elif defined(_WIN32)
 # define CLAR_MAX_PATH MAX_PATH
+#elif !defined(PATH_MAX)			  /* GNU/Hurd */
+# define CLAR_MAX_PATH 4096
 #else
 # define CLAR_MAX_PATH PATH_MAX
 #endif

M gnu/packages/version-control.scm => gnu/packages/version-control.scm +2 -1
@@ 320,7 320,8 @@ Python 3.3 and later, rather than on Python 2.")
                                  version ".tar.xz"))
              (sha256
               (base32
                "1ifpkrr64g8b0vv13155gz876s2f4vcqrvhgc75lkab9dzlgxn1w"))))
                "1ifpkrr64g8b0vv13155gz876s2f4vcqrvhgc75lkab9dzlgxn1w"))
              (patches (search-patches "git-clar-path-max.patch"))))
    (build-system gnu-build-system)
    (arguments
     (list