diff options
3 files changed, 5 insertions, 167 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc index 0b5fffb752..77b6c31536 100644 --- a/meta/recipes-gnome/gtk+/gtk+3.inc +++ b/meta/recipes-gnome/gtk+/gtk+3.inc | |||
@@ -72,10 +72,13 @@ do_install_append_class-nativesdk() { | |||
72 | } | 72 | } |
73 | 73 | ||
74 | do_install_append_class-native() { | 74 | do_install_append_class-native() { |
75 | # provided by gtk-icon-utils-native | 75 | create_wrapper ${D}/${bindir}/gtk-update-icon-cache \ |
76 | rm ${D}${bindir}/gtk-encode-symbolic-svg | 76 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache |
77 | create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \ | ||
78 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache | ||
77 | } | 79 | } |
78 | 80 | ||
81 | PROVIDES += "gtk-icon-utils" | ||
79 | PACKAGES =+ "${PN}-demo" | 82 | PACKAGES =+ "${PN}-demo" |
80 | LIBV = "3.0.0" | 83 | LIBV = "3.0.0" |
81 | 84 | ||
diff --git a/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.30.bb b/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.30.bb deleted file mode 100644 index 28e7a312d2..0000000000 --- a/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.22.30.bb +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | SUMMARY = "Native icon utils for GTK+" | ||
2 | DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution." | ||
3 | SECTION = "libs" | ||
4 | |||
5 | DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native" | ||
6 | |||
7 | LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" | ||
8 | |||
9 | MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" | ||
10 | |||
11 | SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \ | ||
12 | file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch" | ||
13 | SRC_URI[md5sum] = "61e60dc073e0a6893c72043d20579dc0" | ||
14 | SRC_URI[sha256sum] = "a1a4a5c12703d4e1ccda28333b87ff462741dc365131fbc94c218ae81d9a6567" | ||
15 | |||
16 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \ | ||
17 | file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \ | ||
18 | file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \ | ||
19 | file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1" | ||
20 | |||
21 | S = "${WORKDIR}/gtk+-${PV}" | ||
22 | |||
23 | inherit pkgconfig native | ||
24 | |||
25 | # versions >= 3.90 are development versions, otherwise like upstream-version-is-even | ||
26 | UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>3\.([1-8]?[02468])+(\.\d+)+)\.tar" | ||
27 | |||
28 | PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native" | ||
29 | |||
30 | do_configure() { | ||
31 | # Quite ugly but defines enough to compile the tools. | ||
32 | if ! test -f gtk/config.h; then | ||
33 | echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h | ||
34 | echo "#define HAVE_UNISTD_H 1" >> gtk/config.h | ||
35 | echo "#define HAVE_FTW_H 1" >> gtk/config.h | ||
36 | fi | ||
37 | if ! test -f gdk/config.h; then | ||
38 | touch gdk/config.h | ||
39 | fi | ||
40 | } | ||
41 | |||
42 | do_compile() { | ||
43 | ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \ | ||
44 | ${S}/gtk/updateiconcache.c \ | ||
45 | $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \ | ||
46 | -o gtk-update-icon-cache | ||
47 | |||
48 | ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \ | ||
49 | ${S}/gtk/encodesymbolic.c \ | ||
50 | $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \ | ||
51 | -o gtk-encode-symbolic-svg | ||
52 | } | ||
53 | |||
54 | do_install() { | ||
55 | install -d ${D}${bindir} | ||
56 | install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir} | ||
57 | install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir} | ||
58 | |||
59 | create_wrapper ${D}/${bindir}/gtk-update-icon-cache \ | ||
60 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache | ||
61 | create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \ | ||
62 | GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache | ||
63 | } | ||
diff --git a/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch b/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch deleted file mode 100644 index 237f803755..0000000000 --- a/meta/recipes-gnome/gtk+/gtk-icon-utils/Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | From 4d09ff324419fe4e671233044e424378da53969b Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Tue, 9 Jun 2015 14:20:30 +0300 | ||
4 | Subject: [PATCH] Remove Gdk-dependency from gtk-encode-symbolic-svg | ||
5 | |||
6 | Building gtk-encode-symbolic-svg without building Gdk is useful | ||
7 | as only the icon tools are needed on the native build: this makes | ||
8 | native build much faster and requires much less dependencies. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
13 | --- | ||
14 | gtk/encodesymbolic.c | 36 ++++++++++-------------------------- | ||
15 | 1 file changed, 10 insertions(+), 26 deletions(-) | ||
16 | |||
17 | diff --git a/gtk/encodesymbolic.c b/gtk/encodesymbolic.c | ||
18 | index 9f7d015..1f07563 100644 | ||
19 | --- a/gtk/encodesymbolic.c | ||
20 | +++ b/gtk/encodesymbolic.c | ||
21 | @@ -19,7 +19,6 @@ | ||
22 | |||
23 | #include <glib.h> | ||
24 | #include <gdk-pixbuf/gdk-pixdata.h> | ||
25 | -#include <gdk/gdk.h> | ||
26 | #include <glib/gi18n.h> | ||
27 | |||
28 | #ifdef HAVE_UNISTD_H | ||
29 | @@ -43,30 +42,18 @@ static GdkPixbuf * | ||
30 | load_symbolic_svg (char *file_data, gsize file_len, | ||
31 | int width, | ||
32 | int height, | ||
33 | - const GdkRGBA *fg, | ||
34 | - const GdkRGBA *success_color, | ||
35 | - const GdkRGBA *warning_color, | ||
36 | - const GdkRGBA *error_color, | ||
37 | + const char *css_fg, | ||
38 | + const char *css_success, | ||
39 | + const char *css_warning, | ||
40 | + const char *css_error, | ||
41 | GError **error) | ||
42 | { | ||
43 | GInputStream *stream; | ||
44 | GdkPixbuf *pixbuf; | ||
45 | - gchar *css_fg; | ||
46 | - gchar *css_success; | ||
47 | - gchar *css_warning; | ||
48 | - gchar *css_error; | ||
49 | gchar *data; | ||
50 | gchar *svg_width, *svg_height; | ||
51 | gchar *escaped_file_data; | ||
52 | |||
53 | - css_fg = gdk_rgba_to_string (fg); | ||
54 | - | ||
55 | - css_success = css_warning = css_error = NULL; | ||
56 | - | ||
57 | - css_warning = gdk_rgba_to_string (warning_color); | ||
58 | - css_error = gdk_rgba_to_string (error_color); | ||
59 | - css_success = gdk_rgba_to_string (success_color); | ||
60 | - | ||
61 | /* Fetch size from the original icon */ | ||
62 | stream = g_memory_input_stream_new_from_data (file_data, file_len, NULL); | ||
63 | pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, error); | ||
64 | @@ -105,10 +92,6 @@ load_symbolic_svg (char *file_data, gsize file_len, | ||
65 | "</svg>", | ||
66 | NULL); | ||
67 | g_free (escaped_file_data); | ||
68 | - g_free (css_fg); | ||
69 | - g_free (css_warning); | ||
70 | - g_free (css_error); | ||
71 | - g_free (css_success); | ||
72 | g_free (svg_width); | ||
73 | g_free (svg_height); | ||
74 | |||
75 | @@ -167,7 +150,8 @@ make_symbolic_pixbuf (char *file, | ||
76 | GError **error) | ||
77 | |||
78 | { | ||
79 | - GdkRGBA r = { 1,0,0,1}, g = {0,1,0,1}; | ||
80 | + const char r[] = "rgba(255,0,0,1)"; | ||
81 | + const char g[] = "rgba(0,255,0,1)"; | ||
82 | GdkPixbuf *loaded; | ||
83 | GdkPixbuf *pixbuf; | ||
84 | int plane; | ||
85 | @@ -196,10 +180,10 @@ make_symbolic_pixbuf (char *file, | ||
86 | * the "rest", as all color fractions should add up to 1. | ||
87 | */ | ||
88 | loaded = load_symbolic_svg (file_data, file_len, width, height, | ||
89 | - &g, | ||
90 | - plane == 0 ? &r : &g, | ||
91 | - plane == 1 ? &r : &g, | ||
92 | - plane == 2 ? &r : &g, | ||
93 | + g, | ||
94 | + plane == 0 ? r : g, | ||
95 | + plane == 1 ? r : g, | ||
96 | + plane == 2 ? r : g, | ||
97 | error); | ||
98 | if (loaded == NULL) | ||
99 | return NULL; | ||
100 | -- | ||
101 | 2.1.4 | ||
102 | |||