summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gdk-pixbuf
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2014-06-26 14:36:22 +0200
committerAdrian Dudau <adrian.dudau@enea.com>2014-06-26 15:32:53 +0200
commitf4cf9fe05bb3f32fabea4e54dd92d368967a80da (patch)
tree487180fa9866985ea7b28e625651765d86f515c3 /meta/recipes-gnome/gdk-pixbuf
downloadpoky-f4cf9fe05bb3f32fabea4e54dd92d368967a80da.tar.gz
initial commit for Enea Linux 4.0
Migrated from the internal git server on the daisy-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-gnome/gdk-pixbuf')
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch42
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch79
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch33
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/run-ptest3
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/tests-check.patch465
-rw-r--r--meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb105
6 files changed, 727 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch
new file mode 100644
index 0000000000..edbdced43a
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/extending-libinstall-dependencies.patch
@@ -0,0 +1,42 @@
1Upstream-Status: Pending
2
3This patch fixes parallel install issue that lib libpixbufloader-png.la
4depends on libgdk_pixbuf-2.0.la which will be regenerated during insta-
5llation, if libgdk_pixbuf-2.0.la is regenerating and at the same time
6libpixbufloader-png.la links it, the error will happen.
7
8Error message is:
9* usr/bin/ld: cannot find -lgdk_pixbuf-2.0
10* collect2: ld returned 1 exit status
11
12Make an explicit dependency to the libs install targets would fix this
13issue.
14
15Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
16---
17 gdk-pixbuf/Makefile.am | 1 +
18 libdeps.mk | 3 +++
19 2 files changed, 4 insertions(+), 0 deletions(-)
20 create mode 100644 libdeps.mk
21
22diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am
23index 95a93a8..db44cae 100644
24--- a/gdk-pixbuf/Makefile.am
25+++ b/gdk-pixbuf/Makefile.am
26@@ -783,3 +783,4 @@ loaders.cache:
27 endif
28
29 -include $(top_srcdir)/git.mk
30+-include $(top_srcdir)/libdeps.mk
31diff --git a/libdeps.mk b/libdeps.mk
32new file mode 100644
33index 0000000..d7a10a8
34--- /dev/null
35+++ b/libdeps.mk
36@@ -0,0 +1,3 @@
37+# Extending dependencies of install-loaderLTLIBRARIES:
38+# The $(lib-LTLIBRARIES) is needed by relinking $(loader_LTLIBRARIES)
39+install-loaderLTLIBRARIES: install-libLTLIBRARIES
40--
411.7.6.1
42
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
new file mode 100644
index 0000000000..70146c6181
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/fatal-loader.patch
@@ -0,0 +1,79 @@
1If an environment variable is specified set the return value from main() to
2non-zero if the loader had errors (missing libraries, generally).
3
4Upstream-Status: Pending
5Signed-off-by: Ross Burton <ross.burton@intel.com>
6
7diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
8index a9ca015..395674a 100644
9--- a/gdk-pixbuf/queryloaders.c
10+++ b/gdk-pixbuf/queryloaders.c
11@@ -146,7 +146,7 @@ write_loader_info (GString *contents, const char *path, GdkPixbufFormat *info)
12 g_string_append_c (contents, '\n');
13 }
14
15-static void
16+static gboolean
17 query_module (GString *contents, const char *dir, const char *file)
18 {
19 char *path;
20@@ -155,6 +155,7 @@ query_module (GString *contents, const char *dir, const char *file)
21 void (*fill_vtable) (GdkPixbufModule *module);
22 gpointer fill_info_ptr;
23 gpointer fill_vtable_ptr;
24+ gboolean ret = TRUE;
25
26 if (g_path_is_absolute (file))
27 path = g_strdup (file);
28@@ -204,10 +205,13 @@ query_module (GString *contents, const char *dir, const char *file)
29 g_module_error());
30 else
31 g_fprintf (stderr, "Cannot load loader %s\n", path);
32+ ret = FALSE;
33 }
34 if (module)
35 g_module_close (module);
36 g_free (path);
37+
38+ return ret;
39 }
40
41 #ifdef G_OS_WIN32
42@@ -257,6 +261,7 @@ int main (int argc, char **argv)
43 GString *contents;
44 gchar *cache_file = NULL;
45 gint first_file = 1;
46+ gboolean success = TRUE;
47
48 #ifdef G_OS_WIN32
49 gchar *libdir;
50@@ -360,7 +365,8 @@ int main (int argc, char **argv)
51 gint len = strlen (dent);
52 if (len > SOEXT_LEN &&
53 strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
54- query_module (contents, path, dent);
55+ if (!query_module (contents, path, dent))
56+ success = FALSE;
57 }
58 }
59 g_dir_close (dir);
60@@ -378,7 +384,8 @@ int main (int argc, char **argv)
61 infilename = g_locale_to_utf8 (infilename,
62 -1, NULL, NULL, NULL);
63 #endif
64- query_module (contents, cwd, infilename);
65+ if (!query_module (contents, cwd, infilename))
66+ success = FALSE;
67 }
68 g_free (cwd);
69 }
70@@ -394,5 +401,8 @@ int main (int argc, char **argv)
71 else
72 g_print ("%s\n", contents->str);
73
74- return 0;
75+ if (g_getenv ("GDK_PIXBUF_FATAL_LOADER"))
76+ return success ? 0 : 1;
77+ else
78+ return 0;
79 }
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch
new file mode 100644
index 0000000000..ecca62a712
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/hardcoded_libtool.patch
@@ -0,0 +1,33 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: gdk-pixbuf-2.22.1/configure.ac
4===================================================================
5--- gdk-pixbuf-2.22.1.orig/configure.ac 2010-11-26 09:06:34.000000000 +0800
6+++ gdk-pixbuf-2.22.1/configure.ac 2010-11-26 09:07:33.000000000 +0800
7@@ -287,7 +287,7 @@
8 case $enable_explicit_deps in
9 auto)
10 export SED
11- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
12+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
13 if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
14 enable_explicit_deps=yes
15 else
16@@ -484,7 +484,7 @@
17 dnl Now we check to see if our libtool supports shared lib deps
18 dnl (in a rather ugly way even)
19 if $dynworks; then
20- pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
21+ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config"
22 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
23 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
24 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
25@@ -957,7 +957,7 @@
26 # We are using gmodule-no-export now, but I'm leaving the stripping
27 # code in place for now, since pango and atk still require gmodule.
28 export SED
29-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
30+export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
31 if test -n "$export_dynamic"; then
32 GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
33 fi
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/run-ptest b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/run-ptest
new file mode 100644
index 0000000000..8f9072386e
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/run-ptest
@@ -0,0 +1,3 @@
1#! /bin/sh
2
3gnome-desktop-testing-runner gdk-pixbuf
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/tests-check.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/tests-check.patch
new file mode 100644
index 0000000000..31f33689c3
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/tests-check.patch
@@ -0,0 +1,465 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From 9fa240c1ad5a815d63d8aa9126954152c2607f2e Mon Sep 17 00:00:00 2001
5From: Matthias Clasen <mclasen@redhat.com>
6Date: Sat, 25 Jan 2014 21:29:34 +0000
7Subject: Make testsuite robust against disabled formats
8
9Skip tests if their file format is not supported by the
10available loaders.
11
12https://bugzilla.gnome.org/show_bug.cgi?id=722651
13---
14diff --git a/tests/Makefile.am b/tests/Makefile.am
15index de3442e..80840c2 100644
16--- a/tests/Makefile.am
17+++ b/tests/Makefile.am
18@@ -42,17 +42,57 @@ dist_installed_test_data = \
19 icc-profile.png \
20 $(wildcard $(srcdir)/test-images/*)
21
22+pixbuf_icc_SOURCES = \
23+ pixbuf-icc.c \
24+ test-common.c \
25+ test-common.h \
26+ $(NULL)
27+
28+pixbuf_scale_SOURCES = \
29+ pixbuf-scale.c \
30+ test-common.c \
31+ test-common.h \
32+ $(NULL)
33+
34+pixbuf_stream_SOURCES = \
35+ pixbuf-stream.c \
36+ test-common.c \
37+ test-common.h \
38+ $(NULL)
39+
40+pixbuf_threads_SOURCES = \
41+ pixbuf-threads.c \
42+ test-common.c \
43+ test-common.h \
44+ $(NULL)
45+
46+pixbuf_icon_serialize_SOURCES = \
47+ pixbuf-icon-serialize.c \
48+ test-common.c \
49+ test-common.h \
50+ $(NULL)
51+
52+pixbuf_save_SOURCES = \
53+ pixbuf-save.c \
54+ test-common.c \
55+ test-common.h \
56+ $(NULL)
57+
58 pixbuf_resource_SOURCES = \
59 pixbuf-resource.c \
60+ test-common.c \
61+ test-common.h \
62 resources.h \
63- resources.c
64+ resources.c \
65+ $(NULL)
66
67 BUILT_SOURCES += resources.h resources.c
68 DISTCLEANFILES += \
69 resources.h resources.c \
70 pixbuf-save-options \
71 pixbuf-randomly-modified-image \
72- pixbuf-save-roundtrip
73+ pixbuf-save-roundtrip \
74+ $(NULL)
75
76 EXTRA_DIST += resources.gresource.xml
77 TESTS_ENVIRONMENT += GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/loaders.cache
78diff --git a/tests/pixbuf-icc.c b/tests/pixbuf-icc.c
79index 9cb9c90..3b95b09 100644
80--- a/tests/pixbuf-icc.c
81+++ b/tests/pixbuf-icc.c
82@@ -22,6 +22,7 @@
83
84 #include "config.h"
85 #include "gdk-pixbuf/gdk-pixbuf.h"
86+#include "test-common.h"
87
88 static void
89 test_incremental (gconstpointer data)
90@@ -34,7 +35,12 @@ test_incremental (gconstpointer data)
91 gchar *contents;
92 gsize size;
93
94-
95+ if (!format_supported (filename))
96+ {
97+ g_test_skip ("format not supported");
98+ return;
99+ }
100+
101 g_file_get_contents (g_test_get_filename (G_TEST_DIST, filename, NULL), &contents, &size, &error);
102 g_assert_no_error (error);
103
104@@ -62,6 +68,12 @@ test_nonincremental (gconstpointer data)
105 GdkPixbuf *pixbuf;
106 const gchar *profile;
107
108+ if (!format_supported (filename))
109+ {
110+ g_test_skip ("format not supported");
111+ return;
112+ }
113+
114 pixbuf = gdk_pixbuf_new_from_file (g_test_get_filename (G_TEST_DIST, filename, NULL), &error);
115 g_assert_no_error (error);
116
117diff --git a/tests/pixbuf-icon-serialize.c b/tests/pixbuf-icon-serialize.c
118index 20bf6e1..880c654 100644
119--- a/tests/pixbuf-icon-serialize.c
120+++ b/tests/pixbuf-icon-serialize.c
121@@ -1,5 +1,6 @@
122 #include "config.h"
123 #include "gdk-pixbuf/gdk-pixbuf.h"
124+#include "test-common.h"
125 #include <string.h>
126 #include <glib.h>
127
128@@ -13,6 +14,12 @@ test_serialize (void)
129 GIcon *icon;
130 GInputStream *stream;
131
132+ if (!format_supported ("png"))
133+ {
134+ g_test_skip ("format not supported");
135+ return;
136+ }
137+
138 pixbuf = gdk_pixbuf_new_from_file (g_test_get_filename (G_TEST_DIST, "test-image.png", NULL), &error);
139 g_assert_no_error (error);
140 g_assert (pixbuf != NULL);
141diff --git a/tests/pixbuf-resource.c b/tests/pixbuf-resource.c
142index a747bca..aa0bed8 100644
143--- a/tests/pixbuf-resource.c
144+++ b/tests/pixbuf-resource.c
145@@ -22,6 +22,7 @@
146
147 #include "config.h"
148 #include "gdk-pixbuf/gdk-pixbuf.h"
149+#include "test-common.h"
150 #include <string.h>
151
152 #define compare_option(p1, p2, key) \
153@@ -77,6 +78,12 @@ test_resource (void)
154 GError *error = NULL;
155 GdkPixbuf *pixbuf, *ref;
156
157+ if (!format_supported ("png"))
158+ {
159+ g_test_skip ("format not supported");
160+ return;
161+ }
162+
163 path = g_test_get_filename (G_TEST_DIST, "icc-profile.png", NULL);
164 ref = gdk_pixbuf_new_from_file (path, &error);
165 g_assert_no_error (error);
166@@ -111,6 +118,12 @@ test_resource_at_scale (void)
167 GError *error = NULL;
168 GdkPixbuf *pixbuf, *ref;
169
170+ if (!format_supported ("png"))
171+ {
172+ g_test_skip ("format not supported");
173+ return;
174+ }
175+
176 path = g_test_get_filename (G_TEST_DIST, "icc-profile.png", NULL);
177 ref = gdk_pixbuf_new_from_file_at_scale (path, 40, 10, FALSE, &error);
178 g_assert_no_error (error);
179diff --git a/tests/pixbuf-save.c b/tests/pixbuf-save.c
180index f7df29b..78ab288 100644
181--- a/tests/pixbuf-save.c
182+++ b/tests/pixbuf-save.c
183@@ -21,6 +21,7 @@
184 */
185
186 #include "gdk-pixbuf/gdk-pixbuf.h"
187+#include "test-common.h"
188 #include <string.h>
189
190 #define compare_option(p1, p2, key) \
191@@ -76,6 +77,12 @@ test_save_roundtrip (void)
192 GdkPixbuf *ref;
193 GdkPixbuf *pixbuf;
194
195+ if (!format_supported ("png"))
196+ {
197+ g_test_skip ("format not supported");
198+ return;
199+ }
200+
201 ref = gdk_pixbuf_new_from_file (g_test_get_filename (G_TEST_DIST, "test-image.png", NULL), &error);
202 g_assert_no_error (error);
203
204@@ -98,6 +105,12 @@ test_save_options (void)
205 GdkPixbuf *pixbuf;
206 GError *error = NULL;
207
208+ if (!format_supported ("png"))
209+ {
210+ g_test_skip ("format not supported");
211+ return;
212+ }
213+
214 ref = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 10, 10);
215 gdk_pixbuf_fill (ref, 0xff00ff00);
216
217diff --git a/tests/pixbuf-scale.c b/tests/pixbuf-scale.c
218index 4fd9fd5..d57e56a 100644
219--- a/tests/pixbuf-scale.c
220+++ b/tests/pixbuf-scale.c
221@@ -22,6 +22,7 @@
222
223 #include "config.h"
224 #include "gdk-pixbuf/gdk-pixbuf.h"
225+#include "test-common.h"
226
227 static void
228 test_scale (gconstpointer data)
229@@ -33,6 +34,12 @@ test_scale (gconstpointer data)
230 GdkPixbuf *pixbuf;
231 gint width, height;
232
233+ if (!format_supported (filename))
234+ {
235+ g_test_skip ("format not supported");
236+ return;
237+ }
238+
239 path = g_test_get_filename (G_TEST_DIST, filename, NULL);
240 ref = gdk_pixbuf_new_from_file (path, &error);
241 g_assert_no_error (error);
242diff --git a/tests/pixbuf-stream.c b/tests/pixbuf-stream.c
243index 0c2cebe..d66ce3e 100644
244--- a/tests/pixbuf-stream.c
245+++ b/tests/pixbuf-stream.c
246@@ -22,6 +22,7 @@
247
248 #include "config.h"
249 #include "gdk-pixbuf/gdk-pixbuf.h"
250+#include "test-common.h"
251 #include <string.h>
252
253 #define compare_option(p1, p2, key) \
254@@ -71,6 +72,12 @@ test_stream (gconstpointer data)
255 GFile *file;
256 GInputStream *stream;
257
258+ if (!format_supported (filename))
259+ {
260+ g_test_skip ("format not supported");
261+ return;
262+ }
263+
264 path = g_test_get_filename (G_TEST_DIST, filename, NULL);
265 ref = gdk_pixbuf_new_from_file (path, &error);
266 g_assert_no_error (error);
267@@ -116,6 +123,12 @@ test_stream_async (gconstpointer data)
268 gsize size;
269 GInputStream *stream;
270
271+ if (!format_supported (filename))
272+ {
273+ g_test_skip ("format not supported");
274+ return;
275+ }
276+
277 path = g_test_get_filename (G_TEST_DIST, filename, NULL);
278 ref = gdk_pixbuf_new_from_file (path, &error);
279 g_assert_no_error (error);
280@@ -138,6 +151,12 @@ test_stream_at_scale (gconstpointer data)
281 GFile *file;
282 GInputStream *stream;
283
284+ if (!format_supported (filename))
285+ {
286+ g_test_skip ("format not supported");
287+ return;
288+ }
289+
290 path = g_test_get_filename (G_TEST_DIST, filename, NULL);
291 ref = gdk_pixbuf_new_from_file_at_scale (path, 20, 30, TRUE, &error);
292 g_assert_no_error (error);
293@@ -167,6 +186,12 @@ test_stream_at_scale_async (gconstpointer data)
294 gsize size;
295 GInputStream *stream;
296
297+ if (!format_supported (filename))
298+ {
299+ g_test_skip ("format not supported");
300+ return;
301+ }
302+
303 path = g_test_get_filename (G_TEST_DIST, filename, NULL);
304 ref = gdk_pixbuf_new_from_file_at_scale (path, 40, 10, FALSE, &error);
305 g_assert_no_error (error);
306diff --git a/tests/pixbuf-threads.c b/tests/pixbuf-threads.c
307index 5eeb9dd..f2694fd 100644
308--- a/tests/pixbuf-threads.c
309+++ b/tests/pixbuf-threads.c
310@@ -18,7 +18,9 @@
311 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
312 */
313
314+#include "config.h"
315 #include "gdk-pixbuf/gdk-pixbuf.h"
316+#include "test-common.h"
317
318 static void
319 load_image (gpointer data,
320@@ -71,15 +73,24 @@ test_threads (void)
321
322 for (i = 0; i < iterations; i++)
323 {
324- g_thread_pool_push (pool, "valid_jpeg_test", NULL);
325- g_thread_pool_push (pool, "valid_png_test", NULL);
326- g_thread_pool_push (pool, "valid_gif_test", NULL);
327- g_thread_pool_push (pool, "valid_bmp_test", NULL);
328- g_thread_pool_push (pool, "valid_jpeg_progressive_test", NULL);
329- g_thread_pool_push (pool, "valid_xpm_test", NULL);
330- g_thread_pool_push (pool, "valid_ras_test", NULL);
331- g_thread_pool_push (pool, "valid_tga_test", NULL);
332- g_thread_pool_push (pool, "valid_tiff1_test", NULL);
333+ if (format_supported ("jpeg"))
334+ g_thread_pool_push (pool, "valid_jpeg_test", NULL);
335+ if (format_supported ("png"))
336+ g_thread_pool_push (pool, "valid_png_test", NULL);
337+ if (format_supported ("gif"))
338+ g_thread_pool_push (pool, "valid_gif_test", NULL);
339+ if (format_supported ("bmp"))
340+ g_thread_pool_push (pool, "valid_bmp_test", NULL);
341+ if (format_supported ("jpeg"))
342+ g_thread_pool_push (pool, "valid_jpeg_progressive_test", NULL);
343+ if (format_supported ("xpm"))
344+ g_thread_pool_push (pool, "valid_xpm_test", NULL);
345+ if (format_supported ("ras"))
346+ g_thread_pool_push (pool, "valid_ras_test", NULL);
347+ if (format_supported ("tga"))
348+ g_thread_pool_push (pool, "valid_tga_test", NULL);
349+ if (format_supported ("tiff"))
350+ g_thread_pool_push (pool, "valid_tiff1_test", NULL);
351 }
352
353 g_thread_pool_free (pool, FALSE, TRUE);
354diff --git a/tests/test-common.c b/tests/test-common.c
355new file mode 100644
356index 0000000..c7673e3
357--- /dev/null
358+++ b/tests/test-common.c
359@@ -0,0 +1,65 @@
360+/* -*- Mode: C; c-basic-offset: 2; -*- */
361+/* GdkPixbuf library - test loaders
362+ *
363+ * Copyright (C) 2014 Red Hat, Inc.
364+ *
365+ * This program is free software; you can redistribute it and/or modify
366+ * it under the terms of the GNU General Public License as published by
367+ * the Free Software Foundation; either version 2 of the License, or
368+ * (at your option) any later version.
369+ *
370+ * This program is distributed in the hope that it will be useful,
371+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
372+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
373+ * GNU General Public License for more details.
374+ *
375+ * You should have received a copy of the GNU General Public License
376+ * along with this program; if not, write to the Free Software
377+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
378+ *
379+ * Author: Matthias Clasen
380+ */
381+
382+#include "config.h"
383+#include "test-common.h"
384+#include "gdk-pixbuf/gdk-pixbuf.h"
385+
386+#include <string.h>
387+
388+gboolean
389+format_supported (const gchar *filename)
390+{
391+ const gchar *name = NULL;
392+ GSList *formats, *l;
393+ gboolean retval;
394+ const gchar *names[] = { "png", "jpeg", "bmp", "gif", "ras",
395+ "tga", "xpm", "xbm" };
396+ gint i;
397+
398+ for (i = 0; i < G_N_ELEMENTS (names); i++)
399+ {
400+ if (strstr (filename, names[i]))
401+ {
402+ name = names[i];
403+ break;
404+ }
405+ }
406+ if (name == NULL)
407+ return FALSE;
408+
409+ retval = FALSE;
410+ formats = gdk_pixbuf_get_formats ();
411+ for (l = formats; l; l = l->next)
412+ {
413+ GdkPixbufFormat *format = l->data;
414+
415+ if (g_str_equal (gdk_pixbuf_format_get_name (format), name))
416+ {
417+ retval = TRUE;
418+ break;
419+ }
420+ }
421+ g_slist_free (formats);
422+
423+ return retval;
424+}
425diff --git a/tests/test-common.h b/tests/test-common.h
426new file mode 100644
427index 0000000..32ff35a
428--- /dev/null
429+++ b/tests/test-common.h
430@@ -0,0 +1,33 @@
431+/* -*- Mode: C; c-basic-offset: 2; -*- */
432+/* GdkPixbuf library - test loaders
433+ *
434+ * Copyright (C) 2014 Red Hat, Inc.
435+ *
436+ * This program is free software; you can redistribute it and/or modify
437+ * it under the terms of the GNU General Public License as published by
438+ * the Free Software Foundation; either version 2 of the License, or
439+ * (at your option) any later version.
440+ *
441+ * This program is distributed in the hope that it will be useful,
442+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
443+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
444+ * GNU General Public License for more details.
445+ *
446+ * You should have received a copy of the GNU General Public License
447+ * along with this program; if not, write to the Free Software
448+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
449+ *
450+ * Author: Matthias Clasen
451+ */
452+
453+#ifndef __TEST_COMMON_H__
454+
455+#include <glib.h>
456+
457+G_BEGIN_DECLS
458+
459+gboolean format_supported (const gchar *filename);
460+
461+G_END_DECLS
462+
463+#endif /* __TEST_COMMON_H__ */
464--
465cgit v0.9.2 \ No newline at end of file
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb
new file mode 100644
index 0000000000..50e54d8eab
--- /dev/null
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.3.bb
@@ -0,0 +1,105 @@
1SUMMARY = "Image loading library for GTK+"
2HOMEPAGE = "http://www.gtk.org/"
3BUGTRACKER = "https://bugzilla.gnome.org/"
4
5LICENSE = "LGPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
7 file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=5066b71daefeff678494fffa3040aba9"
8
9SECTION = "libs"
10
11DEPENDS = "glib-2.0"
12DEPENDS_append_linuxstdbase = " virtual/libx11"
13
14MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
15
16SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
17 file://hardcoded_libtool.patch \
18 file://extending-libinstall-dependencies.patch \
19 file://run-ptest \
20 file://tests-check.patch \
21 file://fatal-loader.patch \
22 "
23
24SRC_URI[md5sum] = "81161cc895eb43afd9ae7354b87e2261"
25SRC_URI[sha256sum] = "c229c53f59573eab9410b53690a4b9db770312c80a4d84ecd6295aa894574494"
26
27inherit autotools pkgconfig gettext pixbufcache ptest
28
29LIBV = "2.10.0"
30
31GDK_PIXBUF_LOADERS ?= "png jpeg"
32
33PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
34PACKAGECONFIG_linuxstdbase = "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${GDK_PIXBUF_LOADERS}"
35PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
36
37PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
38PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
39PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
40PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
41
42# Use GIO to sniff image format instead of trying all loaders
43PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info"
44PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
45
46EXTRA_OECONF = "\
47 --disable-introspection \
48 ${@base_contains('DISTRO_FEATURES', 'ptest', '--enable-installed-tests', '--disable-installed-tests', d)} \
49"
50
51PACKAGES =+ "${PN}-xlib"
52
53FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
54ALLOW_EMPTY_${PN}-xlib = "1"
55
56FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \
57 ${bindir}/gdk-pixbuf-pixdata \
58 ${libdir}/lib*.so.*"
59
60FILES_${PN}-dev += " \
61 ${bindir}/gdk-pixbuf-csource \
62 ${includedir}/* \
63 ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
64"
65
66FILES_${PN}-dbg += " \
67 ${libdir}/.debug/* \
68 ${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \
69"
70
71FILES_${PN}-ptest += "${libdir}/gdk-pixbuf/installed-tests \
72 ${datadir}/installed-tests/gdk-pixbuf"
73
74RDEPENDS_${PN}-ptest += "gnome-desktop-testing"
75
76PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
77PACKAGES_DYNAMIC_class-native = ""
78
79python populate_packages_prepend () {
80 postinst_pixbufloader = d.getVar("postinst_pixbufloader", True)
81
82 loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
83
84 packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
85 d.setVar('PIXBUF_PACKAGES', packages)
86
87 # The test suite exercises all the loaders, so ensure they are all
88 # dependencies of the ptest package.
89 d.appendVar("RDEPENDS_gdk-pixbuf-ptest", " " + packages)
90}
91
92do_install_append_class-native() {
93 find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
94
95 create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
96 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
97
98 create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
99 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
100
101 create_wrapper ${D}/${bindir}/gdk-pixbuf-query-loaders \
102 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
103 GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
104}
105BBCLASSEXTEND = "native"