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

EAPI=6
VALA_MAX_API_VERSION="0.40"
inherit gnome2 vala versionator

DESCRIPTION="Simple document scanning utility"
HOMEPAGE="https://launchpad.net/simple-scan"

MY_PV=$(get_version_component_range 1-2)
SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${P}.tar.xz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="amd64 ~arm ~ppc64 x86"
IUSE="colord" # packagekit

COMMON_DEPEND="
	>=dev-libs/glib-2.32:2
	dev-libs/libgusb[vala]
	>=media-gfx/sane-backends-1.0.20:=
	>=sys-libs/zlib-1.2.3.1:=
	virtual/jpeg:0=
	x11-libs/cairo:=
	>=x11-libs/gtk+-3:3
	colord? ( >=x11-misc/colord-0.1.24:=[udev] )
"
# packagekit? ( app-admin/packagekit-base )
RDEPEND="${COMMON_DEPEND}
	x11-misc/xdg-utils
	x11-themes/adwaita-icon-theme
"
DEPEND="${COMMON_DEPEND}
	$(vala_depend)
	app-text/yelp-tools
	dev-libs/appstream-glib
	>=sys-devel/gettext-0.19.7
	virtual/pkgconfig
"

src_prepare() {
	# Force build from vala sources due to mismatch between generated
	# C files and configure switches
	# https://bugs.launchpad.net/simple-scan/+bug/1462769
	rm -f src/simple_scan_vala.stamp || die
	vala_src_prepare
	gnome2_src_prepare
}

src_configure() {
	gnome2_src_configure \
		--disable-packagekit \
		$(use_enable colord)
		# $(use_enable packagekit)
}