aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2025-01-18 09:02:10 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2025-03-02 20:31:47 +0100
commit9c790ccd6304878e6b5b6952170a4f07dbd8949e (patch)
treea5d2b77bf7d37a2432efcd59f4b4eb87a58986d8
parent3bb117525e9dfe89028e6c7612a1ca0647e14455 (diff)
downloadguix-9c790ccd6304878e6b5b6952170a4f07dbd8949e.tar.gz
guix-9c790ccd6304878e6b5b6952170a4f07dbd8949e.zip
gnu: libbluray: Use modern package style.
* gnu/packages/video.scm (libbluray)[#:phases]: Convert to list of G-Expressions. <fix-dlopen-path>: Implement in terms of search-input-file. [inputs]: Drop labels.
-rw-r--r--gnu/packages/video.scm69
1 files changed, 32 insertions, 37 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index a17657d920..8a6feb267d 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3416,44 +3416,39 @@ playlists.")
"0aszpsz3pc7p7z6yahlib4na585m6pqbg2d9dkpyipgml1lgv3s7"))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags '("--disable-bdjava-jar"
- "--disable-static")
- #:phases
- (modify-phases %standard-phases
- (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)
- (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"))
- (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))))))
+ (list
+ #:configure-flags #~(list "--disable-bdjava-jar" "--disable-static")
+ #:phases
+ #~(modify-phases %standard-phases
+ (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)
+ (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)
+ (define (lib/no.so library)
+ (let ((found (search-input-file inputs library)))
+ (substring found 0 (- (string-length found)
+ (string-length ".so")))))
+ (substitute* "src/libbluray/disc/aacs.c"
+ (("\"libaacs\"")
+ (string-append "\"" (lib/no.so "lib/libaacs.so") "\""))
+ (("\"libbdplus\"")
+ (string-append "\"" (lib/no.so "lib/libbdplus.so") "\""))))))))
(native-inputs (list pkg-config))
- (inputs
- `(("fontconfig" ,fontconfig)
- ("freetype" ,freetype)
- ("libaacs" ,libaacs)
- ("libbdplus" ,libbdplus)
- ("libxml2" ,libxml2)))
+ (inputs (list fontconfig freetype libaacs libbdplus libxml2))
(home-page "https://www.videolan.org/developers/libbluray.html")
(synopsis "Blu-Ray Disc playback library")
(description