# Template file for 'gd'
pkgname=gd
version=2.3.2
revision=1
build_style=gnu-configure
configure_args="--without-xpm"
hostmakedepends="pkg-config"
makedepends="libheif-devel libjpeg-turbo-devel libpng-devel libwebp-devel tiff-devel
 fontconfig-devel"
# There needs to be a font installed for fontconfig/basic test
checkdepends="liberation-fonts-ttf"
short_desc="Graphics library for the dynamic creation of images"
maintainer="Orphaned <orphan@voidlinux.org>"
license="custom:BSD-like"
homepage="http://www.libgd.org/"
distfiles="https://github.com/libgd/libgd/releases/download/gd-${version}/libgd-${version}.tar.xz"
checksum=478a047084e0d89b83616e4c2cf3c9438175fb0cc55d8c8967f06e0427f7d7fb

post_install() {
	vlicense COPYING
}

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