mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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
This commit is contained in:
parent
1c3a93d770
commit
49b301367b
2 changed files with 74 additions and 71 deletions
|
@ -1389,59 +1389,66 @@ Font Format (WOFF).")
|
||||||
(home-page "https://w3c.github.io/woff/woff2/")
|
(home-page "https://w3c.github.io/woff/woff2/")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
|
;;; Update with: guix refresh -u '(@ (gnu packages fontutils) fontconfig)'
|
||||||
(define-public fontconfig
|
(define-public fontconfig
|
||||||
(hidden-package
|
(hidden-package
|
||||||
(package
|
(package
|
||||||
(name "fontconfig-minimal")
|
(name "fontconfig-minimal")
|
||||||
(version "2.14.0")
|
(version "2.16.2")
|
||||||
(source (origin
|
(source
|
||||||
(method url-fetch)
|
(origin
|
||||||
(uri (string-append
|
(method git-fetch)
|
||||||
"https://www.freedesktop.org/software/"
|
(uri (git-reference
|
||||||
"fontconfig/release/fontconfig-" version ".tar.xz"))
|
(url "https://gitlab.freedesktop.org/fontconfig/fontconfig")
|
||||||
(sha256 (base32
|
(commit version)))
|
||||||
"1b4v1r94ri44p4a3kbwd38ig5jgdgcfgwdfm6fqzvfvlki6bignw"))
|
(file-name (git-file-name name version))
|
||||||
(patches (search-patches "fontconfig-cache-ignore-mtime.patch"))))
|
(sha256 (base32
|
||||||
|
"0cvgca4bh0m4n61syzsr6npqszp4wfsvrhbf8n5r1djvh8gvjv27"))
|
||||||
|
(patches (search-patches "fontconfig-cache-ignore-mtime.patch"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
;; In Requires or Requires.private of fontconfig.pc.
|
;; In Requires or Requires.private of fontconfig.pc.
|
||||||
(propagated-inputs `(("expat" ,expat)
|
(propagated-inputs (list expat freetype
|
||||||
("freetype" ,freetype)
|
`(,util-linux "lib")))
|
||||||
("libuuid" ,util-linux "lib")))
|
|
||||||
(inputs
|
(inputs
|
||||||
;; We use to use 'font-ghostscript' but they are not recognized by newer
|
;; We use to use 'font-ghostscript' but they are not recognized by newer
|
||||||
;; versions of Pango, causing many applications to fail to find fonts
|
;; versions of Pango, causing many applications to fail to find fonts
|
||||||
;; otherwise.
|
;; otherwise.
|
||||||
(list font-dejavu))
|
(list font-dejavu))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("gperf" ,gperf)
|
(list autoconf-2.71
|
||||||
("pkg-config" ,pkg-config)
|
automake
|
||||||
("python" ,python-minimal))) ;to avoid a cycle through tk
|
gettext-minimal
|
||||||
|
gperf
|
||||||
|
libtool
|
||||||
|
pkg-config
|
||||||
|
python-minimal)) ;to avoid a cycle through tk
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
(list
|
||||||
(list "--disable-docs"
|
#:configure-flags
|
||||||
"--with-cache-dir=/var/cache/fontconfig"
|
#~(list "--disable-docs"
|
||||||
;; register the default fonts
|
"--with-cache-dir=/var/cache/fontconfig"
|
||||||
(string-append "--with-default-fonts="
|
;; register the default fonts
|
||||||
(assoc-ref %build-inputs "font-dejavu")
|
(string-append "--with-default-fonts="
|
||||||
"/share/fonts"))
|
#$(this-package-input "font-dejavu")
|
||||||
#:phases
|
"/share/fonts"))
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
(add-before 'check 'skip-problematic-tests
|
#~(modify-phases %standard-phases
|
||||||
(lambda _
|
(add-before 'check 'skip-problematic-tests
|
||||||
;; SOURCE_DATE_EPOCH doesn't make sense when ignoring mtime
|
(lambda _
|
||||||
(unsetenv "SOURCE_DATE_EPOCH")
|
;; SOURCE_DATE_EPOCH doesn't make sense when ignoring mtime
|
||||||
|
(unsetenv "SOURCE_DATE_EPOCH")
|
||||||
|
|
||||||
(substitute* "test/run-test.sh"
|
(substitute* "test/run-test.sh"
|
||||||
;; The crbug1004254 test attempts to fetch fonts from the
|
;; The crbug1004254 test attempts to fetch fonts from the
|
||||||
;; network.
|
;; network.
|
||||||
(("\\[ -x \"\\$BUILDTESTDIR\"/test-crbug1004254 \\]")
|
(("\\[ -x \"\\$BUILDTESTDIR\"/test-crbug1004254 \\]")
|
||||||
"false"))))
|
"false"))))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Don't try to create /var/cache/fontconfig.
|
;; Don't try to create /var/cache/fontconfig.
|
||||||
(invoke "make" "install"
|
(invoke "make" "install"
|
||||||
"fc_cachedir=$(TMPDIR)"
|
"fc_cachedir=$(TMPDIR)"
|
||||||
"RUN_FC_CACHE_TEST=false"))))))
|
"RUN_FC_CACHE_TEST=false"))))))
|
||||||
(synopsis "Library for configuring and customizing font access")
|
(synopsis "Library for configuring and customizing font access")
|
||||||
(description
|
(description
|
||||||
"Fontconfig can discover new fonts when installed automatically;
|
"Fontconfig can discover new fonts when installed automatically;
|
||||||
|
@ -1464,43 +1471,39 @@ high quality, anti-aliased and subpixel rendered text on a display.")
|
||||||
(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
|
;;; 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
|
;;; causes a dramatic increase in the size of the closure of fontconfig.
|
||||||
;;; is intentionally named 'fontconfig', as it's intended as the user-facing
|
|
||||||
;;; fontconfig package.
|
|
||||||
(define-public fontconfig-with-documentation
|
(define-public fontconfig-with-documentation
|
||||||
(package
|
(package
|
||||||
(inherit fontconfig)
|
(inherit fontconfig)
|
||||||
(name "fontconfig")
|
|
||||||
(outputs (cons "doc" (package-outputs fontconfig)))
|
(outputs (cons "doc" (package-outputs fontconfig)))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments (package-arguments fontconfig)
|
(substitute-keyword-arguments (package-arguments fontconfig)
|
||||||
((#:configure-flags configure-flags)
|
((#:configure-flags configure-flags)
|
||||||
`(delete "--disable-docs" ,configure-flags))
|
#~(delete "--disable-docs" #$configure-flags))
|
||||||
((#:phases phases '%standard-phases)
|
((#:phases phases '%standard-phases)
|
||||||
`(modify-phases ,phases
|
#~(modify-phases #$phases
|
||||||
(add-after 'unpack 'no-pdf-doc
|
(add-after 'unpack 'no-pdf-doc
|
||||||
(lambda _
|
(lambda _
|
||||||
;; Don't build documentation as PDF.
|
;; Don't build documentation as PDF.
|
||||||
(substitute* "doc/Makefile.in"
|
(substitute* "doc/Makefile.in"
|
||||||
(("^PDF_FILES = .*")
|
(("^PDF_FILES = .*")
|
||||||
"PDF_FILES =\n"))))
|
"PDF_FILES =\n"))))
|
||||||
(add-after 'install 'move-man-sections
|
(add-after 'install 'move-man-sections
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
;; Move share/man/man{3,5} to the "doc" output. Leave "man1" in
|
;; Move share/man/man{3,5} to the "doc" output. Leave "man1" in
|
||||||
;; "out" for convenience.
|
;; "out" for convenience.
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(for-each
|
||||||
(doc (assoc-ref outputs "doc")))
|
(lambda (section)
|
||||||
(for-each (lambda (section)
|
(let ((source (string-append #$output "/share/man/"
|
||||||
(let ((source (string-append out "/share/man/"
|
section))
|
||||||
section))
|
(target (string-append #$output:doc "/share/man/"
|
||||||
(target (string-append doc "/share/man/"
|
section)))
|
||||||
section)))
|
(copy-recursively source target)
|
||||||
(copy-recursively source target)
|
(delete-file-recursively source)))
|
||||||
(delete-file-recursively source)))
|
'("man3" "man5"))))))))
|
||||||
'("man3" "man5")))))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(append (package-native-inputs fontconfig)
|
(modify-inputs (package-native-inputs fontconfig)
|
||||||
`(("docbook-utils" ,docbook-utils))))
|
(append docbook-utils)))
|
||||||
(properties (alist-delete 'hidden? (package-properties fontconfig)))))
|
(properties (alist-delete 'hidden? (package-properties fontconfig)))))
|
||||||
|
|
||||||
(define-public t1lib
|
(define-public t1lib
|
||||||
|
|
|
@ -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.
|
depend upon modification time to determine if a cache is stale.
|
||||||
|
|
||||||
diff --git a/src/fcstat.c b/src/fcstat.c
|
diff --git a/src/fcstat.c b/src/fcstat.c
|
||||||
index 5a2bd7c..d603a96 100644
|
index 9b54e2b4..76d7780e 100644
|
||||||
--- a/src/fcstat.c
|
--- a/src/fcstat.c
|
||||||
+++ b/src/fcstat.c
|
+++ b/src/fcstat.c
|
||||||
@@ -431,6 +431,7 @@ FcIsFsMmapSafe (int fd)
|
@@ -415,6 +415,7 @@ FcIsFsMmapSafe (int fd)
|
||||||
FcBool
|
FcBool
|
||||||
FcIsFsMtimeBroken (const FcChar8 *dir)
|
FcIsFsMtimeBroken (const FcChar8 *dir)
|
||||||
{
|
{
|
||||||
+ return FcTrue;
|
+ return FcTrue;
|
||||||
int fd = FcOpen ((const char *) dir, O_RDONLY);
|
int fd = FcOpen ((const char *)dir, O_RDONLY);
|
||||||
|
|
||||||
if (fd != -1)
|
if (fd != -1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue