From 72947d32812ec06d17259ca6731824ea44bef874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 14 Nov 2022 20:03:30 +0700 Subject: [PATCH] streamio-shell: use system libmpv --- srcpkgs/stremio-shell/patches/mpv-0.35.patch | 26 ++++++++++++++++++++ srcpkgs/stremio-shell/template | 14 ++++++----- 2 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 srcpkgs/stremio-shell/patches/mpv-0.35.patch diff --git a/srcpkgs/stremio-shell/patches/mpv-0.35.patch b/srcpkgs/stremio-shell/patches/mpv-0.35.patch new file mode 100644 index 00000000000..25be29a6c94 --- /dev/null +++ b/srcpkgs/stremio-shell/patches/mpv-0.35.patch @@ -0,0 +1,26 @@ +Index: stremio-shell-4.4.159/mpv.cpp +=================================================================== +--- stremio-shell-4.4.159.orig/mpv.cpp ++++ stremio-shell-4.4.159/mpv.cpp +@@ -65,7 +65,7 @@ class MpvRenderer : public QQuickFramebu + // init mpv_gl: + if (!obj->mpv_gl) + { +- mpv_opengl_init_params gl_init_params{get_proc_address_mpv, nullptr, nullptr}; ++ mpv_opengl_init_params gl_init_params{get_proc_address_mpv, nullptr}; + mpv_render_param params[]{ + {MPV_RENDER_PARAM_API_TYPE, const_cast(MPV_RENDER_API_TYPE_OPENGL)}, + {MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &gl_init_params}, +Index: stremio-shell-4.4.159/deps/libmpv/include/mpv/qthelper.hpp +=================================================================== +--- stremio-shell-4.4.159.orig/deps/libmpv/include/mpv/qthelper.hpp ++++ stremio-shell-4.4.159/deps/libmpv/include/mpv/qthelper.hpp +@@ -18,7 +18,7 @@ + + #include + +-#if !MPV_ENABLE_DEPRECATED ++#if 0 + #error "This helper is deprecated. Copy it into your project instead." + #else + diff --git a/srcpkgs/stremio-shell/template b/srcpkgs/stremio-shell/template index ac133f6c372..86ffc5bb75e 100644 --- a/srcpkgs/stremio-shell/template +++ b/srcpkgs/stremio-shell/template @@ -1,7 +1,7 @@ # Template file for 'stremio-shell' pkgname=stremio-shell version=4.4.159 -revision=1 +revision=2 _singleapplication_hash=f1e15081dc57a9c03f7f4f165677f18802e1437a _libmpv_hash=822a41a1087daf2911fc336fbd9509f962158fef create_wrksrc=yes @@ -18,22 +18,24 @@ license="GPL-3.0-or-later" homepage="https://www.stremio.com" distfiles="https://github.com/Stremio/stremio-shell/archive/v${version}.tar.gz https://github.com/itay-grudev/SingleApplication/archive/${_singleapplication_hash}.tar.gz - https://github.com/Ivshti/libmpv/archive/${_libmpv_hash}.tar.gz + https://raw.githubusercontent.com/mpv-player/mpv/v0.32.0/libmpv/qthelper.hpp https://dl.strem.io/four/v${version}/server.js https://dl.strem.io/four/v${version}/stremio.asar" checksum="aca0e5bf026e31399571f5cdc1485cbb2540e7ad7b981f10adb0e87ee47b9af5 ddab4bec60e4221580f8bb65ac200619bd2d1c9144a8ac7dccc0c78ea4667dc2 - e0545772ca819236926eb118c2f211f05e01f510c1c1a89758895919ed5718d4 + 86e1fcba6001829b7e23a856db84d01ebc76e63528f74064d7bc5705015a2684 c31c98fe4cd8158523c45685ba2a949cffd3fc0f06dffef66797d07e3a2bbbee d01ba5d69cf0e94f3d44c8e4ed5b10eaab67e83398a7d86f86f378ade59cf8f9" -skip_extraction="server.js stremio.asar" +skip_extraction="server.js stremio.asar qthelper.hpp" post_extract() { mv stremio-shell-$version/* . rmdir deps/singleapplication mv SingleApplication-${_singleapplication_hash} deps/singleapplication - rmdir deps/libmpv - mv libmpv-${_libmpv_hash} deps/libmpv + mkdir deps/libmpv/include + cp -a /usr/include/mpv deps/libmpv/include + cp "${XBPS_SRCDISTDIR}/${pkgname}-${version}/qthelper.hpp" \ + deps/libmpv/include/mpv/ } post_install() {