add a bb file to build an image for gtk over directfb
cover add a bb file to build an image for gtk over directfb
From: Xiaofeng Yan <[email protected]>
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 <[email protected]>
---
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
PATCH 1/2 gtk-directfb: add bbclass gtk-directfb
From: Xiaofeng Yan <[email protected]>
This file remind user to add "gtk-directfb" to DISTRO_FEATURES and remove "x11" \
when building core-image-gtk-directfb.
[YOCTO #1674]
--- meta/classes/gtk-directfb.bbclass | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) create mode 100644 meta/classes/gtk-directfb.bbclass
meta/classes/gtk-directfb.bbclass new file +12 -0
@@ -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") +}
Signature · 1 line
1.7.0.4
Re: [PATCH 1/2] gtk-directfb: add bbclass gtk-directfb
Quoted 21 lines · Xiaofeng Yan
From: Xiaofeng Yan <[email protected]>
This file remind user to add "gtk-directfb" to
DISTRO_FEATURESand remove "x11" \
when building core-image-gtk-directfb.[YOCTO #1674]
Signed-off-by Xiaofeng Yan <[email protected]>--- meta/classes/gtk-directfb.bbclass | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) create mode 100644 meta/classes/gtk-directfb.bbclassmeta/classes/gtk-directfb.bbclass new file +2
-0@@ -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.
meta/classes/gtk-directfb.bbclass line 12
Quoted 10 lines
meta/classes/gtk-directfb.bbclass new file +10
-0+# 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
PATCH 2/2 core-image-gtk-directfb: add a bb file to build an image for gtk over directfb
In reply to Xiaofeng YanFrom: Xiaofeng Yan <[email protected]>
This file can make an image to run gtk over directfb.
[YOCTO #1674]
--- .../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
meta/recipes-graphics/images/core-image-gtk-directfb.bb new file +22 -0
@@ -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 \ +"
Signature · 1 line
1.7.0.4