# Maintainer: PktSurf <smlinux@pktsurf.in>
app=mpv
version=0.35.1
build=1sml
homepage="http://mpv.io"
download="https://github.com/mpv-player/mpv/archive/refs/tags/v$version.tar.gz"
desc="Movie player based on MPlayer and mplayer2"
requires="ffmpeg gtk2 gdk-pixbuf harfbuzz"

prepbuilddir() {
  mkandenterbuilddir
  rm -rf $app-$version

  tar xf $srcdir/$app-$version.tar.?z*
  cd $app-$version 
  fixbuilddirpermissions
}

build() {
  zcat $srcdir/waf-2.0.9.gz > waf 
  chmod +x waf

  ./waf configure \
    --prefix= \
    --confdir=/etc/mpv \
    --enable-egl-x11 

  ./waf build $MAKEFLAGS 
  ./waf --destdir="$pkg" install 

  cp LICENSE* $pkgdocs/

  mkfinalpkg
}

sha512sums="
a6c7cd5d38acef2e4676ca7036dd4343029fbb8373004d125843b29761527e1c96aca2f91b640751a8643e2c6758357f2818c02bac99ab896db7e45a5b924d87  mpv-0.35.1.tar.lz
"