All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] add a bb file to build an image for gtk over directfb
@ 2011-12-14 12:18 Xiaofeng Yan
  2011-12-14 12:18 ` [PATCH 1/2] gtk-directfb: add bbclass gtk-directfb Xiaofeng Yan
  2011-12-14 12:18 ` [PATCH 2/2] core-image-gtk-directfb: add a bb file to build an image for gtk over directfb Xiaofeng Yan
  0 siblings, 2 replies; 4+ messages in thread
From: Xiaofeng Yan @ 2011-12-14 12:18 UTC (permalink / raw)
  To: openembedded-core

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

gtk-directfb is for reminding user to add "gtk-directfb" to DISTRO_FEATURES and remove "x11"
core-image-gtk-directfb is for getting an image to gtk over directfb.

Pull URL: git://git.pokylinux.org/poky-contrib.git
  Branch: xiaofeng/gtk-directfb
  Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/gtk-directfb

Thanks,
    Xiaofeng Yan <xiaofeng.yan@windriver.com>
---


Xiaofeng Yan (2):
  gtk-directfb: add bbclass gtk-directfb
  core-image-gtk-directfb: add a bb file to build an image for gtk over
    directfb

 meta/classes/gtk-directfb.bbclass                  |   12 ++++++++++
 .../images/core-image-gtk-directfb.bb              |   22 ++++++++++++++++++++
 2 files changed, 34 insertions(+), 0 deletions(-)
 create mode 100644 meta/classes/gtk-directfb.bbclass
 create mode 100644 meta/recipes-graphics/images/core-image-gtk-directfb.bb




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] gtk-directfb: add bbclass gtk-directfb
  2011-12-14 12:18 [PATCH 0/2] add a bb file to build an image for gtk over directfb Xiaofeng Yan
@ 2011-12-14 12:18 ` Xiaofeng Yan
  2011-12-15 11:51   ` Richard Purdie
  2011-12-14 12:18 ` [PATCH 2/2] core-image-gtk-directfb: add a bb file to build an image for gtk over directfb Xiaofeng Yan
  1 sibling, 1 reply; 4+ messages in thread
From: Xiaofeng Yan @ 2011-12-14 12:18 UTC (permalink / raw)
  To: openembedded-core

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

This file remind user to add "gtk-directfb" to DISTRO_FEATURES and remove "x11" \
when building core-image-gtk-directfb.

[YOCTO #1674]

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/classes/gtk-directfb.bbclass |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
 create mode 100644 meta/classes/gtk-directfb.bbclass

diff --git a/meta/classes/gtk-directfb.bbclass b/meta/classes/gtk-directfb.bbclass
new file mode 100644
index 0000000..b65b787
--- /dev/null
+++ b/meta/classes/gtk-directfb.bbclass
@@ -0,0 +1,12 @@
+# gtk can only run a backend at a time (directfb or x11) for gtk-2.x. 
+# So if you want to get an image of gtk running directfb. 
+# Please remove x11 from DISTRO_FEATURES
+python () {
+	import sys
+	import logging
+	logger = logging.getLogger('BitBake.Event')
+	packages = d.getVar('DISTRO_FEATURES', 1).split()
+	for pkg in packages:
+		if pkg == "x11":
+			bb.fatal("FEATURE \"x11\" is in DISTRO_FEATURES, Please remove x11 from DISTRO_FEATURES, use \"gtk-directfb\" instead of it\n")
+}
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] core-image-gtk-directfb: add a bb file to build an image for gtk over directfb
  2011-12-14 12:18 [PATCH 0/2] add a bb file to build an image for gtk over directfb Xiaofeng Yan
  2011-12-14 12:18 ` [PATCH 1/2] gtk-directfb: add bbclass gtk-directfb Xiaofeng Yan
@ 2011-12-14 12:18 ` Xiaofeng Yan
  1 sibling, 0 replies; 4+ messages in thread
From: Xiaofeng Yan @ 2011-12-14 12:18 UTC (permalink / raw)
  To: openembedded-core

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

This file can make an image to run gtk over directfb.

[YOCTO #1674]

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 .../images/core-image-gtk-directfb.bb              |   22 ++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-graphics/images/core-image-gtk-directfb.bb

diff --git a/meta/recipes-graphics/images/core-image-gtk-directfb.bb b/meta/recipes-graphics/images/core-image-gtk-directfb.bb
new file mode 100644
index 0000000..2d91538
--- /dev/null
+++ b/meta/recipes-graphics/images/core-image-gtk-directfb.bb
@@ -0,0 +1,22 @@
+LICENSE = "MIT"
+PR="r0"
+
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+inherit gtk-directfb
+
+DEPENDS += "task-core-gtk-directfb"
+
+RDEPENDS_${PN} += " \
+	task-core-gtk-directfb-base \
+	"
+
+inherit core-image
+
+IMAGE_INSTALL += "\
+	${POKY_BASE_INSTALL} \
+	task-core-basic \
+	module-init-tools \
+	task-core-gtk-directfb-base \
+"
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] gtk-directfb: add bbclass gtk-directfb
  2011-12-14 12:18 ` [PATCH 1/2] gtk-directfb: add bbclass gtk-directfb Xiaofeng Yan
@ 2011-12-15 11:51   ` Richard Purdie
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2011-12-15 11:51 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 2011-12-14 at 20:18 +0800, Xiaofeng Yan wrote:
> From: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> 
> This file remind user to add "gtk-directfb" to DISTRO_FEATURES and remove "x11" \
> when building core-image-gtk-directfb.
> 
> [YOCTO #1674]
> 
> Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
> ---
>  meta/classes/gtk-directfb.bbclass |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
>  create mode 100644 meta/classes/gtk-directfb.bbclass
> 
> diff --git a/meta/classes/gtk-directfb.bbclass b/meta/classes/gtk-directfb.bbclass
> new file mode 100644
> index 0000000..b65b787
> --- /dev/null
> +++ b/meta/classes/gtk-directfb.bbclass
> @@ -0,0 +1,12 @@
> +# gtk can only run a backend at a time (directfb or x11) for gtk-2.x. 
> +# So if you want to get an image of gtk running directfb. 
> +# Please remove x11 from DISTRO_FEATURES
> +python () {
> +	import sys
> +	import logging
> +	logger = logging.getLogger('BitBake.Event')
> +	packages = d.getVar('DISTRO_FEATURES', 1).split()
> +	for pkg in packages:
> +		if pkg == "x11":
> +			bb.fatal("FEATURE \"x11\" is in DISTRO_FEATURES, Please remove x11 from DISTRO_FEATURES, use \"gtk-directfb\" instead of it\n")
> +}

Some improvements I'd like to suggest please:

* Put this in the image .bb file, we don't need a generic class for 
  this in the core, at least at this point
* Don't import things you don't need (logging, sys)
* Use something like 'if "x11" in packages' instead for that for loop
* Use SkipPackage instead of bb.fatal like I suggested (grep will show 
  some examples)
* Use True instead of 1
* Rename the variables to be meaningful (packages is confusing here)

Cheers,

Richard





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-15 11:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-14 12:18 [PATCH 0/2] add a bb file to build an image for gtk over directfb Xiaofeng Yan
2011-12-14 12:18 ` [PATCH 1/2] gtk-directfb: add bbclass gtk-directfb Xiaofeng Yan
2011-12-15 11:51   ` Richard Purdie
2011-12-14 12:18 ` [PATCH 2/2] core-image-gtk-directfb: add a bb file to build an image for gtk over directfb Xiaofeng Yan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.