# Template file for 'libwmf'
pkgname=libwmf
version=0.2.15
revision=1
build_style=gnu-configure
configure_args="
 --with-freetype=${XBPS_CROSS_BASE}/usr
 --with-gsfontdir=/usr/share/fonts/Type1
 --with-fontdir=/usr/share/fonts/Type1
 --with-gsfontmap=/usr/share/ghostscript/10.06.0/Resource/Init/Fontmap.GS"
hostmakedepends="automake libtool pkg-config gsfonts"
makedepends="gdk-pixbuf-devel freetype-devel expat-devel libjpeg-turbo-devel libpng-devel"
depends="gsfonts"
short_desc="Library for reading and converting WMF (Windows Meta Files)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.0-or-later"
homepage="http://wvware.sourceforge.net/libwmf.html"
changelog="https://raw.githubusercontent.com/caolanm/libwmf/refs/heads/master/ChangeLog"
distfiles="https://github.com/caolanm/libwmf/archive/v${version}.tar.gz"
checksum=379ae041dd53ab35f55c9b73a78a31f1ce530e925023c31607b05f2199d867e6

pre_configure() {
	autoreconf -fi
}

post_install() {
	rm -rf ${DESTDIR}/usr/share/fonts
}

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