diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2025-04-12 17:45:21 +0200 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-03-06 14:52:03 +0100 |
| commit | c5cff587eb48d1c0e37c313f97bdf0f052932751 (patch) | |
| tree | b37e27f50b77875d3cf073c9cb4a94410a44b4d9 | |
| parent | 38e7132dcfd37799a1392eb1a6fcdaa2c16bdfef (diff) | |
gnu: fontconfig: Update to 2.16.0 and modernize.
* gnu/packages/fontutils.scm (fontconfig): Update to 2.16.0.
[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.
[arguments]: Use gexps.
[native-inputs]: Use modify-inputs.
[home-page]: Add missing trailing /.
Co-authored-by: Andreas Enge <andreas@enge.fr>
Change-Id: I8704eec8cef310c7b1122db7a65e612c8c13fbe2
| -rw-r--r-- | gnu/packages/fontutils.scm | 122 | ||||
| -rw-r--r-- | gnu/packages/patches/fontconfig-cache-ignore-mtime.patch | 4 |
2 files changed, 64 insertions, 62 deletions
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 942224eaa2f..741826f4091 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -1376,59 +1376,64 @@ 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") + (version "2.16.0") (source (origin (method url-fetch) (uri (string-append "https://www.freedesktop.org/software/" "fontconfig/release/fontconfig-" version ".tar.xz")) (sha256 (base32 - "1b4v1r94ri44p4a3kbwd38ig5jgdgcfgwdfm6fqzvfvlki6bignw")) + "086jdsdxmc9ryr0n0dmgs0vfnkhkxxw5hsgpr888pfn9biaxqcva")) (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") + (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")))))) + (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; @@ -1448,12 +1453,10 @@ high quality, anti-aliased and subpixel rendered text on a display.") (list (search-path-specification (variable "XDG_DATA_DIRS") (files '("share"))))) - (home-page "https://www.freedesktop.org/wiki/Software/fontconfig")))) + (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) @@ -1462,32 +1465,31 @@ high quality, anti-aliased and subpixel rendered text on a display.") (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 b6e942ee102..3afe8cfd787 100644 --- a/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch +++ b/gnu/packages/patches/fontconfig-cache-ignore-mtime.patch @@ -2,10 +2,10 @@ 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) { |
