# Template file for 'lcms2'
pkgname=lcms2
version=2.16
revision=2
build_style=meson
configure_args="-Dutils=true -Dsamples=true $(vopt_bool plugins fastfloat) $(vopt_bool plugins threaded)"
hostmakedepends="pkg-config"
makedepends="tiff-devel libjpeg-turbo-devel"
short_desc="Small-footprint color management engine, version 2"
maintainer="skmpz <dem.procopiou@gmail.com>"
license="MIT $(vopt_if plugins GPL-3.0-or-later)"
homepage="https://littlecms.com"
distfiles="${SOURCEFORGE_SITE}/lcms/lcms2-${version}.tar.gz"
checksum=d873d34ad8b9b4cea010631f1a6228d2087475e4dc5e763eb81acc23d9d45a51
build_options="plugins"
build_options_default=" "
desc_option_plugins="Build with threaded and fast float plugins (GPL-3.0-or-later)"

post_install() {
	vlicense LICENSE
}

lcms2-devel_package() {
	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove usr/lib/liblcms2.so
	}
}

lcms2-tools_package() {
	short_desc+=" - bundled tools"
	pkg_install() {
		vmove usr/bin
		vmove usr/share/man
	}
}
