summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-graphics
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@googlemail.com>2012-12-01 00:51:21 +0000
committerKoen Kooi <koen@dominion.thruhere.net>2012-12-04 10:44:59 +0100
commit40f2271ab61a26a3f21fedc72c4949c8ce267aa5 (patch)
treedfd39f88ba9e6657b932a95871a1145be61af187 /meta-oe/recipes-graphics
parent06002db7afad4fefb18f508ba222008ee026699a (diff)
downloadmeta-openembedded-40f2271ab61a26a3f21fedc72c4949c8ce267aa5.tar.gz
gimp: update to 2.8.2
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-graphics')
-rw-r--r--meta-oe/recipes-graphics/gimp/gimp/gimp-2.6.11-poppler18.patch150
-rw-r--r--meta-oe/recipes-graphics/gimp/gimp_2.8.2.bb (renamed from meta-oe/recipes-graphics/gimp/gimp_2.6.11.bb)13
2 files changed, 5 insertions, 158 deletions
diff --git a/meta-oe/recipes-graphics/gimp/gimp/gimp-2.6.11-poppler18.patch b/meta-oe/recipes-graphics/gimp/gimp/gimp-2.6.11-poppler18.patch
deleted file mode 100644
index 0ebfd8983..000000000
--- a/meta-oe/recipes-graphics/gimp/gimp/gimp-2.6.11-poppler18.patch
+++ /dev/null
@@ -1,150 +0,0 @@
1From 9b3e1c91fd2eac69da6947ec9c7fbf10096ba237 Mon Sep 17 00:00:00 2001
2From: Mukund Sivaraman <muks@banu.com>
3Date: Wed, 20 Apr 2011 13:25:44 +0000
4Subject: file-pdf-load: Don't use deprecated API (bug #646947)
5
6Upstream-Status: Applied
7
8---
9diff --git a/plug-ins/common/file-pdf-load.c b/plug-ins/common/file-pdf-load.c
10index c2d5512..6183403 100644
11--- a/plug-ins/common/file-pdf.c
12+++ b/plug-ins/common/file-pdf.c
13@@ -4,6 +4,9 @@
14 *
15 * Copyright (C) 2005 Nathan Summers
16 *
17+ * Some code borrowed from poppler.git/glib/poppler-page.cc
18+ * Copyright (C) 2005, Red Hat, Inc.
19+ *
20 * This program is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published by
22 * the Free Software Foundation; either version 2 of the License, or
23@@ -582,6 +585,84 @@ layer_from_pixbuf (gint32 image,
24 return layer;
25 }
26
27+static void
28+copy_cairo_surface_to_pixbuf (cairo_surface_t *surface,
29+ GdkPixbuf *pixbuf)
30+{
31+ int cairo_width, cairo_height, cairo_rowstride;
32+ unsigned char *pixbuf_data, *dst, *cairo_data;
33+ int pixbuf_rowstride, pixbuf_n_channels;
34+ unsigned int *src;
35+ int x, y;
36+
37+ cairo_width = cairo_image_surface_get_width (surface);
38+ cairo_height = cairo_image_surface_get_height (surface);
39+ cairo_rowstride = cairo_image_surface_get_stride (surface);
40+ cairo_data = cairo_image_surface_get_data (surface);
41+
42+ pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
43+ pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
44+ pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
45+
46+ if (cairo_width > gdk_pixbuf_get_width (pixbuf))
47+ cairo_width = gdk_pixbuf_get_width (pixbuf);
48+ if (cairo_height > gdk_pixbuf_get_height (pixbuf))
49+ cairo_height = gdk_pixbuf_get_height (pixbuf);
50+
51+ for (y = 0; y < cairo_height; y++)
52+ {
53+ src = (unsigned int *) (cairo_data + y * cairo_rowstride);
54+ dst = pixbuf_data + y * pixbuf_rowstride;
55+
56+ for (x = 0; x < cairo_width; x++)
57+ {
58+ dst[0] = (*src >> 16) & 0xff;
59+ dst[1] = (*src >> 8) & 0xff;
60+ dst[2] = (*src >> 0) & 0xff;
61+
62+ if (pixbuf_n_channels == 4)
63+ dst[3] = (*src >> 24) & 0xff;
64+
65+ dst += pixbuf_n_channels;
66+ src++;
67+ }
68+ }
69+}
70+
71+static GdkPixbuf *
72+render_page_to_pixbuf (PopplerPage *page,
73+ int width,
74+ int height,
75+ double scale)
76+{
77+ GdkPixbuf *pixbuf;
78+ cairo_surface_t *surface;
79+ cairo_t *cr;
80+
81+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
82+ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
83+ cr = cairo_create (surface);
84+
85+ cairo_save (cr);
86+ cairo_translate (cr, 0.0, 0.0);
87+
88+ if (scale != 1.0)
89+ cairo_scale (cr, scale, scale);
90+
91+ poppler_page_render (page, cr);
92+ cairo_restore (cr);
93+
94+ cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
95+ cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
96+ cairo_paint (cr);
97+
98+ cairo_destroy (cr);
99+ copy_cairo_surface_to_pixbuf (surface, pixbuf);
100+ cairo_surface_destroy (surface);
101+
102+ return pixbuf;
103+}
104+
105 static gint32
106 load_image (PopplerDocument *doc,
107 const gchar *filename,
108@@ -613,7 +694,7 @@ load_image (PopplerDocument *doc,
109 gdouble page_width;
110 gdouble page_height;
111
112- GdkPixbuf *buf;
113+ GdkPixbuf *pixbuf;
114 gint width;
115 gint height;
116
117@@ -643,15 +724,13 @@ load_image (PopplerDocument *doc,
118 gimp_image_set_resolution (image_ID, resolution, resolution);
119 }
120
121- buf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
122-
123- poppler_page_render_to_pixbuf (page, 0, 0, width, height, scale, 0, buf);
124+ pixbuf = render_page_to_pixbuf (page, width, height, scale);
125
126- layer_from_pixbuf (image_ID, page_label, i, buf,
127+ layer_from_pixbuf (image_ID, page_label, i, pixbuf,
128 doc_progress, 1.0 / pages->n_pages);
129
130 g_free (page_label);
131- g_object_unref (buf);
132+ g_object_unref (pixbuf);
133
134 doc_progress = (double) (i + 1) / pages->n_pages;
135 gimp_progress_update (doc_progress);
136@@ -729,11 +808,7 @@ get_thumbnail (PopplerDocument *doc,
137 width *= scale;
138 height *= scale;
139
140- pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8,
141- width, height);
142-
143- poppler_page_render_to_pixbuf (page,
144- 0, 0, width, height, scale, 0, pixbuf);
145+ pixbuf = render_page_to_pixbuf (page, width, height, scale);
146 }
147
148 g_object_unref (page);
149--
150cgit v0.9.0.2
diff --git a/meta-oe/recipes-graphics/gimp/gimp_2.6.11.bb b/meta-oe/recipes-graphics/gimp/gimp_2.8.2.bb
index f952883e9..44e66ea6d 100644
--- a/meta-oe/recipes-graphics/gimp/gimp_2.6.11.bb
+++ b/meta-oe/recipes-graphics/gimp/gimp_2.8.2.bb
@@ -1,19 +1,16 @@
1DESCRIPTION = "The GIMP is the GNU Image Manipulation Program." 1DESCRIPTION = "The GIMP is the GNU Image Manipulation Program."
2HOMEPAGE = "http://www.gimp.org" 2HOMEPAGE = "http://www.gimp.org"
3SECTION = "x11/graphics" 3SECTION = "x11/graphics"
4LICENSE = "GPLv2" 4LICENSE = "GPLv3"
5LIC_FILES_CHKSUM = "file://COPYING;md5=878e3965c7b52d85827c75f5a2f3b314" 5LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
6 6
7DEPENDS = "babl gdk-pixbuf-native libart-lgpl gtk+ jpeg libpng libexif tiff webkit-gtk lcms gegl poppler" 7DEPENDS = "babl gdk-pixbuf-native libart-lgpl gtk+ jpeg libpng libexif tiff webkit-gtk lcms gegl poppler"
8 8
9PR = "r1"
10
11inherit gnome 9inherit gnome
12 10
13SRC_URI = "ftp://ftp.gimp.org/pub/gimp/v2.6/gimp-${PV}.tar.bz2 \ 11SRC_URI = "ftp://ftp.gimp.org/pub/gimp/v2.8/gimp-${PV}.tar.bz2"
14 file://gimp-2.6.11-poppler18.patch" 12SRC_URI[md5sum] = "b542138820ca3a41cbd63fc331907955"
15SRC_URI[md5sum] = "bb2939fe13e54fc7255cef5d097bb5dd" 13SRC_URI[sha256sum] = "0cd1a7e67e132ead810e16e31ff929394c83fcf841e4a295c45d6f3829601ad9"
16SRC_URI[sha256sum] = "9b6d08d0803b3912ea596d1b77b9c21ee13778c23388a225c004b8c1587cb0a1"
17 14
18EXTRA_OECONF = "--disable-python \ 15EXTRA_OECONF = "--disable-python \
19 --without-wmf" 16 --without-wmf"