- Add patch to check for poppler more nicely to work on older distros:
* 0001-Make-cpp-poppler-version.h-header-optional.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=252
This commit is contained in:
parent
cb626de2bf
commit
617cd3d41a
60
0001-Make-cpp-poppler-version.h-header-optional.patch
Normal file
60
0001-Make-cpp-poppler-version.h-header-optional.patch
Normal file
@ -0,0 +1,60 @@
|
||||
From 9d12508156c354b1ee903727b07a2107be99e90a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tomas.chvatal@gmail.com>
|
||||
Date: Thu, 16 Apr 2015 10:13:06 +0200
|
||||
Subject: [PATCH] Make cpp/poppler-version.h header optional
|
||||
|
||||
Older popler (SLE11) does not have this header yet.
|
||||
With the code simply if the header not found define version to oldest
|
||||
possible working candidate and also raise the .pc check to the same.
|
||||
|
||||
Change-Id: I039c879879188fe2eb90cd119b80a1d6354a6a9c
|
||||
---
|
||||
configure.ac | 7 ++++---
|
||||
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 7 +++++++
|
||||
2 files changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9e8e1d2..4dff95b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -10432,14 +10432,15 @@ if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_
|
||||
if test "$with_system_poppler" = "yes"; then
|
||||
AC_MSG_RESULT([external])
|
||||
SYSTEM_POPPLER=TRUE
|
||||
- PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 )
|
||||
+ PKG_CHECK_MODULES( POPPLER, poppler >= 0.12.0 )
|
||||
AC_LANG_PUSH([C++])
|
||||
save_CXXFLAGS=$CXXFLAGS
|
||||
save_CPPFLAGS=$CPPFLAGS
|
||||
CXXFLAGS="$CXXFLAGS $POPPLER_CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $POPPLER_CFLAGS"
|
||||
- AC_CHECK_HEADER([cpp/poppler-version.h], [],
|
||||
- [AC_MSG_ERROR([cpp/poppler-version.h not found. Install poppler])], [])
|
||||
+ AC_CHECK_HEADER([cpp/poppler-version.h],
|
||||
+ [AC_DEFINE([HAVE_POPPLER_VERSION_H],[1],[Define to 1 if you have <cpp/poppler-version.h>.])],
|
||||
+ [AC_DEFINE([HAVE_POPPLER_VERSION_H],[0],[Define to 1 if you have <cpp/poppler-version.h>.])])
|
||||
CXXFLAGS=$save_CXXFLAGS
|
||||
CPPFLAGS=$save_CPPFLAGS
|
||||
AC_LANG_POP([C++])
|
||||
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
||||
index d15491b..fbe40a8 100644
|
||||
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
||||
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
||||
@@ -50,7 +50,14 @@
|
||||
class GfxPath;
|
||||
class GfxFont;
|
||||
class PDFDoc;
|
||||
+#ifdef HAVE_POPPLER_VERSION_H
|
||||
#include <cpp/poppler-version.h>
|
||||
+#else
|
||||
+#define POPPLER_VERSION "0.12.3"
|
||||
+#define POPPLER_VERSION_MAJOR 0
|
||||
+#define POPPLER_VERSION_MINOR 12
|
||||
+#define POPPLER_VERSION_MICRO 3
|
||||
+#endif
|
||||
#define POPPLER_CHECK_VERSION(major,minor,micro) \
|
||||
(POPPLER_VERSION_MAJOR > (major) || \
|
||||
(POPPLER_VERSION_MAJOR == (major) && POPPLER_VERSION_MINOR > (minor)) || \
|
||||
--
|
||||
2.3.5
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 16 08:24:22 UTC 2015 - tchvatal@suse.com
|
||||
|
||||
- Add patch to check for poppler more nicely to work on older distros:
|
||||
* 0001-Make-cpp-poppler-version.h-header-optional.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 15 18:50:30 UTC 2015 - tchvatal@suse.com
|
||||
|
||||
|
@ -102,6 +102,8 @@ Patch3: system-pyuno.diff
|
||||
# FIXME: the right fix is to compile the help and produce the .db_, .ht_, and other files
|
||||
Patch4: nlpsolver-no-broken-help.diff
|
||||
Patch5: mediawiki-no-broken-help.diff
|
||||
# PATCH-FIX-UPSTREAM: patch to build with older poppler, will be in 5.0
|
||||
Patch6: 0001-Make-cpp-poppler-version.h-header-optional.patch
|
||||
# try to save space by using hardlinks
|
||||
Patch990: install-with-hardlinks.diff
|
||||
%if %{with systemlibs}
|
||||
@ -894,6 +896,7 @@ Provides additional %{langname} translations and resources for %{project}. \
|
||||
%patch3 -p1
|
||||
%patch4
|
||||
%patch5
|
||||
%patch6 -p1
|
||||
%patch990 -p1
|
||||
# 256x256 icons
|
||||
tar -xjf %{SOURCE20}
|
||||
|
Loading…
Reference in New Issue
Block a user