Skip to contentSkip to conversation

make world build work without x11 in DISTRO_FEATURES

PATCH In review Robert Yang 2 participants 19 messages May 11, 2015 – Jun 3, 2015 Arm/actions semi architecture

lore
Share & tools
lore
#0 lore raw

cover make world build work without x11 in DISTRO_FEATURES

Hello,

These patches make world build OK without x11 in DISTRO_FEATURES, please feel free to give your comments.

I'm trying to make the commits by directories, if there is only one recipe in the directory that I have edited, then use the recipe name.

I've added comments in the patch on why it needs x11 in DISTRO_FEATURES, please see the patch for more info.

// Robert

The following changes since commit 7ffe10df73cc20d10fcd41b121074445273bd60e:

license_class: license_create_manifest improvment (2015-05-09 22:26:02 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/no_x11
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/no_x11

Robert Yang (12):
mesa: fix do_install_append
gtk+/cairo: enable x11 or directfb
mesa-demos: only enable glu when x11 in DISTRO_FEATURES
libglu: add x11 to REQUIRED_DISTRO_FEATURES
libsdl: depends on libglu when x11 libowl/settings-daemon/libnotify: add x11 to REQUIRED_DISTRO_FEATURES
recipes-extended: add x11 to REQUIRED_DISTRO_FEATURES
recipes-graphics: add x11 to REQUIRED_DISTRO_FEATURES
gst-plugins-gl: add x11 to REQUIRED_DISTRO_FEATURES
packagegroup-core-qt: add x11 to REQUIRED_DISTRO_FEATURES
recipes-sato: add x11 to REQUIRED_DISTRO_FEATURES
at-spi2-atk: add x11 to REQUIRED_DISTRO_FEATURES

 .../packagegroups/packagegroup-core-lsb.bb         |    5 ++++-
 .../xdg-utils/xdg-utils_1.1.0-rc1.bb               |    5 ++++-
 meta/recipes-gnome/gtk+/gtk+.inc                   |    5 ++---
 meta/recipes-gnome/libnotify/libnotify_0.6.0.bb    |    6 +++++-
 meta/recipes-graphics/cairo/cairo.inc              |    7 +++++--
 meta/recipes-graphics/libepoxy/libepoxy_1.2.bb     |    5 ++++-
 meta/recipes-graphics/libfakekey/libfakekey_git.bb |    5 ++++-
 meta/recipes-graphics/libsdl/libsdl_1.2.15.bb      |    4 ++--
 meta/recipes-graphics/mesa/libglu_9.0.0.bb         |    5 ++++-
 meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb     |    4 ++--
 meta/recipes-graphics/mesa/mesa_10.5.4.bb          |    2 +-
 meta/recipes-graphics/mesa/mesa_git.bb             |    2 +-
 meta/recipes-graphics/waffle/waffle_1.3.0.bb       |    5 ++++-
 .../xorg-font/xorg-font-common.inc                 |    6 +++++-
 .../xorg-font/xorg-minimal-fonts.bb                |    5 ++++-
 meta/recipes-graphics/xorg-lib/libxcb.inc          |    5 ++++-
 meta/recipes-graphics/xorg-lib/xcb-util.inc        |    4 +++-
 .../xvideo-tests/xvideo-tests_git.bb               |    5 ++++-
 .../gstreamer/gst-plugins-gl_0.10.3.bb             |    5 ++++-
 .../packagegroups/packagegroup-core-qt.bb          |    5 ++++-
 meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb      |    8 +++++---
 meta/recipes-sato/libowl/libowl_git.bb             |    5 ++++-
 .../matchbox-config-gtk/matchbox-config-gtk_git.bb |    4 +++-
 .../matchbox-desktop/matchbox-desktop_git.bb       |    5 ++++-
 .../matchbox-keyboard/matchbox-keyboard_git.bb     |    5 ++++-
 .../matchbox-panel-2/matchbox-panel-2_git.bb       |    5 ++++-
 .../matchbox-sato/matchbox-session-sato_0.1.bb     |    5 +++++
 .../matchbox-theme-sato/matchbox-theme-sato.inc    |    5 ++++-
 meta/recipes-sato/midori/midori_0.5.8.bb           |    5 ++++-
 meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb         |    5 ++++-
 meta/recipes-sato/puzzles/oh-puzzles_git.bb        |    9 +++++++--
 meta/recipes-sato/puzzles/puzzles_r10116.bb        |    5 ++++-
 .../sato-screenshot/sato-screenshot_git.bb         |    5 ++++-
 .../settings-daemon/settings-daemon_git.bb         |    5 ++++-
 meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb       |    5 ++++-
 meta/recipes-support/atk/at-spi2-atk_2.16.0.bb     |    5 ++++-
 36 files changed, 138 insertions(+), 43 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/12 mesa: fix do_install_append

"ifdef MESA_EGL_NO_X11_HEADERS" -> "if defined(MESA_EGL_NO_X11_HEADERS)"

---
 meta/recipes-graphics/mesa/mesa_10.5.4.bb |    2 +-
 meta/recipes-graphics/mesa/mesa_git.bb    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa_10.5.4.bb +1 -1
index 150c664..03c9ecf 100644
@@ -9,6 +9,6 @@ SRC_URI[sha256sum] = "b51e723f3a20d842c88a92d809435b229fc4744ca0dbec0317d9d4a3ac
 #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
 do_install_append() {
     if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
-        sed -i -e 's/^#ifdef MESA_EGL_NO_X11_HEADERS/#if ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)/#if ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
     fi
 }
meta/recipes-graphics/mesa/mesa_git.bb +1 -1
index 0260617..8f70f67 100644
@@ -17,6 +17,6 @@ inherit pythonnative
 #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
 do_install_append() {
     if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
-        sed -i -e 's/^#ifdef MESA_EGL_NO_X11_HEADERS/#if ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)/#if ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
     fi
 }
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/12 gtk+/cairo: enable x11 or directfb

In reply to Robert Yang

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.

---
 meta/recipes-gnome/gtk+/gtk+.inc      |    5 ++---
 meta/recipes-graphics/cairo/cairo.inc |    7 +++++--
 2 files changed, 7 insertions(+), 5 deletions(-)
meta/recipes-gnome/gtk+/gtk+.inc +2 -3
index 1c0558c..fcfb86f 100644
@@ -14,9 +14,8 @@ X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender
 DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native docbook-utils-native \
  cairo gdk-pixbuf"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-"
+# Requires x11 or directfb
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'directfb', d)}"
 
 PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
 # without --with-gdktarget=directfb it will check for cairo-xlib which isn't available without X11 DISTRO_FEATURE
