# Maintainer: Christian Hesse <mail@eworm.de>
# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Eivind Uggedal <eivind@uggedal.com>
pkgname=mpv
epoch=1
pkgver=0.38.0
pkgrel=3
pkgdesc='a free, open source, and cross-platform media player'
arch=('armv7h')
license=('GPL-2.0-or-later AND LGPL-2.1-or-later')
url='https://mpv.io/'
depends=('alsa-lib' 'libasound.so' 'desktop-file-utils' 'ffmpeg' 'libavcodec.so' 'libavdevice.so'
'libavfilter.so' 'libavformat.so' 'libavutil.so' 'libswresample.so' 'libswscale.so'
'glibc' 'hicolor-icon-theme'
#'jack' 'libjack.so'
'lcms2' 'liblcms2.so' 'libarchive' # 'libarchive.so'
'libass' 'libass.so'
#'libbluray' 'libbluray.so' 'libcdio' 'libcdio-paranoia'
'libdrm'
#'libdvdnav' 'libdvdread'
'libegl' 'libgl' 'libglvnd'
'libjpeg' 'libjpeg.so' 'libplacebo' 'libplacebo.so' 'libpulse' 'libpulse.so'
#'libsixel'
# 'libva' 'libva.so' 'libva-drm.so' 'libva-wayland.so' 'libva-x11.so' 'libvdpau'
'libx11'
'libxext' 'libxkbcommon' 'libxkbcommon.so' 'libxpresent' 'libxrandr' 'libxss'
'libxv' 'luajit' 'mesa' 'mujs' 'rubberband' 'librubberband.so'
'openal' 'uchardet' 'vapoursynth' 'wayland' 'zlib')
makedepends=('git' 'meson' 'python-docutils' 'ladspa' 'wayland-protocols'
# 'ffnvcodec-headers'
)
optdepends=('yt-dlp: for video-sharing websites playback')
provides=('libmpv.so')
options=('!emptydirs')
validpgpkeys=('145077D82501AA20152CACCE8D769208D5E31419') # sfan5 <sfan5@live.de>
source=("git+https://github.com/mpv-player/mpv.git#tag=v${pkgver}?signed")
sha256sums=('b37b91d0ae4518594b22338ebe979f13bdc56b6fa26d589e5c3f7b96a31bab3d')
build() {
local _meson_options=(
--auto-features auto
-Dlibmpv=true
-Dgl-x11=enabled
-Dcaca=disabled
-Dcdda=disabled
-Ddvbin=enabled
-Ddvdnav=disabled
-Dlibarchive=enabled
-Dopenal=enabled
)
arch-meson "${pkgname}" build "${_meson_options[@]}"
meson compile -C build
}
#check() {
# meson test -C build
#}
package() {
meson install -C build --destdir "${pkgdir}"
# delete private entries only required for static linking
sed -i -e '/Requires.private/d' -e '/Libs.private/d' "${pkgdir}"/usr/lib/pkgconfig/mpv.pc
install -m0644 "${pkgname}"/DOCS/{encoding.rst,tech-overview.txt} \
"${pkgdir}"/usr/share/doc/mpv
install -m0644 "${pkgname}"/TOOLS/{umpv,mpv_identify.sh,stats-conv.py,idet.sh,lua/*} \
-D -t "${pkgdir}"/usr/share/mpv/scripts
}