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,43 +1389,50 @@ 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"))
|
||||
(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
|
||||
"1b4v1r94ri44p4a3kbwd38ig5jgdgcfgwdfm6fqzvfvlki6bignw"))
|
||||
"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"
|
||||
(list
|
||||
#: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")
|
||||
#$(this-package-input "font-dejavu")
|
||||
"/share/fonts"))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-before 'check 'skip-problematic-tests
|
||||
(lambda _
|
||||
;; SOURCE_DATE_EPOCH doesn't make sense when ignoring mtime
|
||||
|
@ -1464,20 +1471,17 @@ 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
|
||||
#~(modify-phases #$phases
|
||||
(add-after 'unpack 'no-pdf-doc
|
||||
(lambda _
|
||||
;; Don't build documentation as PDF.
|
||||
|
@ -1488,19 +1492,18 @@ high quality, anti-aliased and subpixel rendered text on a display.")
|
|||
(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/"
|
||||
(for-each
|
||||
(lambda (section)
|
||||
(let ((source (string-append #$output "/share/man/"
|
||||
section))
|
||||
(target (string-append doc "/share/man/"
|
||||
(target (string-append #$output:doc "/share/man/"
|
||||
section)))
|
||||
(copy-recursively source target)
|
||||
(delete-file-recursively source)))
|
||||
'("man3" "man5")))))))))
|
||||
'("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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue