# Template file for 'SDL2_image'
pkgname=SDL2_image
version=2.8.12
revision=1
build_style=cmake
configure_args="-DSDL2IMAGE_JXL=ON"
hostmakedepends="pkg-config"
makedepends="SDL2-devel libavif-devel libjpeg-turbo-devel libpng-devel libwebp-devel
 libjxl-devel tiff-devel zlib-devel"
short_desc="Load images as SDL surfaces (SDL 2.x)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="Zlib"
homepage="https://github.com/libsdl-org/SDL_image"
changelog="https://raw.githubusercontent.com/libsdl-org/SDL_image/SDL2/CHANGES.txt"
distfiles="http://www.libsdl.org/projects/SDL_image/release/SDL2_image-${version}.tar.gz"
checksum=393f5efb50536ec13ca4f4affb69cc9966d3c3f969e6c5e701faddf9f9785381

post_install() {
	vlicense LICENSE.txt LICENSE
}

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