aboutsummaryrefslogtreecommitdiffstats
path: root/main/cups-filters/APKBUILD
blob: 45bacb00e980f18882ce44962a5273e25a0c747f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cups-filters
pkgver=1.8.3
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="GPLv2 and GPLv2+ and GPLv3 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 cups-dev libjpeg-turbo-dev poppler-dev zlib-dev
	libpng-dev tiff-dev lcms-dev freetype-dev ghostscript-dev fontconfig-dev
	qpdf-dev avahi-dev dbus-dev linux-headers"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="http://www.openprinting.org/download/cups-filters/cups-filters-$pkgver.tar.xz
	0001-Make-textonly-conform-with-POSIX-better.patch
	"

_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/
}

md5sums="6554a92ae338cbfe40a45819d65c3738  cups-filters-1.8.3.tar.xz
b65f5b5191fee1834623b6aedf7f5c50  0001-Make-textonly-conform-with-POSIX-better.patch"
sha256sums="e1e786f1fbcd3a203d87ebb4106a0ba8d579953cbe22056d12d4ee8143f5341a  cups-filters-1.8.3.tar.xz
33f5589e8c8fc98d9715c3a1b93c459c5902ff7115804852f79bbcc1638d6cb3  0001-Make-textonly-conform-with-POSIX-better.patch"
sha512sums="5c3648670ae141038a373c4e800e81a7584759e3caf8c4e4468cb0da11c0ff521ac80678e603856c7209da6638673400305c38903cb27e3b4d792d17947e2af4  cups-filters-1.8.3.tar.xz
522f431e0a531b797a2f8626c22b711adce59c68564c3146db4c684ea81c51a265e8915b3e6148e1771a0bbd42d3bc6dd741793562cc145c52945658e43335b5  0001-Make-textonly-conform-with-POSIX-better.patch"