meta/recipes-graphics/cairo/cairo.inc +5 -2
index 98add5a..f1aca9b 100644
@@ -17,8 +17,11 @@ LICENSE_${PN}-perf-utils = "GPLv3+"
 X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
+# Build cairo-xlib or cairo-directfb for gtk+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'directfb', d)}"
+# No directfb-native, so set PACKAGECONFIG to null when no x11
+PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+
 PACKAGECONFIG[x11] = "--with-x=yes,--without-x,${X11DEPENDS}"
 PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
 PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
Signature · 1 line
1.7.9.5
#3 lore raw

Re: [PATCH 02/12] gtk+/cairo: enable x11 or directfb

Hello,

Other patches have been merged except this one, any comments on it, please ?

// Robert

Quoted 45 lines · Robert Yang

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.

---
  meta/recipes-gnome/gtk+/gtk+.inc      |    5 ++---
  meta/recipes-graphics/cairo/cairo.inc |    7 +++++--
  2 files changed, 7 insertions(+), 5 deletions(-)
meta/recipes-gnome/gtk+/gtk+.inc +2 -3
index 1c0558c..fcfb86f 100644
@@ -14,9 +14,8 @@ X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender
  DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native docbook-utils-native \
   cairo gdk-pixbuf"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-"
+# Requires x11 or directfb
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'directfb', d)}"
 
  PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
  # without --with-gdktarget=directfb it will check for cairo-xlib which isn't available without X11 DISTRO_FEATURE
meta/recipes-graphics/cairo/cairo.inc +5 -2
index 98add5a..f1aca9b 100644
@@ -17,8 +17,11 @@ LICENSE_${PN}-perf-utils = "GPLv3+"
  X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
+# Build cairo-xlib or cairo-directfb for gtk+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'directfb', d)}"
+# No directfb-native, so set PACKAGECONFIG to null when no x11
+PACKAGECONFIG_class-native ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+
  PACKAGECONFIG[x11] = "--with-x=yes,--without-x,${X11DEPENDS}"
  PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb"
  PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
#4 lore raw

PATCH 3/12 mesa-demos: only enable glu when x11 in DISTRO_FEATURES

