[OE-core] [PATCH 1/4] gtk+/cairo: enable x11 or directfb

Robert Yang liezhi.yang at windriver.com
Wed Sep 16 10:34:29 UTC 2015



On 09/16/2015 06:25 PM, Jussi Kukkonen wrote:
> On 16 September 2015 at 05:28, Robert Yang <liezhi.yang at windriver.com
> <mailto:liezhi.yang at windriver.com>> wrote:
>  >
>  > 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.
>
> What is the issue being fixed here? I can see how current config can go wrong in

Make the world build OK when possible, for example, when no x11 in
DISTRO_FEATURE.

> some situations but I'm not sure if the approach "if x11 is not a
> DISTRO_FEATURE, then automatically use direcfb" is much better. Especially for
> cairo: I would have thought building multiple surface backends is a valid choice
> there?

Yes, this is not a perfect solution, I don't like to pull in directfb either.
We can override PACKAGECONFIG to custom the build.

// Robert

>
> Jussi
>
>  > Signed-off-by: Robert Yang <liezhi.yang at windriver.com
> <mailto:liezhi.yang at windriver.com>>
>  > ---
>  >  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 = "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
>  > 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 = "GPLv3+"
>  >  X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
>  >  DEPENDS = "libpng fontconfig pixman glib-2.0 zlib"
>  >
>  > -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb',
> '', 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
> xcb', '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 -enable-xlib,--with-x=no
> --disable-xlib,${X11DEPENDS}"
>  >  PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
>  > --
>  > 1.7.9.5
>  >
>  > --
>  > _______________________________________________
>  > Openembedded-core mailing list
>  > Openembedded-core at lists.openembedded.org
> <mailto:Openembedded-core at lists.openembedded.org>
>  > http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list