gnu: vlc: Fix build.

* gnu/packages/patches/vlc-fix-test_libvlc_slaves.patch: New file.
* gnu/local.mk (dist_patch_DATA): Reference new file.
* gnu/packages/video.scm (vlc): Apply patch.
This commit is contained in:
Nicolas Goaziou 2019-11-02 21:10:40 +01:00
parent 837547cbb6
commit 520b18e6fa
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D
3 changed files with 57 additions and 15 deletions

View file

@ -1412,6 +1412,7 @@ dist_patch_DATA = \
%D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-freerdp.patch \
%D%/packages/patches/vinagre-newer-rdp-parameters.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \
%D%/packages/patches/virglrenderer-CVE-2017-6386.patch \ %D%/packages/patches/virglrenderer-CVE-2017-6386.patch \
%D%/packages/patches/vlc-fix-test_libvlc_slaves.patch \
%D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch \ %D%/packages/patches/vorbis-tools-CVE-2014-9638+CVE-2014-9639.patch \
%D%/packages/patches/vorbis-tools-CVE-2014-9640.patch \ %D%/packages/patches/vorbis-tools-CVE-2014-9640.patch \
%D%/packages/patches/vorbis-tools-CVE-2015-6749.patch \ %D%/packages/patches/vorbis-tools-CVE-2015-6749.patch \

View file

@ -0,0 +1,35 @@
From 4186c94104ee528abd6860611b49515f3e6ec644 Mon Sep 17 00:00:00 2001
From: Thomas Guillem <thomas@gllm.fr>
Date: Fri, 18 Oct 2019 10:34:07 +0200
Subject: [PATCH] input/item: sort before attaching slaves
The order of readdir() is completely filesystem dependent.
Slaves should be attached using the same order across multiple OSses/access
modules.
This fixes the test_libvlc_slaves on some system when the entry order from
readdir() is different.
This patch need to be backported to VLC 3.0.
---
src/input/item.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/input/item.c b/src/input/item.c
index e8db39ca28..fbd74cc95f 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1809,8 +1809,8 @@ void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success)
{
if (b_success)
{
- rdh_attach_slaves(p_rdh, p_rdh->p_node);
rdh_sort(p_rdh->p_node);
+ rdh_attach_slaves(p_rdh, p_rdh->p_node);
}
free(p_rdh->psz_ignored_exts);
--
2.20.1

View file

@ -1088,20 +1088,26 @@ (define-public vlc
(name "vlc") (name "vlc")
(version "3.0.8") (version "3.0.8")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"https://download.videolan.org/pub/videolan/vlc/" "https://download.videolan.org/pub/videolan/vlc/"
(car (string-split version #\-)) (car (string-split version #\-))
"/vlc-" version ".tar.xz")) "/vlc-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"1xmxjpyzdhabchwncz6lvx3kzvl7fz9c42bkv3nbj68albs9w570")))) "1xmxjpyzdhabchwncz6lvx3kzvl7fz9c42bkv3nbj68albs9w570"))
(patches
(search-patches
;; TODO: The test "libvlc_slaves" fails. Applied upstream as
;; <https://git.videolan.org/?p=vlc.git;a=commit;h=4186c94104ee528abd6860611b49515f3e6ec644>.
;; Try removing it in 3.0.9.
"vlc-fix-test_libvlc_slaves.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("flex" ,flex) `(("flex" ,flex)
("bison" ,bison) ("bison" ,bison)
("gettext" ,gettext-minimal) ("gettext" ,gettext-minimal)
("git" ,git) ; needed for a test ("git" ,git) ; needed for a test
("pkg-config" ,pkg-config))) ("pkg-config" ,pkg-config)))
;; FIXME: Add optional inputs once available. ;; FIXME: Add optional inputs once available.
(inputs (inputs
@ -1182,7 +1188,7 @@ (define-public vlc
`("BUILDCC=gcc" `("BUILDCC=gcc"
,(string-append "LDFLAGS=-Wl,-rpath -Wl," ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
(assoc-ref %build-inputs "ffmpeg") (assoc-ref %build-inputs "ffmpeg")
"/lib")) ;needed for the tests "/lib")) ;needed for the tests
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
@ -1233,11 +1239,11 @@ (define-public vlc
(invoke cachegen plugindir)))) (invoke cachegen plugindir))))
(add-after 'install 'wrap-executable (add-after 'install 'wrap-executable
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")) (let ((out (assoc-ref outputs "out"))
(plugin-path (getenv "QT_PLUGIN_PATH"))) (plugin-path (getenv "QT_PLUGIN_PATH")))
(wrap-program (string-append out "/bin/vlc") (wrap-program (string-append out "/bin/vlc")
`("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))) `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
#t))))) #t)))))
(home-page "https://www.videolan.org/") (home-page "https://www.videolan.org/")
(synopsis "Audio and video framework") (synopsis "Audio and video framework")
(description "VLC is a cross-platform multimedia player and framework (description "VLC is a cross-platform multimedia player and framework