1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
8 inherit python-any-r1 toolchain-funcs flag-o-matic
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"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="+graphicsmagick nls openmp test"
18 RESTRICT="!test? ( test )"
21 >=app-text/djvu-3.5.21:=
22 >=app-text/poppler-0.16.7:=
25 graphicsmagick? ( media-gfx/graphicsmagick:= )
30 nls? ( sys-devel/gettext )
33 $(python_gen_any_dep 'dev-python/nose[${PYTHON_USEDEP}]')
37 REQUIRED_USE="test? ( graphicsmagick )"
40 doc/{changelog,credits,djvudigital,README}
44 use test && python-any-r1_pkg_setup
48 # bug 626874, poppler headers require C++11
49 append-cxxflags -std=c++11
54 local openmp=--disable-openmp
55 use openmp && tc-has-openmp && openmp=--enable-openmp
60 $(use_with graphicsmagick)