Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Jussi Kukkonen <jussi.kukkonen@intel.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/4] gtk+/cairo: enable x11 or directfb
Date: Wed, 16 Sep 2015 18:34:29 +0800	[thread overview]
Message-ID: <55F945B5.9060007@windriver.com> (raw)
In-Reply-To: <CAHiDW_Gij3wQ0daYSBetKgBmz-E=DncKUvtP_WJ+O_g-T4vn_w@mail.gmail.com>



On 09/16/2015 06:25 PM, Jussi Kukkonen wrote:
> On 16 September 2015 at 05:28, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@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@windriver.com
> <mailto:liezhi.yang@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@lists.openembedded.org
> <mailto:Openembedded-core@lists.openembedded.org>
>  > http://lists.openembedded.org/mailman/listinfo/openembedded-core


  reply	other threads:[~2015-09-16 10:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16  2:28 [PATCH 0/4] meta: resend patches Robert Yang
2015-09-16  2:28 ` [PATCH 1/4] gtk+/cairo: enable x11 or directfb Robert Yang
2015-09-16 10:25   ` Jussi Kukkonen
2015-09-16 10:34     ` Robert Yang [this message]
2015-09-18 20:23       ` Burton, Ross
2015-09-22  2:40         ` Robert Yang
2015-09-22 14:12           ` Burton, Ross
2015-09-16  2:28 ` [PATCH 2/4] libsdl: depends on libglu when both x11 and opengl Robert Yang
2015-09-16  2:28 ` [PATCH 3/4] insane.bbclass: fix package_qa_check_buildpaths Robert Yang
2015-09-16 12:38   ` Richard Purdie
2015-09-16 13:56     ` Robert Yang
2015-09-16 15:26       ` Richard Purdie
2015-09-16  2:28 ` [PATCH 4/4] insane.bbclass: make package_qa_clean_path return a relative path Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F945B5.9060007@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=jussi.kukkonen@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox