Adjust rdep/rrec for gtk+* and gtk-icon-cache.bbclass
authorChris Larson <chris_larson@mentor.com>
Tue, 5 Oct 2010 16:07:31 +0000 (09:07 -0700)
committerChris Larson <chris_larson@mentor.com>
Tue, 5 Oct 2010 16:22:01 +0000 (09:22 -0700)
Drop the runtime dependencies / recommendations unless the recipe is for the
target.  This is necessary because right now bitbake obeys *_${PN}, even if
${PN} is not in PACKAGES.  This should kill the unnecessary build of the
crosscompiler when doing 'bitbake gtk+-native'.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
classes/gtk-icon-cache.bbclass
recipes/gtk+/gtk+.inc
recipes/gtk+/gtk+_2.20.1.bb

index 903680b..2449e95 100644 (file)
@@ -1,5 +1,6 @@
 FILES_${PN} += "${datadir}/icons/hicolor"
-RDEPENDS_${PN} += "hicolor-icon-theme"
+# Only add runtime dependency on hicolor-icon-theme for target recipes
+RDEPENDS_${PN} += "${@['', 'hicolor-icon-theme']['${PN}' == '${BPN}']}"
 
 # This could run on the host as icon cache files are architecture independent,
 # but there is no gtk-update-icon-cache built natively.
index 76e1a4f..42a8feb 100644 (file)
@@ -33,7 +33,6 @@ FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \
        ${libdir}/lib*.so.* \
        ${datadir}/themes ${sysconfdir} \
        ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so"
-RDEPENDS_${PN} = "hicolor-icon-theme"
 
 FILES_${PN}-dev += " \
        ${datadir}/gtk-2.0/include \
@@ -48,11 +47,13 @@ FILES_${PN}-dbg += " \
        ${libdir}/gtk-2.0/${LIBV}/engines/.debug/* \
        ${libdir}/gtk-2.0/${LIBV}/printbackends/.debug/*"
 
-NEATSTUFF = " ttf-dejavu-sans gdk-pixbuf-loader-png gdk-pixbuf-loader-jpeg gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm "
+NEATSTUFF = "ttf-dejavu-sans gdk-pixbuf-loader-png gdk-pixbuf-loader-jpeg gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm"
+NEATSTUFF_append_linux = " glibc-gconv-iso8859-1"
+NEATSTUFF_append_linux-gnueabi = " glibc-gconv-iso8859-1"
 
-RRECOMMENDS_${PN} = " ${NEATSTUFF} "
-RRECOMMENDS_${PN}_linux = " ${NEATSTUFF} glibc-gconv-iso8859-1 "
-RRECOMMENDS_${PN}_linux-gnueabi = " ${NEATSTUFF} glibc-gconv-iso8859-1"
+# Only add runtime dependencies for target recipe
+RDEPENDS_${PN} += "${@['', 'hicolor-icon-theme']['${PN}' == '${BPN}']}"
+RRECOMMENDS_${PN} += "${@['', '${NEATSTUFF}']['${PN}' == '${BPN}']}"
 
 do_install_append () {
        mkdir -p ${D}${libdir}/gtk-2.0/include
index f9367b7..6ef5e5b 100644 (file)
@@ -17,7 +17,6 @@ BBCLASSEXTEND = "native"
 ARM_INSTRUCTION_SET = "arm"
 
 DEPENDS_virtclass-native = "libpng-native atk-native pango-native cairo-native libxrender-native libxext-native libgcrypt-native"
-RRECOMMENDS_${PN}_virtclass-native = ""
 PROVIDES_virtclass-native = "gdk-pixbuf-csource-native"
 
 # Enable xkb selectively