[packages/minitube] fix build with mpv >= 0.34

atler atler at pld-linux.org
Wed Nov 16 22:37:15 CET 2022


commit f2c75a9c4ae92f0e5415fda22da928665b987131
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Nov 16 22:36:37 2022 +0100

    fix build with mpv >= 0.34
    
    from: https://github.com/flaviotordini/minitube/issues/217

 minitube.spec |  3 +++
 mpv0.34.patch | 16 ++++++++++++++++
 2 files changed, 19 insertions(+)
---
diff --git a/minitube.spec b/minitube.spec
index 80cdd11..bfa52cf 100644
--- a/minitube.spec
+++ b/minitube.spec
@@ -26,6 +26,7 @@ Source5:	https://github.com/flaviotordini/promises/archive/%{promises_version}/p
 # Source5-md5:	d6db801932cd123563bec343ee05bd59
 Source6:	https://github.com/flaviotordini/updater/archive/%{updater_version}/updater-%{updater_version}.tar.gz
 # Source6-md5:	6e531f6cfb1c64f5261f73b9728753e1
+Patch0:		mpv0.34.patch
 URL:		https://flavio.tordini.org/minitube
 BuildRequires:	Qt5Core-devel
 BuildRequires:	Qt5DBus-devel
@@ -63,6 +64,8 @@ for dir in http idle js media promises updater ; do
 	%{__rm} -r $dir-*
 done
 
+%patch0 -p1
+
 %build
 %{qmake_qt5}
 %{__make}
diff --git a/mpv0.34.patch b/mpv0.34.patch
new file mode 100644
index 0000000..e67d4de
--- /dev/null
+++ b/mpv0.34.patch
@@ -0,0 +1,16 @@
+diff -Nur minitube-3.9.2/lib/media/src/mpv/mpvwidget.cpp new/lib/media/src/mpv/mpvwidget.cpp
+--- minitube-3.9.2/lib/media/src/mpv/mpvwidget.cpp	2021-11-11 13:11:41.000000000 +0100
++++ new/lib/media/src/mpv/mpvwidget.cpp	2022-01-21 18:07:34.170765429 +0100
+@@ -30,7 +30,11 @@
+     qDebug() << "initializeGL" << nativeParent;
+     if (nativeParent == nullptr) qFatal("No native parent");
+ 
+-    mpv_opengl_init_params gl_init_params{get_proc_address, this, nullptr};
++    #if MPV_CLIENT_API_VERSION < MPV_MAKE_VERSION(2,0)
++	mpv_opengl_init_params gl_init_params{get_proc_address, this, nullptr};
++    #else
++	mpv_opengl_init_params gl_init_params{get_proc_address, this};
++    #endif
+     mpv_render_param params[]{{MPV_RENDER_PARAM_API_TYPE, (void *)MPV_RENDER_API_TYPE_OPENGL},
+                               {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params},
+                               {MPV_RENDER_PARAM_INVALID, nullptr},
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/minitube.git/commitdiff/f2c75a9c4ae92f0e5415fda22da928665b987131



More information about the pld-cvs-commit mailing list