1 |
commit: 1f97b37e2efa9e9e6ef9897f11998bbee21dab87 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 27 09:29:39 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 27 09:30:48 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f97b37e |
7 |
|
8 |
app-text/poppler: Bump to version 0.78.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.67, Repoman-2.3.16 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
app-text/poppler/Manifest | 1 + |
14 |
.../files/poppler-0.78.0-respect-cflags.patch | 31 +++++ |
15 |
app-text/poppler/poppler-0.78.0.ebuild | 127 +++++++++++++++++++++ |
16 |
3 files changed, 159 insertions(+) |
17 |
|
18 |
diff --git a/app-text/poppler/Manifest b/app-text/poppler/Manifest |
19 |
index f4c999fd676..e2a76fa1983 100644 |
20 |
--- a/app-text/poppler/Manifest |
21 |
+++ b/app-text/poppler/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST poppler-0.77.0.tar.xz 1533068 BLAKE2B 9ce7db05bd9d0131f643096b84058e67ba416b34497af5e97c9b6f404131fc72c29ac05e60b77477d16e586df73b306e4a01c113be7ede0cf3956240db889a7f SHA512 7c82cf584541fcbfa7cecdb06be9c4ba6d03479fc248377b874afeab561eac24015915eee566edc35fafe785b9f381f492c1789c070e67a2c1b344879c156040 |
24 |
+DIST poppler-0.78.0.tar.xz 1540264 BLAKE2B ab3c598667c6169a1c4ff5f7592fa957b5a7d3d4c4a01fcea42b59a8c16f29ca137920e84731b430c5bd3c07d5c7326a371cc45c4f6c9749cce30aadb62b88bd SHA512 738916916be1d94d90b0201c6b225c51c1ae5a93421e8c52e799d8443fbdfcda80c8088ab5f04a9319bc3a2fa1c361d4e781efe585da5bf4cd47b80fe20465ac |
25 |
|
26 |
diff --git a/app-text/poppler/files/poppler-0.78.0-respect-cflags.patch b/app-text/poppler/files/poppler-0.78.0-respect-cflags.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..137af0dedc4 |
29 |
--- /dev/null |
30 |
+++ b/app-text/poppler/files/poppler-0.78.0-respect-cflags.patch |
31 |
@@ -0,0 +1,31 @@ |
32 |
+--- poppler-0.78.0/cmake/modules/PopplerMacros.cmake |
33 |
++++ poppler-0.78.0/cmake/modules/PopplerMacros.cmake |
34 |
+@@ -145,28 +145,6 @@ |
35 |
+ endif(GCC_HAS_AS_NEEDED) |
36 |
+ endif (CMAKE_COMPILER_IS_GNUCXX) |
37 |
+ |
38 |
+-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") |
39 |
+-# set the default compile warnings |
40 |
+- set(_warn "-Wall -Wextra -Wpedantic") |
41 |
+- set(_warn "${_warn} -Wno-unused-parameter") |
42 |
+- set(_warn "${_warn} -Wcast-align") |
43 |
+- set(_warn "${_warn} -Wformat-security") |
44 |
+- set(_warn "${_warn} -Wframe-larger-than=65536") |
45 |
+- set(_warn "${_warn} -Wmissing-format-attribute") |
46 |
+- set(_warn "${_warn} -Wnon-virtual-dtor") |
47 |
+- set(_warn "${_warn} -Woverloaded-virtual") |
48 |
+- set(_warn "${_warn} -Wmissing-declarations") |
49 |
+- set(_warn "${_warn} -Wundef") |
50 |
+- set(_warn "${_warn} -Wzero-as-null-pointer-constant") |
51 |
+- set(_warn "${_warn} -Wshadow") |
52 |
+- |
53 |
+- # set extra warnings |
54 |
+- set(_warnx "${_warnx} -Wconversion") |
55 |
+- |
56 |
+- set(DEFAULT_COMPILE_WARNINGS "${_warn}") |
57 |
+- set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}") |
58 |
+-endif() |
59 |
+- |
60 |
+ if(CMAKE_C_COMPILER MATCHES "icc") |
61 |
+ set(_save_cxxflags "${CMAKE_CXX_FLAGS}") |
62 |
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}") |
63 |
|
64 |
diff --git a/app-text/poppler/poppler-0.78.0.ebuild b/app-text/poppler/poppler-0.78.0.ebuild |
65 |
new file mode 100644 |
66 |
index 00000000000..43e1d1cf946 |
67 |
--- /dev/null |
68 |
+++ b/app-text/poppler/poppler-0.78.0.ebuild |
69 |
@@ -0,0 +1,127 @@ |
70 |
+# Copyright 1999-2019 Gentoo Authors |
71 |
+# Distributed under the terms of the GNU General Public License v2 |
72 |
+ |
73 |
+EAPI=7 |
74 |
+ |
75 |
+inherit cmake-utils flag-o-matic toolchain-funcs xdg-utils |
76 |
+ |
77 |
+if [[ ${PV} == *9999* ]] ; then |
78 |
+ inherit git-r3 |
79 |
+ EGIT_REPO_URI="https://anongit.freedesktop.org/git/poppler/poppler.git" |
80 |
+ SLOT="0/9999" |
81 |
+else |
82 |
+ SRC_URI="https://poppler.freedesktop.org/${P}.tar.xz" |
83 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
84 |
+ SLOT="0/89" # CHECK THIS WHEN BUMPING!!! SUBSLOT IS libpoppler.so SOVERSION |
85 |
+fi |
86 |
+ |
87 |
+DESCRIPTION="PDF rendering library based on the xpdf-3.0 code base" |
88 |
+HOMEPAGE="https://poppler.freedesktop.org/" |
89 |
+ |
90 |
+LICENSE="GPL-2" |
91 |
+IUSE="cairo cjk curl cxx debug doc +introspection +jpeg +jpeg2k +lcms nss png qt5 tiff +utils" |
92 |
+ |
93 |
+# No test data provided |
94 |
+RESTRICT="test" |
95 |
+ |
96 |
+BDEPEND=" |
97 |
+ dev-util/glib-utils |
98 |
+ virtual/pkgconfig |
99 |
+" |
100 |
+DEPEND=" |
101 |
+ media-libs/fontconfig |
102 |
+ media-libs/freetype |
103 |
+ sys-libs/zlib |
104 |
+ cairo? ( |
105 |
+ dev-libs/glib:2 |
106 |
+ x11-libs/cairo |
107 |
+ introspection? ( dev-libs/gobject-introspection:= ) |
108 |
+ ) |
109 |
+ curl? ( net-misc/curl ) |
110 |
+ jpeg? ( virtual/jpeg:0 ) |
111 |
+ jpeg2k? ( >=media-libs/openjpeg-2.3.0-r1:2= ) |
112 |
+ lcms? ( media-libs/lcms:2 ) |
113 |
+ nss? ( >=dev-libs/nss-3.19:0 ) |
114 |
+ png? ( media-libs/libpng:0= ) |
115 |
+ qt5? ( |
116 |
+ dev-qt/qtcore:5 |
117 |
+ dev-qt/qtgui:5 |
118 |
+ dev-qt/qtxml:5 |
119 |
+ ) |
120 |
+ tiff? ( media-libs/tiff:0 ) |
121 |
+" |
122 |
+RDEPEND="${DEPEND} |
123 |
+ cjk? ( app-text/poppler-data ) |
124 |
+" |
125 |
+ |
126 |
+DOCS=( AUTHORS NEWS README README-XPDF ) |
127 |
+ |
128 |
+PATCHES=( |
129 |
+ "${FILESDIR}/${PN}-0.60.1-qt5-dependencies.patch" |
130 |
+ "${FILESDIR}/${PN}-0.28.1-fix-multilib-configuration.patch" |
131 |
+ "${FILESDIR}/${PN}-0.78.0-respect-cflags.patch" |
132 |
+ "${FILESDIR}/${PN}-0.61.0-respect-cflags.patch" |
133 |
+ "${FILESDIR}/${PN}-0.57.0-disable-internal-jpx.patch" |
134 |
+) |
135 |
+ |
136 |
+src_prepare() { |
137 |
+ cmake-utils_src_prepare |
138 |
+ |
139 |
+ # Clang doesn't grok this flag, the configure nicely tests that, but |
140 |
+ # cmake just uses it, so remove it if we use clang |
141 |
+ if [[ ${CC} == clang ]] ; then |
142 |
+ sed -e 's/-fno-check-new//' -i cmake/modules/PopplerMacros.cmake || die |
143 |
+ fi |
144 |
+ |
145 |
+ if ! grep -Fq 'cmake_policy(SET CMP0002 OLD)' CMakeLists.txt ; then |
146 |
+ sed -e '/^cmake_minimum_required/acmake_policy(SET CMP0002 OLD)' \ |
147 |
+ -i CMakeLists.txt || die |
148 |
+ else |
149 |
+ einfo "policy(SET CMP0002 OLD) - workaround can be removed" |
150 |
+ fi |
151 |
+ |
152 |
+ # we need to up the C++ version, bug #622526, #643278 |
153 |
+ append-cxxflags -std=c++11 |
154 |
+} |
155 |
+ |
156 |
+src_configure() { |
157 |
+ xdg_environment_reset |
158 |
+ local mycmakeargs=( |
159 |
+ -DBUILD_GTK_TESTS=OFF |
160 |
+ -DBUILD_QT5_TESTS=OFF |
161 |
+ -DBUILD_CPP_TESTS=OFF |
162 |
+ -DENABLE_SPLASH=ON |
163 |
+ -DENABLE_ZLIB=ON |
164 |
+ -DENABLE_ZLIB_UNCOMPRESS=OFF |
165 |
+ -DENABLE_UNSTABLE_API_ABI_HEADERS=ON |
166 |
+ -DSPLASH_CMYK=OFF |
167 |
+ -DUSE_FIXEDPOINT=OFF |
168 |
+ -DUSE_FLOAT=OFF |
169 |
+ -DWITH_Cairo=$(usex cairo) |
170 |
+ -DENABLE_LIBCURL=$(usex curl) |
171 |
+ -DENABLE_CPP=$(usex cxx) |
172 |
+ -DWITH_JPEG=$(usex jpeg) |
173 |
+ -DENABLE_DCTDECODER=$(usex jpeg libjpeg none) |
174 |
+ -DENABLE_LIBOPENJPEG=$(usex jpeg2k openjpeg2 none) |
175 |
+ -DENABLE_CMS=$(usex lcms lcms2 none) |
176 |
+ -DWITH_NSS3=$(usex nss) |
177 |
+ -DWITH_PNG=$(usex png) |
178 |
+ $(cmake-utils_use_find_package qt5 Qt5Core) |
179 |
+ -DWITH_TIFF=$(usex tiff) |
180 |
+ -DENABLE_UTILS=$(usex utils) |
181 |
+ ) |
182 |
+ use cairo && mycmakeargs+=( -DWITH_GObjectIntrospection=$(usex introspection) ) |
183 |
+ |
184 |
+ cmake-utils_src_configure |
185 |
+} |
186 |
+ |
187 |
+src_install() { |
188 |
+ cmake-utils_src_install |
189 |
+ |
190 |
+ # live version doesn't provide html documentation |
191 |
+ if use cairo && use doc && [[ ${PV} != *9999* ]]; then |
192 |
+ # For now install gtk-doc there |
193 |
+ insinto /usr/share/gtk-doc/html/poppler |
194 |
+ doins -r "${S}"/glib/reference/html/* |
195 |
+ fi |
196 |
+} |