From 1e06772dfd7a94a7bfe7c558f371b0c47d974f7c Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Mon, 1 Nov 2021 18:34:45 +0100 Subject: [PATCH] Updated to version 0.34.0. --- ...65cefb27d4e0d07535d368febdf77b579566.patch | 84 ------------------- mpv-config.patch | 12 --- mpv.spec | 59 ++++++------- sources | 2 +- 4 files changed, 27 insertions(+), 130 deletions(-) delete mode 100644 7c4465cefb27d4e0d07535d368febdf77b579566.patch delete mode 100644 mpv-config.patch diff --git a/7c4465cefb27d4e0d07535d368febdf77b579566.patch b/7c4465cefb27d4e0d07535d368febdf77b579566.patch deleted file mode 100644 index 5aaaf7b..0000000 --- a/7c4465cefb27d4e0d07535d368febdf77b579566.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 7c4465cefb27d4e0d07535d368febdf77b579566 Mon Sep 17 00:00:00 2001 -From: Niklas Haas -Date: Thu, 3 Dec 2020 08:25:23 +0100 -Subject: [PATCH] vo_gpu: placebo: update for upstream API changes - -The concept of sample/address modes was moved from `pl_tex` to -`pl_desc_binding`. - -The `pl_tex_blit()` function also underwent an API change. ---- - video/out/placebo/ra_pl.c | 31 +++++++++++++++++++++++++++++-- - 1 file changed, 29 insertions(+), 2 deletions(-) - -diff --git a/video/out/placebo/ra_pl.c b/video/out/placebo/ra_pl.c -index f8df590511..8244acff26 100644 ---- a/video/out/placebo/ra_pl.c -+++ b/video/out/placebo/ra_pl.c -@@ -144,8 +144,14 @@ bool mppl_wrap_tex(struct ra *ra, const struct pl_tex *pltex, - .blit_dst = pltex->params.blit_dst, - .host_mutable = pltex->params.host_writable, - .downloadable = pltex->params.host_readable, -+#if PL_API_VER >= 103 -+ // These don't exist upstream, so just pick something reasonable -+ .src_linear = pltex->params.format->caps & PL_FMT_CAP_LINEAR, -+ .src_repeat = false, -+#else - .src_linear = pltex->params.sample_mode == PL_TEX_SAMPLE_LINEAR, - .src_repeat = pltex->params.address_mode == PL_TEX_ADDRESS_REPEAT, -+#endif - }, - .priv = (void *) pltex, - }; -@@ -195,10 +201,12 @@ static struct ra_tex *tex_create_pl(struct ra *ra, - .blit_dst = params->blit_dst || params->render_dst, - .host_writable = params->host_mutable, - .host_readable = params->downloadable, -+#if PL_API_VER < 103 - .sample_mode = params->src_linear ? PL_TEX_SAMPLE_LINEAR - : PL_TEX_SAMPLE_NEAREST, - .address_mode = params->src_repeat ? PL_TEX_ADDRESS_REPEAT - : PL_TEX_ADDRESS_CLAMP, -+#endif - .initial_data = params->initial_data, - }); - -@@ -399,7 +407,18 @@ static void blit_pl(struct ra *ra, struct ra_tex *dst, struct ra_tex *src, - pldst.y1 = MPMIN(MPMAX(dst_rc->y1, 0), dst->params.h); - } - -+#if PL_API_VER >= 103 -+ pl_tex_blit(get_gpu(ra), &(struct pl_tex_blit_params) { -+ .src = src->priv, -+ .dst = dst->priv, -+ .src_rc = plsrc, -+ .dst_rc = pldst, -+ .sample_mode = src->params.src_linear ? PL_TEX_SAMPLE_LINEAR -+ : PL_TEX_SAMPLE_NEAREST, -+ }); -+#else - pl_tex_blit(get_gpu(ra), dst->priv, src->priv, pldst, plsrc); -+#endif - } - - static const enum pl_var_type var_type[RA_VARTYPE_COUNT] = { -@@ -627,9 +646,17 @@ static void renderpass_run_pl(struct ra *ra, - struct pl_desc_binding bind; - switch (inp->type) { - case RA_VARTYPE_TEX: -- case RA_VARTYPE_IMG_W: -- bind.object = (* (struct ra_tex **) val->data)->priv; -+ case RA_VARTYPE_IMG_W: { -+ struct ra_tex *tex = *((struct ra_tex **) val->data); -+ bind.object = tex->priv; -+#if PL_API_VER >= 103 -+ bind.sample_mode = tex->params.src_linear ? PL_TEX_SAMPLE_LINEAR -+ : PL_TEX_SAMPLE_NEAREST; -+ bind.address_mode = tex->params.src_repeat ? PL_TEX_ADDRESS_REPEAT -+ : PL_TEX_ADDRESS_CLAMP; -+#endif - break; -+ } - case RA_VARTYPE_BUF_RO: - case RA_VARTYPE_BUF_RW: - bind.object = (* (struct ra_buf **) val->data)->priv; diff --git a/mpv-config.patch b/mpv-config.patch deleted file mode 100644 index a411259..0000000 --- a/mpv-config.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/etc/mpv.conf -+++ b/etc/mpv.conf -@@ -8,7 +8,7 @@ - # no builtin or example mpv.conf with all the defaults. - # - # --# Configuration files are read system-wide from /usr/local/etc/mpv.conf -+# Configuration files are read system-wide from /etc/mpv/mpv.conf - # and per-user from ~/.config/mpv/mpv.conf, where per-user settings override - # system-wide settings, all of which are overridden by the command line. - # - diff --git a/mpv.spec b/mpv.spec index b26fdc6..af648dc 100644 --- a/mpv.spec +++ b/mpv.spec @@ -1,23 +1,16 @@ -%global giturl https://github.com/mpv-player/mpv - Name: mpv -Version: 0.33.1 -Release: 4%{?gitrelease}%{?dist} -Summary: Movie player playing most video formats and DVDs -License: GPLv2+ and LGPLv2+ -URL: http://mpv.io/ -Source0: %{giturl}/archive/v%{version}/%{name}-%{version}.tar.gz +Version: 0.34.0 +Release: 1%{?dist} -# set defaults for Fedora -Patch0: %{name}-config.patch +License: GPLv2+ and LGPLv2+ +Summary: Movie player playing most video formats and DVDs +URL: https://%{name}.io/ +Source0: https://github.com/%{name}-player/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz # Fix ppc as upstream refuse to fix the issue # https://github.com/mpv-player/mpv/issues/3776 Patch1: ppc_fix.patch -# Patch for new libplacebo API -Patch2: %{giturl}/commit/7c4465cefb27d4e0d07535d368febdf77b579566.patch - BuildRequires: pkgconfig(alsa) BuildRequires: desktop-file-utils BuildRequires: gcc @@ -88,16 +81,13 @@ BuildRequires: /usr/bin/rst2man BuildRequires: perl(Math::BigInt) BuildRequires: perl(Math::BigRat) BuildRequires: perl(Encode) - -%ifarch armv7hl armv7hnl -%{?_with_rpi: -BuildRequires: raspberrypi-vc-devel -} +%ifarch %{arm} +%{?_with_rpi:BuildRequires: raspberrypi-vc-devel} %endif # Obsoletes older ci/cd -Obsoletes: mpv-master < %{version}-100 -Provides: mpv-master = %{version}-100 +Obsoletes: %{name}-master < %{version}-100 +Provides: %{name}-master = %{version}-100 Requires: hicolor-icon-theme Provides: mplayer-backend @@ -117,16 +107,15 @@ This package contains the dynamic library libmpv, which provides access to Mpv. %package libs-devel Summary: Development package for libmpv -Requires: mpv-libs%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description libs-devel Libmpv development header files and libraries. %prep -%autosetup -p1 -n mpv-%{?commit}%{?!commit:%{version}} - -sed -i -e "s|c_preproc.standard_includes.append('/usr/local/include')|c_preproc.standard_includes.append('$(pkgconf --variable=includedir libavcodec)')|" wscript - +%autosetup -p1 +sed -e "s|/usr/local/etc|%{_sysconfdir}/%{name}|" -i etc/%{name}.conf +sed -e "s|c_preproc.standard_includes.append('/usr/local/include')|c_preproc.standard_includes.append('$(pkgconf --variable=includedir libavcodec)')|" -i wscript %build %set_build_flags @@ -151,41 +140,45 @@ sed -i -e "s|c_preproc.standard_includes.append('/usr/local/include')|c_preproc. %if 0%{?fedora} < 35 --enable-dvbin %endif - - %{_bindir}/waf -v build %{?_smp_mflags} %install %{_bindir}/waf install --destdir=%{buildroot} +%check desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop -install -Dpm 644 README.md etc/input.conf etc/mpv.conf -t %{buildroot}%{_docdir}/%{name}/ %files %docdir %{_docdir}/%{name}/ -%{_docdir}/%{name}/ +%doc README.md etc/input.conf etc/%{name}.conf %license LICENSE.GPL LICENSE.LGPL Copyright +%{_docdir}/%{name}/ %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %dir %{_datadir}/bash-completion/ %dir %{_datadir}/bash-completion/completions/ %{_datadir}/bash-completion/completions/%{name} %{_datadir}/icons/hicolor/*/apps/%{name}*.* -%{_datadir}/zsh/site-functions/_mpv +%dir %{_datadir}/zsh/ +%dir %{_datadir}/zsh/site-functions/ +%{_datadir}/zsh/site-functions/_%{name} %{_mandir}/man1/%{name}.* %dir %{_sysconfdir}/%{name}/ %config(noreplace) %{_sysconfdir}/%{name}/encoding-profiles.conf %files libs %license LICENSE.GPL LICENSE.LGPL Copyright -%{_libdir}/libmpv.so.* +%{_libdir}/lib%{name}.so.* %files libs-devel %{_includedir}/%{name}/ -%{_libdir}/libmpv.so -%{_libdir}/pkgconfig/mpv.pc +%{_libdir}/lib%{name}.so +%{_libdir}/pkgconfig/%{name}.pc %changelog +* Mon Nov 01 2021 Vitaly Zaitsev - 0.34.0-1 +- Updated to version 0.34.0. + * Mon Sep 20 2021 Leigh Scott - 0.33.1-4 - rebuilt diff --git a/sources b/sources index 05d4cc6..6eb4f41 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mpv-0.33.1.tar.gz) = 99d6c40d18c5cf83814b44ec6d8eade229800c5b51a734c9bbe831c3aeb95f8931124c94f6ae2360ffff62053c163bc3c55b254df021e005b350ebc3df7e952b +SHA512 (mpv-0.34.0.tar.gz) = 9935a20730dbb8fbf4cd11fe2fc38b1981882fc85c93046837a9b99cae089b3f710e6af7d7ea977c177de5479aa24e413f76cab9b995e8b7e66d6b77c524fdf0