Patch to compile with poppler 0.20.0

(bug 822405: patch by Marek Kašík [mkasik@redhat.com])
i9cf
Mamoru TASAKA 13 years ago
parent 49a2698e00
commit 7f36cfcbe7

@ -0,0 +1,52 @@
--- gnome-commander-1.2.8.15/config.h.in 2011-12-06 20:15:56.000000000 +0100
+++ gnome-commander-1.2.8.15/config.h.in 2012-05-17 14:20:16.000000000 +0200
@@ -112,6 +112,9 @@
/* 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
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])
--- 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 2012-05-17 14:21:39.000000000 +0200
@@ -40,8 +40,11 @@ using namespace std;
#ifdef HAVE_PDF
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 +55,12 @@ void gcmd_tags_poppler_init()
#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
}

@ -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 3 %global main_release 4
%global extratag git_%{git_pull_JST} %global extratag git_%{git_pull_JST}
%undefine extratag %undefine extratag
%global mimeedit_rev 1958 %global mimeedit_rev 1958
@ -38,6 +38,9 @@
%global update_po 0 %global update_po 0
%endif %endif
# Patch1 updates configure.in
%global use_autotool 1
# Autotool seems still needed to avoid build failure # Autotool seems still needed to avoid build failure
# under doc/ diretory, need investigating # under doc/ diretory, need investigating
%global use_autotool 1 %global use_autotool 1
@ -60,6 +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
Patch10: mimeedit-svn1958.diff Patch10: mimeedit-svn1958.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -127,6 +131,7 @@ ansluta till FTP-servrar och SMB-nätverk.
%prep %prep
%setup -q -n %{name}-%{version}%{?extratag:-%extratag} %setup -q -n %{name}-%{version}%{?extratag:-%extratag}
%patch0 -p1 %patch0 -p1
%patch1 -p1
%if 0%{use_autotool} > 0 %if 0%{use_autotool} > 0
( export NOCONFIGURE=1 ; sh autogen.sh ) ( export NOCONFIGURE=1 ; sh autogen.sh )
@ -241,6 +246,10 @@ desktop-file-install \
%{_datadir}/pixmaps/%{name}/ %{_datadir}/pixmaps/%{name}/
%changelog %changelog
* Fri May 18 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 3:1.2.8.15-4
- Patch to compile with poppler 0.20.0
(bug 822405: patch by Marek Kašík [mkasik@redhat.com])
* Wed May 02 2012 Rex Dieter <rdieter@fedoraproject.org> - 3:1.2.8.15-3 * Wed May 02 2012 Rex Dieter <rdieter@fedoraproject.org> - 3:1.2.8.15-3
- rebuild (exiv2) - rebuild (exiv2)

Loading…
Cancel
Save