app-office/libreoffice: Fix build w/ USE=pdfimport and poppler-0.62
authorAndreas Sturmlechner <asturm@gentoo.org>
Sun, 7 Jan 2018 15:29:44 +0000 (16:29 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 7 Jan 2018 16:01:42 +0000 (17:01 +0100)
Package-Manager: Portage-2.3.19, Repoman-2.3.6

app-office/libreoffice/files/libreoffice-6.0.0.1-poppler-0.62.patch [new file with mode: 0644]
app-office/libreoffice/libreoffice-5.4.9999.ebuild
app-office/libreoffice/libreoffice-6.0.9999.ebuild
app-office/libreoffice/libreoffice-9999.ebuild

diff --git a/app-office/libreoffice/files/libreoffice-6.0.0.1-poppler-0.62.patch b/app-office/libreoffice/files/libreoffice-6.0.0.1-poppler-0.62.patch
new file mode 100644 (file)
index 0000000..f0ecc3b
--- /dev/null
@@ -0,0 +1,44 @@
+Fix build with >=poppler-0.62.0, cleanup ifdef and raise minimum poppler version.
+
+--- a/configure.ac     2017-12-12 18:45:07.000000000 +0100
++++ b/configure.ac     2018-01-04 23:57:16.410999542 +0100
+@@ -10403,7 +10403,7 @@
+     if test "$with_system_poppler" = "yes"; then
+         AC_MSG_RESULT([external])
+         SYSTEM_POPPLER=TRUE
+-        PKG_CHECK_MODULES( POPPLER, poppler >= 0.12.0 )
++        PKG_CHECK_MODULES( POPPLER, poppler >= 0.21.1 )
+         AC_LANG_PUSH([C++])
+         save_CXXFLAGS=$CXXFLAGS
+         save_CPPFLAGS=$CPPFLAGS
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx    2017-12-12 18:45:07.000000000 +0100
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx    2018-01-05 00:29:16.541246738 +0100
+@@ -32,13 +32,11 @@
+ #pragma warning(push, 1)
+ #endif
+-// sigh, UTF8.h was removed in poppler-0.21.0 and put back in 0.21.1
+ // FIXME: we can't use #if POPPLER_CHECK_VERSION(0, 21, 0) && !POPPLER_CHECK_VERSION(0, 21, 1)
+ //        because the internal poppler does not provide poppler-version.h and the macro always returns 0
+-#if POPPLER_CHECK_VERSION(0, 21, 1)
+-#include <UTF8.h>
+-#elif POPPLER_CHECK_VERSION(0, 21, 0)
+-#include "UTF.h"
++// UTF8.h was renamed to UnicodeMapFuncs.h in poppler-0.62.0
++#if POPPLER_CHECK_VERSION(0, 62, 0)
++#include "UnicodeMapFuncs.h"
+ #else
+ #include "UTF8.h"
+ #endif
+@@ -918,7 +916,11 @@
+             );
+     // silence spurious warning
++#if POPPLER_CHECK_VERSION(0, 62, 0)
++    (void)&mapUTF16;
++#else
+     (void)&mapUCS2;
++#endif
+     char buf[9];
+     for( int i=0; i<uLen; ++i )
index 542f04bac5459d0e862025932fc6132f19ece1c4..d6e9a757db62fb7c8ec1a0c028456432a2fb4d8f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -245,6 +245,7 @@ PATCHES=(
 
        # TODO: upstream
        "${FILESDIR}/${PN}-5.2.5.1-glibc-2.24.patch"
+       "${FILESDIR}/${PN}-5.4.4.2-poppler-0.62.patch" # bug 642602
 )
 
 pkg_pretend() {
index 9b35442a6de347d20cc34fd7c8f17bcc0fb002c5..5fca4ae10c0194e7e7929b1acef65793e98316e2 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -250,6 +250,7 @@ PATCHES=(
 
        # TODO: upstream
        "${FILESDIR}/${PN}-5.2.5.1-glibc-2.24.patch"
+       "${FILESDIR}/${PN}-6.0.0.1-poppler-0.62.patch" # bug 642602
 )
 
 pkg_pretend() {
index 664bacbda8ea29a75c67144c7f0c3338f408a218..ba7d38f7d30496d5e15926d50e9d39dea9ee4afe 100644 (file)
@@ -249,6 +249,7 @@ PATCHES=(
 
        # TODO: upstream
        "${FILESDIR}/${PN}-5.2.5.1-glibc-2.24.patch"
+       "${FILESDIR}/${PN}-6.0.0.1-poppler-0.62.patch" # bug 642602
 )
 
 pkg_pretend() {