From 177d5307559ad1d53fb4170577f2a4ec2d049224 Mon Sep 17 00:00:00 2001 From: Michael 'Mickey' Lauer Date: Thu, 19 Feb 2009 23:45:51 +0100 Subject: vala: add another patch against glib-2.0.vapi --- ...api-add-necessary-struct-members-to-use-B.patch | 27 ++++++++++++++++++++++ ...glib-2.0-bind-g_io_channel_add_watch_full.patch | 26 +++++++++++++++++++++ packages/vala/files/expose-bytesarray-struct.patch | 18 --------------- packages/vala/files/static-dbus-methods.patch | 26 +++++++++++++++++++++ packages/vala/vala-native_0.5.6.bb | 1 - packages/vala/vala.inc | 4 +++- packages/vala/vala_0.5.6.bb | 2 +- 7 files changed, 83 insertions(+), 21 deletions(-) create mode 100644 packages/vala/files/0001-glib-2.0.vapi-add-necessary-struct-members-to-use-B.patch create mode 100644 packages/vala/files/0002-glib-2.0-bind-g_io_channel_add_watch_full.patch delete mode 100644 packages/vala/files/expose-bytesarray-struct.patch create mode 100644 packages/vala/files/static-dbus-methods.patch diff --git a/packages/vala/files/0001-glib-2.0.vapi-add-necessary-struct-members-to-use-B.patch b/packages/vala/files/0001-glib-2.0.vapi-add-necessary-struct-members-to-use-B.patch new file mode 100644 index 0000000000..46b9cf7fa9 --- /dev/null +++ b/packages/vala/files/0001-glib-2.0.vapi-add-necessary-struct-members-to-use-B.patch @@ -0,0 +1,27 @@ +From c0f61469875c232727bab3b63f239f0e9122520c Mon Sep 17 00:00:00 2001 +From: Michael 'Mickey' Lauer +Date: Thu, 19 Feb 2009 17:40:13 +0100 +Subject: [PATCH] glib-2.0.vapi: add necessary struct members to use ByteArray class + +Signed-Off: Michael 'Mickey' Lauer +--- + vapi/glib-2.0.vapi | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi +index 5faee07..26b73e7 100644 +--- a/vapi/glib-2.0.vapi ++++ b/vapi/glib-2.0.vapi +@@ -3144,6 +3144,9 @@ namespace GLib { + public void sort (CompareFunc compare_func); + public void sort_with_data (CompareDataFunc compare_func); + public void set_size (uint length); ++ ++ public uint len; ++ public uint8[] data; + } + + /* N-ary Trees */ +-- +1.6.0.2 + diff --git a/packages/vala/files/0002-glib-2.0-bind-g_io_channel_add_watch_full.patch b/packages/vala/files/0002-glib-2.0-bind-g_io_channel_add_watch_full.patch new file mode 100644 index 0000000000..de03f288bc --- /dev/null +++ b/packages/vala/files/0002-glib-2.0-bind-g_io_channel_add_watch_full.patch @@ -0,0 +1,26 @@ +From ec0865757033416b3ca1d4d046c4308d59aadf85 Mon Sep 17 00:00:00 2001 +From: Michael 'Mickey' Lauer +Date: Thu, 19 Feb 2009 17:52:10 +0100 +Subject: [PATCH] glib-2.0: bind g_io_channel_add_watch_full + +Signed-Off: Michael 'Mickey' Lauer +--- + vapi/glib-2.0.vapi | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi +index 26b73e7..24c3c93 100644 +--- a/vapi/glib-2.0.vapi ++++ b/vapi/glib-2.0.vapi +@@ -1443,6 +1443,8 @@ namespace GLib { + public GLib.Source create_watch (IOCondition condition); + [CCode (cname = "g_io_add_watch")] + public uint add_watch (IOCondition condition, IOFunc func); ++ [CCode (cname = "g_io_add_watch_full")] ++ public uint add_watch_full (int priority, IOCondition condition, IOFunc func, DestroyNotify? notify); + public size_t get_buffer_size (); + public void set_buffer_size (size_t size); + public IOCondition get_buffer_condition (); +-- +1.6.0.2 + diff --git a/packages/vala/files/expose-bytesarray-struct.patch b/packages/vala/files/expose-bytesarray-struct.patch deleted file mode 100644 index ea01208967..0000000000 --- a/packages/vala/files/expose-bytesarray-struct.patch +++ /dev/null @@ -1,18 +0,0 @@ -# -# Necessary to actually use BytesArray. -# Signed-Off: Michael 'Mickey' Lauer -# -Index: vala/vapi/glib-2.0.vapi -=================================================================== ---- vala/vapi/glib-2.0.vapi (Revision 2422) -+++ vala/vapi/glib-2.0.vapi (Arbeitskopie) -@@ -3044,6 +3044,9 @@ - public void sort (CompareFunc compare_func); - public void sort_with_data (CompareDataFunc compare_func); - public void set_size (uint length); -+ -+ public uint len; -+ public uint8[] data; - } - - /* N-ary Trees */ diff --git a/packages/vala/files/static-dbus-methods.patch b/packages/vala/files/static-dbus-methods.patch new file mode 100644 index 0000000000..7bf4144860 --- /dev/null +++ b/packages/vala/files/static-dbus-methods.patch @@ -0,0 +1,26 @@ +From: Frederik Sdun +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/packages/vala/vala-native_0.5.6.bb b/packages/vala/vala-native_0.5.6.bb index 84ed8359c4..bc99ebf0a6 100644 --- a/packages/vala/vala-native_0.5.6.bb +++ b/packages/vala/vala-native_0.5.6.bb @@ -1,5 +1,4 @@ require vala_${PV}.bb -PR = "r1" inherit native DEPENDS = "glib-2.0-native" diff --git a/packages/vala/vala.inc b/packages/vala/vala.inc index c6f5aebbef..422571ca8f 100644 --- a/packages/vala/vala.inc +++ b/packages/vala/vala.inc @@ -9,7 +9,9 @@ MAJV = "${@bb.data.getVar('PV',d,1)[:3]}" SRC_URI = "\ http://download.gnome.org/sources/vala/${MAJV}/vala-${PV}.tar.bz2 \ - file://expose-bytesarray-struct.patch;patch=1 \ + file://0001-glib-2.0.vapi-add-necessary-struct-members-to-use-B.patch;patch=1 \ + file://0002-glib-2.0-bind-g_io_channel_add_watch_full.patch;patch=1 \ + file://static-dbus-methods.patch;patch=1 \ " S = "${WORKDIR}/vala-${PV}" diff --git a/packages/vala/vala_0.5.6.bb b/packages/vala/vala_0.5.6.bb index f6ee943617..7b2b4e293c 100644 --- a/packages/vala/vala_0.5.6.bb +++ b/packages/vala/vala_0.5.6.bb @@ -1,2 +1,2 @@ require vala.inc -PR = "r1" +PR = "r2" -- cgit v1.2.3