summaryrefslogtreecommitdiff
path: root/app-text/poppler-base/poppler-base-0.32.0.ebuild
blob: c10c0e30b4630c6267f829553b2c4141e9bb6f7b (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
HOMEPAGE="http://poppler.freedesktop.org/"
SRC_URI="http://poppler.freedesktop.org/${P/-base}.tar.xz"

LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"
SLOT="0/51"
IUSE="cjk curl cxx debug doc +jpeg jpeg2k +lcms png tiff +utils"

# No test data provided
RESTRICT="test"

COMMON_DEPEND="
	>=media-libs/fontconfig-2.6.0
	>=media-libs/freetype-2.3.9
	sys-libs/zlib
	curl? ( net-misc/curl )
	jpeg? ( virtual/jpeg:0 )
	jpeg2k? ( media-libs/openjpeg:0 )
	lcms? ( media-libs/lcms:2 )
	png? ( media-libs/libpng:0= )
	tiff? ( media-libs/tiff:0 )
"
DEPEND="${COMMON_DEPEND}
	virtual/pkgconfig
"
RDEPEND="${COMMON_DEPEND}
	cjk? ( >=app-text/poppler-data-0.4.4 )
"

S="${WORKDIR}/${P/-base}"

DOCS=(AUTHORS NEWS README README-XPDF TODO)

openjpeg_option() {
	if use jpeg2k; then
		echo --enable-libopenjpeg=openjpeg1
	else
		echo --enable-libopenjpeg=none
	fi
}

src_configure() {
	econf \
		--disable-cairo-output \
		--disable-gtk-test \
		--disable-poppler-qt4 \
		--disable-poppler-qt5 \
		--disable-poppler-glib \
		--enable-introspection=no \
		--enable-zlib \
		--enable-splash-output \
		--enable-xpdf-headers \
		$(use_enable lcms cms) \
		$(use_enable jpeg libjpeg) \
		$(openjpeg_option) \
		$(use_enable png libpng) \
		$(use_enable tiff libtiff) \
		$(use_enable curl libcurl) \
		$(use_enable cxx poppler-cpp) \
		$(use_enable utils) \
		--enable-cms=$(use lcms && echo "lcms2" || echo "none") \
		|| die "econf failed"
}