Patchwork [3/3] gnu: libbluray: Enable libaacs and libbdplus support.

login
register
mail settings
Submitter Andy Patterson
Date Sept. 9, 2016, 7:52 p.m.
Message ID <20160909195226.24339-3-ajpatter@uwaterloo.ca>
Download mbox | patch
Permalink /patch/15473/
State New
Headers show

Comments

Andy Patterson - Sept. 9, 2016, 7:52 p.m.
* gnu/packages/video.scm (libbluray) [inputs]: Add libaacs and
libbdplus.
[arguments]: Add 'fix-dlopen-paths' to #:phases.
---
 gnu/packages/video.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
Ludovic Courtès - Sept. 13, 2016, 8:14 a.m.
Andy Patterson <ajpatter@uwaterloo.ca> skribis:

> * gnu/packages/video.scm (libbluray) [inputs]: Add libaacs and
> libbdplus.
> [arguments]: Add 'fix-dlopen-paths' to #:phases.

Applied, thank you!

Ludo’.

Patch

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index d57393a..d5f3b32 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -979,11 +979,27 @@  YouTube.com and a few more sites.")
                (base32
                 "1q1whviqv5sr9nr372h31zwid1rvbfbx3z4lzr8lnj25xha6cdm6"))))
     (build-system gnu-build-system)
-    (arguments `(#:configure-flags '("--disable-bdjava")))
+    (arguments
+     `(#:configure-flags '("--disable-bdjava")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-dlopen-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((libaacs (assoc-ref inputs "libaacs"))
+                   (libbdplus (assoc-ref inputs "libbdplus")))
+               (substitute* "src/libbluray/disc/aacs.c"
+                 (("\"libaacs\"")
+                  (string-append "\"" libaacs "/lib/libaacs\"")))
+               (substitute* "src/libbluray/disc/bdplus.c"
+                 (("\"libbdplus\"")
+                  (string-append "\"" libbdplus "/lib/libbdplus\"")))
+               #t))))))
     (native-inputs `(("pkg-config" ,pkg-config)))
     (inputs
      `(("fontconfig" ,fontconfig)
        ("freetype" ,freetype)
+       ("libaacs" ,libaacs)
+       ("libbdplus" ,libbdplus)
        ("libxml2" ,libxml2)))
     (home-page "https://www.videolan.org/developers/libbluray.html")
     (synopsis "Blu-Ray Disc playback library")