summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorjakllsch <jakllsch@pkgsrc.org>2013-02-03 20:00:28 +0000
committerjakllsch <jakllsch@pkgsrc.org>2013-02-03 20:00:28 +0000
commit91047a382dcd09b33e22a0666f2e380919a97f1f (patch)
tree50e3b1b78603c21026cdc9aad7fe4e8f482b478f /print
parentde6e2515c3235dafba37d86f5c98efdada44d9f6 (diff)
downloadpkgsrc-91047a382dcd09b33e22a0666f2e380919a97f1f.tar.gz
Apparently we now need to convert BGRA to RGBA. Bump pkgrev.
Backported from upstream, obtained via Debian GNU/Linux.
Diffstat (limited to 'print')
-rw-r--r--print/epdfview/Makefile4
-rw-r--r--print/epdfview/distinfo3
-rw-r--r--print/epdfview/patches/patch-src_PDFDocument.cxx47
3 files changed, 51 insertions, 3 deletions
diff --git a/print/epdfview/Makefile b/print/epdfview/Makefile
index 914b0177a51..f80ecba4d4d 100644
--- a/print/epdfview/Makefile
+++ b/print/epdfview/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.33 2013/01/26 21:38:41 adam Exp $
+# $NetBSD: Makefile,v 1.34 2013/02/03 20:00:28 jakllsch Exp $
#
DISTNAME= epdfview-0.1.8
-PKGREVISION= 10
+PKGREVISION= 11
CATEGORIES= print
MASTER_SITES= http://trac.emma-soft.com/epdfview/chrome/site/releases/
EXTRACT_SUFX= .tar.bz2
diff --git a/print/epdfview/distinfo b/print/epdfview/distinfo
index 08c8823db44..5e2065835ac 100644
--- a/print/epdfview/distinfo
+++ b/print/epdfview/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.9 2012/05/07 00:26:48 dholland Exp $
+$NetBSD: distinfo,v 1.10 2013/02/03 20:00:28 jakllsch Exp $
SHA1 (epdfview-0.1.8.tar.bz2) = 72da8958f58cf7ec55b55541f2e67895b402df3f
RMD160 (epdfview-0.1.8.tar.bz2) = f9444fe278863fdbb545543957a8777e1129ffed
Size (epdfview-0.1.8.tar.bz2) = 466270 bytes
+SHA1 (patch-src_PDFDocument.cxx) = e9f126631fc65459fc8e9a97ddaa3d57d08aa755
SHA1 (patch-src_gtk_StockIcons_h) = be421819baa4c05916d3dc213bd9d9968b9e83ca
diff --git a/print/epdfview/patches/patch-src_PDFDocument.cxx b/print/epdfview/patches/patch-src_PDFDocument.cxx
new file mode 100644
index 00000000000..1ea50b97420
--- /dev/null
+++ b/print/epdfview/patches/patch-src_PDFDocument.cxx
@@ -0,0 +1,47 @@
+$NetBSD: patch-src_PDFDocument.cxx,v 1.1 2013/02/03 20:00:28 jakllsch Exp $
+
+Correct colors, presuably due to a change in poppler.
+
+--- src/PDFDocument.cxx.orig 2011-05-28 10:25:01.000000000 +0000
++++ src/PDFDocument.cxx
+@@ -20,6 +20,7 @@
+ #include <time.h>
+ #include <poppler.h>
+ #include <unistd.h>
++#include <algorithm>
+ #include "epdfview.h"
+
+ using namespace ePDFView;
+@@ -33,6 +34,24 @@ static PageLayout convertPageLayout (gin
+ 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;
++ }
++ }
++ }
++}
++
+ ///
+ /// @brief Constructs a new PDFDocument object.
+ ///
+@@ -650,6 +669,7 @@ PDFDocument::renderPage (gint pageNum)
+ poppler_page_render (page, context);
+ 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.
+ GdkPixbuf *pixbuf = gdk_pixbuf_new_from_data (renderedPage->getData (),