2015-04-16 13:45:59 +02:00
|
|
|
From e0d1a6ee0a54f677ce31c612e198f9c1a7dc555a Mon Sep 17 00:00:00 2001
|
2015-04-16 10:24:48 +02:00
|
|
|
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
|
|
|
|
---
|
2015-04-16 13:45:59 +02:00
|
|
|
configure.ac | 8 +++++---
|
2015-04-16 10:24:48 +02:00
|
|
|
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 7 +++++++
|
2015-04-16 13:45:59 +02:00
|
|
|
2 files changed, 12 insertions(+), 3 deletions(-)
|
2015-04-16 10:24:48 +02:00
|
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
2015-04-16 13:45:59 +02:00
|
|
|
index 9e8e1d2..426e909 100644
|
2015-04-16 10:24:48 +02:00
|
|
|
--- 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],
|
2015-04-16 13:45:59 +02:00
|
|
|
+ [AC_DEFINE([HAVE_POPPLER_VERSION_H])],
|
|
|
|
+ [])
|
2015-04-16 10:24:48 +02:00
|
|
|
CXXFLAGS=$save_CXXFLAGS
|
|
|
|
CPPFLAGS=$save_CPPFLAGS
|
|
|
|
AC_LANG_POP([C++])
|
2015-04-16 13:45:59 +02:00
|
|
|
@@ -10449,6 +10450,7 @@ if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_
|
|
|
|
AC_MSG_RESULT([internal])
|
|
|
|
SYSTEM_POPPLER=
|
|
|
|
BUILD_TYPE="$BUILD_TYPE POPPLER"
|
|
|
|
+ AC_DEFINE([HAVE_POPPLER_VERSION_H])
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
2015-04-16 10:24:48 +02:00
|
|
|
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
2015-04-16 13:45:59 +02:00
|
|
|
index d15491b..06a0120 100644
|
2015-04-16 10:24:48 +02:00
|
|
|
--- 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;
|
2015-04-16 14:24:06 +02:00
|
|
|
+#ifdef HAVE_POPPLER_VERSION_H
|
2015-04-16 10:24:48 +02:00
|
|
|
#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
|
|
|
|
|