gnu: fontconfig: Build fix for the Hurd.
authorJan Nieuwenhuizen <janneke@gnu.org>
Mon, 9 Mar 2020 00:07:24 +0000 (20:07 -0400)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 26 Mar 2020 11:59:33 +0000 (12:59 +0100)
* gnu/packages/patches/fontconfig-hurd-path-max.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/fontutils.scm (fontconfig): Use it.

gnu/local.mk
gnu/packages/fontutils.scm
gnu/packages/patches/fontconfig-hurd-path-max.patch [new file with mode: 0644]

index 5f5b449..2ab58b9 100644 (file)
@@ -886,6 +886,7 @@ dist_patch_DATA =                                           \
   %D%/packages/patches/foobillard++-pkg-config.patch           \
   %D%/packages/patches/foomatic-filters-CVE-2015-8327.patch    \
   %D%/packages/patches/foomatic-filters-CVE-2015-8560.patch    \
+  %D%/packages/patches/fontconfig-hurd-path-max.patch          \
   %D%/packages/patches/freeimage-unbundle.patch                \
   %D%/packages/patches/fuse-overlapping-headers.patch                          \
   %D%/packages/patches/gawk-shell.patch                                \
index 6784dc7..ba0d075 100644 (file)
@@ -296,6 +296,7 @@ fonts to/from the WOFF2 format.")
             (uri (string-append
                    "https://www.freedesktop.org/software/fontconfig/release/fontconfig-"
                    version ".tar.bz2"))
+            (patches (search-patches "fontconfig-hurd-path-max.patch"))
             (sha256 (base32
                      "0hb700a68kk0ip51wdlnjjc682kvlrmb6q920mzajykdk0mdsmgn"))))
    (build-system gnu-build-system)
diff --git a/gnu/packages/patches/fontconfig-hurd-path-max.patch b/gnu/packages/patches/fontconfig-hurd-path-max.patch
new file mode 100644 (file)
index 0000000..f804e68
--- /dev/null
@@ -0,0 +1,17 @@
+Avoid usage of PATH_MAX.
+
+Taken from https://salsa.debian.org/freedesktop-team/fontconfig/-/blob/master/debian/patches/path_max.patch
+
+Index: fontconfig-2.13.1/src/fccfg.c
+===================================================================
+--- fontconfig-2.13.1.orig/src/fccfg.c
++++ fontconfig-2.13.1/src/fccfg.c
+@@ -2231,7 +2231,7 @@ FcConfigRealFilename (FcConfig           *config,
+     if (n)
+     {
+-      FcChar8 buf[PATH_MAX];
++      FcChar8 buf[FC_PATH_MAX];
+       ssize_t len;
+       if (sysroot)