diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2011-01-17 16:06:21 +0100 |
---|---|---|
committer | Thomas Zimmermann <zimmermann@vdm-design.de> | 2011-02-22 21:38:09 +0100 |
commit | 2bd7c71a8bea7b875bc74114778e0fb1430340e1 (patch) | |
tree | 36f8bd0664065abfbf0259967f4e341bcf6ac7c4 | |
parent | 0e1afa7446007ca1ea636968fdc839824b8a48ed (diff) | |
download | openembedded-2bd7c71a8bea7b875bc74114778e0fb1430340e1.tar.gz |
iliwi: add patch for vala-0.11.4 and patch from Ben Thompson
* fix wrong null position in my
0001-adapt-to-elementary-genlist_item_insert_before-API-c.patch
* Ben Thompson fixed WPA issue
* Pau Espin Pedrol added another patch for newer vala-0.11.4
* all patches were sent upstream, no reply yet
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
4 files changed, 190 insertions, 4 deletions
diff --git a/recipes/openmoko-3rdparty/iliwi/0001-adapt-to-elementary-genlist_item_insert_before-API-c.patch b/recipes/openmoko-3rdparty/iliwi/0001-adapt-to-elementary-genlist_item_insert_before-API-c.patch index 7b16182461..d8da411519 100644 --- a/recipes/openmoko-3rdparty/iliwi/0001-adapt-to-elementary-genlist_item_insert_before-API-c.patch +++ b/recipes/openmoko-3rdparty/iliwi/0001-adapt-to-elementary-genlist_item_insert_before-API-c.patch @@ -16,11 +16,11 @@ index 2aafdcc..03f561e 100644 if( network.preferred_network && list_network.preferred_network==false ) { found_place = true; - network.listitem = wifilist.item_insert_before( itc, (void*)network, listitem_tmp, Elm.GenlistItemFlags.NONE, item_select ); -+ network.listitem = wifilist.item_insert_before( itc, (void*)network, listitem_tmp, null, Elm.GenlistItemFlags.NONE, item_select ); ++ network.listitem = wifilist.item_insert_before( itc, (void*)network, null, listitem_tmp, Elm.GenlistItemFlags.NONE, item_select ); } else if( list_network.preferred_network==network.preferred_network && list_network.strength<=network.strength ) { found_place = true; - network.listitem = wifilist.item_insert_before( itc, (void*)network, listitem_tmp, Elm.GenlistItemFlags.NONE, item_select ); -+ network.listitem = wifilist.item_insert_before( itc, (void*)network, listitem_tmp, null, Elm.GenlistItemFlags.NONE, item_select ); ++ network.listitem = wifilist.item_insert_before( itc, (void*)network, null, listitem_tmp, Elm.GenlistItemFlags.NONE, item_select ); } else { // Couldn't find a place to put it listitem_tmp2 = listitem_tmp.next_get(); listitem_tmp = listitem_tmp2; diff --git a/recipes/openmoko-3rdparty/iliwi/iliwi_ben_jan2011.patch b/recipes/openmoko-3rdparty/iliwi/iliwi_ben_jan2011.patch new file mode 100644 index 0000000000..c4872deddd --- /dev/null +++ b/recipes/openmoko-3rdparty/iliwi/iliwi_ben_jan2011.patch @@ -0,0 +1,86 @@ +--- a/src/wifi.vala 2011-01-17 21:32:07.000000000 +0000 ++++ b/src/wifi.vala 2011-01-17 21:33:10.000000000 +0000 +@@ -52,19 +52,19 @@ + } + public void set_ascii_state(Network network,bool new_state) { + network.password_in_ascii = new_state; +- WifiThread.preferred_ascii_password_state_change(network); ++ WifiThread.preferred_state_change(network); + } + + public void preferred_network_password_change(Network network) { +- WifiThread.preferred_network_password_change(network); ++ WifiThread.preferred_state_change(network); + } + + public void preferred_network_username_change(Network network) { +- WifiThread.preferred_network_username_change(network); ++ WifiThread.preferred_state_change(network); + } + + public void preferred_network_certificate_change(Network network) { +- WifiThread.preferred_network_certificate_change(network); ++ WifiThread.preferred_state_change(network); + } + + // Callback from thread +@@ -251,24 +251,6 @@ + preferred_networks.unset(network.address); + } + } +- public static void preferred_ascii_password_state_change(Network network) { +- if(network.preferred_network) +- preferred_networks.get(network.address).password_in_ascii = network.password_in_ascii; +- } +- public static void preferred_network_password_change(Network network) { +- if(network.preferred_network) +- preferred_networks.get(network.address).password = network.password; +- } +- public static void preferred_network_username_change(Network network) { +- if(network.preferred_network) +- preferred_networks.get(network.address).username = network.username; +- } +- public static void preferred_network_certificate_change(Network network) { +- if(network.preferred_network) { +- preferred_networks.get(network.address).cert = network.cert; +- preferred_networks.get(network.address).cert_dir = network.cert_dir; +- } +- } + public static void connect_to_network(Network network) { + disconnectt(); + wifi.set_new_status("connecting.."); +@@ -286,7 +268,7 @@ + stream.puts( " ssid=\"%s\"\n".printf(network.essid) ); + if( network.encryption ) + if ( network.wpa_encryption && (!network.authentication) ) // WPA-Personal +- stream.puts(" psk=%s\n".printf(network.password)); ++ stream.puts(" psk=%s\n".printf(password)); + else if ( network.wpa_encryption && network.authentication ) { // WPA-Enterprise + stream.puts(" password=\"%s\"\n".printf(network.password)); + stream.puts(" key_mgmt=WPA-EAP\n"); +@@ -301,7 +283,7 @@ + } + else { // WEP encryption + stream.puts(" key_mgmt=NONE\n"); +- stream.puts(" wep_key0=%s\n".printf(network.password)); ++ stream.puts(" wep_key0=%s\n".printf(password)); + } + else + stream.puts( " key_mgmt=NONE\n" ); // No encryption +@@ -356,7 +338,6 @@ + } catch(Error e) { + debug("DBus error!"); + } +- + try { + line_regex_start_address = new Regex(""" Address: ([0-9A-Z:]{17})$"""); + line_regex_essid = new Regex("""^\s+ESSID:\"(.*)\"$"""); +@@ -392,7 +373,7 @@ + + preferred_networks.set(result.fetch(1), PreferredNetwork() { + password = result.fetch(2), +- password_in_ascii = (result.fetch(3)==null), ++ password_in_ascii = (result.fetch(3)!="h"), + username = result.fetch(4), + cert = result.fetch(5), + cert_dir = result.fetch(6) diff --git a/recipes/openmoko-3rdparty/iliwi/new.vala2.patch b/recipes/openmoko-3rdparty/iliwi/new.vala2.patch new file mode 100644 index 0000000000..a349659de0 --- /dev/null +++ b/recipes/openmoko-3rdparty/iliwi/new.vala2.patch @@ -0,0 +1,98 @@ +From cd07863b25a009a304766ab4eef94b00028dfcd8 Mon Sep 17 00:00:00 2001 +From: Pau Espin Pedrol <pespin.shar@gmail.com> +Date: Mon, 17 Jan 2011 23:23:18 +0100 +Subject: [PATCH] Port iliwi to gdbus + +--- + configure.ac | 4 ++-- + src/Makefile.am | 2 +- + src/dbus_interfaces.vala | 13 ++++++++----- + src/wifi.vala | 8 +++----- + 4 files changed, 14 insertions(+), 13 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 637597b..de4080b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5,9 +5,9 @@ AC_CONFIG_SRCDIR([src/main.vala]) + + AC_PROG_CC + m4_pattern_allow +-AM_PROG_VALAC([0.7.4]) ++AM_PROG_VALAC([0.11.4]) + +-PKG_CHECK_MODULES([DEPS], [glib-2.0 gio-2.0 dbus-glib-1 elementary gee-1.0]) ++PKG_CHECK_MODULES([DEPS], [glib-2.0 gio-2.0 elementary gee-1.0]) + + AC_CHECK_LIB(gthread-2.0, g_thread_init) + AC_CHECK_LIB(libeflvala) +diff --git a/src/Makefile.am b/src/Makefile.am +index d34b539..70bf8c9 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,5 +1,5 @@ + AM_VALAFLAGS = \ +- --pkg "gio-2.0" --pkg "glib-2.0" --pkg "dbus-glib-1" --pkg "elm" --pkg "gee-1.0" \ ++ --pkg "gio-2.0" --pkg "glib-2.0" --pkg "elm" --pkg "gee-1.0" \ + --thread + + AM_CFLAGS = $(DEPS_CFLAGS) +diff --git a/src/dbus_interfaces.vala b/src/dbus_interfaces.vala +index bb760e6..949972b 100644 +--- a/src/dbus_interfaces.vala ++++ b/src/dbus_interfaces.vala +@@ -15,10 +15,13 @@ + */ + + +-[DBus (name = "org.freesmartphone.Usage")] +-interface Usage : GLib.Object { +- public abstract void RequestResource(string resource) throws DBus.Error; +- public abstract void ReleaseResource(string resource) throws DBus.Error; ++[DBus (name = "org.freesmartphone.Usage", timeout = 120000)] ++public interface Usage: GLib.Object { ++ ++ public abstract void RequestResource(string resource) throws IOError; ++ public abstract void ReleaseResource(string resource) throws IOError; ++ ++ + } + + /* +@@ -88,4 +91,4 @@ $ mdbus -s org.moblin.connman / org.moblin.connman.Manager.GetProperties + 'Services': [ op'/profile/default/wifi_0012cf8f1b2d_6876656d6465722e646b_managed_rsn', + op'/profile/default/wifi_0012cf8f1b2d_474c61444f53_managed_wep'], + 'State': 'offline'} +-*/ +\ No newline at end of file ++*/ +diff --git a/src/wifi.vala b/src/wifi.vala +index 9995f16..9eeeb18 100644 +--- a/src/wifi.vala ++++ b/src/wifi.vala +@@ -164,7 +164,6 @@ namespace iliwi { + + private class WifiThread : GLib.Object { + static MainLoop loop; +- static DBus.Connection conn; + //static Manager manager; + static Usage fso_usage; + +@@ -348,12 +347,11 @@ namespace iliwi { + + private static void initialize() { + try { +- conn = DBus.Bus.get (DBus.BusType.SYSTEM); +- fso_usage = (Usage) conn.get_object("org.freesmartphone.ousaged", +- "/org/freesmartphone/Usage"); ++ fso_usage = Bus.get_proxy_sync (BusType.SYSTEM, "org.freesmartphone.ousaged", ++ "/org/freesmartphone/Usage"); + fso_usage.RequestResource("WiFi"); // Turn on wifi + fso_usage.RequestResource("CPU"); +- } catch(Error e) { ++ } catch(IOError e) { + debug("DBus error!"); + } + +-- +1.7.3.5
\ No newline at end of file diff --git a/recipes/openmoko-3rdparty/iliwi_git.bb b/recipes/openmoko-3rdparty/iliwi_git.bb index 6818b908b4..9537facf28 100644 --- a/recipes/openmoko-3rdparty/iliwi_git.bb +++ b/recipes/openmoko-3rdparty/iliwi_git.bb @@ -8,11 +8,13 @@ RDEPENDS_${PN} = "wireless-tools wpa-supplicant" SRCREV = "fcd77fada06f6373b0fb5771f78aaa9dcaa97036" PV = "0.0.1+gitr${SRCPV}" -PR = "r10" +PR = "r11" SRC_URI = "git://github.com/Ebbe/Iliwi.git;protocol=http;branch=master \ file://0001-adapt-to-elementary-genlist_item_insert_before-API-c.patch \ - file://new.vala.patch" + file://new.vala.patch \ + file://new.vala2.patch \ + file://iliwi_ben_jan2011.patch" S = "${WORKDIR}/git" inherit autotools vala |