# Maintainer: Natanael Copa pkgname=cups-filters pkgver=1.19.0 pkgrel=1 pkgdesc="OpenPrinting CUPS filters and backends" url="http://www.linuxfoundation.org/collaborate/workgroups/openprinting/pdf_as_standard_print_job_format" arch="all" license="GPL-2.0 and GPL-2.0-or-later and GPL-3.0 and MIT" # while textonly is originally a bash script, it only needs a few changes # to work with any shell (dash being the problematic one) # foomatic-rip needs "a modern shell" in case the PPD requires some # newer constructs; bash, ksh, and zsh are documented as working, # and busybox ash supports most of what bash does # texttops/textopdf need FreeMono from ttf-freefont # for text printing to work depends="poppler-utils bc ttf-freefont" depends_dev="" makedepends="$depends_dev bash cups-dev libjpeg-turbo-dev poppler-dev zlib-dev libpng-dev tiff-dev lcms2-dev freetype-dev ghostscript-dev fontconfig-dev qpdf-dev avahi-dev dbus-dev linux-headers mupdf-tools coreutils" install="" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" source="http://www.openprinting.org/download/cups-filters/cups-filters-$pkgver.tar.xz " _builddir="$srcdir"/cups-filters-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --disable-static \ --with-pdftops=pdftops \ --with-shell=/bin/sh \ --without-rcdir \ --without-rclevels \ || return 1 # workaround parallel build issue by building libcupsfilters.la first make libcupsfilters.la && make libfontembed.la && make || return 1 } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install || return 1 #the pdf.utf-8 symlink isn't quite good enough cd "$pkgdir"/usr/share/cups/charsets && \ ln -s pdf.utf-8.simple pdf.UTF-8 || return 1 } dev() { default_dev # cupsfilters.drv needs pcl.h install -Dm644 "$_builddir"/filter/pcl.h \ "$pkgdir"/usr/share/cups/ppdc/pcl.h } libs() { pkgdesc="OpenPrinting CUPS filters and backends - cupsfilters and fontembed libraries" install -d "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/lib*.so.* "$subpkgdir"/usr/lib/ } sha512sums="4b580734f7bac78c9d48aad7d8bb9e47227134e594fba76b1c82632fd8dd3e885f3897f7efd1a4b56647b74741f452f4e36d0157591c7fd5d626001028903d30 cups-filters-1.19.0.tar.xz"