In reply to Robert Yang

Fixed when no x11 in DISTRO_FEATURES:
checking for GL/glu.h... no
configure: error: GLU not found

The GL/glu.h is provided by libglu, and libglu requires libGL.so which is provided by mesa, but mesa doesn't build out libGL.so without x11 in DISTRO_FEATURES, so only enable glu when x11 in DISTRO_FEATURES.

---
 meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb +2 -2
index 1caa50b..e565442 100644
@@ -25,8 +25,8 @@ SRC_URI[sha256sum] = "e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f
 
 inherit autotools pkgconfig
 
-PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 glu \
-                  ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew', '', d)}"
+PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
+                  ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew glu', '', d)}"
 
 # The Wayland code doesn't work with Wayland 1.0, so disable it for now
 #${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH 4/12 libglu: add x11 to REQUIRED_DISTRO_FEATURES

In reply to Robert Yang

It requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES.

---
 meta/recipes-graphics/mesa/libglu_9.0.0.bb |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-graphics/mesa/libglu_9.0.0.bb +4 -1
index 06d30f9..010998d 100644
@@ -21,7 +21,10 @@ S = "${WORKDIR}/glu-${PV}"
 
 DEPENDS = "virtual/libgl"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+
+# Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 # Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty
 RDEPENDS_${PN}-dev = ""
Signature · 1 line
1.7.9.5
#6 lore raw

PATCH 5/12 libsdl: depends on libglu when x11

In reply to Robert Yang

Let it depend on libglu when x11 rather than opengl, since libglu can't be built without x11.

---
 meta/recipes-graphics/libsdl/libsdl_1.2.15.bb |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-graphics/libsdl/libsdl_1.2.15.bb +2 -2
index 266bd42..06490aa 100644
@@ -13,8 +13,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=27818cd7fd83877a8e3ef82b82798ef4"
 PROVIDES = "virtual/libsdl"
 
 DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl libglu', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxext libxrandr libxrender', '', d)} \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)} \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxext libxrandr libxrender libglu', '', d)} \
            tslib"
 DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
 
Signature · 1 line
1.7.9.5
#7 lore raw

Re: [PATCH 05/12] libsdl: depends on libglu when x11

Quoted 3 lines · Robert Yang

Let it depend on libglu when x11 rather than opengl, since libglu can't be built without x11.

But you can build libsdl with X11 enabled and OpenGL disabled, which then refuses to build as libsdl depends on libglu depends on virtual/opengl which refuses to build.

I've just sent a revert for this, but was there a problem this was attempting to fix?

Ross

#8 lore raw

Re: [PATCH 05/12] libsdl: depends on libglu when x11

Quoted 3 lines · Ross

I've just sent a revert for this, but was there a problem this was attempting to fix?

Just realised - opengl enabled and x11 disabled in DISTRO_FEATURES. I guess you need to make the GL support depend on opengl *and* x11. Tested patches for all combinations of those features welcome :)

Ross

#9 lore raw

Re: [PATCH 05/12] libsdl: depends on libglu when x11

Quoted 11 lines · Ross

On 15 May 2015 at 20:59, Burton, Ross <[email protected] <mailto:[email protected]>> wrote:

I've just sent a revert for this, but was there a problem this was attempting to fix?

Just realised - opengl enabled and x11 disabled in DISTRO_FEATURES. I guess you need to make the GL support depend on opengl *and* x11. Tested patches for all combinations of those features welcome :)

Hi Ross,

Yes, you are right, the libsdl can be built when only x11 or opengl in DISTRO_FEATURES, but libglu requires both of them, I will send a patch to fix the problem.

// Robert

Quoted 2 lines

Ross

#10 lore raw

PATCH 6/12 libowl/settings-daemon/libnotify: add x11 to REQUIRED_DISTRO_FEATURES

In reply to Robert Yang

The libowl, settings-daemon and libnotify requires gdk/gdkx.h which is provided by gtk when x11 in DISTRO_FEATURES, so add x11 to REQUIRED_DISTRO_FEATURES.

The leafpad, settings-daemon and oh-puzzles requires libowl or settings-daemon, so add xx to REQUIRED_DISTRO_FEATURES for them too.

The leafpad can't be built without libowl, so depends in directly rather than use DEPENDS_append_poky.

