[v3,1/8] clutter.bbclass: helper class for clutter and friends

Submitted by Tomas Frydrych on May 21, 2013, 11:04 a.m.

Details

Message ID 1369134259-12091-2-git-send-email-tf+lists.yocto@r-finger.com
State New
Headers show

Commit Message

Tomas Frydrych May 21, 2013, 11:04 a.m.
From: Tomas Frydrych <tomas@sleepfive.com>


Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
---
 meta/classes/clutter.bbclass |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 meta/classes/clutter.bbclass

Patch hide | download patch | download mbox

diff --git a/meta/classes/clutter.bbclass b/meta/classes/clutter.bbclass
new file mode 100644
index 0000000..0dc4850
--- /dev/null
+++ b/meta/classes/clutter.bbclass
@@ -0,0 +1,23 @@ 
+
+def get_minor_dir(v):
+    import re
+    m = re.match("^([0-9]+)\.([0-9]+)", v)
+    return "%s.%s" % (m.group(1), m.group(2))
+
+def get_real_name(n):
+    import re
+    m = re.match("^([a-z]+(-[a-z]+)?)(-[0-9]+\.[0-9]+)?", n)
+    return "%s" % (m.group(1))
+
+VERMINOR = "${@get_minor_dir("${PV}")}"
+REALNAME = "${@get_real_name("${BPN}")}"
+FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${REALNAME}-${PV}", "${FILE_DIRNAME}/${REALNAME}-${VERMINOR}", "${FILE_DIRNAME}/${REALNAME}", "${FILE_DIRNAME}/files"], d)}"
+
+CLUTTER_SRC_FTP = "${GNOME_MIRROR}/${REALNAME}/${VERMINOR}/${REALNAME}-${PV}.tar.xz;name=archive"
+
+CLUTTER_SRC_GIT = "git://git.gnome.org/${REALNAME};protocol=git"
+
+SRC_URI = "${CLUTTER_SRC_FTP}"
+S = "${WORKDIR}/${REALNAME}-${PV}"
+
+inherit autotools pkgconfig gtk-doc gettext

Comments

Phil Blundell May 21, 2013, 11:19 a.m.
On Tue, 2013-05-21 at 12:04 +0100, Tomas Frydrych wrote:
>  meta/classes/clutter.bbclass |   23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
>  create mode 100644 meta/classes/clutter.bbclass

Do we really need a new class for this?  Can it be merged with gnomebase
somehow, perhaps?

If clutter really does need its own specialised logic then maybe clutter
and cogl should both stay in recipes-graphics/clutter and just share
an .inc file.  It seems a bit sad to clutter (no pun intended) the
global classes directory with this sort of thing.

p.
Paul Eggleton May 21, 2013, 4:51 p.m.
On Tuesday 21 May 2013 12:19:36 Phil Blundell wrote:
> On Tue, 2013-05-21 at 12:04 +0100, Tomas Frydrych wrote:
> >  meta/classes/clutter.bbclass |   23 +++++++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> >  create mode 100644 meta/classes/clutter.bbclass
> 
> Do we really need a new class for this?  Can it be merged with gnomebase
> somehow, perhaps?
> 
> If clutter really does need its own specialised logic then maybe clutter
> and cogl should both stay in recipes-graphics/clutter and just share
> an .inc file.  It seems a bit sad to clutter (no pun intended) the
> global classes directory with this sort of thing.

Have to say I agree; given that this set has been merged we could take this as 
an additional patch if it works for Tomas?

Cheers,
Paul
Tomas Frydrych May 22, 2013, 8:23 a.m.
On 21/05/13 17:51, Paul Eggleton wrote:
> On Tuesday 21 May 2013 12:19:36 Phil Blundell wrote:
>> On Tue, 2013-05-21 at 12:04 +0100, Tomas Frydrych wrote:
>>>  meta/classes/clutter.bbclass |   23 +++++++++++++++++++++++
>>>  1 file changed, 23 insertions(+)
>>>  create mode 100644 meta/classes/clutter.bbclass
>>
>> Do we really need a new class for this?  Can it be merged with gnomebase
>> somehow, perhaps?
>>
>> If clutter really does need its own specialised logic then maybe clutter
>> and cogl should both stay in recipes-graphics/clutter and just share
>> an .inc file.  It seems a bit sad to clutter (no pun intended) the
>> global classes directory with this sort of thing.
> 
> Have to say I agree; given that this set has been merged we could take this as 
> an additional patch if it works for Tomas?

The clutter class is used by cogl, clutter and mx (only the version
parsing logic in the latter); it is also used by the mutter package in
meta-clutter. But if you prefer includes in oecore, that's fine by me.

Tomas