1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit cmake-utils toolchain-funcs
9 if [[ "${PV}" == "9999" ]] ; then
11 EGIT_REPO_URI="git://git.freedesktop.org/git/${PN}/${PN}"
14 SRC_URI="http://poppler.freedesktop.org/${P}.tar.xz"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
16 SLOT="0/56" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION
19 DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
20 HOMEPAGE="http://poppler.freedesktop.org/"
23 IUSE="cairo cjk curl cxx debug doc +introspection +jpeg +jpeg2k +lcms png qt4 qt5 tiff +utils"
25 # No test data provided
29 >=media-libs/fontconfig-2.6.0
30 >=media-libs/freetype-2.3.9
34 >=x11-libs/cairo-1.10.0
35 introspection? ( >=dev-libs/gobject-introspection-1.32.1 )
37 curl? ( net-misc/curl )
38 jpeg? ( virtual/jpeg:0 )
39 jpeg2k? ( media-libs/openjpeg:2= )
40 lcms? ( media-libs/lcms:2 )
41 png? ( media-libs/libpng:0= )
51 tiff? ( media-libs/tiff:0 )
53 DEPEND="${COMMON_DEPEND}
56 RDEPEND="${COMMON_DEPEND}
57 cjk? ( >=app-text/poppler-data-0.4.4 )
60 DOCS=(AUTHORS NEWS README README-XPDF TODO)
63 "${FILESDIR}/${PN}-0.26.0-qt5-dependencies.patch"
64 "${FILESDIR}/${PN}-0.28.1-fix-multilib-configuration.patch"
65 "${FILESDIR}/${PN}-0.28.1-respect-cflags.patch"
66 "${FILESDIR}/${PN}-0.33.0-openjpeg2.patch"
70 cmake-utils_src_prepare
72 # Clang doesn't grok this flag, the configure nicely tests that, but
73 # cmake just uses it, so remove it if we use clang
74 if [[ ${CC} == clang ]] ; then
75 sed -i -e 's/-fno-check-new//' cmake/modules/PopplerMacros.cmake || die
87 -DENABLE_XPDF_HEADERS=ON
88 $(cmake-utils_use_enable curl LIBCURL)
89 $(cmake-utils_use_enable cxx CPP)
90 $(cmake-utils_use_enable utils)
91 $(cmake-utils_use_with cairo)
92 $(cmake-utils_use_with introspection GObjectIntrospection)
93 $(cmake-utils_use_with jpeg)
94 $(cmake-utils_use_with png)
95 $(cmake-utils_use_with qt4)
96 $(cmake-utils_use_find_package qt5 Qt5Core)
97 $(cmake-utils_use_with tiff)
100 mycmakeargs+=(-DENABLE_LIBOPENJPEG=openjpeg2)
102 mycmakeargs+=(-DENABLE_LIBOPENJPEG=)
105 mycmakeargs+=(-DENABLE_CMS=lcms2)
107 mycmakeargs+=(-DENABLE_CMS=)
110 cmake-utils_src_configure
114 cmake-utils_src_install
116 # live version doesn't provide html documentation
117 if use cairo && use doc && [[ ${PV} != 9999 ]]; then
118 # For now install gtk-doc there
119 insinto /usr/share/gtk-doc/html/poppler
120 doins -r "${S}"/glib/reference/html/*