---
 meta/recipes-gnome/libnotify/libnotify_0.6.0.bb    |    6 +++++-
 meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb      |    8 +++++---
 meta/recipes-sato/libowl/libowl_git.bb             |    5 ++++-
 .../matchbox-config-gtk/matchbox-config-gtk_git.bb |    4 +++-
 meta/recipes-sato/puzzles/oh-puzzles_git.bb        |    9 +++++++--
 .../settings-daemon/settings-daemon_git.bb         |    5 ++++-
 6 files changed, 28 insertions(+), 9 deletions(-)
meta/recipes-gnome/libnotify/libnotify_0.6.0.bb +5 -1
index 1d92b64..e6ee89b 100644
@@ -7,7 +7,11 @@ PR = "r1"
 
 DEPENDS = "dbus gtk+ dbus-glib"
 
-inherit gnomebase
+inherit gnomebase distro_features_check
+
+# Requires gdk/gdkx.h which is provided by gtk when x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
 SRC_URI[archive.md5sum] = "732c9d2cd5eb6a9069264a319d330516"
 SRC_URI[archive.sha256sum] = "73b16a79bb2fed62dcf146b11c4405776cb96a09dce66379ca541da7dbd64210"
 
meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb +5 -3
index 830c053..f715149 100644
@@ -6,8 +6,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
                     file://src/leafpad.h;endline=20;md5=d3d6a89f5e61e8b13bdea537511ba1fa \
                     file://src/utils.c;endline=20;md5=0d2cc6584ba3202448bb274f62739571"
 
-DEPENDS = "gtk+ intltool-native"
-DEPENDS_append_poky = " libowl"
+DEPENDS = "gtk+ intltool-native libowl"
+# The libowl requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
 SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
 	   file://leafpad.desktop"
 
@@ -17,7 +19,7 @@ PR = "r2"
 
 SRC_URI_append_poky = " file://owl-menu.patch;apply=yes "
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
 
 EXTRA_OECONF = " --enable-chooser --disable-emacs --disable-print"
 
meta/recipes-sato/libowl/libowl_git.bb +4 -1
index 3ccd340..9cc47db 100644
@@ -17,4 +17,7 @@ SRC_URI = "git://git.yoctoproject.org/${BPN}"
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+
+# Requires gdk/gdkx.h which is provided by gtk when x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
meta/recipes-sato/matchbox-config-gtk/matchbox-config-gtk_git.bb +3 -1
index f0119b7..5f73a4c 100644
@@ -17,5 +17,7 @@ S = "${WORKDIR}/git"
 SRC_URI = "git://git.yoctoproject.org/${BPN} \
         file://no-handed.patch;striplevel=0"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
 
+# The settings-daemon requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
meta/recipes-sato/puzzles/oh-puzzles_git.bb +7 -2
index bd762e9..36cd2cc 100644
@@ -9,7 +9,12 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=f56ec6772dd1c7c367067bbea8ea1675 \
 
 SECTION = "x11"
 DEPENDS = "gtk+ gconf intltool-native librsvg"
-DEPENDS_append_poky = " libowl"
+
+# libowl requires x11 in DISTRO_FEATURES
+DEPENDS_append_poky = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libowl', '', d)}"
+
+# Requires gdk/gdkx.h which is provided by gtk when x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 SRCREV = "92f1a20e4b72eed7a35b00984d9793b51dc2fb3b"
 PV = "0.2+git${SRCPV}"
@@ -20,7 +25,7 @@ SRC_URI_append_poky = " file://oh-puzzles-owl-menu.patch;striplevel=0 "
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
 
 bindir = "/usr/games"
 
meta/recipes-sato/settings-daemon/settings-daemon_git.bb +4 -1
index ba48d90..c061553 100644
@@ -17,10 +17,13 @@ SRC_URI = "git://git.yoctoproject.org/xsettings-daemon \
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig gconf
+inherit autotools pkgconfig gconf distro_features_check
 
 FILES_${PN} = 	"${bindir}/* ${sysconfdir}"
 
