aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2025-01-18 08:56:12 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2025-03-02 20:31:47 +0100
commit3bb117525e9dfe89028e6c7612a1ca0647e14455 (patch)
tree446c81e78de89e2ee994143a2c8bcd700abca484
parent8bf39a76ee6c057f90d464134473e6c516de2078 (diff)
downloadguix-3bb117525e9dfe89028e6c7612a1ca0647e14455.tar.gz
guix-3bb117525e9dfe89028e6c7612a1ca0647e14455.zip
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.
-rw-r--r--gnu/packages/video.scm25
1 files changed, 15 insertions, 10 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 694d833a82..a17657d920 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3420,17 +3420,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"))