Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (a6c4eab09c5072acd5aef47dc990e40a43a8ffe4)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (a6c4eab09c5072acd5aef47dc990e40a43a8ffe4)
  • Date: Thu, 3 Mar 2016 16:32:03 +0000

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

doc/epdfview/DETAILS | 2
doc/epdfview/HISTORY | 5
doc/epdfview/PRE_BUILD | 2
doc/epdfview/epdfview-0.1.8-fixes-2.patch | 160
++++++++++++++++++++++++++++++
4 files changed, 167 insertions(+), 2 deletions(-)

New commits:
commit a6c4eab09c5072acd5aef47dc990e40a43a8ffe4
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

epdfview: added fixes from BLFS; fixed build with recent poppler

diff --git a/doc/epdfview/DETAILS b/doc/epdfview/DETAILS
index 466431e..58649ab 100755
--- a/doc/epdfview/DETAILS
+++ b/doc/epdfview/DETAILS
@@ -1,6 +1,6 @@
SPELL=epdfview
VERSION=0.1.8
- PATCHLEVEL=0
+ PATCHLEVEL=1
SOURCE=$SPELL-$VERSION.tar.bz2

SOURCE_HASH=sha512:e81ca39158ed77040a00b69cdbbea4726a1bbf4885a096aaa3dfc4c64d0cbcadabdc69c559bb14d23c2bf7fc8244799176d2c2d5689ab670c13237edc10e8e40

SOURCE_URL[0]=http://trac.emma-soft.com/epdfview/chrome/site/releases/$SOURCE
diff --git a/doc/epdfview/HISTORY b/doc/epdfview/HISTORY
index c1517f2..54619a4 100644
--- a/doc/epdfview/HISTORY
+++ b/doc/epdfview/HISTORY
@@ -1,3 +1,8 @@
+2016-03-03 Vlad Glagolev <stealth AT sourcemage.org>
+ * DETAILS: PATCHLEVEL=1
+ * PRE_BUILD: apply patch
+ * epdfview-0.1.8-fixes-2.patch: added, backported BLFS patch
+
2011-12-09 Pol Vinogradov <vin.public AT gmail.com>
* PRE_BUILD: readded for successful compilation
with new glib2
diff --git a/doc/epdfview/PRE_BUILD b/doc/epdfview/PRE_BUILD
index d5a4f4c..47c331a 100755
--- a/doc/epdfview/PRE_BUILD
+++ b/doc/epdfview/PRE_BUILD
@@ -1,4 +1,4 @@
default_pre_build &&
cd ${SOURCE_DIRECTORY} &&