+# Requires gdk-x11-2.0 which is provided by gtk when x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
 do_install_append () {
 	install -d ${D}/${sysconfdir}/X11/Xsession.d
 	install -m 755 ${WORKDIR}/70settings-daemon.sh ${D}/${sysconfdir}/X11/Xsession.d/
Signature · 1 line
1.7.9.5
#11 lore raw

PATCH 7/12 recipes-extended: add x11 to REQUIRED_DISTRO_FEATURES

In reply to Robert Yang

They can't be built withou x11 in DISTRO_FEATURES.

---
 .../packagegroups/packagegroup-core-lsb.bb         |    5 ++++-
 .../xdg-utils/xdg-utils_1.1.0-rc1.bb               |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb +4 -1
index a07a6ad..3d5075e 100644
@@ -7,7 +7,10 @@ DESCRIPTION = "Packages required to satisfy the Linux Standard Base (LSB) specif
 PR = "r10"
 LICENSE = "MIT"
 
-inherit packagegroup
+inherit packagegroup distro_features_check
+
+# The libxt, libxtst and others require x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 #
 # We will skip parsing this packagegeoup for non-glibc systems
meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb +4 -1
index 2ac979b..46f1e3c 100644
@@ -24,6 +24,9 @@ SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
 SRC_URI[md5sum] = "fadf5e7a08e0526fc60dbe3e5b7ef8d6"
 SRC_URI[sha256sum] = "7b05558ae4bb8ede356863cae8c42e3e012aa421bf9d45130a570fd209d79102"
 
-inherit autotools-brokensep
+inherit autotools-brokensep distro_features_check
+
+# The xprop requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 RDEPENDS_${PN} += "xprop"
Signature · 1 line
1.7.9.5
#12 lore raw

PATCH 8/12 recipes-graphics: add x11 to REQUIRED_DISTRO_FEATURES

In reply to Robert Yang

They can't be built withou x11 in DISTRO_FEATURES.

---
 meta/recipes-graphics/libepoxy/libepoxy_1.2.bb     |    5 ++++-
 meta/recipes-graphics/libfakekey/libfakekey_git.bb |    5 ++++-
 meta/recipes-graphics/waffle/waffle_1.3.0.bb       |    5 ++++-
 .../xorg-font/xorg-font-common.inc                 |    6 +++++-
 .../xorg-font/xorg-minimal-fonts.bb                |    5 ++++-
 meta/recipes-graphics/xorg-lib/libxcb.inc          |    5 ++++-
 meta/recipes-graphics/xorg-lib/xcb-util.inc        |    4 +++-
 .../xvideo-tests/xvideo-tests_git.bb               |    5 ++++-
 8 files changed, 32 insertions(+), 8 deletions(-)
meta/recipes-graphics/libepoxy/libepoxy_1.2.bb +4 -1
index 4fbc861..1934fae 100644
@@ -11,6 +11,9 @@ SRCREV="7422de5b4be7b19d789136b3bb5f932de42db27c"
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+
+# The virtual/libx11 requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 DEPENDS = "util-macros virtual/egl virtual/libx11"
meta/recipes-graphics/libfakekey/libfakekey_git.bb +4 -1
index 862fe38..c60ddea 100644
@@ -17,4 +17,7 @@ SRC_URI = "git://git.yoctoproject.org/${BPN}"
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig gettext
+inherit autotools pkgconfig gettext distro_features_check
+
+# The libxtst requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
meta/recipes-graphics/waffle/waffle_1.3.0.bb +4 -1
index fe9609c..a21fcbb 100644
@@ -7,12 +7,15 @@ SRC_URI = "http://people.freedesktop.org/~chadversary/waffle/files/release/${BPN
 SRC_URI[md5sum] = "5020ecc249096c881e1f59ee961f3d41"
 SRC_URI[sha256sum] = "340ee04172dba878249469018cd7ec9d1ecd41af26b612c741b8b52e713bca8e"
 
-inherit cmake
+inherit cmake distro_features_check
 
 # This should be overridden per-machine to reflect the capabilities of the GL
 # stack.
 PACKAGECONFIG ??= "glx"
 
+# libx11 requires x11 in DISTRO_FEATURES.
+REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'glx', 'x11', '', d)}"
+
 # I say virtual/libgl, actually wants gl.pc
 PACKAGECONFIG[glx] = "-Dwaffle_has_glx=1,,virtual/libgl libx11"
 
meta/recipes-graphics/xorg-font/xorg-font-common.inc +5 -1
index d3b995a..d5267f59 100644
@@ -10,10 +10,14 @@ RDEPENDS_${PN} = "encodings font-util font-alias"
 XORG_PN = "${BPN}"
 INC_PR = "r2"
 
+
 SRC_URI = "${XORG_MIRROR}/individual/font/${XORG_PN}-${PV}.tar.bz2"
 S = "${WORKDIR}/${XORG_PN}-${PV}"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+
