# Template file for 'libmypaint'
pkgname=libmypaint
version=1.6.1
revision=1
build_style=gnu-configure
configure_args="--disable-gegl"
hostmakedepends="intltool pkg-config $(vopt_if gir gobject-introspection)"
makedepends="json-c-devel glib-devel json-glib-devel"
short_desc="MyPaint brush engine library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="ISC"
homepage="https://github.com/mypaint/libmypaint"
distfiles="https://github.com/mypaint/libmypaint/releases/download/v${version}/libmypaint-${version}.tar.xz"
checksum=741754f293f6b7668f941506da07cd7725629a793108bb31633fb6c3eae5315f

build_options="gir"
if [ -z "$CROSS_BUILD" ]; then
	build_options_default="gir"
fi

post_install() {
	vlicense COPYING
}

libmypaint-devel_package() {
	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
		if [ "$build_option_gir" ]; then
			vmove "usr/share/gir-*"
		fi
	}
}
