guix_mirror_bot pushed a commit to branch gnome-team
in repository guix.
commit 353f700e0bfe32794cdc5cc06699c7f473fbe4ef
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Sat Apr 12 17:45:21 2025 +0200
gnu: fontconfig: Update to 2.16.2 and modernize.
* gnu/packages/fontutils.scm (fontconfig): Update to 2.16.2.
[source]: Fetch from git.
[name]: Normalize to 'fonconfig', which fixes 'guix refresh'.
[propagated-inputs]: Remove labels.
[native-inputs]: Likewise. Add autoconf-2.71, automake, gettext-minimal and
libtool.
[configure-flags]: Use gexps.
[phases]: Likewise.
(fontconfig-with-documentation): Streamline comment. Inherit name.
[arguments]: Use gexps.
[native-inputs]: Use modify-inputs.
* gnu/packages/patches/fontconfig-cache-ignore-mtime.patch: Rebase.
Change-Id: I8704eec8cef310c7b1122db7a65e612c8c13fbe2
---
gnu/packages/fontutils.scm | 139 +++++++++++----------
.../patches/fontconfig-cache-ignore-mtime.patch | 8 +-
2 files changed, 75 insertions(+), 72 deletions(-)
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index cf43ec25e5..3f07e1e0a7 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -1403,59 +1403,66 @@ Font Format (WOFF).")
(home-page "https://w3c.github.io/woff/woff2/")
(license license:expat)))
+;;; Update with: guix refresh -u '(@ (gnu packages fontutils) fontconfig)'
(define-public fontconfig
(hidden-package
(package
(name "fontconfig-minimal")
- (version "2.14.0")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://www.freedesktop.org/software/"
- "fontconfig/release/fontconfig-" version ".tar.xz"))
- (sha256 (base32
-
"1b4v1r94ri44p4a3kbwd38ig5jgdgcfgwdfm6fqzvfvlki6bignw"))
- (patches (search-patches
"fontconfig-cache-ignore-mtime.patch"))))
+ (version "2.16.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.freedesktop.org/fontconfig/fontconfig")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256 (base32
+ "0cvgca4bh0m4n61syzsr6npqszp4wfsvrhbf8n5r1djvh8gvjv27"))
+ (patches (search-patches "fontconfig-cache-ignore-mtime.patch"))))
(build-system gnu-build-system)
;; In Requires or Requires.private of fontconfig.pc.
- (propagated-inputs `(("expat" ,expat)
- ("freetype" ,freetype)
- ("libuuid" ,util-linux "lib")))
+ (propagated-inputs (list expat freetype
+ `(,util-linux "lib")))
(inputs
;; We use to use 'font-ghostscript' but they are not recognized by newer
;; versions of Pango, causing many applications to fail to find fonts
;; otherwise.
(list font-dejavu))
(native-inputs
- `(("gperf" ,gperf)
- ("pkg-config" ,pkg-config)
- ("python" ,python-minimal))) ;to avoid a cycle through tk
+ (list autoconf-2.71
+ automake
+ gettext-minimal
+ gperf
+ libtool
+ pkg-config
+ python-minimal)) ;to avoid a cycle through tk
(arguments
- `(#:configure-flags
- (list "--disable-docs"
- "--with-cache-dir=/var/cache/fontconfig"
- ;; register the default fonts
- (string-append "--with-default-fonts="
- (assoc-ref %build-inputs "font-dejavu")
- "/share/fonts"))
- #:phases
- (modify-phases %standard-phases
- (add-before 'check 'skip-problematic-tests
- (lambda _
- ;; SOURCE_DATE_EPOCH doesn't make sense when ignoring mtime
- (unsetenv "SOURCE_DATE_EPOCH")
-
- (substitute* "test/run-test.sh"
- ;; The crbug1004254 test attempts to fetch fonts from the
- ;; network.
- (("\\[ -x \"\\$BUILDTESTDIR\"/test-crbug1004254 \\]")
- "false"))))
- (replace 'install
- (lambda _
- ;; Don't try to create /var/cache/fontconfig.
- (invoke "make" "install"
- "fc_cachedir=$(TMPDIR)"
- "RUN_FC_CACHE_TEST=false"))))))
+ (list
+ #:configure-flags
+ #~(list "--disable-docs"
+ "--with-cache-dir=/var/cache/fontconfig"
+ ;; register the default fonts
+ (string-append "--with-default-fonts="
+ #$(this-package-input "font-dejavu")
+ "/share/fonts"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'skip-problematic-tests
+ (lambda _
+ ;; SOURCE_DATE_EPOCH doesn't make sense when ignoring mtime
+ (unsetenv "SOURCE_DATE_EPOCH")
+
+ (substitute* "test/run-test.sh"
+ ;; The crbug1004254 test attempts to fetch fonts from the
+ ;; network.
+ (("\\[ -x \"\\$BUILDTESTDIR\"/test-crbug1004254 \\]")
+ "false"))))
+ (replace 'install
+ (lambda _
+ ;; Don't try to create /var/cache/fontconfig.
+ (invoke "make" "install"
+ "fc_cachedir=$(TMPDIR)"
+ "RUN_FC_CACHE_TEST=false"))))))
(synopsis "Library for configuring and customizing font access")
(description
"Fontconfig can discover new fonts when installed automatically;
@@ -1478,43 +1485,39 @@ high quality, anti-aliased and subpixel rendered text
on a display.")
(home-page "https://www.freedesktop.org/wiki/Software/fontconfig"))))
;;; The documentation of fontconfig is built in a separate package, as it
-;;; causes a dramatic increase in the size of the closure of fontconfig. This
-;;; is intentionally named 'fontconfig', as it's intended as the user-facing
-;;; fontconfig package.
+;;; causes a dramatic increase in the size of the closure of fontconfig.
(define-public fontconfig-with-documentation
(package
(inherit fontconfig)
- (name "fontconfig")
(outputs (cons "doc" (package-outputs fontconfig)))
(arguments
(substitute-keyword-arguments (package-arguments fontconfig)
((#:configure-flags configure-flags)
- `(delete "--disable-docs" ,configure-flags))
+ #~(delete "--disable-docs" #$configure-flags))
((#:phases phases '%standard-phases)
- `(modify-phases ,phases
- (add-after 'unpack 'no-pdf-doc
- (lambda _
- ;; Don't build documentation as PDF.
- (substitute* "doc/Makefile.in"
- (("^PDF_FILES = .*")
- "PDF_FILES =\n"))))
- (add-after 'install 'move-man-sections
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Move share/man/man{3,5} to the "doc" output. Leave "man1" in
- ;; "out" for convenience.
- (let ((out (assoc-ref outputs "out"))
- (doc (assoc-ref outputs "doc")))
- (for-each (lambda (section)
- (let ((source (string-append out "/share/man/"
- section))
- (target (string-append doc "/share/man/"
- section)))
- (copy-recursively source target)
- (delete-file-recursively source)))
- '("man3" "man5")))))))))
+ #~(modify-phases #$phases
+ (add-after 'unpack 'no-pdf-doc
+ (lambda _
+ ;; Don't build documentation as PDF.
+ (substitute* "doc/Makefile.in"
+ (("^PDF_FILES = .*")
+ "PDF_FILES =\n"))))
+ (add-after 'install 'move-man-sections
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Move share/man/man{3,5} to the "doc" output. Leave "man1"
in
+ ;; "out" for convenience.
+ (for-each
+ (lambda (section)
+ (let ((source (string-append #$output "/share/man/"
+ section))
+ (target (string-append #$output:doc "/share/man/"
+ section)))
+ (copy-recursively source target)
+ (delete-file-recursively source)))
+ '("man3" "man5"))))))))
(native-inputs
- (append (package-native-inputs fontconfig)
- `(("docbook-utils" ,docbook-utils))))
+ (modify-inputs (package-native-inputs fontconfig)
+ (append docbook-utils)))
(properties (alist-delete 'hidden? (package-properties fontconfig)))))
(define-public t1lib
diff --git a/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
b/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
index b6e942ee10..fa1df8bb9b 100644
--- a/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
+++ b/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch
@@ -2,14 +2,14 @@ Pretend that stat's mtime is broken, so that the fontconfig
cache does not
depend upon modification time to determine if a cache is stale.
diff --git a/src/fcstat.c b/src/fcstat.c
-index 5a2bd7c..d603a96 100644
+index 9b54e2b4..76d7780e 100644
--- a/src/fcstat.c
+++ b/src/fcstat.c
-@@ -431,6 +431,7 @@ FcIsFsMmapSafe (int fd)
+@@ -415,6 +415,7 @@ FcIsFsMmapSafe (int fd)
FcBool
FcIsFsMtimeBroken (const FcChar8 *dir)
{
+ return FcTrue;
- int fd = FcOpen ((const char *) dir, O_RDONLY);
+ int fd = FcOpen ((const char *)dir, O_RDONLY);
- if (fd != -1)
+ if (fd != -1) {