# Maintainer: PktSurf <smlinux@pktsurf.in>
app=glib
version=2.78.1
build=1sml
homepage="https://gitlab.gnome.org/GNOME/glib"
download="https://download.gnome.org/sources/glib/2.66/glib-$version.tar.xz"
desc="library of C routines"
requires="libffi util-linux pcre python3 gettext meson"

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=/ \
     -Dman=false \
     -Dgtk_doc=false \
     -Dselinux=disabled \
     -Dinstalled_tests=false

  ninja
  DESTDIR="$pkg" ninja install

  cp ../COPYING $pkgdocs/

  mkfinalpkg
}

sha512sums="
417177f991fc449308135d6390a4c887a02718c32ba8a3699126d2f2d2b3225fb34946c47ae32895232e1e0df65ae3a9643ed7bc9c6d0a42c0847ab8e134a1a3  glib-2.78.1.tar.lz
"