sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / app-text / pdf2djvu / pdf2djvu-0.9.8.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit python-any-r1 toolchain-funcs flag-o-matic
9
10 DESCRIPTION="A tool to create DjVu files from PDF files"
11 HOMEPAGE="http://jwilk.net/software/pdf2djvu"
12 SRC_URI="https://github.com/jwilk/${PN}/releases/download/${PV}/${P}.tar.xz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="+graphicsmagick nls openmp test"
18 RESTRICT="!test? ( test )"
19
20 RDEPEND="
21         >=app-text/djvu-3.5.21:=
22         >=app-text/poppler-0.16.7:=
23         dev-libs/libxml2:=
24         dev-libs/libxslt:=
25         graphicsmagick? ( media-gfx/graphicsmagick:= )
26 "
27 DEPEND="${RDEPEND}
28         dev-cpp/pstreams
29         virtual/pkgconfig
30         nls? ( sys-devel/gettext )
31         test? (
32                 ${PYTHON_DEPS}
33                 $(python_gen_any_dep 'dev-python/nose[${PYTHON_USEDEP}]')
34         )
35 "
36
37 REQUIRED_USE="test? ( graphicsmagick )"
38
39 DOCS=(
40         doc/{changelog,credits,djvudigital,README}
41 )
42
43 pkg_setup() {
44         use test && python-any-r1_pkg_setup
45 }
46
47 src_prepare() {
48         # bug 626874, poppler headers require C++11
49         append-cxxflags -std=c++11
50         default
51 }
52
53 src_configure() {
54         local openmp=--disable-openmp
55         use openmp && tc-has-openmp && openmp=--enable-openmp
56
57         econf \
58                 ${openmp} \
59                 $(use_enable nls) \
60                 $(use_with graphicsmagick)
61 }