diff options
Diffstat (limited to 'main/epdfview/354-poppler-0.15.patch')
-rw-r--r-- | main/epdfview/354-poppler-0.15.patch | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/main/epdfview/354-poppler-0.15.patch b/main/epdfview/354-poppler-0.15.patch deleted file mode 100644 index 1c7880ac0..000000000 --- a/main/epdfview/354-poppler-0.15.patch +++ /dev/null @@ -1,72 +0,0 @@ -Support for poppler >= 0.15.0 - -Poppler 0.15 has an API change. See: -http://cgit.freedesktop.org/poppler/poppler/commit/?id=b257428150e2c13dcc24fd8f75e4ee2c679ab414 -This adds support for the new poppler version to epdfview. -Tested in Fedora Rawhide. - -[ Patch sent to Jordi Fita on 2010-10-01 -- michich ] - -Index: src/PDFDocument.cxx -=================================================================== ---- src/PDFDocument.cxx (revision 353) -+++ src/PDFDocument.cxx (working copy) -@@ -681,14 +681,24 @@ - gdouble pageWidth, pageHeight; - 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(), - (pageHeight - rect->getY2() / getZoom()), - 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); - #else // !HAVE_POPPLER_0_6_0 -Index: configure.ac -=================================================================== ---- configure.ac (revision 353) -+++ configure.ac (working copy) -@@ -41,18 +41,22 @@ - AC_SUBST([POPPLER_CFLAGS]) - 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 - - AC_MSG_CHECKING([for native Win32]) - case "$host" in |