Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/poppler/
Date: Sun, 07 Jan 2018 16:22:32
Message-Id: 1515342078.94e056026aa78b1129ae8dee76983bdac239d653.asturm@gentoo
1 commit: 94e056026aa78b1129ae8dee76983bdac239d653
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 7 16:21:18 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 7 16:21:18 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94e05602
7
8 app-text/poppler: Bump subslot to 0/73
9
10 Closes: https://bugs.gentoo.org/643796
11 Package-Manager: Portage-2.3.19, Repoman-2.3.6
12
13 app-text/poppler/poppler-0.62.0-r1.ebuild | 126 ++++++++++++++++++++++++++++++
14 1 file changed, 126 insertions(+)
15
16 diff --git a/app-text/poppler/poppler-0.62.0-r1.ebuild b/app-text/poppler/poppler-0.62.0-r1.ebuild
17 new file mode 100644
18 index 00000000000..b582e20f1f7
19 --- /dev/null
20 +++ b/app-text/poppler/poppler-0.62.0-r1.ebuild
21 @@ -0,0 +1,126 @@
22 +# Copyright 1999-2018 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +
27 +inherit cmake-utils flag-o-matic toolchain-funcs xdg-utils
28 +
29 +if [[ "${PV}" == "9999" ]] ; then
30 + inherit git-r3
31 + EGIT_REPO_URI="git://git.freedesktop.org/git/${PN}/${PN}"
32 + SLOT="0/9999"
33 +else
34 + SRC_URI="https://poppler.freedesktop.org/${P}.tar.xz"
35 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
36 + SLOT="0/73" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION
37 +fi
38 +
39 +DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base"
40 +HOMEPAGE="https://poppler.freedesktop.org/"
41 +
42 +LICENSE="GPL-2"
43 +IUSE="cairo cjk curl cxx debug doc +introspection +jpeg +jpeg2k +lcms nss png qt5 tiff +utils"
44 +
45 +# No test data provided
46 +RESTRICT="test"
47 +
48 +COMMON_DEPEND="
49 + >=media-libs/fontconfig-2.6.0
50 + >=media-libs/freetype-2.3.9
51 + sys-libs/zlib
52 + cairo? (
53 + dev-libs/glib:2
54 + >=x11-libs/cairo-1.10.0
55 + introspection? ( >=dev-libs/gobject-introspection-1.32.1:= )
56 + )
57 + curl? ( net-misc/curl )
58 + jpeg? ( virtual/jpeg:0 )
59 + jpeg2k? ( media-libs/openjpeg:2= )
60 + lcms? ( media-libs/lcms:2 )
61 + nss? ( >=dev-libs/nss-3.19:0 )
62 + png? ( media-libs/libpng:0= )
63 + qt5? (
64 + dev-qt/qtcore:5
65 + dev-qt/qtgui:5
66 + dev-qt/qtxml:5
67 + )
68 + tiff? ( media-libs/tiff:0 )
69 +"
70 +DEPEND="${COMMON_DEPEND}
71 + virtual/pkgconfig
72 +"
73 +RDEPEND="${COMMON_DEPEND}
74 + cjk? ( >=app-text/poppler-data-0.4.7 )
75 +"
76 +
77 +DOCS=(AUTHORS NEWS README README-XPDF)
78 +
79 +PATCHES=(
80 + "${FILESDIR}/${PN}-0.60.1-qt5-dependencies.patch"
81 + "${FILESDIR}/${PN}-0.28.1-fix-multilib-configuration.patch"
82 + "${FILESDIR}/${PN}-0.61.0-respect-cflags.patch"
83 + "${FILESDIR}/${PN}-0.62.0-openjpeg2.patch"
84 + "${FILESDIR}/${PN}-0.57.0-disable-internal-jpx.patch"
85 +)
86 +
87 +src_prepare() {
88 + cmake-utils_src_prepare
89 +
90 + # Clang doesn't grok this flag, the configure nicely tests that, but
91 + # cmake just uses it, so remove it if we use clang
92 + if [[ ${CC} == clang ]] ; then
93 + sed -i -e 's/-fno-check-new//' cmake/modules/PopplerMacros.cmake || die
94 + fi
95 +
96 + if ! grep -Fq 'cmake_policy(SET CMP0002 OLD)' CMakeLists.txt ; then
97 + sed '/^cmake_minimum_required/acmake_policy(SET CMP0002 OLD)' \
98 + -i CMakeLists.txt || die
99 + else
100 + einfo "policy(SET CMP0002 OLD) - workaround can be removed"
101 + fi
102 +
103 + # we need to up the C++ version, bug #622526, #643278
104 + append-cxxflags -std=c++11
105 +}
106 +
107 +src_configure() {
108 + xdg_environment_reset
109 + local mycmakeargs=(
110 + -DBUILD_GTK_TESTS=OFF
111 + -DBUILD_QT5_TESTS=OFF
112 + -DBUILD_CPP_TESTS=OFF
113 + -DENABLE_SPLASH=ON
114 + -DENABLE_ZLIB=ON
115 + -DENABLE_ZLIB_UNCOMPRESS=OFF
116 + -DENABLE_XPDF_HEADERS=ON
117 + -DSPLASH_CMYK=OFF
118 + -DUSE_FIXEDPOINT=OFF
119 + -DUSE_FLOAT=OFF
120 + -DWITH_Cairo=$(usex cairo)
121 + -DENABLE_LIBCURL=$(usex curl)
122 + -DENABLE_CPP=$(usex cxx)
123 + -DWITH_GObjectIntrospection=$(usex introspection)
124 + -DWITH_JPEG=$(usex jpeg)
125 + -DENABLE_DCTDECODER=$(usex jpeg libjpeg none)
126 + -DENABLE_LIBOPENJPEG=$(usex jpeg2k openjpeg2 none)
127 + -DENABLE_CMS=$(usex lcms lcms2 none)
128 + -DWITH_NSS3=$(usex nss)
129 + -DWITH_PNG=$(usex png)
130 + $(cmake-utils_use_find_package qt5 Qt5Core)
131 + -DWITH_TIFF=$(usex tiff)
132 + -DENABLE_UTILS=$(usex utils)
133 + )
134 +
135 + cmake-utils_src_configure
136 +}
137 +
138 +src_install() {
139 + cmake-utils_src_install
140 +
141 + # live version doesn't provide html documentation
142 + if use cairo && use doc && [[ ${PV} != 9999 ]]; then
143 + # For now install gtk-doc there
144 + insinto /usr/share/gtk-doc/html/poppler
145 + doins -r "${S}"/glib/reference/html/*
146 + fi
147 +}