~ruther/guix-local

3bb117525e9dfe89028e6c7612a1ca0647e14455 — Liliana Marie Prikler 1 year, 6 months ago 8bf39a7
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.
1 files changed, 15 insertions(+), 10 deletions(-)

M gnu/packages/video.scm
M gnu/packages/video.scm => gnu/packages/video.scm +15 -10
@@ 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"))