summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Pielmeier <billie@gentoo.org>2012-01-28 13:32:56 +0000
committerDaniel Pielmeier <billie@gentoo.org>2012-01-28 13:32:56 +0000
commit7fed292211cfd20e055713a86439c1deebd9d3f2 (patch)
tree6e6977983fd7c0c2c2287a658a488112382f92bb /app-text/epdfview
parentRefactor ChangeLog entry since I really didn't need this afterall (diff)
downloadgentoo-2-7fed292211cfd20e055713a86439c1deebd9d3f2.tar.gz
gentoo-2-7fed292211cfd20e055713a86439c1deebd9d3f2.tar.bz2
gentoo-2-7fed292211cfd20e055713a86439c1deebd9d3f2.zip
Add patch from upstream to fix bug #387125. Thanks to Vladimir for the report and Fab for the link to the upstream patch. Possible endian issues still have to be sorted out.
(Portage version: 2.1.10.41/cvs/Linux i686)
Diffstat (limited to 'app-text/epdfview')
-rw-r--r--app-text/epdfview/ChangeLog10
-rw-r--r--app-text/epdfview/epdfview-0.1.8-r1.ebuild59
-rw-r--r--app-text/epdfview/files/epdfview-0.1.8-swap-blue-red-channels.patch39
3 files changed, 107 insertions, 1 deletions
diff --git a/app-text/epdfview/ChangeLog b/app-text/epdfview/ChangeLog
index ccadf1683671..d99837b8b012 100644
--- a/app-text/epdfview/ChangeLog
+++ b/app-text/epdfview/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-text/epdfview
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-text/epdfview/ChangeLog,v 1.45 2012/01/28 12:57:29 billie Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-text/epdfview/ChangeLog,v 1.46 2012/01/28 13:32:56 billie Exp $
+
+*epdfview-0.1.8-r1 (28 Jan 2012)
+
+ 28 Jan 2012; Daniel Pielmeier <billie@gentoo.org> +epdfview-0.1.8-r1.ebuild,
+ +files/epdfview-0.1.8-swap-blue-red-channels.patch:
+ Add patch from upstream to fix bug #387125. Thanks to Vladimir for the report
+ and Fab for the link to the upstream patch. Possible endian issues still have
+ to be sorted out.
28 Jan 2012; Daniel Pielmeier <billie@gentoo.org>
-files/epdfview-0.1.7-mouse-scrolling.patch,
diff --git a/app-text/epdfview/epdfview-0.1.8-r1.ebuild b/app-text/epdfview/epdfview-0.1.8-r1.ebuild
new file mode 100644
index 000000000000..d3a5a1d1d145
--- /dev/null
+++ b/app-text/epdfview/epdfview-0.1.8-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-text/epdfview/epdfview-0.1.8-r1.ebuild,v 1.1 2012/01/28 13:32:56 billie Exp $
+
+EAPI=4
+inherit eutils fdo-mime
+
+DESCRIPTION="Lightweight PDF viewer using Poppler and GTK+ libraries."
+HOMEPAGE="http://trac.emma-soft.com/epdfview/"
+SRC_URI="http://trac.emma-soft.com/epdfview/chrome/site/releases/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="cups nls test"
+
+RDEPEND=">=app-text/poppler-0.12.3-r3[cairo]
+ >=x11-libs/pango-1.28.4
+ >=x11-libs/gtk+-2.6:2
+ cups? ( >=net-print/cups-1.1 )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( dev-util/cppunit )
+ userland_GNU? ( >=sys-apps/findutils-4.4 )"
+
+RESTRICT="test"
+
+src_prepare() {
+ sed -i \
+ -e 's:Icon=icon_epdfview-48:Icon=epdfview:' \
+ data/epdfview.desktop || die
+ epatch "${FILESDIR}/${P}-swap-blue-red-channels.patch"
+}
+
+src_configure() {
+ econf $(use_with cups) \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+
+ local res
+ for res in 24 32 48; do
+ insinto /usr/share/icons/hicolor/${res}x${res}/apps
+ newins data/icon_epdfview-${res}.png epdfview.png || die
+ done
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/app-text/epdfview/files/epdfview-0.1.8-swap-blue-red-channels.patch b/app-text/epdfview/files/epdfview-0.1.8-swap-blue-red-channels.patch
new file mode 100644
index 000000000000..c57a5eff923a
--- /dev/null
+++ b/app-text/epdfview/files/epdfview-0.1.8-swap-blue-red-channels.patch
@@ -0,0 +1,39 @@
+Index: /trunk/src/PDFDocument.cxx
+===================================================================
+--- /trunk/src/PDFDocument.cxx (revision 361)
++++ /trunk/src/PDFDocument.cxx (revision 367)
+@@ -21,4 +21,5 @@
+ #include <poppler.h>
+ #include <unistd.h>
++#include <algorithm>
+ #include "epdfview.h"
+
+@@ -33,4 +34,22 @@
+ static PageMode convertPageMode (gint pageMode);
+ static gchar *getAbsoluteFileName (const gchar *fileName);
++
++namespace
++{
++ void
++ convert_bgra_to_rgba (guint8 *data, int width, int height)
++ {
++ using std::swap;
++
++ for (int y = 0; y < height; y++)
++ {
++ for (int x = 0; x < width; x++)
++ {
++ swap(data[0], data[2]);
++ data += 4;
++ }
++ }
++ }
++}
+
+ ///
+@@ -651,4 +670,5 @@
+ cairo_destroy(context);
+ cairo_surface_destroy (surface);
++ convert_bgra_to_rgba(renderedPage->getData (), width, height);
+ #else // !HAVE_POPPLER_0_17_0
+ // Create the pixbuf from the data and render to it.