-sed -i "s:glib/gmacros.h:glib.h:" src/gtk/StockIcons.h
+patch -p1 < "${SPELL_DIRECTORY}/epdfview-0.1.8-fixes-2.patch"
diff --git a/doc/epdfview/epdfview-0.1.8-fixes-2.patch
b/doc/epdfview/epdfview-0.1.8-fixes-2.patch
new file mode 100644
index 0000000..0ad2ec3
--- /dev/null
+++ b/doc/epdfview/epdfview-0.1.8-fixes-2.patch
@@ -0,0 +1,160 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2015-01-19
+Initial Package Version: 0.1.8
+Upstream Status: Varies
+Origin: Found at fedora / from Tim Tassonis
+Description: Three fixes found at fedora. For the first (only glib.h
+can be included directly, with recent glib), we used to use a sed - but
+the other two fixes need patches so I've put them all together.
+
+ Second part is from upstream and fixes trashed colours
+Upstream: http://trac.emma-soft.com/epdfview/changeset/367/trunk
+Fixes bug: https://bugzilla.redhat.com/show_bug.cgi?id=745483
+
+ Third part was originally the most critical - from Jiri Popelka, found
+at https://bugzilla.redhat.com/show_bug.cgi?id=841880 - looks as if
+fedora haven't applied it yet. It solves building with cups-1.6.
+
+ Fourth part (one-line change to use CAIRO_FORMAT_ARGB32) is from
+Tim Tassonis <stuff at decentral dot ch> and allows embedded
+transparent pngs to display with "recent" poppler : in practice,
+it is needed for poppler-0.22 onwards.
+
+diff -Naur a/src/gtk/StockIcons.h b/src/gtk/StockIcons.h
+--- a/src/gtk/StockIcons.h 2011-05-28 11:24:57.000000000 +0100
++++ b/src/gtk/StockIcons.h 2015-03-19 19:04:47.009630630 +0000
+@@ -18,7 +18,7 @@
+ #if !defined (__STOCK_ICONS_H__)
+ #define __STOCK_ICONS_H__
+
+-#include <glib/gmacros.h>
++#include <glib.h>
+
+ G_BEGIN_DECLS
+
+diff -Naur a/src/PDFDocument.cxx b/src/PDFDocument.cxx
+--- a/src/PDFDocument.cxx 2011-05-28 11:25:01.000000000 +0100
++++ b/src/PDFDocument.cxx 2015-03-19 19:06:10.627619420 +0000
+@@ -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 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.
+ ///
+@@ -616,7 +635,7 @@
+ #if defined (HAVE_POPPLER_0_17_0)
+ cairo_surface_t *surface = cairo_image_surface_create_for_data (
+ renderedPage->getData (),
+- CAIRO_FORMAT_RGB24, width, height,
++ CAIRO_FORMAT_ARGB32, width, height,
+ renderedPage->getRowStride ());
+ cairo_t *context = cairo_create (surface);
+ cairo_save(context);
+@@ -650,6 +669,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
(),
+diff -Naur a/src/PrintPter.cxx b/src/PrintPter.cxx
+--- a/src/PrintPter.cxx 2011-05-28 11:25:01.000000000 +0100
++++ b/src/PrintPter.cxx 2015-03-19 19:04:47.009630630 +0000
+@@ -22,6 +22,40 @@
+ #include <locale.h>
+ #include "epdfview.h"
+
++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5)
++#define HAVE_CUPS_1_6 1
++#endif
++
++#ifndef HAVE_CUPS_1_6
++inline int ippGetInteger (ipp_attribute_t *attr, int element)
++{
++ return (attr->values[element].integer);
++}
++
++inline const char * ippGetString (ipp_attribute_t *attr,
++ int element,
++ const char **language /*UNUSED*/)
++{
++ return (attr->values[element].string.text);
++}
++
++inline int ippSetOperation (ipp_t *ipp, ipp_op_t op)
++{
++ if (!ipp)
++ return (0);
++ ipp->request.op.operation_id = op;
++ return (1);
++}
++
++inline int ippSetRequestId (ipp_t *ipp, int request_id)
++{
++ if (!ipp)
++ return (0);
++ ipp->request.any.request_id = request_id;
++ return (1);
++}
++#endif
++
+ using namespace ePDFView;
+
+ // Structures
+@@ -380,8 +414,8 @@
+
+ ipp_t *request = ippNew ();
+
+- request->request.op.operation_id = IPP_GET_PRINTER_ATTRIBUTES;
+- request->request.op.request_id = 1;
++ ippSetOperation(request, IPP_GET_PRINTER_ATTRIBUTES);
++ ippSetRequestId(request, 1);
+
+ ippAddString (request, IPP_TAG_OPERATION, IPP_TAG_CHARSET,
+ "attributes-charset", NULL, "utf-8");
+@@ -403,7 +437,7 @@
+ ippFindAttribute (answer, "printer-state", IPP_TAG_ZERO);
+ if ( NULL != state )
+ {
+- switch (state->values[0].integer)
++ switch (ippGetInteger (state, 0))
+ {
+ case IPP_PRINTER_IDLE:
+ attributes->state = g_strdup (_("Idle"));
+@@ -425,7 +459,7 @@
+ ippFindAttribute (answer, "printer-location", IPP_TAG_ZERO);
+ if ( NULL != location )
+ {
+- attributes->location = g_strdup
(location->values[0].string.text);
++ attributes->location = g_strdup (ippGetString (location, 0,
NULL));
+ }
+
+ ippDelete (answer);



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (a6c4eab09c5072acd5aef47dc990e40a43a8ffe4), Vlad Glagolev, 03/03/2016

Archive powered by MHonArc 2.6.24.

Top of Page