+# The mkfontscale-native requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 EXTRA_OEMAKE += "FCCACHE=/bin/true UTIL_DIR=${STAGING_DIR_TARGET}\$\(MAPFILES_PATH\)"
 
meta/recipes-graphics/xorg-font/xorg-minimal-fonts.bb +4 -1
index bee500b..9bcd1b2 100644
@@ -13,7 +13,10 @@ SRC_URI = "file://misc"
 PE = "1"
 PR = "r2"
 
-inherit allarch
+inherit allarch distro_features_check
+
+# The font-alias requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 S = "${WORKDIR}/misc"
 
meta/recipes-graphics/xorg-lib/libxcb.inc +4 -1
index 453f550..fe31f20 100644
@@ -20,7 +20,10 @@ PACKAGES_DYNAMIC = "^libxcb-.*"
 
 FILES_${PN} = "${libdir}/libxcb.so.*"
 
-inherit autotools pkgconfig pythonnative
+inherit autotools pkgconfig pythonnative distro_features_check
+
+# The libxau and others requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 python populate_packages_prepend () {
     do_split_packages(d, '${libdir}', '^libxcb-(.*)\.so\..*$', 'libxcb-%s', 'XCB library module for %s', allow_links=True)
meta/recipes-graphics/xorg-lib/xcb-util.inc +3 -1
index d15cf9f..99d04f9 100644
@@ -18,4 +18,6 @@ DEPENDS += "gperf-native"
 
 SRC_URI = "http://xcb.freedesktop.org/dist/${BPN}-${PV}.tar.bz2"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb +4 -1
index 27aacde..9b3c9e0 100644
@@ -11,4 +11,7 @@ SRC_URI = "git://git.yoctoproject.org/test-xvideo"
 
 S = "${WORKDIR}/git"
 
-inherit autotools
+inherit autotools distro_features_check
+
+# The libxv requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
Signature · 1 line
1.7.9.5
#13 lore raw

PATCH 9/12 gst-plugins-gl: add x11 to REQUIRED_DISTRO_FEATURES

In reply to Robert Yang

It can't be built withou x11 in DISTRO_FEATURES.

---
 .../gstreamer/gst-plugins-gl_0.10.3.bb             |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb +4 -1
index 90efbcc..635f522 100644
@@ -10,9 +10,12 @@ SRC_URI += " file://0001-conditional-gl-framebuffer-undefined-use.patch"
 
 DEPENDS += "gst-plugins-base virtual/libgles2 virtual/egl jpeg libpng glew"
 
+# The glew requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
 PR = "r4"
 
-inherit gettext
+inherit gettext distro_features_check
 
 # This package doesn't have a configure switch for EGL or GL, so forcibly tell
 # configure that it can't find gl.h so it always uses EGL.  If/when we have some
Signature · 1 line
1.7.9.5
#14 lore raw

PATCH 10/12 packagegroup-core-qt: add x11 to REQUIRED_DISTRO_FEATURES

In reply to Robert Yang

It can't be built withou x11 in DISTRO_FEATURES.

---
 .../packagegroups/packagegroup-core-qt.bb          |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-qt/packagegroups/packagegroup-core-qt.bb +4 -1
index 5f6916a..b81f8a3 100644
@@ -9,7 +9,10 @@ PR = "r4"
 # Qt4 could NOT be built on MIPS64 with 64 bits userspace
 COMPATIBLE_HOST_mips64 = "null"
 
-inherit packagegroup
+inherit packagegroup distro_features_check
+
+# The quicky and fotowall requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 PACKAGES = "${PN}-demoapps"
 
Signature · 1 line
1.7.9.5
#15 lore raw

Re: [PATCH 10/12] packagegroup-core-qt: add x11 to REQUIRED_DISTRO_FEATURES

meta/recipes-qt/packagegroups/packagegroup-core-qt.bb PR = "r4" · line 15

Quoted 3 lines · Robert Yang
meta/recipes-qt/packagegroups/packagegroup-core-qt.bb +2 -0
+# The quicky and fotowall requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"

As this is a helper packagegroup, would it make sense to have these as optional dependencies based on DISTRO_FEATURES instead?

Ross

#16 lore raw

Re: [PATCH 10/12] packagegroup-core-qt: add x11 to REQUIRED_DISTRO_FEATURES

Quoted 10 lines · Ross

