# Maintainer: PktSurf <smlinux@pktsurf.in>
app=libdrm
version=2.4.115
build=1sml
homepage="https://dri.freedesktop.org/"
download="https://dri.freedesktop.org/libdrm/libdrm-$version.tar.xz"
desc="Userspace interface to kernel DRM services"
requires="libxslt libpciaccess"

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

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

build() {
  mkdir -p smbuild && cd smbuild
  meson .. \
   --prefix=/ \
   -Dcairo-tests=disabled

  ninja
  DESTDIR="$pkg" ninja install

  cp $srcdir/COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
ef97ef5a9a6366f7a85bc67d826416c3156c24f6b034a3790076d97942cef1d9d9671e264d556afa9d94cd1e9deebe66ed4979c3aee7e79f6b6ee2d3ead43628  libdrm-2.4.115.tar.lz
"
