app=libepoxy
version=1.5.4
build=1sml
homepage="https://github.com/anholt/libepoxy"
download="https://github.com/anholt/libepoxy/archive/refs/tags/$version.tar.gz"
desc="Library handling OpenGL function pointer management"
requires="mesa"

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

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

  mkdir -p smbuild && cd smbuild
  meson .. --prefix="/" 

  ninja
  DESTDIR="$pkg" ninja install

  cp ../COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
7bde6fe7164aaa88b6e476dafb13391c551c530267936a1456e242d2bf648117f319788ba089100b3f773444098a894db6d27326b47dc4ae26db4766308d7510  libepoxy-1.5.4.tar.xz
"
