# Template file for 'lensfun'
pkgname=lensfun
version=0.3.4
revision=2
build_style=cmake
configure_args="-DINSTALL_HELPER_SCRIPTS=0"
hostmakedepends="pkg-config python3-setuptools"
makedepends="libglib-devel"
short_desc="Library for rectifying and simulating photographic lens distortions"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-3.0-only, CC-BY-SA-3.0"
homepage="https://lensfun.github.io"
changelog="https://raw.githubusercontent.com/lensfun/lensfun/master/ChangeLog"
distfiles="https://github.com/lensfun/lensfun/archive/refs/tags/v${version}.tar.gz"
checksum=dafb39c08ef24a0e2abd00d05d7341b1bf1f0c38bfcd5a4c69cf5f0ecb6db112

case "$XBPS_TARGET_MACHINE" in
	i686*|x86_64*);;
	*) configure_args+=" -DBUILD_FOR_SSE=0 -DBUILD_FOR_SSE2=0";;
esac

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