summaryrefslogtreecommitdiff
blob: 2750146a5d6eebdc79012e87c6c1f4635e908e01 (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
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Cups filters"
HOMEPAGE="https://wiki.linuxfoundation.org/openprinting/cups-filters"
SRC_URI="https://github.com/OpenPrinting/cups-filters/releases/download/${PV}/${P}.tar.xz"

LICENSE="Apache-2.0"
SLOT="0"
IUSE="+foomatic"
#IUSE=""
KEYWORDS="~amd64 ~arm64 ~loong"

RDEPEND="
	net-print/libcupsfilters
	net-print/libppd
	>=net-print/cups-1.7.3
"
DEPEND="${RDEPEND}"
BDEPEND="
	>=sys-devel/gettext-0.18.3
	virtual/pkgconfig
"

# The tests are composed of:
# - built program
# - test case itself: filter/test.sh
#
# The latter is not wired up, and it becomes immediately evident why.
# Bow to this reality and don't claim we can run anything. As a side
# effect, don't compile in src_test, that which we never use.
RESTRICT="test"

src_configure() {
	local myeconfargs=(
		--enable-imagefilters
		--enable-driverless
		--enable-poppler
		--localstatedir="${EPREFIX}"/var
		--with-fontdir="fonts/conf.avail"
		# cups-browsed is split out and avahi is not needed for filters
		# https://github.com/OpenPrinting/cups-filters/pull/558
		--disable-avahi
		# These are just probed for the path. Always enable them.
		--with-gs-path="${EPREFIX}"/usr/bin/gs
		--with-mutool-path="${EPREFIX}"/usr/bin/mutool

		$(use_enable foomatic)
	)

	econf "${myeconfargs[@]}"
}