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
|
@ -98,32 +98,21 @@
|
|||
(arguments
|
||||
;; The use of "freetype-config" is deprecated, but other packages still
|
||||
;; depend on it.
|
||||
`(#:configure-flags (list "--enable-freetype-config")
|
||||
#:disallowed-references (,pkg-config)
|
||||
(list
|
||||
#:configure-flags #~(list "--enable-freetype-config")
|
||||
#:disallowed-references (list pkg-config)
|
||||
#:phases
|
||||
;; TODO: Keep only the first variant on the next core rebuild cycle.
|
||||
,(if (%current-target-system)
|
||||
'(modify-phases %standard-phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'install 'remove-reference-to-pkg-config
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(substitute* (string-append out "/bin/freetype-config")
|
||||
(("/([a-zA-Z0-9/\\._-]+)/bin/([a-zA-Z0-9_-]+)pkg-config"
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(substitute* (search-input-file outputs "bin/freetype-config")
|
||||
(("/([a-zA-Z0-9/\\._-]+)/bin/([a-zA-Z0-9_-]+)?pkg-config"
|
||||
_ store target)
|
||||
"pkg-config"))))))
|
||||
'(modify-phases %standard-phases
|
||||
(add-after 'install 'remove-reference-to-pkg-config
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(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))
|
||||
"pkg-config")))))))
|
||||
(native-inputs (list pkg-config))
|
||||
;; XXX: Not adding harfbuzz here, as it would introduce a dependency
|
||||
;; cycle.
|
||||
(propagated-inputs (list libpng zlib))
|
||||
(synopsis "Font rendering library")
|
||||
(description
|
||||
"Freetype is a library that can be used by applications to access the
|
||||
|
|
Reference in a new issue