SHA256
1
0
forked from pool/mpv
mpv/mpv.spec
llyyr 2227a79c9c Accepting request 1113231 from home:llyyr:branches:multimedia:apps
- Update to version 0.36.0+git20230923.140d0185:
  * ci/mingw: drop old workarounds for vulkan-headers
  * m_config_core: remove mp_read_option_raw
  * cuda: move --cuda-device to cuda_opts group
  * opengl/context_win: move opengl-dwmflush to wingl_opts group
  * libmpv_gl: replace mp_read_option_raw call
  * video/out/gpu: replace mp_read_option_raw call
  * stream: remove unneeded mp_read_option_raw call
  * options: rename some opt structs to *_opts instead of *_params
  * stream_bluray: move --bluray-device to stream_bluray_opts
  * stream_cdda: move cdrom-device to cdda_params
  * demuxer: remove several mp_read_option_raw calls
  * demux: make demux opts public
  * options: move some demux-specific opts to demux opts
  * demux_lavf: set duration to -1 if unknown
  * DOCS/options: remove some stray tabs
  * win32: don't remove WS_CAPTION from style
  * win32: enable custom WM_NCHITTEST also when title bar is hidden
  * win32: set window_corners to default for fullscreen
  * win32: add --window-corners
  * win32: fix fit_window_on_screen to account for invisible borders
  * win32: reduce top border thickness to imitate DWM invisible borders
  * win32: add an option to control window title bar state
  * win32: add an option to change window affinity
  * wayland: ensure at least a scale factor of 1 when drawing cursor
  * github/workflows: comment PR artifacts links
  * win32: explicitly guard dark mode calls by Windows version
  * vo_gpu_next: use proper color for subtitles
  * {github/workflows,ci}: install and enable libplacebo in macOS CI
  * github/workflows: add macOS 13 build
  * vo_gpu: don't override scaler options with default ones
  * builtin.conf: remove unneeded vlang/alang/slang lines
  * vo_gpu: allow deband-iterations to be 0
  * drm: remove selecting the card number with --drm-connector
  * options: remove --vf-defaults and --af-defaults
  * options: remove deprecated --record-file option
  * vo_sixel: change exit-clear handling to OPT_REPLACED
  * options: remove a few options marked with .deprecation_message
  * command: stop restarting playback when writing to playlist-pos
  * command: remove some old deprecated properities
  * options: remove ancient option fallbacks/deprecation
  * builtin.conf: remove deprecated opengl-hq profile
  * demux_playlist: add --directory-mode=auto
  * various: add missing include in header flles
  * sub/ass_mp: filters/f_lavfi: forward declare mp_log
  * sd_ass: use directive instead of writing magic constants
  * vo_dmabuf_wayland: support osd rendering when there's no video
  * mp_image: add force_window field
  * demux_mf: detect svg
  * sdl_gamepad: fix button detection on modern controllers
  * TOOLS/autocrop.lua: switch to auto-copy hwdec during cropdetect
  * TOOLS/autocrop.lua: cleanup timers correctly
  * vo_gpu_next: fix unscaled screenshot with --blend-subtitles
  * TOOLS/autocrop.lua: use VO crop always
  * options: make video-crop validation more strict
  * player/video: don't try to restore old crop when invalid were provided
  * vo_gpu: match libplacebo debanding defaults
  * vo_gpu: match libplacebo peak detection defaults
  * DOCS: update notes about new profiles
  * vo_gpu: default to dscale=hermite
  * DOCS/options: document hermite scaler
  * DOCS/options: remove potentially offensive language
  * DOCS/options: remove spline36 section
  * DOCS/options: change wording to be less inflammatory
  * af_scaletempo2: fix missing variable init, remove redundant init
  * af_scaletempo2: truncate final packet to expected length
  * af_scaletempo2: fix processing of final packet
  * af_scaletempo2: calculate latency by center of search block
  * af_scaletempo2: restore exact audio sync on return to 1x speed
  * af_scaletempo2: fix speed change latency and pts spikes
  * af_scaletempo2: fix audio artifact on initial WSOLA iteration
  * af_scaletempo2: fix audio offset when playing back at 1x speed
  * af_scaletempo2: fix inconsistent search block position after init
  * af_scaletempo2: move latency calculation to internal function
  * af_scaletempo2: fix missing dereference when processing final packet
  * af_scaletempo2: fix audio-video de-sync caused by speed changes
  * DOCS/vo: remove some dated deprecation warnings about --vo=rpi
  * meson: enable cplugins on Windows
  * cplugin: allow loading mpv_* symbols dynamically
  * libmpv: remove not used mpv.pc.in
  * osdep/io: provide dlopen, etc. abstraction wrappers for windows
  * scripting: dll cplugins
  * builtin.conf: modernize internal profiles
  * vo: change tscale to oversample by default
  * vo: make cscale follow scale by default
  * vo: enable correct-downscaling, linear-downscaling, sigmoid-upscaling
  * vo: avoid unnecessary redraws when the OSD shows
  * demux: prepend some cache options with demuxer
  * filter_kernels: remove bcspline filter
  * filter_kernels: fix bcspline params
  * filter_kernels: add hermite filter
  * vo_gpu_next: fix blur and taper values being zero
  * vo_dmabuf_wayland: support 90 degree rotations
  * DOCS/vo: remove outdated reference to --vo-vaapi-deinit-mode
  * demux_mkv: support ProjectionPoseRoll element
  * demux_mkv: support PixelCrop* elements
  * TOOLS/matroska.py: add PixelCrop* elements
  * demux: add crop to mp_codec_params
  * win32: remove noisy debug log
  * osc: add scrolling to audio/sub buttons
  * vo_gpu: remove --scale-wblur etc
  * filter_kernels: add ewa_lanczos4sharpest
  * filter_kernels: refine ewa_lanczossharp/soft constants
  * filter_kernels: use true jinc radius
  * filter_kernels: replace magic jinc radius by constant (cosmetic)
  * filter_kernels: properly sharpen/blur filter radius
  * vo_gpu: slight bump to hard-coded option size limits
  * vo_gpu_next: remove ewa_lanczossharp nag
  * TOOLS/lua/autoload: rename local variable to lowercase
  * TOOLS/lua/autoload: pass extensions to recursive call
  * hwtransfer: make probe_formats logging less spammy
  * vo_gpu: vo_gpu_next: support --icc-3dlut-size=auto
  * vo_gpu_next: update for new ICC profile API
  * present_sync: allow future timestamps
  * vo_gpu_next: map --scaler-resizes-only
  * TOOLS/lua/autoload: change EXTENSIONS_TARGET to a local variable
  * TOOLS/lua/autoload: fix specify loading only one type of files
  * TOOLS/lua/autoload: add directory_mode option
  * TOOLS/lua/autoload: add recursive directory loading
  * TOOLS/lua/autoload: avoid adding entries to the playlist more then once
  * TOOLS/lua/autoload: support directories
  * meson: check vulkan version
  * stream: accept dav:// and davs:// urls
  * meson: rename last feature with underscore
  * DOCS/options: add catmull_rom as an example for --scale
  * sd_lavc: fix subtitle presentation time
  * Revert "sub: add auto option to --sub-fix-timing"
  * vd_lavc: by default enable cropping by decoder
  * DOCS/lua.rst: fix typo
  * player: redo --subs-fallback-forced
  * vo: change vsync_interval to double
  * sd_lavc: account for floating point inaccuracy
  * player/video: apply crop for all frames in vo_frame
  * screenshot: support crop with --screenshot-sw
  * vo_gpu_next: support --blend-subtitles when taking screenshoot
  * vo_gpu: support crop in gl_video_screenshot
  * vo_gpu_next: support crop in video_screenshot
  * vo_gpu_next: forwards compatibility with pl_cache
  * vd_lavc: disable cropping by decoder
  * mp_image: add missing crop initialization
  * video: allow overriding container crop if it is present
  * stats.lua: don't display full frame crop
  * player/command: mark video-params/crop- unavailable if empty
  * m_option: return empty rect when no width/height is available
  * autocrop.lua: enable vo_crop mode by default
  * autocrop.lua: don't remove crop on startup/exit
  * autocrop.lua: detect if crop is enabled based on prop
  * m_option: make m_rect_apply center based
  * sub: add auto option to --sub-fix-timing
  * Revert "sd_lavc: use SUB_GAP_THRESHOLD for overlaps/gaps"
  * path-{darwin,unix}: save cache to subdir when using non-XDG path
  * meson: add -Bsymbolic for libmpv
  * vo: vulkan: allow picking devices by UUID
  * meson: include our local copy of libavutil uuid if ffmpeg is too old
  * misc: add copy of uuid from ffmpeg
  * {zsh,bash}-completion: use config when autocompleting profiles
  * stream/dvbin: recommend to use specific channels.conf file names
  * stream/dvbin: drop too verbose messages
  * stream/dvbin: add some helpful verbose output
  * stream/dvbin: detect ZAP channel configs looking like VDR configs
  * stream/dvbin: do not forget channel list for multiply delivery systems
  * stream/dvbin: add support for delivery system ISDB-T
  * vo_gpu_next: don't rotate gamut visualization
  * demux_lavf: get total duration from track durations
  * {zsh,bash}-completion: add missing --no-config flags
  * options: remove unnecessary clamping on video-pan-x/y
  * Revert "aspect: change --video-pan-x/y to be relative to the destination rect"
  * osc: add scrolling to the seekbar
  * ci/lint: ignore subject length for revert commits
  * vo_gpu: remove --tone-mapping-mode
  * loadfile: fix forced subtitles not respecting slang
  * builtin.conf: add --allow-delayed-peak-detect=no to gpu-hq
  * win32: allow heap cache optimization and memory decommit
  * win32: add BASE_SEARCH_PATH_PERMANENT to SetSearchPathMode
  * win32: don't load dynamically always available functions
  * win32/displayconfig: remove custom struct redefinition
  * osc: remove toggle for forced only subpictures
  * stats.lua: display --video-crop values when used
  * man/input: remove trailing spaces
  * player/command: add video-params/crop-[w,h,x,y]
  * autocrop.lua: use new --video-crop
  * vo: add --video-crop
  * player/video: don't copy mp_image_params when not needed
  * m_option: add OPT_RECT
  * mp_image: add image crop rect to mp_image_params
  * aspect: don't override src_start/src_end
  * common: constify mp_rect_equals
  * player/command: remove video-aspect property
  * demux_playlist: default to --directory-mode=lazy
  * stats.lua: enable --tone-mapping-visualize while stats shown
  * vo_gpu_next: improve --tonemapping-visualize
  * stats.lua: display hdr metadata and peak detection
  * command: add hdr-metadata property
  * vo_gpu_next: add support for VOCTRL_HDR_METADATA
  * vo: add VOCTRL_HDR_METADATA to get mp_hdr_metadata
  * csputils: add mp_hdr_metadata
  * input.conf: swap wheel up/down with wheel left/right
  * loadfile: fix --no-subs-with-matching-audio with --slang
  * osc: replace sub-forced-only with sub-forced-events-only
  * command: remove sub-forced-only-cur property
  * player: rename --sub-forced-only to --sub-forced-events-only
  * player: remove auto choice from sub-forced-only
  * ci/mingw: attempt to enable Vulkan Video Decoding
  * README: update minimum windows version and clarify
  * stats.lua: add hints about scrolling
  * stats.lua: refactor video params display
  * stats.lua: remove dummy new lines from headers
  * stats.lua: display actual output video size after anamorphic correction
  * player: add always to --subs-fallback-forced
  * player: add --subs-match-os-language option
  * loadfile: simplify default track selection a bit
  * player: remove special auto option from alang/slang/vlang
  * playlist: remove unused code to track redirects
  * player: always write redirect entries for resuming playback
  * vo_dmabuf_wayland: unmap osd surface when not needed
  * vo_gpu_next: fix --target-contrast=inf
  * README: replace outdated xinerama reference with xpresent
  * f_lavfi: don't reject dynamic lavfi ins/outs
  * osc: fix margin for forced-only subs toggle in bar layout
  * osc: only add sub forced-only toggle to layout for DVD/PGS subs
  * input: add missing windows multimedia keys
  * command: add `sub-ass-extradata` property
  * vo_gpu_next: update tmp params before rendering frame
  * vo_gpu_next: make option shim consistent with new API
  * vo_gpu_next: avoid duplicate code (cosmetic)
  * vo_gpu_next: correctly set params.frame_mixer
  * vo_gpu_next: don't nuke main options state in video_screenshot
  * vo_gpu_next: don't override main options in draw_frame

