lilyp pushed a commit to branch gnome-team
in repository guix.
commit 6a306729ce0338f968e9f330d4e5fa6caed65520
Author: Liliana Marie Prikler <[email protected]>
AuthorDate: Sat Jan 18 08:56:12 2025 +0100
gnu: libbluray: Fix pkg-config file.
* gnu/packages/video.scm (libbluray)[#:phases]: Rename
‘refer-to-libxml2-in-.pc-file’ to ‘move-packages-to-libs’. Generalize to
also
handle freetype and fontconfig.
---
gnu/packages/video.scm | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 7f13bdd049..5fe8691586 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3418,17 +3418,22 @@ playlists.")
"--disable-static")
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'refer-to-libxml2-in-.pc-file
- ;; Avoid the need to propagate libxml2 by referring to it
- ;; directly, as is already done for fontconfig & freetype.
+ (add-after 'unpack 'move-packages-to-libs
+ ;; Avoid the need to propagate libxml2 et al. by referring to them
+ ;; directly.
(lambda* (#:key inputs #:allow-other-keys)
- (let ((libxml2 (assoc-ref inputs "libxml2")))
- (substitute* "configure"
- ((" libxml-2.0") ""))
- (substitute* "src/libbluray.pc.in"
- (("^Libs.private:" field)
- (string-append field " -L" libxml2 "/lib -lxml2")))
- #t)))
+ (define (search-input-vicinity lib)
+ (dirname
+ (search-input-file inputs
+ (string-append "lib/lib" lib ".so"))))
+ (substitute* "src/libbluray.pc.in"
+ (("@PACKAGES@") "")
+ (("^Libs.private:" field)
+ (string-append field
+ " -L" (search-input-vicinity "xml2")
+ " -L" (search-input-vicinity "freetype")
+ " -L" (search-input-vicinity "fontconfig")
+ " -lxml2 -lfreetype -lfontconfig")))))
(add-before 'build 'fix-dlopen-paths
(lambda* (#:key inputs #:allow-other-keys)
(let ((libaacs (assoc-ref inputs "libaacs"))