diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2026-04-02 08:40:38 +0900 |
|---|---|---|
| committer | NoƩ Lopez <noelopez@free.fr> | 2026-08-25 01:15:31 +0200 |
| commit | b1f4d32a5fdbe1b7146b431e9b64610d50c25043 (patch) | |
| tree | d6a2fa9221d9ce88471be644d35f1c2499a7ba40 /gnu | |
| parent | 260abd7d36ec62da65420d6233d5bcd3b945c45b (diff) | |
gnu: libbluray: Build BD-J for Blu-ray menu support.
Note that this augments the closure of ffmpeg from 958.4 Mio to 1295.2 Mio, or
26%; it seems justified by the fact that a library called `libbluray' should
provide complete support for handling Blu-ray discs.
* gnu/packages/video.scm (libbluray)
[#:disallowed-references]: New.
[#:phases] {set-java-home}: New.
{patch-dlopen-calls}: Patch JDK_HOME macro/string.
[native-inputs]: Add ant, openjdk11:jdk.
[inputs]: Add openjdk11.
Change-Id: Ifd40f85034b0d843414827464554b558af20d29c
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/video.scm | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index d5da0c6571a..c81680737cf 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm | |||
| @@ -177,6 +177,7 @@ | |||
| 177 | #:use-module (gnu packages image-processing) | 177 | #:use-module (gnu packages image-processing) |
| 178 | #:use-module (gnu packages imagemagick) | 178 | #:use-module (gnu packages imagemagick) |
| 179 | #:use-module (gnu packages iso-codes) | 179 | #:use-module (gnu packages iso-codes) |
| 180 | #:use-module (gnu packages java) | ||
| 180 | #:use-module (gnu packages kde-frameworks) | 181 | #:use-module (gnu packages kde-frameworks) |
| 181 | #:use-module (gnu packages libbsd) | 182 | #:use-module (gnu packages libbsd) |
| 182 | #:use-module (gnu packages libcanberra) | 183 | #:use-module (gnu packages libcanberra) |
| @@ -3753,8 +3754,18 @@ soon as it starts.") | |||
| 3753 | (build-system meson-build-system) | 3754 | (build-system meson-build-system) |
| 3754 | (arguments | 3755 | (arguments |
| 3755 | (list | 3756 | (list |
| 3757 | #:disallowed-references | ||
| 3758 | (list (gexp-input (this-package-native-input "openjdk") "jdk")) | ||
| 3756 | #:phases | 3759 | #:phases |
| 3757 | #~(modify-phases %standard-phases | 3760 | #~(modify-phases %standard-phases |
| 3761 | (add-before 'build 'set-java-home | ||
| 3762 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 3763 | ;; There is a jdk_home build option, but it conflates build-time | ||
| 3764 | ;; (openjdk:jdk) and runtime (openjdk), so use JAVA_HOME | ||
| 3765 | ;; instead. | ||
| 3766 | (setenv "JAVA_HOME" | ||
| 3767 | #$(gexp-input (this-package-native-input "openjdk") | ||
| 3768 | "jdk")))) | ||
| 3758 | (add-after 'unpack 'fix-dlopen-paths | 3769 | (add-after 'unpack 'fix-dlopen-paths |
| 3759 | (lambda* (#:key inputs #:allow-other-keys) | 3770 | (lambda* (#:key inputs #:allow-other-keys) |
| 3760 | (define (lib/no.so library) | 3771 | (define (lib/no.so library) |
| @@ -3764,6 +3775,14 @@ soon as it starts.") | |||
| 3764 | (substitute* "src/libbluray/disc/aacs.c" | 3775 | (substitute* "src/libbluray/disc/aacs.c" |
| 3765 | (("\"libaacs\"") | 3776 | (("\"libaacs\"") |
| 3766 | (string-append "\"" (lib/no.so "lib/libaacs.so") "\""))) | 3777 | (string-append "\"" (lib/no.so "lib/libaacs.so") "\""))) |
| 3778 | (substitute* "src/libbluray/bdj/bdj.c" | ||
| 3779 | ;; Manually fix the JDK_HOME macro that is set by Meson for | ||
| 3780 | ;; the `jdk_home' option and embedded in the binaries for use | ||
| 3781 | ;; at runtime. The Meson option is not used because we need | ||
| 3782 | ;; to build with the 'jdk' output but don't want to retain a | ||
| 3783 | ;; reference to it. | ||
| 3784 | (("JDK_HOME") | ||
| 3785 | (format #f "~s" #$(this-package-input "openjdk")))) | ||
| 3767 | (substitute* "src/libbluray/disc/bdplus.c" | 3786 | (substitute* "src/libbluray/disc/bdplus.c" |
| 3768 | (("\"libbdplus\"") | 3787 | (("\"libbdplus\"") |
| 3769 | (string-append "\"" (lib/no.so "lib/libbdplus.so") "\""))))) | 3788 | (string-append "\"" (lib/no.so "lib/libbdplus.so") "\""))))) |
| @@ -3784,8 +3803,11 @@ soon as it starts.") | |||
| 3784 | " -L" (search-input-vicinity "freetype") | 3803 | " -L" (search-input-vicinity "freetype") |
| 3785 | " -L" (search-input-vicinity "fontconfig") | 3804 | " -L" (search-input-vicinity "fontconfig") |
| 3786 | " -lxml2 -lfreetype -lfontconfig")))))))) | 3805 | " -lxml2 -lfreetype -lfontconfig")))))))) |
| 3787 | (native-inputs (list pkg-config)) | 3806 | ;; The latest OpenJDK 25 is not yet supported, so we use an older version |
| 3788 | (inputs (list fontconfig freetype libaacs libbdplus libudfread libxml2)) | 3807 | ;; that is a bit smaller and produces less warnings at runtime. |
| 3808 | (native-inputs (list ant `(,openjdk11 "jdk") pkg-config)) | ||
| 3809 | (inputs (list fontconfig freetype libaacs libbdplus libudfread libxml2 | ||
| 3810 | openjdk11)) | ||
| 3789 | (home-page "https://www.videolan.org/developers/libbluray.html") | 3811 | (home-page "https://www.videolan.org/developers/libbluray.html") |
| 3790 | (synopsis "Blu-Ray Disc playback library") | 3812 | (synopsis "Blu-Ray Disc playback library") |
| 3791 | (description | 3813 | (description |
