streamio-shell: use system libmpv

This commit is contained in:
Đoàn Trần Công Danh 2022-11-14 20:03:30 +07:00
parent 1dafd49128
commit 72947d3281
2 changed files with 34 additions and 6 deletions

View File

@ -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<char *>(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 <mpv/client.h>
-#if !MPV_ENABLE_DEPRECATED
+#if 0
#error "This helper is deprecated. Copy it into your project instead."
#else

View File

@ -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() {