# Template file for 'babl'
pkgname=babl
version=0.1.106
revision=1
build_style=meson
build_helper=gir
configure_args="-Dwith-docs=false -Denable-gir=true"
hostmakedepends="pkg-config vala-devel gobject-introspection"
makedepends="lcms2-devel vala-devel"
short_desc="Dynamic pixel format translation library"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="LGPL-3.0-only"
homepage="https://gegl.org/babl/"
changelog="https://gitlab.gnome.org/GNOME/babl/-/raw/master/NEWS"
distfiles="https://download.gimp.org/pub/babl/${version%.*}/babl-${version}.tar.xz"
checksum=d325135d3304f088c134cc620013acf035de2e5d125a50a2d91054e7377c415f

case "$XBPS_TARGET_MACHINE" in
	arm*) configure_args+=" -Db_lto=false"
esac

babl-devel_package() {
	depends="lcms2-devel ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/share/vala
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
		vmove "usr/share/gir-*"
	}
}
