summaryrefslogtreecommitdiff
blob: 8992c84de2de285b1de8fb258ed61cc3db58edfa (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="5"
GCONF_DEBUG="no"
PYTHON_COMPAT=( python2_7 )

inherit autotools eutils gnome2 python-r1

DESCRIPTION="Document layout analysis and optical character recognition system"
HOMEPAGE="https://wiki.gnome.org/Apps/OCRFeeder"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

COMMON_DEPEND="
	${PYTHON_DEPS}
	app-text/gtkspell:3[introspection]
	dev-libs/gobject-introspection
	dev-python/lxml[${PYTHON_USEDEP}]
	>=dev-python/odfpy-0.7[${PYTHON_USEDEP}]
	dev-python/pyenchant[${PYTHON_USEDEP}]
	dev-python/pygobject:3
	dev-python/python-sane[${PYTHON_USEDEP}]
	dev-python/reportlab[${PYTHON_USEDEP}]
	virtual/python-imaging[${PYTHON_USEDEP}]
	x11-libs/goocanvas:2.0[introspection]
	x11-libs/gtk+:3[introspection]
"
RDEPEND="${COMMON_DEPEND}
	media-gfx/sane-backends

	app-text/unpaper
	|| (
		app-text/tesseract
		app-text/ocrad
		app-text/gocr
		app-text/cuneiform
	)
"
DEPEND="${COMMON_DEPEND}
	app-text/gnome-doc-utils[${PYTHON_USEDEP}]
	>=dev-util/intltool-0.35
"

pkg_setup() {
	python_setup
}

src_prepare() {
	# Unbundle odfpy
	#epatch "${FILESDIR}"/0002-Drop-bundled-odfpy-usage.patch
	#rm -rf src/ocrfeeder/odf/ || die

	#eautoreconf
	gnome2_src_prepare
	python_copy_sources
}

src_configure() {
	python_foreach_impl run_in_build_dir gnome2_src_configure
}

src_compile() {
	python_foreach_impl run_in_build_dir emake
}

src_test() {
	python_foreach_impl run_in_build_dir emake check
}

src_install() {
	python_foreach_impl run_in_build_dir gnome2_src_install
	python_fix_shebang "${D}"/usr/bin
}