# Template file for 'jasper'
pkgname=jasper
version=4.2.9
revision=1
build_style=cmake
cmake_builddir="builddir" # source contains a `build` directory.
configure_args="-DALLOW_IN_SOURCE_BUILD=ON -DJAS_STDC_VERSION=201112L"
makedepends="libjpeg-turbo-devel"
short_desc="Software-based reference implementation of the JPEG-2000 codec"
maintainer="Orphaned <orphan@voidlinux.org>"
license="JasPer-2.0"
homepage="http://www.ece.uvic.ca/~mdadams/jasper"
changelog="https://raw.githubusercontent.com/jasper-software/jasper/refs/heads/master/NEWS.txt"
distfiles="https://github.com/mdadams/jasper/archive/version-${version}.tar.gz"
checksum=b0e5af6b54c274b9670c7e32ddbf6c802d88c896062d760267695dd0aa7014ff

post_install() {
	vlicense LICENSE.txt
}

libjasper_package() {
	short_desc+=" - shared library"
	pkg_install() {
		vmove "usr/lib/*.so.*"
	}
}

jasper-devel_package() {
	depends="libjpeg-turbo-devel libjasper>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
	}
}
