Hello community, here is the log from the commit of package epdfview for openSUSE:Factory checked in at Thu Mar 10 12:47:49 CET 2011.
-------- --- epdfview/epdfview.changes 2011-02-17 21:48:14.000000000 +0100 +++ /mounts/work_src_done/STABLE/epdfview/epdfview.changes 2011-03-09 22:36:01.000000000 +0100 @@ -1,0 +2,6 @@ +Wed Mar 9 21:17:27 UTC 2011 - g...@opensuse.org + +- added epdfview-0.1.7-poppler-0.15.1-api-changes.patch in order to + adapt epdfview to poppler 0.15.1 API changes + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- epdfview-0.1.7-poppler-0.15.1-api-changes.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ epdfview.spec ++++++ --- /var/tmp/diff_new_pack.MxA0yy/_old 2011-03-10 12:47:28.000000000 +0100 +++ /var/tmp/diff_new_pack.MxA0yy/_new 2011-03-10 12:47:28.000000000 +0100 @@ -19,7 +19,7 @@ Name: epdfview Version: 0.1.7 -Release: 15 +Release: 16 License: GPLv2+ Summary: Lightweight PDF document viewer Url: http://trac.emma-soft.com/epdfview @@ -28,6 +28,8 @@ Patch0: %{name}-0.1.7-desktop.patch Patch1: epdfview-0.1.7-non_void.patch Patch2: epdfview-0.1.7-q_quit.patch +# PATCH-FIX-UPSTREAM epdfview-0.1.7-poppler-0.15.1-api-changes.patch g...@opensuse.org -- Adapt epdfview to poppler 0.15.1 API changes (backported from upstream svn) +Patch3: epdfview-0.1.7-poppler-0.15.1-api-changes.patch BuildRequires: cups-devel BuildRequires: gcc-c++ BuildRequires: libpoppler-glib-devel @@ -46,8 +48,11 @@ %patch0 %patch1 %patch2 +%patch3 -p1 %build +touch ChangeLog +autoreconf -fi %configure make %{?_smp_mflags} ++++++ epdfview-0.1.7-poppler-0.15.1-api-changes.patch ++++++ diff -urNp epdfview-0.1.7.orig/configure.ac epdfview-0.1.7/configure.ac --- epdfview-0.1.7.orig/configure.ac 2009-02-28 22:00:49.000000000 +0100 +++ epdfview-0.1.7/configure.ac 2011-03-09 22:13:25.000000000 +0100 @@ -40,18 +40,27 @@ PKG_CHECK_MODULES([POPPLER], [poppler-gl 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 +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 + EPDFVIEW_PATH_CUPS([CUPS], [have_cups=yes]) AM_CONDITIONAL(cups_printing, test "x$have_cups" = "xyes") diff -urNp epdfview-0.1.7.orig/src/IDocument.cxx epdfview-0.1.7/src/IDocument.cxx --- epdfview-0.1.7.orig/src/IDocument.cxx 2009-02-28 22:00:35.000000000 +0100 +++ epdfview-0.1.7/src/IDocument.cxx 2011-03-09 22:13:33.000000000 +0100 @@ -135,7 +135,11 @@ IDocument::IDocument () m_FindPage = 0; m_Format = NULL; m_Keywords = NULL; +#if defined (HAVE_POPPLER_0_15_1) + m_Linearized = FALSE; +#else m_Linearized = NULL; +#endif m_ModifiedDate = NULL; m_PageCache = NULL; m_PageCacheAge = 0; @@ -164,7 +168,9 @@ IDocument::~IDocument () g_free (m_FileName); g_free (m_Format); g_free (m_Keywords); +#if !defined (HAVE_POPPLER_0_15_1) g_free (m_Linearized); +#endif g_free (m_ModifiedDate); g_free (m_Password); g_free (m_Producer); @@ -755,11 +761,16 @@ IDocument::setFormat (gchar *format) const gchar * IDocument::getLinearized () { +#if defined (HAVE_POPPLER_0_15_1) + if ( m_Linearized ) return "Yes"; + else return "No"; +#else if ( NULL == m_Linearized ) { return "No"; } return m_Linearized; +#endif } /// @@ -768,14 +779,22 @@ IDocument::getLinearized () /// @param linearized Set to "Yes" if the document is linearized. "No" /// otherwise. IDocument will free it. /// +#if defined (HAVE_POPPLER_0_15_1) void -IDocument::setLinearized (gchar *linearized) +IDocument::setLinearized (gboolean *linearized) +{ + m_Linearized = linearized; +} +#else +void + IDocument::setLinearized (gchar *linearized) { gchar *oldLinearized = m_Linearized; m_Linearized = g_strdup (linearized); g_free (oldLinearized); g_free (linearized); } +#endif /// /// @brief Gets the document's creation date. diff -urNp epdfview-0.1.7.orig/src/IDocument.h epdfview-0.1.7/src/IDocument.h --- epdfview-0.1.7.orig/src/IDocument.h 2009-02-28 22:00:35.000000000 +0100 +++ epdfview-0.1.7/src/IDocument.h 2011-03-09 22:13:25.000000000 +0100 @@ -306,7 +306,11 @@ namespace ePDFView const gchar *getFormat (void); 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); const gchar *getModifiedDate (void); @@ -382,7 +386,11 @@ namespace ePDFView /// The document's keyword. 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; /// @brief The list of classes that will receive notifications diff -urNp epdfview-0.1.7.orig/src/PDFDocument.cxx epdfview-0.1.7/src/PDFDocument.cxx --- epdfview-0.1.7.orig/src/PDFDocument.cxx 2009-02-28 22:00:35.000000000 +0100 +++ epdfview-0.1.7/src/PDFDocument.cxx 2011-03-09 22:13:25.000000000 +0100 @@ -324,7 +324,11 @@ PDFDocument::loadMetadata (void) gchar *format = NULL; 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; gchar *producer = NULL; @@ -678,14 +682,24 @@ PDFDocument::setTextSelection (DocumentR 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() / 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 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org