APP=libdrm
VERSION=2.4.102
BUILD=1sml
HOMEPAGE="https://dri.freedesktop.org/"
DOWNLOAD="https://dri.freedesktop.org/libdrm/libdrm-2.4.102.tar.xz"
DESC="Userspace interface to kernel DRM services"
REQUIRES="libxslt libpciaccess "

build() {
  mkandenterbuilddir
  rm -rf $APP-$VERSION

  tar xf $SRCDIR/$APP-$VERSION.tar.?z*
  cd $APP-$VERSION
  fixbuilddirpermissions

  mkdir -p smbuild && cd smbuild
  meson .. \
   --prefix="/" \
   -Dcairo-tests=false 

  ninja
  DESTDIR="$PKG" ninja install

  cp $SRCDIR/COPYING $PKGDOCS/

  mkfinalpkg
}

SHA512SUMS="
386afd228efd809fe32776a6ff5d9dd95d1409a6a6a89b3806a3b42ed27e84f1e090f3b7834973f834d6b0d1342b7034447fe8690d072f85f03292d7795c3e0c  libdrm-2.4.102.tar.xz
"
