packages: epdfview/epdfview-poppler-0.16.patch (NEW) - fix build with poppl...
lisu
lisu at pld-linux.org
Tue Dec 28 12:39:36 CET 2010
Author: lisu Date: Tue Dec 28 11:39:36 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- fix build with poppler 0.16
---- Files affected:
packages/epdfview:
epdfview-poppler-0.16.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/epdfview/epdfview-poppler-0.16.patch
diff -u /dev/null packages/epdfview/epdfview-poppler-0.16.patch:1.1
--- /dev/null Tue Dec 28 12:39:36 2010
+++ packages/epdfview/epdfview-poppler-0.16.patch Tue Dec 28 12:39:31 2010
@@ -0,0 +1,59 @@
+--- src/PDFDocument.cxx~ 2009-02-28 22:00:35.000000000 +0100
++++ src/PDFDocument.cxx 2010-12-28 12:30:52.475843668 +0100
+@@ -678,14 +678,24 @@
+ gdouble pageWidth, pageHeight;
+ poppler_page_get_size(page, &pageWidth, &pageHeight);
+
++#if defined (HAVE_POPPLER_0_16_0)
++ PopplerRectangle textRect = { rect->getX1() / getZoom(),
++ rect->getY1() / getZoom(),
++ rect->getX2() / getZoom(),
++ rect->getY2() / getZoom()};
++#else // !HAVE_POPPLER_0_16_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() / getZoom(),
+ (pageHeight - rect->getY1() / getZoom())};
++#endif // HAVE_POPPLER_0_16_0
+ repairEmpty(textRect);
+
+-#if defined (HAVE_POPPLER_0_6_0)
++#if defined (HAVE_POPPLER_0_16_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
+--- 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.16], [have_poppler_0_16_0=yes])
++if test "x$have_poppler_0_16_0" = "xyes"; then
++ AC_DEFINE([HAVE_POPPLER_0_16_0], [1], [Define to 1 if you have Poppler version 0.16.0 or higher.])
++fi
+
+ AC_MSG_CHECKING([for native Win32])
+ case "$host" in
================================================================
More information about the pld-cvs-commit
mailing list