<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7720</bug_id>
          
          <creation_ts>2015-05-06 03:06:14 +0000</creation_ts>
          <short_desc>make the world build work without x11 in DISTRO_FEATURES</short_desc>
          <delta_ts>2015-09-25 02:37:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.9 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>50809</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2015-05-06 03:06:14 +0000</bug_when>
    <thetext>Use distro_features_check and REQUIRED_DISTRO_FEATURES to make the world build work without x11 in REQUIRED_DISTRO_FEATURES.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54657</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2015-09-25 02:37:11 +0000</bug_when>
    <thetext>Most of the patches have been merged, the only left one is:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b2a93ca8e853d6479983408e6294c7fb38159c92
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5f21aa0776bef90142116344cbb6280434bf4eec
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f744f0b18c22daf8bdab837ba8096760b1ce00b8
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0ac9aa19373d1b7ecdf15a8b2adb07c9c947b164
[snip]

The only left one is, I will file new defect in 2.1 to track it.

The gtk+2 requires whether x11 or directfb to build, so we need enable
either of them. The cairo can be built without x11 or directfb, but gtk+
requires cairo, so enable x11 or directfb for cairo, too.

Signed-off-by: Robert Yang &lt;liezhi.yang@windriver.com&gt;
---
 meta/recipes-gnome/gtk+/gtk+.inc      |    5 ++---
 meta/recipes-graphics/cairo/cairo.inc |    8 ++++++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-gnome/gtk+/gtk+.inc b/meta/recipes-gnome/gtk+/gtk+.inc
index be5273d..9d697cdb 100644
--- a/meta/recipes-gnome/gtk+/gtk+.inc
+++ b/meta/recipes-gnome/gtk+/gtk+.inc
@@ -17,9 +17,8 @@ X11DEPENDS = &quot;virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender
 DEPENDS = &quot;glib-2.0 pango atk jpeg libpng gdk-pixbuf-native docbook-utils-native \
  cairo gdk-pixbuf&quot;
 
-PACKAGECONFIG ??= &quot;${@bb.utils.contains(&apos;DISTRO_FEATURES&apos;, &apos;x11&apos;, &apos;x11&apos;, &apos;&apos;, d)} \
-           ${@bb.utils.contains(&apos;DISTRO_FEATURES&apos;, &apos;directfb&apos;, &apos;directfb&apos;, &apos;&apos;, d)} \
-&quot;
+# Requires x11 or directfb
+PACKAGECONFIG ??= &quot;${@bb.utils.contains(&apos;DISTRO_FEATURES&apos;, &apos;x11&apos;, &apos;x11&apos;, &apos;directfb&apos;, d)}&quot;
 
 PACKAGECONFIG[x11] = &quot;--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}&quot;
 # without --with-gdktarget=directfb it will check for cairo-xlib which isn&apos;t available without X11 DISTRO_FEATURE
diff --git a/meta/recipes-graphics/cairo/cairo.inc b/meta/recipes-graphics/cairo/cairo.inc
index 1e45318..f6474bc 100644
--- a/meta/recipes-graphics/cairo/cairo.inc
+++ b/meta/recipes-graphics/cairo/cairo.inc
@@ -17,8 +17,12 @@ LICENSE_${PN}-perf-utils = &quot;GPLv3+&quot;
 X11DEPENDS = &quot;virtual/libx11 libsm libxrender libxext&quot;
 DEPENDS = &quot;libpng fontconfig pixman glib-2.0 zlib&quot;
 
-PACKAGECONFIG ??= &quot;${@bb.utils.contains(&apos;DISTRO_FEATURES&apos;, &apos;x11&apos;, &apos;x11 xcb&apos;, &apos;&apos;, d)} \
-           ${@bb.utils.contains(&apos;DISTRO_FEATURES&apos;, &apos;directfb&apos;, &apos;directfb&apos;, &apos;&apos;, d)}&quot;
+# Build cairo-xlib or cairo-directfb for gtk+
+PACKAGECONFIG ??= &quot; ${@bb.utils.contains(&apos;DISTRO_FEATURES&apos;, &apos;x11&apos;, &apos;x11 xcb&apos;, &apos;directfb&apos;, d)} \
+                    &quot;
+
+# No directfb-native, so set PACKAGECONFIG to null when no x11
+PACKAGECONFIG_class-native ??= &quot;${@bb.utils.contains(&apos;DISTRO_FEATURES&apos;, &apos;x11&apos;, &apos;x11&apos;, &apos;&apos;, d)}&quot;
 
 PACKAGECONFIG[x11] = &quot;--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}&quot;
 PACKAGECONFIG[xcb] = &quot;--enable-xcb,--disable-xcb,libxcb&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>