# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Daniel Isenmann <daniel@archlinux.org>

pkgname=babl
_tag='21fbe9f353ade07ea6af71d8562fcb6b6912110e'
pkgver=0.1.108
pkgrel=1
pkgdesc='Dynamic, any to any, pixel format conversion library'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://gegl.org/babl/'
license=('LGPL-3.0-or-later')
depends=('glibc' 'lcms2')
makedepends=(
    'git'
    'meson'
    'gobject-introspection'
    'vala'
    'gi-docgen'
)
source=("git+https://gitlab.gnome.org/GNOME/babl.git#tag=$_tag")
sha256sums=('SKIP')

pkgver() {
  cd "${pkgname}"
  git describe --tags | sed 's/^BABL_//;s/_$//;s/_/./g;s/-/+/g'
}

build() {
  arch-meson "${pkgname}" build
  ninja -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="${pkgdir}" meson install -C build
}
