void-packages/srcpkgs/epdfview/patches/epdfview-0.1.7-poppler-chan...

55 lines
2.5 KiB
Diff

--- src/PDFDocument.cxx (revision 351)
+++ 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);
--- configure.ac (revision 344)
+++ 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