summaryrefslogtreecommitdiffstats
path: root/system/gnome-commander/gnome-commander-poppler020.patch
blob: 2354f505b75bccc3d71d39550be606341a03140b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
diff -Naur gnome-commander-20120801_2f83e80.orig/configure.in gnome-commander-20120801_2f83e80/configure.in
--- gnome-commander-20120801_2f83e80.orig/configure.in	2012-08-01 21:05:40.000000000 +0200
+++ gnome-commander-20120801_2f83e80/configure.in	2012-09-28 20:30:08.952474818 +0200
@@ -259,6 +259,9 @@
     if pkg-config --max-version=0.11.2 poppler; then
         AC_DEFINE(POPPLER_HAS_GET_PDF_VERSION, 1, [Define to 1 if poppler has support for PDFDoc::getPDFVersion()])
     fi
+    if pkg-config --atleast-version=0.19.0 poppler; then
+        AC_DEFINE(POPPLER_HAS_SET_ERROR_CALLBACK, 1, [Define to 1 if poppler has support for setErrorCallback()])
+    fi
 fi
 if test "x$have_pdf" = "xyes"; then
    AC_DEFINE(HAVE_PDF, 1, [Define to 1 if you have PDF support])
diff -Naur gnome-commander-20120801_2f83e80.orig/src/tags/gnome-cmd-tags-poppler.cc gnome-commander-20120801_2f83e80/src/tags/gnome-cmd-tags-poppler.cc
--- gnome-commander-20120801_2f83e80.orig/src/tags/gnome-cmd-tags-poppler.cc	2012-08-01 21:05:40.000000000 +0200
+++ gnome-commander-20120801_2f83e80/src/tags/gnome-cmd-tags-poppler.cc	2012-09-28 20:32:21.602458163 +0200
@@ -41,7 +41,11 @@
 static regex_t rxDate;
 static gboolean rxDate_OK;
 
+#ifdef POPPLER_HAS_SET_ERROR_CALLBACK
+static void noErrorReporting(void *, ErrorCategory, int pos, char *msg)
+#else
 static void noErrorReporting(int pos, char *msg, va_list args)
+#endif
 {
 }
 #endif
@@ -52,8 +56,12 @@
 #ifdef HAVE_PDF
     rxDate_OK = regcomp (&rxDate, "^(D:)?([12][019][0-9][0-9]([01][0-9]([0-3][0-9]([012][0-9]([0-5][0-9]([0-5][0-9])?)?)?)?)?)", REG_EXTENDED)==0;
 
+#ifdef POPPLER_HAS_SET_ERROR_CALLBACK
+    setErrorCallback(noErrorReporting, NULL);
+#else
     setErrorFunction(noErrorReporting);
 #endif
+#endif
 }