# Template file for 'cups-filters'
pkgname=cups-filters
version=1.28.17
revision=3
build_style=gnu-configure
configure_args="--disable-static --with-rcdir=no --enable-avahi
 --with-browseremoteprotocols=DNSSD,CUPS
 --with-test-font-path=/usr/share/fonts/TTF/DejaVuSans.ttf"
hostmakedepends="ghostscript glib-devel mupdf-tools pkg-config poppler liblouis"
makedepends="avahi-glib-libs-devel cups-devel fontconfig-devel liblouis-devel
 ghostscript-devel lcms2-devel libqpdf-devel poppler-cpp-devel libexif-devel"
depends="bc ghostscript libcups-filters-${version}_${revision} poppler"
checkdepends="dejavu-fonts-ttf"
conf_files="/etc/cups/cups-browsed.conf"
short_desc="OpenPrinting CUPS Filters"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later, MIT"
homepage="https://wiki.linuxfoundation.org/openprinting/cups-filters"
changelog="https://github.com/OpenPrinting/cups-filters/releases"
distfiles="https://github.com/OpenPrinting/cups-filters/releases/download/${version}/cups-filters-${version}.tar.xz"
checksum=270a3752a960368aa99d431fb5d34f4039b2ac943c576d840612d1d8185c9bb9
lib32disabled=yes

# https://github.com/OpenPrinting/cups-filters/issues/512
export CXXFLAGS="-std=c++17"

post_install() {
	vsv cups-browsed
	vlicense COPYING
}

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

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