On 11 May 2015 at 07:08, Robert Yang <[email protected] <mailto:[email protected]>> wrote:

+# The quicky and fotowall requires x11 in DISTRO_FEATURES +REQUIRED_DISTRO_FEATURES = "x11"

As this is a helper packagegroup, would it make sense to have these as optional dependencies based on DISTRO_FEATURES instead?

Hi Ross,

The packagegroup-core-qt RDEPENDS on 3 packages:

QTDEMOS ?= "quicky ${COMMERCIAL_QT} fotowall"

Both quicky and fotowall requires x11. The COMMERCIAL_QT(such as qmmp) requires commercial license, I think that it also requires x11 (I will fix it in other patches). Use optional dependencies based on DISTRO_FEATURES for packagegroup-core-qt would make it rdepends on nothing, so I didn't use that.

// Robert

Quoted 2 lines

Ross

#17 lore raw

PATCH 11/12 recipes-sato: add x11 to REQUIRED_DISTRO_FEATURES

In reply to Robert Yang

They can't be built withou x11 in DISTRO_FEATURES.

---
 .../matchbox-desktop/matchbox-desktop_git.bb       |    5 ++++-
 .../matchbox-keyboard/matchbox-keyboard_git.bb     |    5 ++++-
 .../matchbox-panel-2/matchbox-panel-2_git.bb       |    5 ++++-
 .../matchbox-sato/matchbox-session-sato_0.1.bb     |    5 +++++
 .../matchbox-theme-sato/matchbox-theme-sato.inc    |    5 ++++-
 meta/recipes-sato/midori/midori_0.5.8.bb           |    5 ++++-
 meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb         |    5 ++++-
 meta/recipes-sato/puzzles/puzzles_r10116.bb        |    5 ++++-
 .../sato-screenshot/sato-screenshot_git.bb         |    5 ++++-
 meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb       |    5 ++++-
 10 files changed, 41 insertions(+), 9 deletions(-)
meta/recipes-sato/matchbox-desktop/matchbox-desktop_git.bb +4 -1
index 29b472a..318d2e0 100644
@@ -19,4 +19,7 @@ EXTRA_OECONF = "--enable-startup-notification --with-dbus"
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+
+# The startup-notification requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb +4 -1
index 7a99a9c..0d321d3 100644
@@ -20,7 +20,10 @@ SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1 \
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig gettext gtk-immodules-cache
+inherit autotools pkgconfig gettext gtk-immodules-cache distro_features_check
+
+# The libxft, libfakekey and matchbox-panel-2 requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 EXTRA_OECONF = "--disable-cairo --enable-gtk-im --enable-applet"
 
meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_git.bb +4 -1
index 490e2bc..4ed7368 100644
@@ -11,6 +11,9 @@ DEPENDS = "gnome-common gtk+ startup-notification dbus dbus-glib"
 DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "acpi", "libacpi", "",d)}"
 DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "apm", "apmd", "",d)}"
 
+# The startup-notification requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
 SRCREV = "26a3a67b41c50e0ae163d8fe86ccf7a0f0a671ae"
 PV = "2.0+git${SRCPV}"
 
@@ -33,4 +36,4 @@ FILES_${PN} += "${libdir}/matchbox-panel/*.so \
 FILES_${PN}-dbg += "${libdir}/matchbox-panel/.debug"
 FILES_${PN}-dev += "${libdir}/matchbox-panel/*.la"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
meta/recipes-sato/matchbox-sato/matchbox-session-sato_0.1.bb +5 -0
index fe84a0f..76de18a 100644
@@ -14,6 +14,11 @@ PR = "r30"
 # based on the machine architecture.
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
+inherit distro_features_check
+
+# The matchbox-theme-sato requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
 SRC_URI = "file://session"
 S = "${WORKDIR}"
 
meta/recipes-sato/matchbox-theme-sato/matchbox-theme-sato.inc +4 -1
index b0f8380..d947e1a 100644
@@ -8,6 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=aae86bb34b0a83716ca09f4e783d6ba4"
 DEPENDS = "matchbox-wm"
 SECTION = "x11/wm"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
 
 FILES_${PN} += "${datadir}/themes"
+
+# The matchbox-wm requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
meta/recipes-sato/midori/midori_0.5.8.bb +4 -1
index 3aabdd4..5cc42cb 100644
@@ -12,7 +12,10 @@ SRC_URI[sha256sum] = "af19135fd4c4b04345df4d3592e7939c20f9b40eaca24550e6cb619751
 # MIPS64 with n32 ABI. So remove it from mips64 n32 temporarily.
 COMPATIBLE_HOST_mips64n32 = "null"
 
