Revert "gtk+3: add librsvg to DEPENDS"
PATCH 1/3 Revert "gtk+3: add librsvg to DEPENDS"
This was added so that adwaita-icon-theme can find the SVG loader for icon generation, but the fix is in the wrong place. GTK+ does not depend on librsvg at all, the tool in GTK+ which loads the icons uses gdk-pixbuf which uses loadable modules.
This reverts commit 66828ff04d107b7719c9c8857d7c6c2ebf20a8bb.
--- meta/recipes-gnome/gtk+/gtk+3.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/gtk+/gtk+3.inc +1 -1
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.gtk.org" BUGTRACKER = "https://bugzilla.gnome.org/" SECTION = "libs" -DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf librsvg \ +DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \ gdk-pixbuf-native" LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
Signature · 1 line
2.11.0
PATCH 2/3 adwaita-icon-theme: depend on librsvg
adwaita-icon-theme uses gtk-encode-symbolic-svg to generate icons, so DEPEND on librsvg-native (and gtk+3-native, via gtk-icon-cache.bbclass) so that this tool exists and can load SVG files.
--- meta/recipes-gnome/gnome/adwaita-icon-theme_3.30.1.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-gnome/gnome/adwaita-icon-theme_3.30.1.bb +2 -1
@@ -8,7 +8,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c" inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even - MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ file://0001-Don-t-use-AC_CANONICAL_HOST.patch \
@@ -18,6 +17,8 @@ SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ SRC_URI[md5sum] = "db3fd812821d72fdd9a3c7d622a95b35" SRC_URI[sha256sum] = "6d752a2b1bc668483956d4485c39cad1642d9358e133ff689526e43674a4e1ce" +DEPENDS += "librsvg-native" + PACKAGES = "${PN}-cursors ${PN}-symbolic-hires ${PN}-symbolic ${PN}-hires ${PN}" RREPLACES_${PN} = "gnome-icon-theme"
Signature · 1 line
2.11.0
PATCH 3/3 gtk-icon-cache: clean up DEPENDS
In reply to Ross BurtonInstead of using DEPENDS += use _append to ensure that these additions can't get overwritten.
Also use gtk+3-native instead gtk-icon-utils-native as that recipe no longer exists and is provided by gtk+3-native for compatibility.
--- meta/classes/gtk-icon-cache.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/gtk-icon-cache.bbclass +2 -2
@@ -1,8 +1,8 @@ FILES_${PN} += "${datadir}/icons/hicolor" -DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk-icon-utils-native" +DEPENDS_append = " ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+3-native" -PACKAGE_WRITE_DEPS += "gtk-icon-utils-native gdk-pixbuf-native" +PACKAGE_WRITE_DEPS += "gtk+3-native gdk-pixbuf-native" gtk_icon_cache_postinst() { if [ "x$D" != "x" ]; then
Signature · 1 line
2.11.0
Re: [PATCH 3/3] gtk-icon-cache: clean up DEPENDS
Quoted 16 lines · Ross Burton
Instead of using DEPENDS += use
_appendto ensure that these additions can't get overwritten.Also use gtk+3-native instead gtk-icon-utils-native as that recipe no longer exists and is provided by gtk+3-native for compatibility.
Signed-off-by Ross Burton <[email protected]>--- meta/classes/gtk-icon-cache.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/classes/gtk-icon-cache.bbclass +0
-0
meta/classes/gtk-icon-cache.bbclass line 3
Quoted 4 lines
meta/classes/gtk-icon-cache.bbclass +1
-1@@ -1,8 +1,8 @@ FILES_${PN} += "${datadir}/icons/hicolor" -DEPENDS += "${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk-icon-utils-native" +DEPENDS_append = " ${@['hicolor-icon-theme', '']['${BPN}' == 'hicolor-icon-theme']} gtk+3-native"
I don't mind the changes themselves but I do have a bit of an issue with changing to use DEPENDS_append.
In general recipes should be doing DEPENDS += "xxx", unless its at the start of the recipe before any inherits (and even then += is fine).
_append is much harder to override and whilst it can be needed (e.g. the hoops base.bbclass has to jump through), I'd much prefer to encourage people to use +=.
I appreciate its a style thing and there is no "right" answer but its one do have a fairly strong preference over, mainly for the overridability. Our _append/_remove/_prepend operators are operators of last resort to me.
Cheers,
Richard