# Contributor: Sören Tempel # Contributor: Łukasz Jendrysik # Contributor: Natanael Copa # Contributor: Jakub Skrzypnik # Maintainer: Alex McGrath pkgname=mpv # intentionally git, see # https://github.com/mpv-player/mpv#release-cycle # the stable releases are just arbitrary git, so we can update more often. # it's the same stability policy regardless pkgver=0.36.0_git20230731 pkgrel=0 _gitrev=f4210f84906c3b00a65fba198c8127b6757b9350 pkgdesc="Video player based on MPlayer/mplayer2" url="https://mpv.io/" license="GPL-2.0-or-later" arch="all" makedepends=" alsa-lib-dev ffmpeg-dev jack-dev libao-dev libarchive-dev libass-dev libbluray-dev libcdio-paranoia-dev libdvdnav-dev libplacebo-dev libva-dev libxext-dev libxinerama-dev libxkbcommon-dev libxpresent-dev libxrandr-dev libxscrnsaver-dev libxv-dev mesa-dev meson pipewire-dev pulseaudio-dev py3-docutils rubberband-dev shaderc-dev sndio-dev uchardet-dev vulkan-headers vulkan-loader-dev wayland-dev wayland-protocols zimg-dev zlib-dev " subpackages=" $pkgname-dbg $pkgname-doc $pkgname-libs $pkgname-dev $pkgname-bash-completion $pkgname-zsh-completion " source="https://github.com/mpv-player/mpv/archive/$_gitrev/mpv-$_gitrev.tar.gz" builddir="$srcdir/mpv-$_gitrev" case "$CARCH" in ppc64le|riscv64) makedepends="$makedepends lua5.2-dev" ;; *) makedepends="$makedepends luajit-dev" ;; esac case "$CARCH" in # the tests expect a little endian host s390x) options="$options !check" ;; esac # secfixes: # 0.27.0-r3: # - CVE-2018-6360 prepare() { default_prepare echo "${pkgver%_git*}-$_gitrev" > VERSION } build() { CFLAGS="$CFLAGS -O2" \ CXXFLAGS="$CXXFLAGS -O2" \ abuild-meson \ -Db_lto=true \ -Dalsa=enabled \ -Dbuild-date=false \ -Dcdda=enabled \ -Ddvdnav=enabled \ -Degl-drm=enabled \ -Degl-wayland=enabled \ -Degl-x11=enabled \ -Degl=enabled \ -Dgl=enabled \ -Djack=enabled \ -Dlibplacebo=enabled \ -Dlibplacebo-next=enabled \ -Dlibmpv=true \ -Dpulse=enabled \ -Dsndio=enabled \ -Dtests="$(want_check && echo true || echo false)" \ -Duchardet=enabled \ -Dvdpau=disabled \ -Dvulkan=enabled \ -Dx11=enabled \ . output meson compile -C output } check() { meson test --no-rebuild --print-errorlogs -C output } package() { DESTDIR="$pkgdir" meson install --no-rebuild -C output install -Dm644 "$builddir"/DOCS/*.rst "$builddir"/DOCS/*.md \ -t "$pkgdir"/usr/share/doc/$pkgname/ # Move example configuration files to subdirectory mkdir -p "$pkgdir"/usr/share/doc/mpv/examples mv "$pkgdir"/usr/share/doc/mpv/*.conf \ "$pkgdir"/usr/share/doc/mpv/examples/ } sha512sums=" 3efacb9202064fcdc6de5b89fd774a48ab78d5504a1a4e5e94bf2dd395ce7f6ba1d510908e1057a1939ea0b06206c6e4a88645059bbeab9b2fee45f349237132 mpv-f4210f84906c3b00a65fba198c8127b6757b9350.tar.gz "