-inherit gtk-icon-cache pkgconfig vala pythonnative cmake
+inherit gtk-icon-cache pkgconfig vala pythonnative cmake distro_features_check
+
+# The webkit-gtk and libxscrnsaver requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 EXTRA_OECMAKE = " \
     -DCMAKE_INSTALL_PREFIX=${prefix} \
meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb +4 -1
index 14f58ae..6ef0347 100644
@@ -23,7 +23,10 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.xz \
 SRC_URI[md5sum] = "c993402d407b0a3fc076f842ac1bc5c9"
 SRC_URI[sha256sum] = "cfa8d82fc63be147045174bef074807e1e32ce8c6bf4dbd8fad49e260bcf6380"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+
+# The startup-notification requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 do_install_append () {
 	install -d ${D}/${datadir}
meta/recipes-sato/puzzles/puzzles_r10116.bb +4 -1
index 3bc2c85..1ad8d1b 100644
@@ -4,6 +4,9 @@ HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
 DEPENDS = "gtk+ libxt"
 MOD_PV = "${@d.getVar('PV',1)[1:]}"
 
+# The libxt requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENCE;md5=33bcd4bce8f3c197f2aefbdbd2d299bc"
 
@@ -14,7 +17,7 @@ SRC_URI = "svn://svn.tartarus.org/sgt;module=puzzles;rev=${MOD_PV} \
 
 S = "${WORKDIR}/${BPN}"
 
-inherit autotools-brokensep
+inherit autotools-brokensep distro_features_check
 
 do_configure_prepend () {
     ./mkfiles.pl
meta/recipes-sato/sato-screenshot/sato-screenshot_git.bb +4 -1
index a079e03..8794032 100644
@@ -16,7 +16,7 @@ SRC_URI = "git://git.yoctoproject.org/screenshot"
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
 
 FILES_${PN} += "${libdir}/matchbox-panel/*.so"
 FILES_${PN}-dbg += "${libdir}/matchbox-panel/.debug"
@@ -24,3 +24,6 @@ FILES_${PN}-dbg += "${libdir}/matchbox-panel/.debug"
 do_install_append () {
 	rm ${D}${libdir}/matchbox-panel/*.la
 }
+
+# The matchbox-panel-2 requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
meta/recipes-sato/webkit/webkit-gtk_1.8.3.bb +4 -1
index 3f19c2d..3348702 100644
@@ -17,6 +17,9 @@ DEPENDS = "zlib enchant libsoup-2.4 curl libxml2 cairo libxslt libxt libidn gnut
            gtk+ gstreamer gst-plugins-base flex-native gperf-native perl-native-runtime sqlite3 ${ICU_LIB}"
 DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)}"
 
+# The libxt requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
 SRC_URI = "\
   http://www.webkitgtk.org/releases/webkit-${PV}.tar.xz \
   file://nodolt.patch \
@@ -35,7 +38,7 @@ SRC_URI[sha256sum] = "ada02d636af61aed38f142d3cded662d141ce71264f624c4eb873621a7
 # webkit-gtk can NOT be built on MIPS64 with n32 ABI
 COMPATIBLE_HOST_mips64n32 = "null"
 
-inherit autotools lib_package gtk-doc pkgconfig
+inherit autotools lib_package gtk-doc pkgconfig distro_features_check
 
 S = "${WORKDIR}/webkit-${PV}/"
 
Signature · 1 line
1.7.9.5
#18 lore raw

PATCH 12/12 at-spi2-atk: add x11 to REQUIRED_DISTRO_FEATURES

In reply to Robert Yang

It can't be built withou x11 in DISTRO_FEATURES.

---
 meta/recipes-support/atk/at-spi2-atk_2.16.0.bb |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta/recipes-support/atk/at-spi2-atk_2.16.0.bb +4 -1
index d8379c1..7d95fdb 100644
@@ -10,7 +10,10 @@ SRC_URI[sha256sum] = "78efc45ec36383bf785f8636e64a8d866defeb020e00a08f92978f1fc3
 
 DEPENDS = "dbus glib-2.0 atk at-spi2-core"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+
+# The at-spi2-core requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
 
 PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
 
Signature · 1 line
1.7.9.5