gnu: freetype: Update remove-reference-to-pkg-config phase.
* gnu/packages/fontutils.scm (freetype) [arguments]: Use the newer remove-reference-to-pkg-config phase variant, with a small adjustment to make the target group optional. Use gexps and search-input-file. [propagated-inputs]: Update comment regarding harfbuzz.
This commit is contained in:
parent
91c9bfc8c1
commit
e6090152a6
1 changed files with 32 additions and 43 deletions
|
@ -85,54 +85,43 @@
|
||||||
|
|
||||||
(define-public freetype
|
(define-public freetype
|
||||||
(package
|
(package
|
||||||
(name "freetype")
|
(name "freetype")
|
||||||
(version "2.13.0")
|
(version "2.13.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://savannah/freetype/freetype-"
|
(uri (string-append "mirror://savannah/freetype/freetype-"
|
||||||
version ".tar.xz"))
|
version ".tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0k32jaaz4pfhw34xwr6a38fncrpwr9fn5ij35m5w4dkn0jykmqjy"))))
|
(base32 "0k32jaaz4pfhw34xwr6a38fncrpwr9fn5ij35m5w4dkn0jykmqjy"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
;; The use of "freetype-config" is deprecated, but other packages still
|
;; The use of "freetype-config" is deprecated, but other packages still
|
||||||
;; depend on it.
|
;; depend on it.
|
||||||
`(#:configure-flags (list "--enable-freetype-config")
|
(list
|
||||||
#:disallowed-references (,pkg-config)
|
#:configure-flags #~(list "--enable-freetype-config")
|
||||||
|
#:disallowed-references (list pkg-config)
|
||||||
#:phases
|
#:phases
|
||||||
;; TODO: Keep only the first variant on the next core rebuild cycle.
|
#~(modify-phases %standard-phases
|
||||||
,(if (%current-target-system)
|
(add-after 'install 'remove-reference-to-pkg-config
|
||||||
'(modify-phases %standard-phases
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(add-after 'install 'remove-reference-to-pkg-config
|
(substitute* (search-input-file outputs "bin/freetype-config")
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(("/([a-zA-Z0-9/\\._-]+)/bin/([a-zA-Z0-9_-]+)?pkg-config"
|
||||||
(let ((out (assoc-ref outputs "out")))
|
_ store target)
|
||||||
(substitute* (string-append out "/bin/freetype-config")
|
"pkg-config")))))))
|
||||||
(("/([a-zA-Z0-9/\\._-]+)/bin/([a-zA-Z0-9_-]+)pkg-config"
|
(native-inputs (list pkg-config))
|
||||||
_ store target)
|
;; XXX: Not adding harfbuzz here, as it would introduce a dependency
|
||||||
"pkg-config"))))))
|
;; cycle.
|
||||||
'(modify-phases %standard-phases
|
(propagated-inputs (list libpng zlib))
|
||||||
(add-after 'install 'remove-reference-to-pkg-config
|
(synopsis "Font rendering library")
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(description
|
||||||
(let ((out (assoc-ref outputs "out")))
|
"Freetype is a library that can be used by applications to access the
|
||||||
(substitute* (string-append out "/bin/freetype-config")
|
|
||||||
(((search-input-file inputs "/bin/pkg-config"))
|
|
||||||
"pkg-config")))))))))
|
|
||||||
(native-inputs
|
|
||||||
(list pkg-config))
|
|
||||||
(propagated-inputs
|
|
||||||
;; These are all in the Requires.private field of freetype2.pc.
|
|
||||||
;; XXX: add harfbuzz.
|
|
||||||
(list libpng zlib))
|
|
||||||
(synopsis "Font rendering library")
|
|
||||||
(description
|
|
||||||
"Freetype is a library that can be used by applications to access the
|
|
||||||
contents of font files. It provides a uniform interface to access font files.
|
contents of font files. It provides a uniform interface to access font files.
|
||||||
It supports both bitmap and scalable formats, including TrueType, OpenType,
|
It supports both bitmap and scalable formats, including TrueType, OpenType,
|
||||||
Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. It supports high-speed
|
Type1, CID, CFF, Windows FON/FNT, X11 PCF, and others. It supports high-speed
|
||||||
anti-aliased glyph bitmap generation with 256 gray levels.")
|
anti-aliased glyph bitmap generation with 256 gray levels.")
|
||||||
(license license:freetype) ; some files have other licenses
|
(license license:freetype) ; some files have other licenses
|
||||||
(home-page "https://freetype.org/")))
|
(home-page "https://freetype.org/")))
|
||||||
|
|
||||||
(define-public opentype-sanitizer
|
(define-public opentype-sanitizer
|
||||||
(package
|
(package
|
||||||
|
|
Reference in a new issue