summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2023-12-16 21:16:59 +0000
committerJames Le Cuirot <chewi@gentoo.org>2023-12-16 21:17:59 +0000
commit90b4f2e08581cfccf88f8f38ccf388002af5982a (patch)
tree1c96156989faa8307514f9df02f629ec637539d9
parentapp-emulation/winetricks: drop 20220411 (diff)
downloadgentoo-90b4f2e08581cfccf88f8f38ccf388002af5982a.tar.gz
gentoo-90b4f2e08581cfccf88f8f38ccf388002af5982a.tar.bz2
gentoo-90b4f2e08581cfccf88f8f38ccf388002af5982a.zip
media-video/mpv: Apply upstream patch to fix USE="drm -wayland -X"
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
-rw-r--r--media-video/mpv/files/mpv-0.37.0-drm-fix.patch41
-rw-r--r--media-video/mpv/mpv-0.37.0.ebuild4
2 files changed, 45 insertions, 0 deletions
diff --git a/media-video/mpv/files/mpv-0.37.0-drm-fix.patch b/media-video/mpv/files/mpv-0.37.0-drm-fix.patch
new file mode 100644
index 000000000000..7e10c07eebc1
--- /dev/null
+++ b/media-video/mpv/files/mpv-0.37.0-drm-fix.patch
@@ -0,0 +1,41 @@
+From e575ec4fc3654387c7358bd3640877ef32628d2c Mon Sep 17 00:00:00 2001
+From: Jan Beich <jbeich@FreeBSD.org>
+Date: Wed, 22 Nov 2023 19:44:13 +0100
+Subject: [PATCH] meson: also expose present_sync for VT-only after
+ a96d04f19d73
+
+$ meson setup --auto-features=disabled -Ddrm=enabled -Degl=enabled -Dgbm=enabled -Degl-drm=enabled /tmp/mpv_build
+$ meson compile -C /tmp/mpv_build
+[...]
+ld: error: undefined symbol: mp_present_initialize
+>>> referenced by drm_common.c
+>>> libmpv.so.2.2.0.p/video_out_drm_common.c.o:(vo_drm_init)
+
+ld: error: undefined symbol: present_sync_update_values
+>>> referenced by drm_common.c
+>>> libmpv.so.2.2.0.p/video_out_drm_common.c.o:(drm_pflip_cb)
+
+ld: error: undefined symbol: present_sync_swap
+>>> referenced by drm_common.c
+>>> libmpv.so.2.2.0.p/video_out_drm_common.c.o:(drm_pflip_cb)
+
+ld: error: undefined symbol: present_sync_get_info
+>>> referenced by vo_drm.c
+>>> libmpv.so.2.2.0.p/video_out_vo_drm.c.o:(get_vsync)
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index a3c3430dd47b..6fd5afa5122a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1049,7 +1049,7 @@ if features['xv']
+ sources += files('video/out/vo_xv.c')
+ endif
+
+-if features['wayland'] or features['x11']
++if features['wayland'] or features['x11'] or features['drm']
+ sources += ('video/out/present_sync.c')
+ endif
+
diff --git a/media-video/mpv/mpv-0.37.0.ebuild b/media-video/mpv/mpv-0.37.0.ebuild
index 8e95724ccf24..36d77d771326 100644
--- a/media-video/mpv/mpv-0.37.0.ebuild
+++ b/media-video/mpv/mpv-0.37.0.ebuild
@@ -134,6 +134,10 @@ BDEPEND="
wayland? ( dev-util/wayland-scanner )
"
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.37.0-drm-fix.patch
+)
+
pkg_setup() {
use lua && lua-single_pkg_setup
python-single-r1_pkg_setup