diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-12-30 07:41:58 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-12-30 07:41:58 +0000 |
commit | 3270e77a12feb8bd0ba4e9128021b025999ad36c (patch) | |
tree | 883960b57acaaaf45c266bbc333b772789d89002 /main/epdfview | |
parent | 847825bd51fedcfcbefa5eeec9c0f23b9113cfe5 (diff) | |
download | aports-3270e77a12feb8bd0ba4e9128021b025999ad36c.tar.bz2 aports-3270e77a12feb8bd0ba4e9128021b025999ad36c.tar.xz |
main/epdfview: rebuild against new poppler
Diffstat (limited to 'main/epdfview')
-rw-r--r-- | main/epdfview/350-coordinates.patch | 13 | ||||
-rw-r--r-- | main/epdfview/351-memleak.patch | 24 | ||||
-rw-r--r-- | main/epdfview/354-poppler-0.15.patch | 72 | ||||
-rw-r--r-- | main/epdfview/APKBUILD | 32 |
4 files changed, 133 insertions, 8 deletions
diff --git a/main/epdfview/350-coordinates.patch b/main/epdfview/350-coordinates.patch new file mode 100644 index 000000000..39fe67354 --- /dev/null +++ b/main/epdfview/350-coordinates.patch @@ -0,0 +1,13 @@ +Index: src/PDFDocument.cxx +=================================================================== +--- src/PDFDocument.cxx (revision 349) ++++ src/PDFDocument.cxx (revision 350) +@@ -683,7 +683,7 @@ + //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(), ++ rect->getX2() / getZoom(), + (pageHeight - rect->getY1() / getZoom())}; + repairEmpty(textRect); + diff --git a/main/epdfview/351-memleak.patch b/main/epdfview/351-memleak.patch new file mode 100644 index 000000000..097a06a8a --- /dev/null +++ b/main/epdfview/351-memleak.patch @@ -0,0 +1,24 @@ +Index: src/PDFDocument.cxx +=================================================================== +--- src/PDFDocument.cxx (revision 350) ++++ src/PDFDocument.cxx (revision 351) +@@ -167,6 +167,7 @@ + (height - matchRect->y1)); + results = g_list_prepend (results, rect); + } ++ g_object_unref (G_OBJECT (page)); + } + + return g_list_reverse (results); +Index: THANKS +=================================================================== +--- THANKS (revision 350) ++++ THANKS (revision 351) +@@ -16,6 +16,7 @@ + - Fridrich Strba <fridrich.strba@bluewin.ch>, for his Windows patch. + - Ihar Hrachyshka <ihar.hrachyshka@gmail.com>, for his vim keybindings patch. + - Igor Vagulin <igor_vagulin@mail.ru>, for his Russian translation and patches. ++ - Jim Ramsay <i.am@jimramsay.com>, for his patches. + - Lester Godwin <lgodwin@pushcorp.com>, for his patches. + - LoneFox <>, for his patches. + - Michael Opitz <opitz.michael@gmail.com>, for his patches. diff --git a/main/epdfview/354-poppler-0.15.patch b/main/epdfview/354-poppler-0.15.patch new file mode 100644 index 000000000..1c7880ac0 --- /dev/null +++ b/main/epdfview/354-poppler-0.15.patch @@ -0,0 +1,72 @@ +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 diff --git a/main/epdfview/APKBUILD b/main/epdfview/APKBUILD index 3dfba8dbc..b7284b130 100644 --- a/main/epdfview/APKBUILD +++ b/main/epdfview/APKBUILD @@ -1,22 +1,35 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=epdfview pkgver=0.1.7 -pkgrel=4 +pkgrel=5 pkgdesc="A free lightweight PDF document viewer." url="http://www.emma-soft.com/projects/epdfview/" -arch="x86 x86_64" +arch="all" license="GPL" depends="desktop-file-utils hicolor-icon-theme" -makedepends="poppler-gtk-dev cups-dev" +makedepends="poppler-gtk-dev cups-dev autoconf automake" source="http://www.emma-soft.com/projects/$pkgname/chrome/site/releases/$pkgname-$pkgver.tar.bz2 $pkgname.desktop.patch - fix-scrolling.patch" + fix-scrolling.patch + 350-coordinates.patch + 351-memleak.patch + 354-poppler-0.15.patch + " _builddir="$srcdir"/$pkgname-$pkgver -package() { +prepare() { cd "$_builddir" - patch -Np0 -i ../epdfview.desktop.patch || return 1 - patch -Np0 -i ../fix-scrolling.patch || return 1 + for i in $source; do + case $i in + *.patch) + msg "$i" + patch -p0 -i "$srcdir"/$i || return 1;; + esac + done + # make automake happy + touch ChangeLog + + aclocal -I m4 && autoconf && automake && autoheader } build() { @@ -45,4 +58,7 @@ package() { md5sums="1919bb19c16ef0a97d48b0a8303d3c7b epdfview-0.1.7.tar.bz2 fbf22bbabdbb7544db615ac5775d57e2 epdfview.desktop.patch -7a1574e0a8d0bcde316050629fb7bedd fix-scrolling.patch" +7a1574e0a8d0bcde316050629fb7bedd fix-scrolling.patch +8cb4bc10e91afdb0651df12fa83408d7 350-coordinates.patch +b6595810d47ef70ef6ca87a7de89c117 351-memleak.patch +3718789a62e1d1ce9bb3dec756609df6 354-poppler-0.15.patch" |