Patch to compile with poppler 0.24.0

i9cf
Mamoru TASAKA 11 years ago
parent 6b80f963d8
commit e85ef6ed18

@ -1,35 +1,29 @@
--- gnome-commander-1.2.8.15/config.h.in 2011-12-06 20:15:56.000000000 +0100 --- gnome-commander-1.2.8.15/configure.in.poppler 2011-12-07 04:10:27.000000000 +0900
+++ gnome-commander-1.2.8.15/config.h.in 2012-05-17 14:20:16.000000000 +0200 +++ gnome-commander-1.2.8.15/configure.in 2013-08-23 18:24:54.383027945 +0900
@@ -112,6 +112,9 @@ @@ -239,6 +239,13 @@
/* Define to 1 if poppler has support for PDFDoc::getPDFVersion() */
#undef POPPLER_HAS_GET_PDF_VERSION
+/* Define to 1 if poppler has support for setErrorCallback() */
+#undef POPPLER_HAS_SET_ERROR_CALLBACK
+
/* definition of PREFIX */
#undef PREFIX
--- gnome-commander-1.2.8.15/configure.in 2011-12-06 20:10:27.000000000 +0100
+++ gnome-commander-1.2.8.15/configure.in 2012-05-17 14:21:52.000000000 +0200
@@ -239,6 +239,9 @@ if test x$with_poppler != xno; then
if pkg-config --max-version=0.11.2 poppler; then 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()]) AC_DEFINE(POPPLER_HAS_GET_PDF_VERSION, 1, [Define to 1 if poppler has support for PDFDoc::getPDFVersion()])
fi fi
+ if pkg-config --atleast-version=0.19.0 poppler; then + 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()]) + AC_DEFINE(POPPLER_HAS_SET_ERROR_CALLBACK, 1, [Define to 1 if poppler has support for setErrorCallback()])
+ fi
+ if pkg-config --atleast-version=0.24.0 poppler; then
+ AC_DEFINE(POPPLER_HAS_GOFFSET_ARGUMENT_FOR_SET_ERROR_CALLBACK, 1,
+ [Define to 1 if poppler uses Goffset for the 3rd argument of setErrorCallback])
+ fi + fi
fi fi
if test "x$have_pdf" = "xyes"; then if test "x$have_pdf" = "xyes"; then
AC_DEFINE(HAVE_PDF, 1, [Define to 1 if you have PDF support]) AC_DEFINE(HAVE_PDF, 1, [Define to 1 if you have PDF support])
--- gnome-commander-1.2.8.15/src/tags/gnome-cmd-tags-poppler.cc 2011-12-06 20:10:29.000000000 +0100 --- gnome-commander-1.2.8.15/src/tags/gnome-cmd-tags-poppler.cc.poppler 2011-12-07 04:10:29.000000000 +0900
+++ gnome-commander-1.2.8.15/src/tags/gnome-cmd-tags-poppler.cc 2012-05-17 14:21:39.000000000 +0200 +++ gnome-commander-1.2.8.15/src/tags/gnome-cmd-tags-poppler.cc 2013-08-23 18:32:03.618636877 +0900
@@ -40,8 +40,11 @@ using namespace std; @@ -40,8 +40,13 @@
#ifdef HAVE_PDF #ifdef HAVE_PDF
static regex_t rxDate; static regex_t rxDate;
static gboolean rxDate_OK; static gboolean rxDate_OK;
- -
+#ifdef POPPLER_HAS_SET_ERROR_CALLBACK +#if defined(POPPLER_HAS_GOFFSET_ARGUMENT_FOR_SET_ERROR_CALLBACK)
+static void noErrorReporting(void *, ErrorCategory, Goffset pos, char *msg)
+#elif defined(POPPLER_HAS_SET_ERROR_CALLBACK)
+static void noErrorReporting(void *, ErrorCategory, int pos, char *msg) +static void noErrorReporting(void *, ErrorCategory, int pos, char *msg)
+#else +#else
static void noErrorReporting(int pos, char *msg, va_list args) static void noErrorReporting(int pos, char *msg, va_list args)
@ -37,11 +31,11 @@
{ {
} }
#endif #endif
@@ -52,8 +55,12 @@ void gcmd_tags_poppler_init() @@ -52,8 +57,12 @@
#ifdef HAVE_PDF #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; 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 +#if defined(POPPLER_HAS_GOFFSET_ARGUMENT_FOR_SET_ERROR_CALLBACK) || defined(POPPLER_HAS_SET_ERROR_CALLBACK)
+ setErrorCallback(noErrorReporting, NULL); + setErrorCallback(noErrorReporting, NULL);
+#else +#else
setErrorFunction(noErrorReporting); setErrorFunction(noErrorReporting);

@ -26,7 +26,7 @@
%global use_autotool 0 %global use_autotool 0
%global update_po 0 %global update_po 0
%global if_pre 0 %global if_pre 0
%global main_release 10 %global main_release 11
%global extratag git_%{git_pull_JST} %global extratag git_%{git_pull_JST}
%undefine extratag %undefine extratag
%global mimeedit_rev 1958 %global mimeedit_rev 1958
@ -63,7 +63,7 @@ Source0: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.2/%{name}-%{versi
Source1: gnome-commander.sh Source1: gnome-commander.sh
Source10: mimeedit-svn%{mimeedit_rev}.sh Source10: mimeedit-svn%{mimeedit_rev}.sh
Patch0: gnome-commander-1.2.8.15-gcc47.patch Patch0: gnome-commander-1.2.8.15-gcc47.patch
Patch1: gnome-commander-1.2.8.15-poppler020.patch Patch1: gnome-commander-1.2.8.15-poppler024.patch
# Patch for libgsf 1.14.26 # Patch for libgsf 1.14.26
Patch2: gnome-commander-1.2.8.15-newgsf.patch Patch2: gnome-commander-1.2.8.15-newgsf.patch
Patch10: mimeedit-svn1958.diff Patch10: mimeedit-svn1958.diff
@ -249,6 +249,9 @@ desktop-file-install \
%{_datadir}/pixmaps/%{name}/ %{_datadir}/pixmaps/%{name}/
%changelog %changelog
* Sat Aug 24 4013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3:1.2.8.15-11
- Patch to compile with poppler 0.24.0
* Mon Aug 19 2013 Marek Kasik <mkasik@redhat.com> - 3:1.2.18.15-10 * Mon Aug 19 2013 Marek Kasik <mkasik@redhat.com> - 3:1.2.18.15-10
- Rebuild (poppler-0.24.0) - Rebuild (poppler-0.24.0)

Loading…
Cancel
Save