aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/vala
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/vala')
-rw-r--r--recipes/vala/files/static-dbus-methods.patch26
-rw-r--r--recipes/vala/vala-native_0.5.7.bb10
-rw-r--r--recipes/vala/vala-native_git.bb17
-rw-r--r--recipes/vala/vala.inc20
-rw-r--r--recipes/vala/vala_0.5.7.bb2
5 files changed, 75 insertions, 0 deletions
diff --git a/recipes/vala/files/static-dbus-methods.patch b/recipes/vala/files/static-dbus-methods.patch
new file mode 100644
index 0000000000..7bf4144860
--- /dev/null
+++ b/recipes/vala/files/static-dbus-methods.patch
@@ -0,0 +1,26 @@
+From: Frederik Sdun <frederik.sdun@googlemail.com>
+Hi,
+
+I figured out that vala generates wrong code on static methods. It tries
+to add a user_data pointer, but then the C function has no void*
+user_data.
+
+I appended a diff which fixes the problem for me.
+
+Regards, Frederik
+
+Index: vala/gobject/valadbusclientmodule.vala
+===================================================================
+--- vala/gobject/valadbusclientmodule.vala (Revision 2430)
++++ vala/gobject/valadbusclientmodule.vala (Arbeitskopie)
+@@ -133,7 +133,9 @@
+ cend_call.add_argument (new CCodeIdentifier ("call"));
+ cend_call.add_argument (new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("error")));
+ var creply_call = new CCodeFunctionCall ((CCodeExpression) callback.ccodenode);
+- creply_call.add_argument (new CCodeIdentifier ("user_data"));
++ if( reply_method.binding != MemberBinding.STATIC ) {
++ creply_call.add_argument (new CCodeIdentifier ("user_data"));
++ }
+ int param_count = reply_method.get_parameters ().size;
+ int i = 0;
+ foreach (FormalParameter param in reply_method.get_parameters ()) {
diff --git a/recipes/vala/vala-native_0.5.7.bb b/recipes/vala/vala-native_0.5.7.bb
new file mode 100644
index 0000000000..735c93f3f6
--- /dev/null
+++ b/recipes/vala/vala-native_0.5.7.bb
@@ -0,0 +1,10 @@
+require vala_${PV}.bb
+
+inherit native
+DEPENDS = "glib-2.0-native"
+
+# work around timestamp problem in tarball
+do_compile_prepend() {
+ touch gobject/gobject.vala.stamp
+}
+
diff --git a/recipes/vala/vala-native_git.bb b/recipes/vala/vala-native_git.bb
new file mode 100644
index 0000000000..66abd5e292
--- /dev/null
+++ b/recipes/vala/vala-native_git.bb
@@ -0,0 +1,17 @@
+require vala_0.5.7.bb
+# vala from git always needs the latest released version to compile itself
+DEPENDS = "vala-native"
+
+SRCREV = "e7462e3ed00b75c16c11c27f6d8a640c7f35fafc"
+PV := "0.5.7+0.5.8pre02-gitr${SRCREV}"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "\
+ ${FREESMARTPHONE_GIT}/vala;protocol=git;branch=master \
+ file://static-dbus-methods.patch;patch=1 \
+"
+S = "${WORKDIR}/git"
+
+inherit native
+DEPENDS = "glib-2.0-native"
diff --git a/recipes/vala/vala.inc b/recipes/vala/vala.inc
new file mode 100644
index 0000000000..f5ea1ee520
--- /dev/null
+++ b/recipes/vala/vala.inc
@@ -0,0 +1,20 @@
+DESCRIPTION = "Vala is a C#-like language dedicated to ease GObject programming. \
+Vala compiles to plain C and has no runtime environment nor penality whatsoever."
+SECTION = "devel"
+DEPENDS = "glib-2.0 dbus"
+HOMEPAGE = "http://live.gnome.org/Vala"
+LICENSE = "LGPL"
+
+MAJV = "${@bb.data.getVar('PV',d,1)[:3]}"
+
+SRC_URI = "\
+ http://download.gnome.org/sources/vala/${MAJV}/vala-${PV}.tar.bz2 \
+ file://static-dbus-methods.patch;patch=1 \
+"
+S = "${WORKDIR}/vala-${PV}"
+
+inherit autotools autotools_stage lib_package
+
+EXTRA_OECONF = "--enable-vapigen"
+
+FILES_${PN}-doc += ${datadir}/devhelp
diff --git a/recipes/vala/vala_0.5.7.bb b/recipes/vala/vala_0.5.7.bb
new file mode 100644
index 0000000000..7b2b4e293c
--- /dev/null
+++ b/recipes/vala/vala_0.5.7.bb
@@ -0,0 +1,2 @@
+require vala.inc
+PR = "r2"