summaryrefslogtreecommitdiff
blob: 954eeb8e36345e64ca5d74669d44ef9d2bc61bf8 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-base/okular/okular-4.0.4.ebuild,v 1.2 2008/05/30 09:22:22 zlin Exp $

EAPI="1"

KMNAME=kdegraphics
inherit kde4-meta

DESCRIPTION="Okular is an universal document viewer based on KPDF for KDE 4."
KEYWORDS="~amd64 ~x86"
IUSE="chm debug djvu htmlhandbook jpeg pdf tiff"

RDEPEND=">=app-text/libspectre-0.2
	media-libs/freetype
	kde-base/qimageblitz
	chm? ( dev-libs/chmlib )
	djvu? ( >=app-text/djvu-3.5.17 )
	jpeg? ( media-libs/jpeg )
	pdf? ( >=app-text/poppler-0.7
		>=app-text/poppler-bindings-0.7 )
	tiff? ( media-libs/tiff )"
DEPEND="${RDEPEND}
	dev-util/pkgconfig"

PATCHES=("${FILESDIR}/${KMNAME}-4.0.2-system-libspectre.patch")

pkg_setup() {
	if use pdf; then
		KDE4_BUILT_WITH_USE_CHECK=("app-text/poppler-bindings qt4")
	fi
	kde4-meta_pkg_setup
}

src_compile() {
	# remove internal copy of libspectre
	rm -r "${S}"/okular/generators/spectre/libspectre || \
		die "Failed to remove internal copy of libspectre."

	mycmakeargs="${mycmakeargs}
		$(cmake-utils_use_with chm CHM)
		$(cmake-utils_use_with djvu DjVuLibre)
		$(cmake-utils_use_with jpeg JPEG)
		$(cmake-utils_use_with pdf PopplerQt4)
		$(cmake-utils_use_with pdf Poppler)
		$(cmake-utils_use_with tiff TIFF)"

	kde4-meta_src_compile
}