aboutsummaryrefslogtreecommitdiff
path: root/graphics/epdfview
diff options
context:
space:
mode:
authorThomas Abthorpe <tabthorpe@FreeBSD.org>2011-11-12 00:24:15 +0000
committerThomas Abthorpe <tabthorpe@FreeBSD.org>2011-11-12 00:24:15 +0000
commitcb185783634357f6333416fdb5a66d4f00ba846c (patch)
tree867739a790aaa068ab499cd843e72025a348755c /graphics/epdfview
parenta6cd2af20248fac0c121a5194efafe528cba0701 (diff)
downloadports-cb185783634357f6333416fdb5a66d4f00ba846c.tar.gz
ports-cb185783634357f6333416fdb5a66d4f00ba846c.zip
Notes
Diffstat (limited to 'graphics/epdfview')
-rw-r--r--graphics/epdfview/Makefile6
-rw-r--r--graphics/epdfview/files/patch-PDFDocument.cxx42
2 files changed, 45 insertions, 3 deletions
diff --git a/graphics/epdfview/Makefile b/graphics/epdfview/Makefile
index 9da93bdbaf45..6769e1988be3 100644
--- a/graphics/epdfview/Makefile
+++ b/graphics/epdfview/Makefile
@@ -7,7 +7,7 @@
PORTNAME= epdfview
PORTVERSION= 0.1.8
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= graphics print gnome
MASTER_SITES= http://trac.emma-soft.com/epdfview/chrome/site/releases/ \
http://mirror.slitaz.org/sources/packages/e/
@@ -15,11 +15,11 @@ MASTER_SITES= http://trac.emma-soft.com/epdfview/chrome/site/releases/ \
MAINTAINER= sylvio@FreeBSD.org
COMMENT= A lightweight PDF document viewer
+LICENSE= GPLv2
+
BUILD_DEPENDS= cppunit-config:${PORTSDIR}/devel/cppunit
LIB_DEPENDS= poppler-glib.8:${PORTSDIR}/graphics/poppler-glib
-LICENSE= GPLv2
-
USE_BZIP2= yes
GNU_CONFIGURE= yes
INSTALLS_ICONS= yes
diff --git a/graphics/epdfview/files/patch-PDFDocument.cxx b/graphics/epdfview/files/patch-PDFDocument.cxx
new file mode 100644
index 000000000000..d361172ea365
--- /dev/null
+++ b/graphics/epdfview/files/patch-PDFDocument.cxx
@@ -0,0 +1,42 @@
+--- src/PDFDocument.cxx.orig 2011-05-28 18:25:01.000000000 +0800
++++ src/PDFDocument.cxx 2011-11-03 13:42:30.000000000 +0800
+@@ -20,6 +20,7 @@
+ #include <time.h>
+ #include <poppler.h>
+ #include <unistd.h>
++#include <algorithm>
+ #include "epdfview.h"
+
+ using namespace ePDFView;
+@@ -33,6 +34,23 @@
+ 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 +668,7 @@
+ 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 (),