OBS-URL: https://build.opensuse.org/request/show/1113231
OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/mpv?expand=0&rev=302
2023-09-23 19:00:08 +00:00

273 lines
9.1 KiB
RPMSpec

#
# spec file for package mpv
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2015 Packman Team <packman@links2linux.de>
# Copyright (c) 2012 Jiri Slaby <jslaby@suse.de>
# Copyright (c) 2011-2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150400
%bcond_without jxl
%else
%bcond_with jxl
%endif
%define lname libmpv2
Name: mpv
Version: 0.36.0+git20230923.140d0185
Release: 0
Summary: Advanced general-purpose multimedia player
License: GPL-2.0-or-later
Group: Productivity/Multimedia/Video/Players
URL: http://mpv.io
Source: %{name}-%{version}.tar.xz
Source2: %{name}.changes
# PATCH-FIX-OPENSUSE do not require equal libav versions, obs rebuilds as needed
Patch0: mpv-make-ffmpeg-version-check-non-fatal.patch
Patch1: 0001-Revert-meson-bump-required-version-to-0.62.patch
# Install docs in proper directory
Patch2: fix-docs-path.patch
BuildRequires: bash
BuildRequires: hicolor-icon-theme
BuildRequires: linux-kernel-headers
BuildRequires: meson >= 0.60.3
# Needed any lua to convert the bash-completion
BuildRequires: lua
BuildRequires: perl
BuildRequires: pkgconfig
BuildRequires: python3-docutils
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(alsa) >= 1.0.18
BuildRequires: pkgconfig(caca) >= 0.99.beta18
BuildRequires: pkgconfig(dri)
BuildRequires: pkgconfig(dvdnav) >= 4.2.0
BuildRequires: pkgconfig(dvdread) >= 4.1.0
BuildRequires: pkgconfig(egl) >= 1.4
BuildRequires: pkgconfig(ffnvcodec) >= 8.2.15.7
BuildRequires: pkgconfig(gbm) >= 17.1.0
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(lcms2) >= 2.6
BuildRequires: pkgconfig(libarchive) >= 3.4.0
BuildRequires: pkgconfig(libass) >= 0.12.2
BuildRequires: pkgconfig(libavcodec) >= 58.12.100
BuildRequires: pkgconfig(libavdevice) >= 57.0.0
BuildRequires: pkgconfig(libavfilter) >= 7.14.100
%if 0%{?suse_version} > 1500
BuildRequires: pkgconfig(libavformat) >= 59.27.100
BuildRequires: pkgconfig(libavif) >= 0.11.1
BuildRequires: pkgconfig(libavutil) >= 57.24.100
%else
BuildRequires: pkgconfig(libavformat) >= 58.9.100
BuildRequires: pkgconfig(libavutil) >= 56.12.100
%endif
BuildRequires: pkgconfig(libbluray) >= 0.3.0
BuildRequires: pkgconfig(libcdio)
BuildRequires: pkgconfig(libcdio_cdda)
BuildRequires: pkgconfig(libcdio_paranoia)
BuildRequires: pkgconfig(libdrm) >= 2.4.75
BuildRequires: pkgconfig(libiso9660)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libpulse) >= 1.0
BuildRequires: pkgconfig(libswresample) >= 3.0.100
BuildRequires: pkgconfig(libswscale) >= 5.0.101
BuildRequires: pkgconfig(libva) >= 1.1.0
BuildRequires: pkgconfig(lua5.1)
BuildRequires: pkgconfig(openal) >= 1.13
BuildRequires: pkgconfig(python3)
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} > 150400
BuildRequires: pkgconfig(libsixel) >= 1.5
%endif
BuildRequires: pkgconfig(rubberband) >= 3.0.0
BuildRequires: pkgconfig(uchardet)
BuildRequires: pkgconfig(vapoursynth) >= 24
BuildRequires: pkgconfig(vapoursynth-script) >= 23
BuildRequires: pkgconfig(vdpau) >= 0.2
BuildRequires: pkgconfig(x11) >= 1.0.0
BuildRequires: pkgconfig(xext) >= 1.0.0
BuildRequires: pkgconfig(xkbcommon) >= 0.3.0
BuildRequires: pkgconfig(xpresent) >= 1.0.0
BuildRequires: pkgconfig(xrandr) >= 1.4.0
BuildRequires: pkgconfig(xscrnsaver) >= 1.0.0
BuildRequires: pkgconfig(xv)
BuildRequires: pkgconfig(zimg) >= 2.9
BuildRequires: pkgconfig(zlib)
%if %{with jxl}
BuildRequires: pkgconfig(libjxl)
BuildRequires: pkgconfig(libjxl_threads)
%endif
Requires: hicolor-icon-theme
Requires(post): hicolor-icon-theme
Requires(post): update-desktop-files
Requires(postun):hicolor-icon-theme
Requires(postun):update-desktop-files
# Used via LUA scripts
Recommends: yt-dlp
Conflicts: mpv-plugin-mpris < 0.4
# Obsoletion of mplayer2 that is dead for 2 years now
Provides: mplayer2 = 20140101
Obsoletes: mplayer2 < 20140101
# Use libplacebo v5.264 for Leap 15.5
%if 0%{?sle_version} >= 150400 && 0%{?is_opensuse}
BuildRequires: (pkgconfig(libplacebo) >= 5 with pkgconfig(libplacebo) < 6.292.0)
%endif
# Use libplacebo v6.292 for Tumbleweed
%if 0%{?suse_version} >= 1550
BuildRequires: pkgconfig(libplacebo) >= 6.292.0
BuildRequires: pkgconfig(shaderc)
%endif
# mujs is not available for Leap 15.5
%if 0%{?suse_version} >= 1550
BuildRequires: pkgconfig(mujs)
%endif
BuildRequires: pkgconfig(libva-wayland) >= 1.1.0
BuildRequires: pkgconfig(vulkan) >= 1.0.61
BuildRequires: pkgconfig(wayland-client) >= 1.20.0
BuildRequires: pkgconfig(wayland-cursor) >= 1.20.0
BuildRequires: pkgconfig(wayland-egl) >= 9.0.0
BuildRequires: pkgconfig(wayland-protocols) >= 1.25
BuildRequires: pkgconfig(wayland-scanner)
BuildRequires: pkgconfig(wayland-server)
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150300
BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.48
%endif
# JIT for lua.
%ifarch aarch64 %{ix86} x86_64
BuildRequires: pkgconfig(luajit)
%else
BuildRequires: pkgconfig(lua5.1)
%endif
%description
mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety
of video file formats, audio and video codecs, and subtitle types.
%package bash-completion
Summary: Bash Completion for %{name}
Group: Productivity/Multimedia/Video/Players
Requires: %{name} = %{version}
Requires: bash-completion
Recommends: xrandr
Supplements: (mpv and bash)
BuildArch: noarch
%description bash-completion
Bash command line completion support for %{name}.
%package zsh-completion
Summary: ZSH Completion for %{name}
Group: Productivity/Multimedia/Video/Players
Requires: %{name} = %{version}
Supplements: (mpv and zsh)
BuildArch: noarch
%description zsh-completion
ZSH command line completion support for %{name}.
%package devel
Summary: A library to link together with mpv player
Group: Development/Libraries/C and C++
Requires: %{lname} = %{version}
%description devel
mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety
of video file formats, audio and video codecs, and subtitle types.
This package contains all the development files.
%package -n %{lname}
Summary: A library to link together with mpv player
Group: System/Libraries
%description -n %{lname}
mpv is a movie player based on MPlayer and mplayer2. It supports a wide variety
of video file formats, audio and video codecs, and subtitle types.
This package contains a library that can other apps use to utilize the mpv
features.
%prep
%autosetup -p1
# I hate UNKNOWN so lets put decent info there.
MODIFIED="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE2}")"
DATE="$(date -d "$MODIFIED" "+%%b %%e %%Y")"
sed -i "s|UNKNOWN|$DATE|g;s|VERSION|\"%{version}\"|g" common/version.c
%build
# We don't want to rebuild all the time.
myopts=" -Dbuild-date=false"
# Disable pipwire for Leap because of build error
%if 0%{?suse_version} <= 1500 && 0%{?sle_version} < 150500
myopts+=" -Dpipewire=disabled"
%endif
# Needs libavutil >= 58.11.100 (unreleased as of 2023-07-14)
myopts+=" -Dvulkan-interop=disabled"
%meson \
--auto-features=auto \
-Dcdda=enabled \
-Dlibmpv=true \
-Ddvbin=enabled \
-Ddvdnav=enabled \
-Dopenal=enabled \
${myopts} \
%{?nil}
%meson_build
%install
%meson_install
install -D -m 0644 etc/input.conf %{buildroot}%{_sysconfdir}/%{name}/input.conf
install -D -m 0644 etc/mpv.conf %{buildroot}%{_sysconfdir}/%{name}/mpv.conf
# remove shebang
sed -i -e '1d' %{buildroot}%{_datadir}/bash-completion/completions/mpv
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%files
%license LICENSE.GPL
%doc Copyright README.md RELEASE_NOTES
%doc %{_defaultdocdir}/%{name}/input.conf
%doc %{_defaultdocdir}/%{name}/mplayer-input.conf
%doc %{_defaultdocdir}/%{name}/mpv.conf
%doc %{_defaultdocdir}/%{name}/restore-old-bindings.conf
%dir %{_sysconfdir}/%{name}/
%ghost %dir %{_sysconfdir}/%{name}/scripts/
%config %{_sysconfdir}/%{name}/encoding-profiles.conf
%config %{_sysconfdir}/%{name}/input.conf
%config %{_sysconfdir}/%{name}/mpv.conf
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor
%{_datadir}/metainfo/mpv.metainfo.xml
%{_mandir}/man?/%{name}.?%{?ext_man}
%files zsh-completion
%{_datadir}/zsh/site-functions/_mpv
%files bash-completion
%{_datadir}/bash-completion/completions/mpv
%files -n %{lname}
%{_libdir}/*.so.*
%files devel
%{_includedir}/%{name}/
%{_libdir}/*.so
%{_libdir}/pkgconfig/%{name}.pc
%changelog