* [PATCH 1/4] gtk-update-icon-cache-native: add
2013-03-04 12:52 [PATCH 0/4] Don't build gtk+-native Ross Burton
@ 2013-03-04 12:52 ` Ross Burton
2013-03-05 9:17 ` Richard Purdie
2013-03-04 12:52 ` [PATCH 2/4] default-providers: add default virtual provider for gtk-update-icon-cache Ross Burton
` (3 subsequent siblings)
4 siblings, 1 reply; 7+ messages in thread
From: Ross Burton @ 2013-03-04 12:52 UTC (permalink / raw)
To: openembedded-core
This recipe builds natively just the gtk-update-icon-cache binary that is
required to run the gtk-icon-cache.bbclass postinstall scripts.
The advantage of doing this is it means running 400 less tasks which takes four
minutes on my machine, as the alternative is building GTK+ natively (and so
libX11, freetype, fontconfig...).
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
.../gtk+/gtk-update-icon-cache-native_3.4.4.bb | 44 ++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb
diff --git a/meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb b/meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb
new file mode 100644
index 0000000..5941bbd
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb
@@ -0,0 +1,44 @@
+SUMMARY = "gtk-update-icon-cache built natively"
+DESCRIPTION = "Just gtk-update-icon-cache built from GTK+ natively, for on-host postinst script execution."
+SECTION = "libs"
+
+PROVIDES = "virtual/gtk-update-icon-cache-native"
+
+DEPENDS = "gdk-pixbuf-native"
+
+LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+ file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+ file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+ file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
+
+SRC_URI = "http://download.gnome.org/sources/gtk+/3.4/gtk+-${PV}.tar.xz"
+SRC_URI[md5sum] = "1b2cf29502a6394e8d4b30f7f5bb9131"
+SRC_URI[sha256sum] = "f154e460075034da4c0ce89c320025dcd459da2a1fdf32d92a09522eaca242c7"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+inherit pkgconfig native
+
+PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
+
+do_configure() {
+ # Quite ugly but defines enough to compile the tool.
+ if ! test -f gtk/config.h; then
+ echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
+ echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
+ echo "#define HAVE_FTW_H 1" >> gtk/config.h
+
+ fi
+}
+
+do_compile() {
+ ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
+ -o gtk-update-icon-cache ${S}/gtk/updateiconcache.c
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
+}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/4] gtk-update-icon-cache-native: add
2013-03-04 12:52 ` [PATCH 1/4] gtk-update-icon-cache-native: add Ross Burton
@ 2013-03-05 9:17 ` Richard Purdie
0 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2013-03-05 9:17 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core
On Mon, 2013-03-04 at 12:52 +0000, Ross Burton wrote:
> This recipe builds natively just the gtk-update-icon-cache binary that is
> required to run the gtk-icon-cache.bbclass postinstall scripts.
>
> The advantage of doing this is it means running 400 less tasks which takes four
> minutes on my machine, as the alternative is building GTK+ natively (and so
> libX11, freetype, fontconfig...).
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
> .../gtk+/gtk-update-icon-cache-native_3.4.4.bb | 44 ++++++++++++++++++++
> 1 file changed, 44 insertions(+)
> create mode 100644 meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb
>
> diff --git a/meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb b/meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb
> new file mode 100644
> index 0000000..5941bbd
> --- /dev/null
> +++ b/meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb
> @@ -0,0 +1,44 @@
> +SUMMARY = "gtk-update-icon-cache built natively"
> +DESCRIPTION = "Just gtk-update-icon-cache built from GTK+ natively, for on-host postinst script execution."
> +SECTION = "libs"
> +
> +PROVIDES = "virtual/gtk-update-icon-cache-native"
> +
> +DEPENDS = "gdk-pixbuf-native"
> +
> +LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
> + file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
> + file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
> + file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
> +
> +SRC_URI = "http://download.gnome.org/sources/gtk+/3.4/gtk+-${PV}.tar.xz"
> +SRC_URI[md5sum] = "1b2cf29502a6394e8d4b30f7f5bb9131"
> +SRC_URI[sha256sum] = "f154e460075034da4c0ce89c320025dcd459da2a1fdf32d92a09522eaca242c7"
> +
> +S = "${WORKDIR}/gtk+-${PV}"
> +
> +inherit pkgconfig native
> +
> +PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
> +
> +do_configure() {
> + # Quite ugly but defines enough to compile the tool.
> + if ! test -f gtk/config.h; then
> + echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
> + echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
> + echo "#define HAVE_FTW_H 1" >> gtk/config.h
> +
> + fi
> +}
> +
> +do_compile() {
> + ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
> + -o gtk-update-icon-cache ${S}/gtk/updateiconcache.c
I saw failures when building locally for this, I think its down to
linker order. Moving ${S}/gtk/updateiconcache.c before the pkg-config
libs made it work...
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/4] default-providers: add default virtual provider for gtk-update-icon-cache
2013-03-04 12:52 [PATCH 0/4] Don't build gtk+-native Ross Burton
2013-03-04 12:52 ` [PATCH 1/4] gtk-update-icon-cache-native: add Ross Burton
@ 2013-03-04 12:52 ` Ross Burton
2013-03-04 12:52 ` [PATCH 3/4] gtk+: mark as provider of virtual/gtk-update-icon-cache-native Ross Burton
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Ross Burton @ 2013-03-04 12:52 UTC (permalink / raw)
To: openembedded-core
Use a virtual provider instead of a hard dependency so that if gtk+-native is
required in some configuration, this provider can be changed and then
gtk+-native and gtk-update-icon-cache-native won't be both built and conflict in
the sysroot.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/conf/distro/include/default-providers.inc | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index 444176c..ebf2a09 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -12,6 +12,7 @@ PREFERRED_PROVIDER_virtual/update-alternatives ?= "opkg"
PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-native"
PREFERRED_PROVIDER_virtual/libx11 ?= "libx11"
PREFERRED_PROVIDER_xf86-video-intel ?= "xf86-video-intel"
+PREFERRED_PROVIDER_virtual/gtk-update-icon-cache-native ?= "gtk-update-icon-cache-native"
#
# Default virtual runtime providers
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 3/4] gtk+: mark as provider of virtual/gtk-update-icon-cache-native
2013-03-04 12:52 [PATCH 0/4] Don't build gtk+-native Ross Burton
2013-03-04 12:52 ` [PATCH 1/4] gtk-update-icon-cache-native: add Ross Burton
2013-03-04 12:52 ` [PATCH 2/4] default-providers: add default virtual provider for gtk-update-icon-cache Ross Burton
@ 2013-03-04 12:52 ` Ross Burton
2013-03-04 12:52 ` [PATCH 4/4] gtk-icon-cache: use virtual/gtk-update-icon-cache-native instead of gtk+-native Ross Burton
2013-03-05 23:49 ` [PATCH 0/4] Don't build gtk+-native Richard Purdie
4 siblings, 0 replies; 7+ messages in thread
From: Ross Burton @ 2013-03-04 12:52 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/recipes-gnome/gtk+/gtk+.inc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/recipes-gnome/gtk+/gtk+.inc b/meta/recipes-gnome/gtk+/gtk+.inc
index 8c2b977..f05838a 100644
--- a/meta/recipes-gnome/gtk+/gtk+.inc
+++ b/meta/recipes-gnome/gtk+/gtk+.inc
@@ -10,6 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
SECTION = "libs"
+PROVIDES_class-native = "virtual/gtk-update-icon-cache-native"
+
X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native docbook-utils-native \
libgcrypt cairo gdk-pixbuf"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] gtk-icon-cache: use virtual/gtk-update-icon-cache-native instead of gtk+-native
2013-03-04 12:52 [PATCH 0/4] Don't build gtk+-native Ross Burton
` (2 preceding siblings ...)
2013-03-04 12:52 ` [PATCH 3/4] gtk+: mark as provider of virtual/gtk-update-icon-cache-native Ross Burton
@ 2013-03-04 12:52 ` Ross Burton
2013-03-05 23:49 ` [PATCH 0/4] Don't build gtk+-native Richard Purdie
4 siblings, 0 replies; 7+ messages in thread
From: Ross Burton @ 2013-03-04 12:52 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/classes/gtk-icon-cache.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index 223a280..a5d642c 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -1,6 +1,6 @@
FILES_${PN} += "${datadir}/icons/hicolor"
-DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+-native"
+DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} virtual/gtk-update-icon-cache-native"
#
# On host, the postinstall MUST return 1 because we do not know if the intercept
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 0/4] Don't build gtk+-native
2013-03-04 12:52 [PATCH 0/4] Don't build gtk+-native Ross Burton
` (3 preceding siblings ...)
2013-03-04 12:52 ` [PATCH 4/4] gtk-icon-cache: use virtual/gtk-update-icon-cache-native instead of gtk+-native Ross Burton
@ 2013-03-05 23:49 ` Richard Purdie
4 siblings, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2013-03-05 23:49 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core
On Mon, 2013-03-04 at 12:52 +0000, Ross Burton wrote:
> We're building gtk+-native (so the X stack, freetype, fontconfig, etc etc) just
> to run gtk-update-icon-cache on the host when building the rootfs.
>
> This series adds a recipe that builds just that binary from a GTK+ tarball using
> a bit of hackery.
>
> For a benchmark of building sato-icon-theme from nothing (no sstate or tmp):
>
> master takes 13:25 to run 1037 tasks.
> ross/gtk takes 9:26 to run 629 tasks.
>
> So that's a four minute gain and 400 less tasks.
Here, my core-image-sato build from populated DL_DIR time fell by about
2.5 minutes due to this changeset (46:59 to 44:17 mins) so a 5% speedup.
Nice! :)
It would seemingly make around six seconds on "bitbake core-image-sato
-c rootfs" from sstate too (5m25 ish).
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread