soc.2012.android: e5989394: Added new linking script to include libp...

michael at soc.pidgin.im michael at soc.pidgin.im
Mon May 28 07:18:26 EDT 2012


----------------------------------------------------------------------
Revision: e598939413e2527367bab354a630faf02b1fff9f
Parent:   692b0c867c254b2cd1a1e7b1aeff7adf3c9b3204
Author:   michael at soc.pidgin.im
Date:     05/28/12 06:07:46
Branch:   im.pidgin.soc.2012.android
URL: http://d.pidgin.im/viewmtn/revision/info/e598939413e2527367bab354a630faf02b1fff9f

Changelog: 

Added new linking script to include libpurple in android projects and to rename libraries for android.
Removed headers that are automatically generated from mtn



Changes against parent 692b0c867c254b2cd1a1e7b1aeff7adf3c9b3204

  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_account_PurpleAccount.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_account_PurpleAccountList.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_account_PurpleStatus.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_blist_PurpleBlist.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_blist_PurpleBlistNode.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_blist_PurpleContact.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_buddy_PurpleBuddy.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_EventLoop.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_PurpleInstance.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_dns_DnsQueryData.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_dns_DnsQueryFailedCallback.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_dns_DnsQueryResolvedCallback.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_glib_GHashTable.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_glib_GHashTableSet.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_glib_GList.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_glib_GListIterator.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_glib_GSourceFunctionCall.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_plugin_PurplePlugin.h
  dropped  android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_plugin_PurpleProtocolPlugin.h
  added    android/workspace/im.pidgin.libpurple/.externalToolBuilders
  added    android/workspace/im.pidgin.libpurple/.settings
  added    android/workspace/im.pidgin.libpurple.build/.externalToolBuilders
  added    android/workspace/im.pidgin.libpurple.build/.settings
  added    android/workspace/im.pidgin.libpurple.build/src/im/pidgin/libpurple/build/libs
  added    android/workspace/im.pidgin.libpurple/.classpath
  added    android/workspace/im.pidgin.libpurple/.cproject
  added    android/workspace/im.pidgin.libpurple/.externalToolBuilders/headers and native.launch
  added    android/workspace/im.pidgin.libpurple/.project
  added    android/workspace/im.pidgin.libpurple/.settings/org.eclipse.cdt.codan.core.prefs
  added    android/workspace/im.pidgin.libpurple/loadlibs.ant
  added    android/workspace/im.pidgin.libpurple/native/distribute.ant
  added    android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_PurpleInstance.c
  added    android/workspace/im.pidgin.libpurple.build/.classpath
  added    android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/dbus.launch
  added    android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/glib.launch
  added    android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/libffi.launch
  added    android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/libgettext.launch
  added    android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/libiconv.launch
  added    android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/libxml2.launch
  added    android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/purple.launch
  added    android/workspace/im.pidgin.libpurple.build/.settings/org.eclipse.ltk.core.refactoring.prefs
  added    android/workspace/im.pidgin.libpurple.build/src/im/pidgin/libpurple/build/libs/Library.java
  added    android/workspace/im.pidgin.libpurple.build/src/im/pidgin/libpurple/build/libs/LibraryDirectory.java
  added    android/workspace/im.pidgin.libpurple.build/src/im/pidgin/libpurple/build/libs/ReplaceLibNames.java
  added    android/workspace/im.pidgin.libpurple.build/src/im/pidgin/libpurple/build/libs/Replacer.java
  patched  android/workspace/im.pidgin.libpurple/native/build.ant
  patched  android/workspace/im.pidgin.libpurple/project.properties
  patched  android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleInstance.java
  patched  android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleLibraryLoader.java
  patched  android/workspace/im.pidgin.libpurple.build/buildscripts/common.ant
  patched  libpurple/core.h

-------------- next part --------------
============================================================
--- libpurple/core.h	558dce05a30cad8930b62b15c8594040dda1c014
+++ libpurple/core.h	6a6f0143442b4196d3adb99b47cc1dcb156ff5c4
@@ -37,6 +37,8 @@
 #ifndef _PURPLE_CORE_H_
 #define _PURPLE_CORE_H_
 
+#include <glib.h>
+
 typedef struct PurpleCore PurpleCore;
 
 /** Callbacks that fire at different points of the initialization and teardown
============================================================
--- android/workspace/im.pidgin.libpurple.build/buildscripts/common.ant	3200e495859027e26387dd06be71633f981d9180
+++ android/workspace/im.pidgin.libpurple.build/buildscripts/common.ant	4d1403aa5e0469e7d10b29838efc1edff0eb674a
@@ -153,6 +153,8 @@
     	<taskdef name="extractconstants" classpathref="bin" classname="im.pidgin.libpurple.build.constants.ExtractConstants"></taskdef>
     	<taskdef name="enum" classpathref="bin" classname="im.pidgin.libpurple.build.constants.EnumName"></taskdef>
     	<taskdef name="constant" classpathref="bin" classname="im.pidgin.libpurple.build.constants.ConstantName"></taskdef>
+    	
+    	<taskdef name="replaceLibNames" classpathref="bin" classname="im.pidgin.libpurple.build.libs.ReplaceLibNames"></taskdef>
     </target>
 	
 </project>
============================================================
--- android/workspace/im.pidgin.libpurple/native/build.ant	f08eaf220fb2cc62fe062410286505e62ed49044
+++ android/workspace/im.pidgin.libpurple/native/build.ant	f111d0581b5704e952b5765eef98c7c1a7e55655
@@ -14,32 +14,29 @@
 
 	<import file="../../im.pidgin.libpurple.build/buildscripts/common.ant" />
 	<import file="generateheaders.ant" />
+	<import file="distribute.ant"/>
 
 	<property name="androidMakefile" location="Android.mk" />
 
-	<property name="libpurple.constants.outdir" location="../gen/im/pidgin/libpurple/constants" />
+	<property name="libpurple.java.gen" location="../gen" />
+	<property name="libpurple.constants.outdir" location="${libpurple.java.gen}/im/pidgin/libpurple/constants" />
 	<property name="libpurple.constants.package" value="im.pidgin.libpurple.constants" />
 
+
 	<property name="javah.out" location="." />
 
+	<property name="cc" value="${ndk.host}-gcc"/>
 
 
+
 	<!-- ================================= 
           target: default              
          ================================= -->
-	<target name="build" depends="ant-contrib.load,extractconstants,headers.create,generate-makefile" description="Builds the native functions that need to exists to interface libpurple with java.">
+	<target name="build" depends="ant-contrib.load,extractconstants,headers.create,distribute" description="Builds the native functions that need to exists to interface libpurple with java.">
 
 	</target>
 
 	<!-- - - - - - - - - - - - - - - - - - 
-          target: generate-makefile               
-          generates the android makefile       
-         - - - - - - - - - - - - - - - - - -->
-	<target name="generate-makefile">
-
-	</target>
-
-	<!-- - - - - - - - - - - - - - - - - - 
           target: headers.create                      
          - - - - - - - - - - - - - - - - - -->
 	<target name="headers.create">
@@ -88,7 +85,6 @@
 			<enum name="PurpleConnectionFlags" />
 			<enum name="PurpleConnectionState" />
 			<enum name="PurpleConnectionError" />
-
 		</extractconstants>
 	</target>
 
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_account_PurpleAccount.h	ca1c331cc7a8d44bb8f1f0000f9d30ad329c42d3
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_account_PurpleAccount */
-
-#ifndef _Included_im_pidgin_libpurple_account_PurpleAccount
-#define _Included_im_pidgin_libpurple_account_PurpleAccount
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_account_PurpleAccountList.h	fc0df10fa87e2b248be6136f6235670edc69a9f7
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_account_PurpleAccountList */
-
-#ifndef _Included_im_pidgin_libpurple_account_PurpleAccountList
-#define _Included_im_pidgin_libpurple_account_PurpleAccountList
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_account_PurpleStatus.h	ae60b9603013c6370b2d57a5371fdbf69a579b78
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_account_PurpleStatus */
-
-#ifndef _Included_im_pidgin_libpurple_account_PurpleStatus
-#define _Included_im_pidgin_libpurple_account_PurpleStatus
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_blist_PurpleBlist.h	2166ba78b228bf3deeeb44ba979a6d7448118d62
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_blist_PurpleBlist */
-
-#ifndef _Included_im_pidgin_libpurple_blist_PurpleBlist
-#define _Included_im_pidgin_libpurple_blist_PurpleBlist
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_blist_PurpleBlistNode.h	4c65ca895b90daba6a02a5b173f51701a11fc2c5
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_blist_PurpleBlistNode */
-
-#ifndef _Included_im_pidgin_libpurple_blist_PurpleBlistNode
-#define _Included_im_pidgin_libpurple_blist_PurpleBlistNode
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_blist_PurpleContact.h	66fc51646a8d8d8f8392968dbc5440b55620b391
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_blist_PurpleContact */
-
-#ifndef _Included_im_pidgin_libpurple_blist_PurpleContact
-#define _Included_im_pidgin_libpurple_blist_PurpleContact
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_buddy_PurpleBuddy.h	44875b9c3215a800033e48d523124f48ae141217
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_buddy_PurpleBuddy */
-
-#ifndef _Included_im_pidgin_libpurple_buddy_PurpleBuddy
-#define _Included_im_pidgin_libpurple_buddy_PurpleBuddy
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_EventLoop.h	7f2527d2dcf83cd82b7988a1b5cbc24d3c8fffda
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_core_EventLoop */
-
-#ifndef _Included_im_pidgin_libpurple_core_EventLoop
-#define _Included_im_pidgin_libpurple_core_EventLoop
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_PurpleInstance.h	455a8b1708e11964f3897bea77c05ea8b292955b
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_core_PurpleInstance */
-
-#ifndef _Included_im_pidgin_libpurple_core_PurpleInstance
-#define _Included_im_pidgin_libpurple_core_PurpleInstance
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_dns_DnsQueryData.h	17adaf8635e5258b108bddd33ce54ffdc6bae6d6
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_core_dns_DnsQueryData */
-
-#ifndef _Included_im_pidgin_libpurple_core_dns_DnsQueryData
-#define _Included_im_pidgin_libpurple_core_dns_DnsQueryData
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_dns_DnsQueryFailedCallback.h	169a64202c310df5d6e2a8ad8585e8a3b6905cdc
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_core_dns_DnsQueryFailedCallback */
-
-#ifndef _Included_im_pidgin_libpurple_core_dns_DnsQueryFailedCallback
-#define _Included_im_pidgin_libpurple_core_dns_DnsQueryFailedCallback
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_dns_DnsQueryResolvedCallback.h	c3d5bfd4bcc719686590cc04aee2548da0734a32
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_core_dns_DnsQueryResolvedCallback */
-
-#ifndef _Included_im_pidgin_libpurple_core_dns_DnsQueryResolvedCallback
-#define _Included_im_pidgin_libpurple_core_dns_DnsQueryResolvedCallback
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_glib_GHashTable.h	8f1e270523b7844869a391b1d76de6ae9e9aadd5
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_glib_GHashTable */
-
-#ifndef _Included_im_pidgin_libpurple_glib_GHashTable
-#define _Included_im_pidgin_libpurple_glib_GHashTable
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_glib_GHashTableSet.h	478bb012ee72af0fa56d2aee91b937f4cc8e6d70
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_glib_GHashTableSet */
-
-#ifndef _Included_im_pidgin_libpurple_glib_GHashTableSet
-#define _Included_im_pidgin_libpurple_glib_GHashTableSet
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_glib_GList.h	fa6885de512bfc4f77b3f5434c4c20d69fb21e98
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_glib_GList */
-
-#ifndef _Included_im_pidgin_libpurple_glib_GList
-#define _Included_im_pidgin_libpurple_glib_GList
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_glib_GListIterator.h	2edbc14a1e821c1f6f382f30987a7c2c723caf32
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_glib_GListIterator */
-
-#ifndef _Included_im_pidgin_libpurple_glib_GListIterator
-#define _Included_im_pidgin_libpurple_glib_GListIterator
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_glib_GSourceFunctionCall.h	87dbace54f2ebdcdce8be91f293bbe873d1f38cc
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_glib_GSourceFunctionCall */
-
-#ifndef _Included_im_pidgin_libpurple_glib_GSourceFunctionCall
-#define _Included_im_pidgin_libpurple_glib_GSourceFunctionCall
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_plugin_PurplePlugin.h	2be1eb7aadc8782dd48ba33fbb148d0bd47ddfa7
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_plugin_PurplePlugin */
-
-#ifndef _Included_im_pidgin_libpurple_plugin_PurplePlugin
-#define _Included_im_pidgin_libpurple_plugin_PurplePlugin
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_plugin_PurpleProtocolPlugin.h	e65f34c2ce9d68e8399f82db023317e086b9d4b2
+++ /dev/null	
@@ -1,13 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include <jni.h>
-/* Header for class im_pidgin_libpurple_plugin_PurpleProtocolPlugin */
-
-#ifndef _Included_im_pidgin_libpurple_plugin_PurpleProtocolPlugin
-#define _Included_im_pidgin_libpurple_plugin_PurpleProtocolPlugin
-#ifdef __cplusplus
-extern "C" {
-#endif
-#ifdef __cplusplus
-}
-#endif
-#endif
============================================================
--- android/workspace/im.pidgin.libpurple/project.properties	a926b50aa1fecfff2ab44d8911f4214ce154d5e5
+++ android/workspace/im.pidgin.libpurple/project.properties	f01b9ea628fe08127d2bbff43235be62ba943969
@@ -12,3 +12,4 @@ target=android-10
 
 # Project target.
 target=android-10
+android.library=true
============================================================
--- android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleInstance.java	ed1a1da5adfdcbdfed90cc182496c39db60407ec
+++ android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleInstance.java	d58012cd32660a40f95582eaf5cf607e518e842f
@@ -15,8 +15,13 @@ public class PurpleInstance {
  */
 public class PurpleInstance {
 
-	
+	public PurpleInstance() {
+		PurpleLibraryLoader.load();
+	}
+
 	public static PurpleInstance createInstance(File baseDirectory) {
 		return null;
 	}
+
+	public native String getVersion_native();
 }
============================================================
--- android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleLibraryLoader.java	1e7151530921cadb555bb4768acd285c4af33ce0
+++ android/workspace/im.pidgin.libpurple/src/im/pidgin/libpurple/core/PurpleLibraryLoader.java	23c65524605799d029955751022ba1d359509cb8
@@ -1,5 +1,7 @@ package im.pidgin.libpurple.core;
 package im.pidgin.libpurple.core;
 
+
+
 /**
  * Loads the libraries needed to do any native operation.
  * <p>
@@ -11,27 +13,105 @@ public class PurpleLibraryLoader {
 public class PurpleLibraryLoader {
 	private static boolean loaded = false;
 	private static Object mutex = new Object();
+//	private Method loadLibraryMethod;
+//	private String[] libDirs;
 
+	private PurpleLibraryLoader() {
+	}
+
 	public static void load() {
 		synchronized (mutex) {
 			if (!loaded) {
-				System.loadLibrary("ffi");
-				System.loadLibrary("charset");
-				System.loadLibrary("iconv");
-				System.loadLibrary("intl");
-				System.loadLibrary("gettextlib");
-				System.loadLibrary("gettextsrc");
-				System.loadLibrary("gettextpo");
-				System.loadLibrary("xml2");
-				System.loadLibrary("dbus-1");
-				System.loadLibrary("glib-2.0");
-				System.loadLibrary("gthread-2.0");
-				System.loadLibrary("gobject-2.0");
-				System.loadLibrary("gmodule-2.0");
-				System.loadLibrary("gio-2.0");
-				System.loadLibrary("purple");
+				PurpleLibraryLoader purpleLibraryLoader = new PurpleLibraryLoader();
+				purpleLibraryLoader.loadLibrary("ffi", "6");
+				purpleLibraryLoader.loadLibrary("charset", "1");
+				purpleLibraryLoader.loadLibrary("iconv", "2");
+				purpleLibraryLoader.loadLibrary("intl", "8");
+				purpleLibraryLoader.loadLibrary("gettextlib-0.18.1", null);
+				purpleLibraryLoader.loadLibrary("gettextsrc-0.18.1", null);
+				//purpleLibraryLoader.loadLibrary("gettextpo", "0");
+				purpleLibraryLoader.loadLibrary("xml2", "2");
+				purpleLibraryLoader.loadLibrary("dbus-1", "3");
+				purpleLibraryLoader.loadLibrary("glib-2.0", "0");
+				purpleLibraryLoader.loadLibrary("gthread-2.0", "0");
+				purpleLibraryLoader.loadLibrary("gobject-2.0", "0");
+				purpleLibraryLoader.loadLibrary("gmodule-2.0", "0");
+				purpleLibraryLoader.loadLibrary("gio-2.0", "0");
+				purpleLibraryLoader.loadLibrary("purple", "20");
+				purpleLibraryLoader.loadLibrary("purple-java", null);
 				loaded = true;
 			}
 		}
 	}
+	private void loadLibrary(String name, String major) {
+		String realname = name;
+		if (major != null) {
+			realname += "." + major;
+		}
+		System.loadLibrary(realname);
+	}
+//	private void loadLibrary(String name, String major) {
+//		if (libDirs == null) {
+//			String pathSeparator = System.getProperty("path.separator", ":");
+//			String javaLibraryPath = System.getProperty("java.library.path",
+//					".");
+//			String fileSep = System.getProperty("file.separator", "/");
+//
+//			libDirs = javaLibraryPath.split(pathSeparator);
+//
+//			for (int i = 0; i < libDirs.length; i++) {
+//				if (!libDirs[i].endsWith(fileSep)) {
+//					libDirs[i] += fileSep;
+//				}
+//			}
+//			System.out.println("Runtime paths: " + Arrays.toString(libDirs));
+//		}
+//
+//		String filename = "lib" + name + ".so";
+//		if (major != null) {
+//			filename += "." + major;
+//		}
+//
+//		for (String dir : libDirs) {
+//			File file = new File(dir + filename);
+//			if (file.exists()) {
+//				loadFile(file.getAbsolutePath());
+//				return;
+//			}
+//		}
+//		throw new UnsatisfiedLinkError("could not find " + filename);
+//	}
+//
+//	private void loadFile(String file) {
+//		if (loadLibraryMethod == null) {
+//			try {
+//				loadLibraryMethod = Runtime.class.getMethod("nativeLoad",
+//						String.class, ClassLoader.class);
+//				loadLibraryMethod.setAccessible(true);
+//			} catch (SecurityException e) {
+//				e.printStackTrace();
+//				throw new UnsatisfiedLinkError(
+//						"security error accessing nativeLoad()");
+//			} catch (NoSuchMethodException e) {
+//				e.printStackTrace();
+//				throw new UnsatisfiedLinkError("cannot find nativeLoad()");
+//			}
+//		}
+//		try {
+//			String error = (String) loadLibraryMethod.invoke(Runtime.class,
+//					file);
+//			if (error != null) {
+//				throw new UnsatisfiedLinkError(error);
+//			}
+//		} catch (IllegalArgumentException e) {
+//			e.printStackTrace();
+//			throw new UnsatisfiedLinkError("error invoking nativeLoad()");
+//		} catch (IllegalAccessException e) {
+//			e.printStackTrace();
+//			throw new UnsatisfiedLinkError("error accessing nativeLoad()");
+//		} catch (InvocationTargetException e) {
+//			e.printStackTrace();
+//			throw new UnsatisfiedLinkError("error invoking nativeLoad()");
+//		}
+//	}
 }
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple/.classpath	172acec4dece46639cfc2af8c68357765a2faae0
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="gen"/>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+	<classpathentry kind="output" path="bin/classes"/>
+</classpath>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple/.cproject	aef56829adcff808c5d636e71b1fe73fe2394274
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<buildSystem id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.340630140">
+			<storageModule id="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.340630140" moduleId="org.eclipse.cdt.core.settings"/>
+		</buildSystem>
+		<cconfiguration id="cdt.managedbuild.config.gnu.so.release.1657673646">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.so.release.1657673646" moduleId="org.eclipse.cdt.core.settings" name="Android">
+				<externalSettings>
+					<externalSetting>
+						<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/im.pidgin.libpurple"/>
+						<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/im.pidgin.libpurple/Android"/>
+						<entry flags="RESOLVED" kind="libraryFile" name="purple-java"/>
+					</externalSetting>
+				</externalSettings>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactExtension="so" artifactName="purple-java" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.so.release.1657673646" name="Android" parent="cdt.managedbuild.config.gnu.so.release" postannouncebuildStep="Copy so file to the right location" postbuildStep="cp libpurple-java.so ..">
+					<folderInfo id="cdt.managedbuild.config.gnu.so.release.1657673646." name="/" resourcePath="">
+						<toolChain id="cdt.managedbuild.toolchain.gnu.so.release.1972536089" name="Linux GCC" nonInternalBuilderId="cdt.managedbuild.target.gnu.builder.so.release" resourceTypeBasedDiscovery="true" superClass="cdt.managedbuild.toolchain.gnu.so.release">
+							<targetPlatform id="cdt.managedbuild.target.gnu.platform.so.release.1243702157" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.so.release"/>
+							<builder buildPath="${workspace_loc:/im.pidgin.libpurple/Android}" id="cdt.managedbuild.target.gnu.builder.so.release.5273459" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="-1" superClass="cdt.managedbuild.target.gnu.builder.so.release"/>
+							<tool id="cdt.managedbuild.tool.gnu.archiver.base.1816111940" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.so.release.165987769" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.so.release">
+								<option id="gnu.cpp.compiler.so.release.option.optimization.level.1740518659" name="Optimization Level" superClass="gnu.cpp.compiler.so.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+								<option id="gnu.cpp.compiler.so.release.option.debugging.level.208987653" name="Debug Level" superClass="gnu.cpp.compiler.so.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
+							</tool>
+							<tool command="${ndk.root}/bin/${ndk.host}-gcc" id="cdt.managedbuild.tool.gnu.c.compiler.so.release.438648946" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.so.release">
+								<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.so.release.option.optimization.level.1239458496" name="Optimization Level" superClass="gnu.c.compiler.so.release.option.optimization.level" valueType="enumerated"/>
+								<option id="gnu.c.compiler.so.release.option.debugging.level.17581855" name="Debug Level" superClass="gnu.c.compiler.so.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
+								<option id="gnu.c.compiler.option.include.paths.105762210" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+									<listOptionValue builtIn="false" value=""${ndk.root}/sysroot/usr/include""/>
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/include}""/>
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/include/glib-2.0}""/>
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/lib/glib-2.0/include}""/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.877345300" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+							</tool>
+							<tool command="${ndk.root}/bin/${ndk.host}-gcc" id="cdt.managedbuild.tool.gnu.c.linker.so.release.1449130208" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.so.release">
+								<option defaultValue="true" id="gnu.c.link.so.release.option.shared.788169912" name="Shared (-shared)" superClass="gnu.c.link.so.release.option.shared" valueType="boolean"/>
+								<option id="gnu.c.link.option.libs.1851430816" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
+									<listOptionValue builtIn="false" value="purple"/>
+									<listOptionValue builtIn="false" value="glib-2.0"/>
+								</option>
+								<option id="gnu.c.link.option.paths.866605597" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/lib}""/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.252302685" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+								</inputType>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.so.release.1318396899" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.so.release">
+								<option defaultValue="true" id="gnu.cpp.link.so.release.option.shared.1426157056" name="Shared (-shared)" superClass="gnu.cpp.link.so.release.option.shared" valueType="boolean"/>
+							</tool>
+							<tool command="${ndk.root}/bin/${ndk.host}-as" id="cdt.managedbuild.tool.gnu.assembler.so.release.1588726773" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.so.release">
+								<option id="gnu.both.asm.option.include.paths.409578374" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+									<listOptionValue builtIn="false" value=""${ndk.root}/sysroot/usr/include""/>
+									<listOptionValue builtIn="false" value=""${ndk.root}/sysroot/usr/include/glib-2.0""/>
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/lib/glib-2.0/include}""/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1723368890" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1484348270">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1484348270" moduleId="org.eclipse.cdt.core.settings" name="Android Debug">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1484348270" name="Android Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
+					<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1484348270." name="/" resourcePath="">
+						<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.536919813" name="Linux GCC" nonInternalBuilderId="cdt.managedbuild.target.gnu.builder.exe.debug" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+							<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.894737806" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
+							<builder buildPath="${workspace_loc:/im.pidgin.libpurple/Android Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.1650330450" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
+							<tool id="cdt.managedbuild.tool.gnu.archiver.base.289614368" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+							<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.688792751" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+								<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.1520803778" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
+								<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.507664491" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.58653906" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
+								<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.289472638" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
+								<option id="gnu.c.compiler.exe.debug.option.debugging.level.1051527660" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
+								<option id="gnu.c.compiler.option.include.paths.1831007009" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+									<listOptionValue builtIn="false" value=""${ndk.root}/sysroot/usr/include""/>
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/include}""/>
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/include/glib-2.0}""/>
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/lib/glib-2.0/include}""/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.793154500" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.137759764" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug">
+								<option id="gnu.c.link.option.libs.1999672232" name="Libraries (-l)" superClass="gnu.c.link.option.libs" valueType="libs">
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/lib/libpurple.so}""/>
+								</option>
+								<option id="gnu.c.link.option.paths.727652150" name="Library search path (-L)" superClass="gnu.c.link.option.paths" valueType="libPaths">
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/lib}""/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.425224706" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+								</inputType>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1506438485" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug"/>
+							<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.336892324" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
+								<option id="gnu.both.asm.option.include.paths.281739864" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
+									<listOptionValue builtIn="false" value=""${ndk.root}/sysroot/usr/include""/>
+									<listOptionValue builtIn="false" value=""${ndk.root}/sysroot/usr/include/glib-2.0""/>
+									<listOptionValue builtIn="false" value=""${workspace_loc:/im.pidgin.libpurple.build/build/prefix/lib/glib-2.0/include}""/>
+								</option>
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1928617760" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="im.pidgin.libpurple.null.1844386711" name="im.pidgin.libpurple"/>
+	</storageModule>
+	<storageModule moduleId="refreshScope" versionNumber="1">
+		<resource resourceType="PROJECT" workspacePath="/im.pidgin.libpurple"/>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.1657673646;cdt.managedbuild.config.gnu.so.release.1657673646.;cdt.managedbuild.tool.gnu.c.compiler.so.release.438648946;cdt.managedbuild.tool.gnu.c.compiler.input.877345300">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.1484348270;cdt.managedbuild.config.gnu.exe.debug.1484348270.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.58653906;cdt.managedbuild.tool.gnu.c.compiler.input.793154500">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.so.release.1657673646">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
+		</scannerConfigBuildInfo>
+		<scannerConfigBuildInfo instanceId="preference.org.eclipse.cdt.managedbuilder.core.configurationDataProvider.340630140">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		</scannerConfigBuildInfo>
+	</storageModule>
+</cproject>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple/.externalToolBuilders/headers and native.launch	c1316a7b663b87c807587e28c444bc3f074a9318
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/im.pidgin.libpurple/gen" type="2"/>
<item path="/im.pidgin.libpurple/native" type="2"/>
</resources>}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/im.pidgin.libpurple"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="im.pidgin.libpurple"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/im.pidgin.libpurple/native/build.ant}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple/.project	c98e549547abeca157c10a02528edee50803c8a6
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>im.pidgin.libpurple</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>LaunchConfigHandle</key>
+					<value><project>/.externalToolBuilders/headers and native.launch</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>clean,full,incremental,</triggers>
+			<arguments>
+				<dictionary>
+					<key>?name?</key>
+					<value></value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.append_environment</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildArguments</key>
+					<value>-j</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildCommand</key>
+					<value>make</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.buildLocation</key>
+					<value>${workspace_loc:/im.pidgin.libpurple/Android}</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+					<value>clean</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.contents</key>
+					<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+					<value>all</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.stopOnError</key>
+					<value>true</value>
+				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+					<value>true</value>
+				</dictionary>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple/.settings/org.eclipse.cdt.codan.core.prefs	68be6d7e77799f982ba065f31781ca2bd24906f2
@@ -0,0 +1,65 @@
+eclipse.preferences.version=1
+org.eclipse.cdt.codan.checkers.errnoreturn=Warning
+org.eclipse.cdt.codan.checkers.errnoreturn.params={implicit\=>false}
+org.eclipse.cdt.codan.checkers.errreturnvalue=Error
+org.eclipse.cdt.codan.checkers.errreturnvalue.params={}
+org.eclipse.cdt.codan.checkers.noreturn=Error
+org.eclipse.cdt.codan.checkers.noreturn.params={implicit\=>false}
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
+org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
+org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={}
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
+org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={}
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={no_break_comment\=>"no break",last_case_param\=>true,empty_case_param\=>false}
+org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
+org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={unknown\=>false,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
+org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
+org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
+org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
+org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
+org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
+org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={}
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
+org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
+org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={}
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
+org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={}
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={macro\=>true,exceptions\=>()}
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={paramNot\=>false}
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={else\=>false,afterelse\=>false}
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={macro\=>true}
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
+org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={macro\=>true,exceptions\=>("@(\#)","$Id")}
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
+org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>false,RUN_ON_INC_BUILD\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple/loadlibs.ant	4e67eb45f0050a40d6f7968e1c7da7965e7dc490
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ====================================================================== 
+     27.05.2012 23:26:27                                                        
+
+     libpurple.loadlibs    
+     This file contains procedres that let you easilly include libpurple and alle needed Libraries in your project.
+                   
+     michaelz                                                                
+     ====================================================================== -->
+<project name="libpurple.loadlibs">
+	<description>
+            This file contains procedres that let you easilly include libpurple and alle needed Libraries in your project.
+    </description>
+
+
+	<!-- = = = = = = = = = = = = = = = = =
+          macrodef: libpurple.loadlibs          
+         = = = = = = = = = = = = = = = = = -->
+	<macrodef name="libpurple.loadlibs">
+		<attribute name="outproject" default="" />
+		<sequential>
+			<dirname file="${ant.file.libpurple.loadlibs}" property="libpurple.projectroot" />
+			<property name="libpurple.deploy" location="${libpurple.projectroot}/deploy" />
+
+			<property name="libpurple.outproject" location="@{outproject}" />
+			<property name="libpurple.outlibdir" location="${libpurple.outproject}/libs/armeabi" />
+			<mkdir dir="${libpurple.outlibdir}" />
+
+			<!-- do the copy -->
+			<copy todir="${libpurple.outlibdir}">
+				<fileset dir="${libpurple.deploy}">
+					<include name="*.so" />
+				</fileset>
+			</copy>
+		</sequential>
+	</macrodef>
+
+
+</project>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple/native/distribute.ant	89d8eeeec596aee6f1eb1fc3a03fa02116a8ca98
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ====================================================================== 
+     28.05.2012 02:58:34                                                        
+
+     libpurple.distribute    
+     Create distributeable library files
+                   
+     michaelz                                                                
+     ====================================================================== -->
+<project name="libpurple.distribute" default="distribute">
+	<description>
+            Create distributeable library files
+    </description>
+
+	<import file="../../im.pidgin.libpurple.build/buildscripts/common.ant" />
+	<dirname file="${ant.file.libpurple.distribute}" property="libpurple.native" />
+	<property name="libpurple.deploy" location="${libpurple.native}/../deploy" />
+
+
+	<!-- ================================= 
+          target: distribute              
+         ================================= -->
+	<target name="distribute" depends="ant-contrib.load" description="Create distributeable library files">
+		<replaceLibNames output="${libpurple.deploy}" override="false">
+			<directory directory="${libpurple.native}/.." />
+			<directory directory="${libpurple.prefix}/lib" />
+			<library name="libpurple-java.so" />
+			<library name="libcharset.so.1" />
+			<library name="libdbus-1.so.3" />
+			<library name="libffi.so.6" />
+			<library name="libgettextpo.so.0" />
+			<library name="libgettextlib-0.18.1.so" />
+			<library name="libgettextsrc-0.18.1.so" />
+			<library name="libgio-2.0.so.0" />
+			<library name="libglib-2.0.so.0" />
+			<library name="libgmodule-2.0.so.0" />
+			<library name="libgobject-2.0.so.0" />
+			<library name="libgthread-2.0.so.0" />
+			<library name="libiconv.so.2" />
+			<library name="libintl.so.8" />
+			<library name="libpurple.so.20" />
+			<library name="libxml2.so.2" />
+		</replaceLibNames>
+	</target>
+</project>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple/native/im_pidgin_libpurple_core_PurpleInstance.c	ca9bbabe0ee3859ce49b6b43c4e05eeeb50dfa3f
@@ -0,0 +1,15 @@
+#include <jni.h>
+#include <libpurple/core.h>
+
+#include "im_pidgin_libpurple_core_PurpleInstance.h"
+
+/*
+ * Class:     im_pidgin_libpurple_core_PurpleInstance
+ * Method:    getVersion_native
+ * Signature: ()Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_im_pidgin_libpurple_core_PurpleInstance_getVersion_1native
+  (JNIEnv *env, jobject obj) {
+	const char* version = purple_core_get_version();
+	return (*env)->NewStringUTF(env, version);
+}
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/.classpath	5c9cf0b24901a06e714b7b44a5cc1abbbe434770
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/dbus.launch	e74ffc4dc57035961f4c2d262641d3c54e9f30c3
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/im.pidgin.libpurple.build/build/dbus.log}"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="im.pidgin.libpurple.build"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/im.pidgin.libpurple.build/buildscripts/common.ant" type="1"/>
<item path="/im.pidgin.libpurple.build/buildscripts/dbus.ant" type="1"/>
</resources>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/im.pidgin.libpurple.build/buildscripts/dbus.ant}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/glib.launch	d49b166fb439456437b896393ca020c476d76b84
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/im.pidgin.libpurple.build/build/glib.log}"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="im.pidgin.libpurple.build"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/im.pidgin.libpurple.build/buildscripts/common.ant" type="1"/>
<item path="/im.pidgin.libpurple.build/buildscripts/glib.ant" type="1"/>
</resources>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/im.pidgin.libpurple.build/buildscripts/glib.ant}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/libffi.launch	7c51195008e826ea91e2c113cb55622f7e306c4f
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/im.pidgin.libpurple.build/build/libffi-3.0.11" type="2"/>
</resources>}"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="im.pidgin.libpurple.build"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/im.pidgin.libpurple.build/buildscripts/common.ant" type="1"/>
<item path="/im.pidgin.libpurple.build/buildscripts/libffi.ant" type="1"/>
</resources>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/im.pidgin.libpurple.build/buildscripts/libffi.ant}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/libgettext.launch	254725ae695c8247daeb92dd73d643dd5d6417ed
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="im.pidgin.libpurple.build"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/im.pidgin.libpurple.build/buildscripts/common.ant" type="1"/>
<item path="/im.pidgin.libpurple.build/buildscripts/libgettext.ant" type="1"/>
</resources>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/im.pidgin.libpurple.build/buildscripts/libgettext.ant}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/libiconv.launch	c140de0b4df96165e2d1afcc398a56887b773163
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/im.pidgin.libpurple.build/build/libiconv-1.14" type="2"/>
</resources>}"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="im.pidgin.libpurple.build"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/im.pidgin.libpurple.build/buildscripts/common.ant" type="1"/>
<item path="/im.pidgin.libpurple.build/buildscripts/libiconv.ant" type="1"/>
</resources>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/im.pidgin.libpurple.build/buildscripts/libiconv.ant}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/libxml2.launch	15effc8d4d717d36fb06dcaefeef01224ee1eeea
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<stringAttribute key="org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE" value="${workspace_loc:/im.pidgin.libpurple.build/build/libxml2.log}"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="im.pidgin.libpurple.build"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/im.pidgin.libpurple.build/buildscripts/common.ant" type="1"/>
<item path="/im.pidgin.libpurple.build/buildscripts/libxml2.ant" type="1"/>
</resources>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/im.pidgin.libpurple.build/buildscripts/libxml2.ant}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/.externalToolBuilders/purple.launch	05f7120955b141265745c2c91aabc49ab68276e4
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="im.pidgin.libpurple.build"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?>
<resources>
<item path="/im.pidgin.libpurple.build/buildscripts/common.ant" type="1"/>
<item path="/im.pidgin.libpurple.build/buildscripts/purple.ant" type="1"/>
</resources>}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/im.pidgin.libpurple.build/buildscripts/purple.ant}"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+</launchConfiguration>
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/.settings/org.eclipse.ltk.core.refactoring.prefs	b47eb48025fe917e9540ba67c455a2fd104ae2a8
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/src/im/pidgin/libpurple/build/libs/Library.java	edefbb563eb0c980e87f178f885123c96aac90ce
@@ -0,0 +1,18 @@
+package im.pidgin.libpurple.build.libs;
+
+/**
+ * @see ReplaceLibNames#createLibrary()
+ * @author michaelz
+ *
+ */
+public class Library {
+	private String fullName;
+
+	public void setName(String fullName) {
+		this.fullName = fullName;
+	}
+	
+	public String getFullName() {
+		return fullName;
+	}
+}
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/src/im/pidgin/libpurple/build/libs/LibraryDirectory.java	01295f98e08a3a2f48f3c1350584df636be06704
@@ -0,0 +1,16 @@
+package im.pidgin.libpurple.build.libs;
+
+import java.io.File;
+
+public class LibraryDirectory {
+	
+	private File dir;
+
+	public void setDirectory(File dir) {
+		this.dir = dir;
+	}
+	
+	public File getDir() {
+		return dir;
+	}
+}
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/src/im/pidgin/libpurple/build/libs/ReplaceLibNames.java	6bc91bd73e5da95082610b8980482ed6dd219613
@@ -0,0 +1,121 @@
+package im.pidgin.libpurple.build.libs;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.LinkedList;
+
+/**
+ * Replaces all libnames in the form of libx.so.major with libx.major.so, so that android does not complain.
+ * @author michaelz
+ *
+ */
+public class ReplaceLibNames {
+	private static final int BUFFER = 4096;
+	private File outputDir;
+	private final LinkedList<Library> libs = new LinkedList<Library>();
+	private final LinkedList<LibraryDirectory> dirs = new LinkedList<LibraryDirectory>();
+
+	private final LinkedList<Replacer> replacers = new LinkedList<Replacer>();
+	
+	private Boolean override =false;
+	
+	public void execute() throws IOException {
+		if (outputDir == null) {
+			throw new IllegalArgumentException("Output must be given.");
+		}
+		for (Library libname : libs) {
+			String fullName = libname.getFullName();
+			String replacement = libname.getFullName().replaceFirst("\\.so\\.(\\d+(?:\\.\\d+)*)", ".$1.so");
+			replacers.add(new Replacer(fullName, replacement));
+		}
+		
+		for (Library libname : libs) {
+			String fullName = libname.getFullName();
+			String replacement = libname.getFullName().replaceFirst("\\.so\\.(\\d+(?:\\.\\d+)*)", ".$1.so");
+			File in = null;
+			for (LibraryDirectory dir : dirs) {
+				File search = new File(dir.getDir(), fullName);
+				if (search.exists()) {
+					in = search;
+					break;
+				}
+			}
+			if (in == null) {
+				throw new IllegalArgumentException("Could not find file " + fullName);
+			}
+			File out = new File(outputDir, replacement);
+			
+			if (override || out.lastModified() < in.lastModified()) {
+				System.out.println("Moving " + fullName + " to " + out.getAbsolutePath());
+				moveLib(new FileInputStream(in), new FileOutputStream(out));
+			} else {
+				System.out.println("Skipping " + fullName);
+			}
+		}
+	}
+	
+	private void moveLib(FileInputStream in, FileOutputStream out) throws IOException {
+		byte[] buffer = new byte[BUFFER * 2];
+		int end = in.read(buffer, 0, BUFFER);
+		
+		while (in.available() > 0 && end > 0) {
+			int len = in.read(buffer, end, BUFFER);
+			binaryReplace(buffer, end);
+			out.write(buffer, 0, end);
+
+			System.arraycopy(buffer, end, buffer, 0, len);
+			end = len;
+		}
+		
+		binaryReplace(buffer, end);
+		out.write(buffer, 0, end);
+		out.close();
+	}
+
+	/**
+	 * 
+	 * @param buffer
+	 * @param end First index where no match is tryed.
+	 */
+	private void binaryReplace(byte[] buffer, int end) {
+		for (Replacer r : replacers) {
+			for (int i = 0; i < end; i++) {
+				r.replaceAt(buffer, i);
+			}
+		}
+	}
+
+	/**
+	 * The direcotry where all files should go to.
+	 * @param outputDir
+	 */
+	public void setOutput(File outputDir) {
+		this.outputDir = outputDir;
+	}
+	
+	/**
+	 * Adds a search path direcotry for files.
+	 * @return
+	 */
+	public LibraryDirectory createDirectory() {
+		LibraryDirectory directory = new LibraryDirectory();
+		dirs.add(directory);
+		return directory;
+	}
+	
+	/**
+	 * A file to be searched and renamed.
+	 * @return
+	 */
+	public Library createLibrary() {
+		Library library = new Library();
+		libs.add(library);
+		return library;
+	}
+	
+	public void setOverride(Boolean override) {
+		this.override = override;
+	}
+}
============================================================
--- /dev/null	
+++ android/workspace/im.pidgin.libpurple.build/src/im/pidgin/libpurple/build/libs/Replacer.java	94db6495347cf46e8153c1dcdbbb22d6ddcc3f14
@@ -0,0 +1,33 @@
+package im.pidgin.libpurple.build.libs;
+
+public class Replacer {
+	
+	private final byte[] toBytes;
+	private final byte[] fromBytes;
+
+	public Replacer(String from, String to) {
+		fromBytes = from.getBytes();
+		toBytes = to.getBytes();
+		if (fromBytes.length != toBytes.length) {
+			throw new IllegalArgumentException("Can only replace strings of same length");
+		}
+	}
+	
+	public void replaceAt(byte[] buffer, int position) {
+		boolean match = true;
+		if (position + fromBytes.length > buffer.length) {
+			match = false;
+		}
+		
+		for (int i = 0; match && i < fromBytes.length; i++) {
+			if (buffer[position + i] != fromBytes[i]) {
+				match = false;
+			}
+		}
+		if (match) {
+			for (int i = 0; match && i < toBytes.length; i++) {
+				buffer[position + i] = toBytes[i];
+			}
+		}
+	}
+}


More information about the Commits mailing list