summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2010-12-29 08:53:17 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2010-12-29 08:53:17 +0000
commit3d01acb5ca60381ba2ce506ed56ef41e149adeac (patch)
tree456f7aa565e68c1e7b2dcc9ad841e29160dd82dd /app-text/epdfview
parentUpdate pulseaudio patches #349665. (diff)
downloadgentoo-2-3d01acb5ca60381ba2ce506ed56ef41e149adeac.tar.gz
gentoo-2-3d01acb5ca60381ba2ce506ed56ef41e149adeac.tar.bz2
gentoo-2-3d01acb5ca60381ba2ce506ed56ef41e149adeac.zip
Fix building with recent poppler wrt #349943 by Helmut Jarausch.
(Portage version: 2.2.0_alpha10/cvs/Linux x86_64)
Diffstat (limited to 'app-text/epdfview')
-rw-r--r--app-text/epdfview/ChangeLog7
-rw-r--r--app-text/epdfview/epdfview-0.1.7-r2.ebuild9
-rw-r--r--app-text/epdfview/files/epdfview-0.1.7-poppler-changeset_r354.patch58
-rw-r--r--app-text/epdfview/files/epdfview-0.1.7-poppler-changeset_r357.patch93
4 files changed, 163 insertions, 4 deletions
diff --git a/app-text/epdfview/ChangeLog b/app-text/epdfview/ChangeLog
index 2da37293f44e..87a18b66940e 100644
--- a/app-text/epdfview/ChangeLog
+++ b/app-text/epdfview/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-text/epdfview
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/epdfview/ChangeLog,v 1.38 2010/06/02 06:35:44 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/epdfview/ChangeLog,v 1.39 2010/12/29 08:53:17 ssuominen Exp $
+
+ 29 Dec 2010; Samuli Suominen <ssuominen@gentoo.org> epdfview-0.1.7-r2.ebuild,
+ +files/epdfview-0.1.7-poppler-changeset_r354.patch,
+ +files/epdfview-0.1.7-poppler-changeset_r357.patch:
+ Fix building with recent poppler wrt #349943 by Helmut Jarausch.
02 Jun 2010; Torsten Veller <tove@gentoo.org> metadata.xml:
Remove omp from metadata.xml (#147119)
diff --git a/app-text/epdfview/epdfview-0.1.7-r2.ebuild b/app-text/epdfview/epdfview-0.1.7-r2.ebuild
index d3a6fc0cc29c..9e5fedaf7b34 100644
--- a/app-text/epdfview/epdfview-0.1.7-r2.ebuild
+++ b/app-text/epdfview/epdfview-0.1.7-r2.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/epdfview/epdfview-0.1.7-r2.ebuild,v 1.2 2010/02/10 14:21:28 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/epdfview/epdfview-0.1.7-r2.ebuild,v 1.3 2010/12/29 08:53:17 ssuominen Exp $
EAPI=2
-inherit eutils gnome2
+inherit autotools eutils gnome2
DESCRIPTION="Lightweight PDF viewer using Poppler and GTK+ libraries."
HOMEPAGE="http://trac.emma-soft.com/epdfview/"
@@ -36,7 +36,10 @@ src_prepare() {
-e 's:Icon=icon_epdfview-48:Icon=epdfview:' \
data/epdfview.desktop || die
- epatch "${FILESDIR}"/${PN}-0.1.7-mouse-scrolling.patch
+ epatch "${FILESDIR}"/${PN}-0.1.7-mouse-scrolling.patch \
+ "${FILESDIR}"/${P}-poppler-changeset_r35{4,7}.patch
+
+ eautoreconf
gnome2_src_prepare
}
diff --git a/app-text/epdfview/files/epdfview-0.1.7-poppler-changeset_r354.patch b/app-text/epdfview/files/epdfview-0.1.7-poppler-changeset_r354.patch
new file mode 100644
index 000000000000..a2d42b964599
--- /dev/null
+++ b/app-text/epdfview/files/epdfview-0.1.7-poppler-changeset_r354.patch
@@ -0,0 +1,58 @@
+Index: /trunk/src/PDFDocument.cxx
+===================================================================
+--- /trunk/src/PDFDocument.cxx (revision 351)
++++ /trunk/src/PDFDocument.cxx (revision 354)
+@@ -682,4 +682,10 @@
+ poppler_page_get_size(page, &pageWidth, &pageHeight);
+
++#if defined (HAVE_POPPLER_0_15_0)
++ PopplerRectangle textRect = { rect->getX1() / getZoom(),
++ rect->getY1() / getZoom(),
++ rect->getX2() / getZoom(),
++ rect->getY2() / getZoom()};
++#else // !HAVE_POPPLER_0_15_0
+ //for get text we must exchange y coordinate, don't ask me where logic here.
+ PopplerRectangle textRect = { rect->getX1() / getZoom(),
+@@ -687,7 +693,11 @@
+ rect->getX2() / getZoom(),
+ (pageHeight - rect->getY1() / getZoom())};
++#endif // HAVE_POPPLER_0_15_0
+ repairEmpty(textRect);
+
+-#if defined (HAVE_POPPLER_0_6_0)
++#if defined (HAVE_POPPLER_0_15_0)
++ gchar *text = poppler_page_get_selected_text(page, POPPLER_SELECTION_GLYPH,
++ &textRect);
++#elif defined (HAVE_POPPLER_0_6_0)
+ gchar *text = poppler_page_get_text(page, POPPLER_SELECTION_GLYPH,
+ &textRect);
+Index: /trunk/configure.ac
+===================================================================
+--- /trunk/configure.ac (revision 344)
++++ /trunk/configure.ac (revision 354)
+@@ -42,15 +42,19 @@
+ AC_SUBST([POPPLER_LIBS])
+ dnl Check if we have poppler version 0.5.2 or higher.
+-PKG_CHECK_EXISTS([poppler-glib >= 0.5.2], [have_poppler_052=yes])
+-if test "x$have_poppler_052" = "xyes"; then
++PKG_CHECK_EXISTS([poppler-glib >= 0.5.2], [have_poppler_0_5_2=yes])
++if test "x$have_poppler_0_5_2" = "xyes"; then
+ AC_DEFINE([HAVE_POPPLER_0_5_2], [1], [Define to 1 if you have Poppler version 0.5.2 or higher.])
+ fi
+-PKG_CHECK_EXISTS([poppler-glib >= 0.6], [have_poppler_060=yes])
+-if test "x$have_poppler_060" = "xyes"; then
++PKG_CHECK_EXISTS([poppler-glib >= 0.6], [have_poppler_0_6_0=yes])
++if test "x$have_poppler_0_6_0" = "xyes"; then
+ AC_DEFINE([HAVE_POPPLER_0_6_0], [1], [Define to 1 if you have Poppler version 0.6.0 or higher.])
+ fi
+-PKG_CHECK_EXISTS([poppler-glib >= 0.8], [have_poppler_080=yes])
+-if test "x$have_poppler_080" = "xyes"; then
++PKG_CHECK_EXISTS([poppler-glib >= 0.8], [have_poppler_0_8_0=yes])
++if test "x$have_poppler_0_8_0" = "xyes"; then
+ AC_DEFINE([HAVE_POPPLER_0_8_0], [1], [Define to 1 if you have Poppler version 0.8.0 or higher.])
++fi
++PKG_CHECK_EXISTS([poppler-glib >= 0.15], [have_poppler_0_15_0=yes])
++if test "x$have_poppler_0_15_0" = "xyes"; then
++ AC_DEFINE([HAVE_POPPLER_0_15_0], [1], [Define to 1 if you have Poppler version 0.15.0 or higher.])
+ fi
+
diff --git a/app-text/epdfview/files/epdfview-0.1.7-poppler-changeset_r357.patch b/app-text/epdfview/files/epdfview-0.1.7-poppler-changeset_r357.patch
new file mode 100644
index 000000000000..e6795ec14165
--- /dev/null
+++ b/app-text/epdfview/files/epdfview-0.1.7-poppler-changeset_r357.patch
@@ -0,0 +1,93 @@
+Index: /trunk/src/IDocument.cxx
+===================================================================
+--- /trunk/src/IDocument.cxx (revision 338)
++++ /trunk/src/IDocument.cxx (revision 357)
+@@ -750,4 +750,8 @@
+ IDocument::getLinearized ()
+ {
++#if defined (HAVE_POPPLER_0_15_1)
++ if ( m_Linearized ) return "Yes";
++ else return "No";
++#else
+ if ( NULL == m_Linearized )
+ {
+@@ -755,4 +759,5 @@
+ }
+ return m_Linearized;
++#endif
+ }
+
+@@ -763,6 +768,13 @@
+ /// otherwise. IDocument will free it.
+ ///
+-void
+-IDocument::setLinearized (gchar *linearized)
++#if defined (HAVE_POPPLER_0_15_1)
++void
++IDocument::setLinearized (gboolean *linearized)
++{
++ m_Linearized = linearized;
++}
++#else
++void
++ IDocument::setLinearized (gchar *linearized)
+ {
+ g_free (m_Linearized);
+@@ -770,4 +782,5 @@
+ g_free (linearized);
+ }
++#endif
+
+ ///
+Index: /trunk/src/PDFDocument.cxx
+===================================================================
+--- /trunk/src/PDFDocument.cxx (revision 356)
++++ /trunk/src/PDFDocument.cxx (revision 357)
+@@ -328,5 +328,9 @@
+ gchar *keywords = NULL;
+ PopplerPageLayout layout = POPPLER_PAGE_LAYOUT_UNSET;
++#if defined (HAVE_POPPLER_0_15_1)
++ gboolean *linearized = NULL;
++#else
+ gchar *linearized = NULL;
++#endif
+ GTime modDate;
+ PopplerPageMode mode = POPPLER_PAGE_MODE_UNSET;
+Index: /trunk/src/IDocument.h
+===================================================================
+--- /trunk/src/IDocument.h (revision 340)
++++ /trunk/src/IDocument.h (revision 357)
+@@ -307,5 +307,9 @@
+ void setFormat (gchar *format);
+ const gchar *getLinearized (void);
++#if defined (HAVE_POPPLER_0_15_1)
++ void setLinearized (gboolean *linearized);
++#else
+ void setLinearized (gchar *linearized);
++#endif
+ const gchar *getCreationDate (void);
+ void setCreationDate (gchar *date);
+@@ -383,5 +387,9 @@
+ gchar *m_Keywords;
+ /// Tells if the document is linearized or not.
++#if defined (HAVE_POPPLER_0_15_1)
++ gboolean *m_Linearized;
++#else
+ gchar *m_Linearized;
++#endif
+ /// The document's modification date and time.
+ gchar *m_ModifiedDate;
+Index: /trunk/configure.ac
+===================================================================
+--- /trunk/configure.ac (revision 354)
++++ /trunk/configure.ac (revision 357)
+@@ -58,4 +58,9 @@
+ AC_DEFINE([HAVE_POPPLER_0_15_0], [1], [Define to 1 if you have Poppler version 0.15.0 or higher.])
+ fi
++PKG_CHECK_EXISTS([poppler-glib >= 0.15.1], [have_poppler_0_15_1=yes])
++if test "x$have_poppler_0_15_1" = "xyes"; then
++ AC_DEFINE([HAVE_POPPLER_0_15_1], [1], [Define to 1 if you have Poppler version 0.15.1 or higher.])
++fi
++
+
+ AC_MSG_CHECKING([for native Win32])