summaryrefslogtreecommitdiff
blob: d83eefcd0dbe5ebc67ed5e898e841b7dff8f3bab (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-text/getxbook/getxbook-1.0-r1.ebuild,v 1.1 2015/03/21 09:25:25 jlec Exp $

EAPI=5

inherit eutils toolchain-funcs

DESCRIPTION="Download books from google, amazon, barnes and noble"
HOMEPAGE="http://njw.me.uk/software/getxbook/"
SRC_URI="http://njw.me.uk/software/getxbook/${P}.tar.bz2"

LICENSE="ISC"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="pdf djvu ocr tk"

DEPEND=""
RDEPEND="
	djvu? ( app-text/djvu )
	pdf? ( media-gfx/imagemagick )
	ocr? (
		app-text/tesseract
		pdf? ( media-gfx/exact-image app-text/pdftk )
		)
	tk? ( dev-lang/tk:0= )"

src_prepare() {
	epatch "${FILESDIR}"/${P}.patch
	tc-export CC AR RANLIB
}

src_install() {
	DOCS=( README LEGAL )
	default

	use pdf  && dobin extras/mkpdf.sh
	use djvu && dobin extras/mkdjvu.sh

	if use ocr; then
		dobin extras/mkocrtxt.sh
		use pdf  && dobin extras/mkocrpdf.sh
		use djvu && dobin extras/mkocrdjvu.sh
	fi
	use tk && dobin getxbookgui.tcl
}