Patchwork emacs: Allows non-x11 build on distribution supporting x11

login
register
mail settings
Submitter Alexandre Tuleu
Date Nov. 7, 2013, 6:17 p.m.
Message ID <1383848240-8328-1-git-send-email-alexandre.tuleu.2005@polytechnique.org>
Download mbox | patch
Permalink /patch/61281/
State Superseded, archived
Headers show

Comments

Alexandre Tuleu - Nov. 7, 2013, 6:17 p.m.
By default emacs will build with x11 if the distribution has x11
support. However in a .bbappend file a user could strip away x11
support, even if x11 is supported on the platform. There was another
check in do_compile_prepend() that checked if the distro has x11
feature and not if PACAKAGECONFIG enables x11 support.

Since in this receipe dbus dependence is only marked if x11 is
enabled, desactiving x11 support should also desactivate dbus support.

Signed-off-by: Alexandre Tuleu <alexandre.tuleu.2005@polytechnique.org>
---
 meta-oe/recipes-support/emacs/emacs.inc |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Patch

diff --git a/meta-oe/recipes-support/emacs/emacs.inc b/meta-oe/recipes-support/emacs/emacs.inc
index fa554ed..7e468c1 100644
--- a/meta-oe/recipes-support/emacs/emacs.inc
+++ b/meta-oe/recipes-support/emacs/emacs.inc
@@ -9,7 +9,7 @@  DEPENDS += "qemu-native"
 DEPENDS +=" liblockfile"
 
 X11DEPENDS = " \
-    libice libsm atk cairo dbus expat libffi fontconfig freetype gconf giflib \
+    libice libsm atk cairo expat libffi fontconfig freetype gconf giflib \
     jpeg xz pixman libpng librsvg tiff libcroco \
     libx11 libxau libxcomposite libxcursor libxdamage libxdmcp libxext libxfixes \
     libxft libxpm libxrandr libxrender \
@@ -19,7 +19,8 @@  X11DEPENDS = " \
 EXTRA_OECONF =  "--without-sound --with-crt-dir=${STAGING_LIBDIR} "
 
 PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG[x11] = "--with-x-toolkit=gtk,--without-x,${X11DEPENDS}"
+PACKAGECONFIG[x11] = "--with-x-toolkit=gtk,--without-x --without-dbus,${X11DEPENDS}"
+
 
 inherit autotools
 
@@ -87,7 +88,7 @@  do_compile_prepend() {
     ${STAGING_DIR_TARGET}/${base_libdir}/libgcc_s.so.* \
     ${STAGING_DIR_TARGET}/${base_libdir}/libpthread* $treedir/${base_libdir}/
 
-    if [ ! -z "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" ] ; then
+    if [ ! -z "${@base_contains('PACKAGECONFIG', 'x11', 'x11', '', d)}" ] ; then
         echo "X11 build enabled"
         # copy only as much stuff as we need
         # before: 5.5G   ../../qemu-treedir/