vala.bbclass: add dependency on vala
PATCH v2 1/1 vala.bbclass: add dependency on vala
This class points the inheritor, if it is a target, to directories in the target sysroot, so we want to be sure the .vapi files are there.
--- meta/classes/vala.bbclass | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
meta/classes/vala.bbclass +5 -3
@@ -1,9 +1,11 @@ # Vala has problems with multiple concurrent invocations PARALLEL_MAKE = "" -# Vala needs vala-native -DEPENDS += "vala-native" -DEPENDS_virtclass-native += "vala-native" +# Everyone needs vala-native and targets need vala, too, +# because that is where target builds look for .vapi files. +# +VALADEPENDS_class-target = "vala" +DEPENDS_append = " vala-native ${VALADEPENDS}" # Our patched version of Vala looks in STAGING_DATADIR for .vapi files export STAGING_DATADIR
Signature · 1 line
1.7.3.4
Quoted 29 lines · Joe Slater
This class points the inheritor, if it is a target, to directories in the target sysroot, so we want to be sure the .vapi files are there.
Signed-off-by Joe Slater <[email protected]>--- meta/classes/vala.bbclass | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)meta/classes/vala.bbclass +5
-3@@ -1,9 +1,11 @@ # Vala has problems with multiple concurrent invocations PARALLEL_MAKE = "" -# Vala needs vala-native -DEPENDS += "vala-native" -DEPENDS_virtclass-native += "vala-native" +# Everyone needs vala-native and targets need vala, too, +# because that is where target builds look for .vapi files. +# +VALADEPENDS_class-target = "vala" +DEPENDS_append = " vala-native ${VALADEPENDS}" # Our patched version of Vala looks in STAGING_DATADIR for .vapi files export STAGING_DATADIR
Quoted 8 lines · Richard P
In class code this is a really bad idea. Why? Imagine a recipe which does:
DEPENDS =+ "x"
DEPENDS_class-native = "y"The += on the class-native above will not do what you think.
Quoted 8 lines
I'd recommend something like:
VALADEPENDS = "vala vala-native"
VALADEPENDS_class-native = "vala-native"
DEPENDS += "${VALADEPENDS}"Most other classes actually use
_appendon DEPENDS to ensure consistent behaviour.
so send it to oe-core and see what they say.
Mark H any comments?
// Randy
Signature · 2 lines
# Randy MacLeod. SMTS, Linux, Wind River Direct: 613.963.1350
Quoted 47 lines · Randy MacLeod
Quoted 29 lines · Joe Slater
This class points the inheritor, if it is a target, to directories in the target sysroot, so we want to be sure the .vapi files are there.
Signed-off-by Joe Slater <[email protected]>--- meta/classes/vala.bbclass | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)meta/classes/vala.bbclass +5
-3@@ -1,9 +1,11 @@ # Vala has problems with multiple concurrent invocations PARALLEL_MAKE = "" -# Vala needs vala-native -DEPENDS += "vala-native" -DEPENDS_virtclass-native += "vala-native" +# Everyone needs vala-native and targets need vala, too, +# because that is where target builds look for .vapi files. +# +VALADEPENDS_class-target = "vala" +DEPENDS_append = " vala-native ${VALADEPENDS}" # Our patched version of Vala looks in STAGING_DATADIR for .vapi files export STAGING_DATADIRQuoted 14 lines · Richard P
In class code this is a really bad idea. Why? Imagine a recipe which does:
DEPENDS =+ "x"
DEPENDS_class-native = "y"The += on the class-native above will not do what you think.
I'd recommend something like:
VALADEPENDS = "vala vala-native"
VALADEPENDS_class-native = "vala-native"
DEPENDS += "${VALADEPENDS}"
Quoted 5 lines
Quoted 2 lines
Most other classes actually use
_appendon DEPENDS to ensure consistent behaviour.so send it to oe-core and see what they say.
Mark H any comments?
Good catch, I had missed this.
Ya the overrides (class-native) run -after- the rest of the system. So:
DEPENDS = "foobar"
DEPENDS =+ "x"
DEPENDS_class-native =+ "y"
For "normal" it' would be "x foobar"
For "native" it would be "y"
This is because that system evals and gets:
DEPENDS = "foobar" (DEPENDS = "foobar")
DEPENDS =+ "x" (DEPENDS = "x foobar")
DEPENDS_class-native =+ "y" (DEPENDS_class-native = "y")
invoke 'class-native' override, DEPENDS = "y"
--Mark
Quoted 2 lines
// Randy
PATCH v2 1/1 vala.bbclass: add dependency on vala
In reply to Joe SlaterI sent the following a while ago and haven't seen any comments, but I think it parallels the suggestions made about v1.
The patch has not been put into oe-core master.
Joe
-----Original Message-----
From: Joe Slater [mailto:[email protected]]
Sent: Thursday, September 26, 2013 11:53 AM
To: [email protected]
Cc: MacLeod, Randy; Slater, Joseph
Subject: [v2][PATCH 1/1] vala.bbclass: add dependency on vala
This class points the inheritor, if it is a target, to directories in the target sysroot, so we want to be sure the .vapi files are there.
--- meta/classes/vala.bbclass | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
meta/classes/vala.bbclass +5 -3
@@ -1,9 +1,11 @@ # Vala has problems with multiple concurrent invocations PARALLEL_MAKE = "" -# Vala needs vala-native -DEPENDS += "vala-native" -DEPENDS_virtclass-native += "vala-native" +# Everyone needs vala-native and targets need vala, too, +# because that is where target builds look for .vapi files. +# +VALADEPENDS_class-target = "vala" +DEPENDS_append = " vala-native ${VALADEPENDS}" # Our patched version of Vala looks in STAGING_DATADIR for .vapi files export STAGING_DATADIR
Signature · 1 line
1.7.3.4
Quoted 15 lines · Joe Slater
This class points the inheritor, if it is a target, to directories in the target sysroot, so we want to be sure the .vapi files are there.
Signed-off-by Joe Slater <[email protected]>--- meta/classes/vala.bbclass | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)meta/classes/vala.bbclass +0
-0@@ -1,9 +1,11 @@ # Vala has problems with multiple concurrent invocations
meta/classes/vala.bbclass line 8
Quoted 10 lines
meta/classes/vala.bbclass +5
-3PARALLEL_MAKE = "" -# Vala needs vala-native -DEPENDS += "vala-native" -DEPENDS_virtclass-native += "vala-native" +# Everyone needs vala-native and targets need vala, too, +# because that is where target builds look for .vapi files. +# +VALADEPENDS_class-target = "vala" +DEPENDS_append = " vala-native ${VALADEPENDS}"
You should really have a default value for VALADEPENDS = "", the above class override relies on bitbake behaviour which could change.
Thanks
Sau!
Quoted 4 lines
meta/classes/vala.bbclass +0
-0# Our patched version of Vala looks in STAGING_DATADIR for .vapi files export STAGING_DATADIR