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 /gnu/packages/fontutils.scm | |
| 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
Diffstat (limited to 'gnu/packages/fontutils.scm')
| -rw-r--r-- | gnu/packages/fontutils.scm | 124 |
1 files changed, 63 insertions, 61 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).") | |||
| 1376 | (home-page "https://w3c.github.io/woff/woff2/") | 1376 | (home-page "https://w3c.github.io/woff/woff2/") |
| 1377 | (license license:expat))) | 1377 | (license license:expat))) |
| 1378 | 1378 | ||
| 1379 | ;;; Update with: guix refresh -u '(@ (gnu packages fontutils) fontconfig)' | ||
| 1379 | (define-public fontconfig | 1380 | (define-public fontconfig |
| 1380 | (hidden-package | 1381 | (hidden-package |
| 1381 | (package | 1382 | (package |
| 1382 | (name "fontconfig-minimal") | 1383 | (name "fontconfig-minimal") |
| 1383 | (version "2.14.0") | 1384 | (version "2.16.0") |
| 1384 | (source (origin | 1385 | (source (origin |
| 1385 | (method url-fetch) | 1386 | (method url-fetch) |
| 1386 | (uri (string-append | 1387 | (uri (string-append |
| 1387 | "https://www.freedesktop.org/software/" | 1388 | "https://www.freedesktop.org/software/" |
| 1388 | "fontconfig/release/fontconfig-" version ".tar.xz")) | 1389 | "fontconfig/release/fontconfig-" version ".tar.xz")) |
| 1389 | (sha256 (base32 | 1390 | (sha256 (base32 |
| 1390 | "1b4v1r94ri44p4a3kbwd38ig5jgdgcfgwdfm6fqzvfvlki6bignw")) | 1391 | "086jdsdxmc9ryr0n0dmgs0vfnkhkxxw5hsgpr888pfn9biaxqcva")) |
| 1391 | (patches (search-patches "fontconfig-cache-ignore-mtime.patch")))) | 1392 | (patches (search-patches "fontconfig-cache-ignore-mtime.patch")))) |
| 1392 | (build-system gnu-build-system) | 1393 | (build-system gnu-build-system) |
| 1393 | ;; In Requires or Requires.private of fontconfig.pc. | 1394 | ;; In Requires or Requires.private of fontconfig.pc. |
| 1394 | (propagated-inputs `(("expat" ,expat) | 1395 | (propagated-inputs (list expat freetype |
| 1395 | ("freetype" ,freetype) | 1396 | `(,util-linux "lib"))) |
| 1396 | ("libuuid" ,util-linux "lib"))) | ||
| 1397 | (inputs | 1397 | (inputs |
| 1398 | ;; We use to use 'font-ghostscript' but they are not recognized by newer | 1398 | ;; We use to use 'font-ghostscript' but they are not recognized by newer |
| 1399 | ;; versions of Pango, causing many applications to fail to find fonts | 1399 | ;; versions of Pango, causing many applications to fail to find fonts |
| 1400 | ;; otherwise. | 1400 | ;; otherwise. |
| 1401 | (list font-dejavu)) | 1401 | (list font-dejavu)) |
| 1402 | (native-inputs | 1402 | (native-inputs |
| 1403 | `(("gperf" ,gperf) | 1403 | (list autoconf-2.71 |
| 1404 | ("pkg-config" ,pkg-config) | 1404 | automake |
| 1405 | ("python" ,python-minimal))) ;to avoid a cycle through tk | 1405 | gettext-minimal |
| 1406 | gperf | ||
| 1407 | libtool | ||
| 1408 | pkg-config | ||
| 1409 | python-minimal)) ;to avoid a cycle through tk | ||
| 1406 | (arguments | 1410 | (arguments |
| 1407 | `(#:configure-flags | 1411 | (list |
| 1408 | (list "--disable-docs" | 1412 | #:configure-flags |
| 1409 | "--with-cache-dir=/var/cache/fontconfig" | 1413 | #~(list "--disable-docs" |
| 1410 | ;; register the default fonts | 1414 | "--with-cache-dir=/var/cache/fontconfig" |
| 1411 | (string-append "--with-default-fonts=" | 1415 | ;; register the default fonts |
| 1412 | (assoc-ref %build-inputs "font-dejavu") | 1416 | (string-append "--with-default-fonts=" |
| 1413 | "/share/fonts")) | 1417 | #$(this-package-input "font-dejavu") |
| 1414 | #:phases | 1418 | "/share/fonts")) |
| 1415 | (modify-phases %standard-phases | 1419 | #:phases |
| 1416 | (add-before 'check 'skip-problematic-tests | 1420 | #~(modify-phases %standard-phases |
| 1417 | (lambda _ | 1421 | (add-before 'check 'skip-problematic-tests |
| 1418 | ;; SOURCE_DATE_EPOCH doesn't make sense when ignoring mtime | 1422 | (lambda _ |
| 1419 | (unsetenv "SOURCE_DATE_EPOCH") | 1423 | ;; SOURCE_DATE_EPOCH doesn't make sense when ignoring mtime |
| 1420 | 1424 | (unsetenv "SOURCE_DATE_EPOCH") | |
| 1421 | (substitute* "test/run-test.sh" | 1425 | |
| 1422 | ;; The crbug1004254 test attempts to fetch fonts from the | 1426 | (substitute* "test/run-test.sh" |
| 1423 | ;; network. | 1427 | ;; The crbug1004254 test attempts to fetch fonts from the |
| 1424 | (("\\[ -x \"\\$BUILDTESTDIR\"/test-crbug1004254 \\]") | 1428 | ;; network. |
| 1425 | "false")))) | 1429 | (("\\[ -x \"\\$BUILDTESTDIR\"/test-crbug1004254 \\]") |
| 1426 | (replace 'install | 1430 | "false")))) |
| 1427 | (lambda _ | 1431 | (replace 'install |
| 1428 | ;; Don't try to create /var/cache/fontconfig. | 1432 | (lambda _ |
| 1429 | (invoke "make" "install" | 1433 | ;; Don't try to create /var/cache/fontconfig. |
| 1430 | "fc_cachedir=$(TMPDIR)" | 1434 | (invoke "make" "install" |
| 1431 | "RUN_FC_CACHE_TEST=false")))))) | 1435 | "fc_cachedir=$(TMPDIR)" |
| 1436 | "RUN_FC_CACHE_TEST=false")))))) | ||
| 1432 | (synopsis "Library for configuring and customizing font access") | 1437 | (synopsis "Library for configuring and customizing font access") |
| 1433 | (description | 1438 | (description |
| 1434 | "Fontconfig can discover new fonts when installed automatically; | 1439 | "Fontconfig can discover new fonts when installed automatically; |
| @@ -1448,12 +1453,10 @@ high quality, anti-aliased and subpixel rendered text on a display.") | |||
| 1448 | (list (search-path-specification | 1453 | (list (search-path-specification |
| 1449 | (variable "XDG_DATA_DIRS") | 1454 | (variable "XDG_DATA_DIRS") |
| 1450 | (files '("share"))))) | 1455 | (files '("share"))))) |
| 1451 | (home-page "https://www.freedesktop.org/wiki/Software/fontconfig")))) | 1456 | (home-page "https://www.freedesktop.org/wiki/Software/fontconfig/")))) |
| 1452 | 1457 | ||
| 1453 | ;;; The documentation of fontconfig is built in a separate package, as it | 1458 | ;;; The documentation of fontconfig is built in a separate package, as it |
| 1454 | ;;; causes a dramatic increase in the size of the closure of fontconfig. This | 1459 | ;;; causes a dramatic increase in the size of the closure of fontconfig. |
| 1455 | ;;; is intentionally named 'fontconfig', as it's intended as the user-facing | ||
| 1456 | ;;; fontconfig package. | ||
| 1457 | (define-public fontconfig-with-documentation | 1460 | (define-public fontconfig-with-documentation |
| 1458 | (package | 1461 | (package |
| 1459 | (inherit fontconfig) | 1462 | (inherit fontconfig) |
| @@ -1462,32 +1465,31 @@ high quality, anti-aliased and subpixel rendered text on a display.") | |||
| 1462 | (arguments | 1465 | (arguments |
| 1463 | (substitute-keyword-arguments (package-arguments fontconfig) | 1466 | (substitute-keyword-arguments (package-arguments fontconfig) |
| 1464 | ((#:configure-flags configure-flags) | 1467 | ((#:configure-flags configure-flags) |
| 1465 | `(delete "--disable-docs" ,configure-flags)) | 1468 | #~(delete "--disable-docs" #$configure-flags)) |
| 1466 | ((#:phases phases '%standard-phases) | 1469 | ((#:phases phases '%standard-phases) |
| 1467 | `(modify-phases ,phases | 1470 | #~(modify-phases #$phases |
| 1468 | (add-after 'unpack 'no-pdf-doc | 1471 | (add-after 'unpack 'no-pdf-doc |
| 1469 | (lambda _ | 1472 | (lambda _ |
| 1470 | ;; Don't build documentation as PDF. | 1473 | ;; Don't build documentation as PDF. |
| 1471 | (substitute* "doc/Makefile.in" | 1474 | (substitute* "doc/Makefile.in" |
| 1472 | (("^PDF_FILES = .*") | 1475 | (("^PDF_FILES = .*") |
| 1473 | "PDF_FILES =\n")))) | 1476 | "PDF_FILES =\n")))) |
| 1474 | (add-after 'install 'move-man-sections | 1477 | (add-after 'install 'move-man-sections |
| 1475 | (lambda* (#:key outputs #:allow-other-keys) | 1478 | (lambda* (#:key outputs #:allow-other-keys) |
| 1476 | ;; Move share/man/man{3,5} to the "doc" output. Leave "man1" in | 1479 | ;; Move share/man/man{3,5} to the "doc" output. Leave "man1" in |
| 1477 | ;; "out" for convenience. | 1480 | ;; "out" for convenience. |
| 1478 | (let ((out (assoc-ref outputs "out")) | 1481 | (for-each |
| 1479 | (doc (assoc-ref outputs "doc"))) | 1482 | (lambda (section) |
| 1480 | (for-each (lambda (section) | 1483 | (let ((source (string-append #$output "/share/man/" |
| 1481 | (let ((source (string-append out "/share/man/" | 1484 | section)) |
| 1482 | section)) | 1485 | (target (string-append #$output:doc "/share/man/" |
| 1483 | (target (string-append doc "/share/man/" | 1486 | section))) |
| 1484 | section))) | 1487 | (copy-recursively source target) |
| 1485 | (copy-recursively source target) | 1488 | (delete-file-recursively source))) |
| 1486 | (delete-file-recursively source))) | 1489 | '("man3" "man5")))))))) |
| 1487 | '("man3" "man5"))))))))) | ||
| 1488 | (native-inputs | 1490 | (native-inputs |
| 1489 | (append (package-native-inputs fontconfig) | 1491 | (modify-inputs (package-native-inputs fontconfig) |
| 1490 | `(("docbook-utils" ,docbook-utils)))) | 1492 | (append docbook-utils))) |
| 1491 | (properties (alist-delete 'hidden? (package-properties fontconfig))))) | 1493 | (properties (alist-delete 'hidden? (package-properties fontconfig))))) |
| 1492 | 1494 | ||
| 1493 | (define-public t1lib | 1495 | (define-public t1lib |
