From 5393be6e3eac4f18061c7df47a2c2dab8e3ca293 Mon Sep 17 00:00:00 2001 From: peijiankang Date: Wed, 15 Jan 2025 17:48:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9mpv=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit da2f474280666ebe3cf9a5d33a2304473b7a26d5) --- 0001-fix-build-error-of-meson.patch | 39 +++++++++++++++++++++++++ mpv.spec | 44 +++++++++++++---------------- 2 files changed, 58 insertions(+), 25 deletions(-) create mode 100644 0001-fix-build-error-of-meson.patch diff --git a/0001-fix-build-error-of-meson.patch b/0001-fix-build-error-of-meson.patch new file mode 100644 index 0000000..60ddd08 --- /dev/null +++ b/0001-fix-build-error-of-meson.patch @@ -0,0 +1,39 @@ +From 12d95f9968ad2eed065736499d5e1cf1bbf3ad93 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Sat, 8 Feb 2025 16:28:35 +0800 +Subject: [PATCH] fix-build-error-of-meson + +--- + filters/f_lavfi.c | 2 +- + meson.build | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/filters/f_lavfi.c b/filters/f_lavfi.c +index 597cf91..911d959 100644 +--- a/filters/f_lavfi.c ++++ b/filters/f_lavfi.c +@@ -1024,7 +1024,7 @@ static const char *get_avopt_type_name(enum AVOptionType type) + case AV_OPT_TYPE_VIDEO_RATE: return "fps"; + case AV_OPT_TYPE_DURATION: return "duration"; + case AV_OPT_TYPE_COLOR: return "color"; +- case AV_OPT_TYPE_CHANNEL_LAYOUT: return "channellayout"; ++ case AV_OPT_TYPE_CHLAYOUT: return "channellayout"; + case AV_OPT_TYPE_BOOL: return "bool"; + case AV_OPT_TYPE_CONST: // fallthrough + default: +diff --git a/meson.build b/meson.build +index f9fe4e7..5d771a8 100644 +--- a/meson.build ++++ b/meson.build +@@ -1724,7 +1724,7 @@ if get_option('libmpv') + description: 'mpv media player client library') + + headers = ['libmpv/client.h', 'libmpv/render.h', +- 'libmpv/render_gl.h', 'libmpv/stream_cb.h'] ++ 'libmpv/render_gl.h', 'libmpv/stream_cb.h', 'libmpv/opengl_cb.h', 'libmpv/qthelper.hpp'] + install_headers(headers, subdir: 'mpv') + endif + +-- +2.25.1 + diff --git a/mpv.spec b/mpv.spec index 7914f59..e2fba81 100644 --- a/mpv.spec +++ b/mpv.spec @@ -1,12 +1,12 @@ Name: mpv Version: 0.36.0 -Release: 1 +Release: 2 Summary: Movie player playing most video formats and DVDs License: GPL-2.0-or-later AND LGPL-2.1-or-later URL: http://mpv.io/ Source0: https://github.com/mpv-player/mpv/archive/v%{version}/%{name}-%{version}.tar.gz Patch01: 0001-add-opengl-api-for-mpv-0.35.patch - +Patch02: 0001-fix-build-error-of-meson.patch BuildRequires: pkgconfig(alsa) BuildRequires: desktop-file-utils BuildRequires: gcc @@ -69,7 +69,7 @@ BuildRequires: python3-docutils BuildRequires: perl(Math::BigInt) BuildRequires: perl(Math::BigRat) BuildRequires: perl(Encode) -BuildRequires: waf +BuildRequires: meson # Obsoletes older ci/cd Obsoletes: mpv-master < %{version}-100 @@ -103,32 +103,23 @@ Libmpv development header files and libraries. sed -i -e "s|c_preproc.standard_includes.append('/usr/local/include')|c_preproc.standard_includes.append('$(pkgconf --variable=includedir libavcodec)')|" wscript - %build -%set_build_flags -%{_bindir}/waf configure \ - --prefix=%{_prefix} \ - --bindir=%{_bindir} \ - --libdir=%{_libdir} \ - --mandir=%{_mandir} \ - --docdir=%{_docdir}/%{name} \ - --confdir=%{_sysconfdir}/%{name} \ - --disable-build-date \ - --enable-libmpv-shared \ - --enable-sdl2 \ - --enable-libarchive \ - --enable-dvdnav \ - --enable-cdda \ - --enable-html-build \ - --enable-dvbin \ - --enable-gl-x11 \ - --enable-wayland +%meson --auto-features=auto \ + -Dbuild-date=false \ + -Dlibmpv=true \ + -Dsdl2=enabled \ + -Dlibarchive=enabled \ + -Ddvdnav=enabled \ + -Dcdda=enabled \ + -Dhtml-build=enabled \ + -Ddvbin=enabled \ + -Dgl-x11=enabled \ + -Dwayland=enabled - -%{_bindir}/waf -v build %{?_smp_mflags} +%meson_build %install -%{_bindir}/waf install --destdir=%{buildroot} +%meson_install desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop install -Dpm 644 README.md etc/input.conf etc/mpv.conf -t %{buildroot}%{_docdir}/%{name}/ @@ -161,6 +152,9 @@ install -Dpm 644 README.md etc/input.conf etc/mpv.conf -t %{buildroot}%{_docdir} %{_libdir}/pkgconfig/mpv.pc %changelog +* Fri Jan 17 2025 peijiankang - 0.36.0-2 +- fix build error + * Thu Aug 15 2024 zhangxingrong - 0.36.0-1 - Update to 0.36.0 -- Gitee