Skip to content

Commit 3ff773c

Browse files
committedDec 19, 2012
Initial import
0 parents  commit 3ff773c

29 files changed

+5235
-0
lines changed
 

‎.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
android-ndk-*
2+
android-sdk-linux
3+
install
4+
sources
5+
toolchain
6+
jhbuild
7+
.local
8+
fake-android-application/fake-android-application.o

‎COPYING

Lines changed: 502 additions & 0 deletions
Large diffs are not rendered by default.

‎LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Copyright © 2012, Intel Corporation.
2+
3+
This program is free software; you can redistribute it and/or modify it
4+
under the terms and conditions of the GNU Lesser General Public License,
5+
version 2.1, as published by the Free Software Foundation.
6+
7+
This program is distributed in the hope it will be useful, but WITHOUT
8+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9+
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
10+
more details.
11+
12+
You should have received a copy of the GNU Lesser General Public License alon
13+
this program; if not, write to the Free Software Foundation, Inc., 51 Frankli
14+
- Fifth Floor, Boston, MA 02110-1301 USA
15+

‎Makefile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
QUIET_ = @
2+
QUIET = $(QUIET_$(V))
3+
4+
help:
5+
@echo "Usage: make [ ohand-app | ohand-pc | clean ]"
6+
7+
FAKE_C = $(PWD)/fake-android-application/fake-android-application.c
8+
FAKE_H = $(PWD)/fake-android-application/fake-android-application.h
9+
FAKE_OBJS = $(patsubst %.c,%.o,$(FAKE_C))
10+
FAKE_CFLAGS = `pkg-config mx-2.0 libsoup-2.4 gdk-pixbuf-2.0 --cflags` -D_PC_VERSION=1 -include $(FAKE_H) -I ohand/jni
11+
FAKE_LIBS = `pkg-config mx-2.0 libsoup-2.4 gdk-pixbuf-2.0 --libs` -lm
12+
13+
$(FAKE_OBJS): $(FAKE_C)
14+
@echo " CC `basename $@`"
15+
$(QUIET)$(CC) -Wall -g -c -o $@ $< $(FAKE_CFLAGS)
16+
17+
# OHand
18+
19+
ohand-app:
20+
cd $(PWD)/ohand && ndk-build
21+
cd $(PWD)/ohand && ant debug
22+
adb install -r $(PWD)/ohand/bin/NativeActivity-debug.apk
23+
24+
ohand-app-full:
25+
android update project -p $(PWD)/ohand --target 1
26+
cd $(PWD)/ohand && ndk-build
27+
cd $(PWD)/ohand && ant debug
28+
adb install -r $(PWD)/ohand/bin/NativeActivity-debug.apk
29+
30+
OHAND_FILES = $(shell cat $(PWD)/ohand/jni/Android.mk | grep LOCAL_SRC_FILES | cut -d = -f 2)
31+
OHAND_SOURCES = $(addprefix $(PWD)/ohand/jni/, $(OHAND_FILES))
32+
33+
ohand-pc: $(OHAND_SOURCES) $(FAKE_C) $(FAKE_H)
34+
@echo $(OHAND_SOURCES)
35+
$(CC) -Wall -g -D_PC_VERSION=1 -include $(FAKE_H) $(FAKE_FLAGS) $(OHAND_SOURCES) $(FAKE_C) -I$(PWD)/ohand/jni -o ohand-pc $(FAKE_LIBS)

‎README

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
====== Intro ======
2+
3+
Android-Clutter is a set of scripts helping you to build Clutter based
4+
applications for Android. This project mostly relies on jhbuild to
5+
compile all the libraries with the right options.
6+
7+
====== First setup ======
8+
9+
To build Clutter and all its dependencies run :
10+
11+
$ ./build-clutter-android.sh
12+
13+
This script will take care of downloading the Android SDK/NDK for you.
14+
15+
====== Setup and Compile the demo app ======
16+
17+
Once the stack is compiled you can setup and install the demo app by
18+
running :
19+
20+
$ make ohand-app-full
21+
22+
After you setup the app, any modification to the app can be compiled
23+
and installed by running :
24+
25+
$ make ohand-app

‎android-env.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Copyright © 2012, Intel Corporation.
2+
#
3+
# This program is free software; you can redistribute it and/or modify it
4+
# under the terms and conditions of the GNU Lesser General Public License,
5+
# version 2.1, as published by the Free Software Foundation.
6+
#
7+
# This program is distributed in the hope it will be useful, but WITHOUT
8+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
10+
# more details.
11+
#
12+
# You should have received a copy of the GNU Lesser General Public License along with
13+
# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St
14+
# - Fifth Floor, Boston, MA 02110-1301 USA
15+
16+
if [ ! -d $PWD/install ]; then
17+
echo "Please source this script from the top level directory of the clutter-android project"
18+
exit 1
19+
fi
20+
21+
22+
SOURCES="$PWD/sources"
23+
PREFIX="$PWD/install"
24+
LIBDIR="$PWD/install/lib"
25+
26+
export CFLAGS=
27+
export CC=arm-linux-androideabi-gcc
28+
export CXX=arm-linux-androideabi-g++
29+
30+
export C_INCLUDE_PATH=$PREFIX/include
31+
export CPLUS_INCLUDE_PATH=$PREFIX/include
32+
33+
export ANDROID_SDK_DIR="$PWD/android-sdk-linux"
34+
export ANDROID_NDK_DIR=`find $PWD/* -maxdepth 0 -type d -name 'android-ndk-r*'`
35+
export ANDROID_NDK_TOOLCHAIN="$PWD/toolchain"
36+
37+
export gl_cv_header_working_stdint_h=yes
38+
39+
# remove other langauges
40+
export LINGUAS=C
41+
42+
# avoid picking up system libraries
43+
export PKG_CONFIG_LIBDIR=/foo/bar
44+
export PKG_CONFIG_PATH=$LIBDIR/pkgconfig
45+
46+
export PATH="$PATH:$ANDROID_NDK_DIR:$ANDROID_NDK_TOOLCHAIN/bin"
47+
export PATH="$PATH:$ANDROID_SDK_DIR/tools/:$ANDROID_SDK_DIR/platform-tools"
48+
49+
export NDK_MODULE_PATH=$PWD
50+
51+
export PKG_CONFIG="pkg-config --define-variable=glib_genmarshal=/usr/bin/glib-genmarshal --define-variable=gobject_query=/usr/bin/gobject-query --define-variable=glib_mkenums=/usr/bin/glib-mkenums --define-variable=glib_compile_resources=/usr/bin/glib-compile-resources"

‎build-clutter-android.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright © 2012, Intel Corporation.
2+
#
3+
# This program is free software; you can redistribute it and/or modify it
4+
# under the terms and conditions of the GNU Lesser General Public License,
5+
# version 2.1, as published by the Free Software Foundation.
6+
#
7+
# This program is distributed in the hope it will be useful, but WITHOUT
8+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
10+
# more details.
11+
#
12+
# You should have received a copy of the GNU Lesser General Public License along with
13+
# this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St
14+
# - Fifth Floor, Boston, MA 02110-1301 USA
15+
16+
17+
set -ex
18+
19+
source ./android-env.sh
20+
21+
# download Android NDK and create standalone toolchain
22+
if ! test -d android-ndk-r8c; then
23+
wget http://dl.google.com/android/ndk/android-ndk-r8c-linux-x86.tar.bz2
24+
tar jxf android-ndk-r8c-linux-x86.tar.bz2
25+
rm android-ndk-r8c-linux-x86.tar.bz2
26+
pushd android-ndk-r8c
27+
./build/tools/make-standalone-toolchain.sh --platform=android-14 --install-dir=../toolchain
28+
popd
29+
fi
30+
31+
PREFIX=$PWD/jhbuild/.local
32+
33+
# set up patched version of jhbuild
34+
if ! test -d jhbuild; then
35+
git clone git://git.gnome.org/jhbuild
36+
pushd jhbuild
37+
patch -p1 -i ../modulesets/patches/jhbuild/disable-clean-la-files.patch
38+
./autogen.sh --prefix=$PREFIX
39+
make install
40+
popd
41+
fi
42+
43+
mkdir -p $PREFIX/share/aclocal
44+
cp /usr/share/aclocal/gtk-doc.m4 $PREFIX/share/aclocal/
45+
46+
# start the build
47+
$PREFIX/bin/jhbuild -f jhbuildrc-android build -q mx libsoup
48+
49+
# download Android SDK
50+
if ! test -d android-sdk-linux; then
51+
wget http://dl.google.com/android/android-sdk_r21-linux.tgz
52+
tar zxf android-sdk_r21-linux.tgz
53+
rm android-sdk_r21-linux.tgz
54+
fi
55+
56+
android update sdk -u --filter platform-tool,tool
57+
android update sdk -u --filter android-14
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
/*
2+
* Clutter.
3+
*
4+
* An OpenGL based 'interactive canvas' library.
5+
*
6+
* Copyright (C) 2011 Intel Corporation.
7+
*
8+
* This library is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU Lesser General Public
10+
* License as published by the Free Software Foundation; either
11+
* version 2 of the License, or (at your option) any later version.
12+
*
13+
* This library is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
* Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public
19+
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
20+
*
21+
* Authors:
22+
* Damien Lespiau <damien.lespiau@intel.com>
23+
*/
24+
25+
#include <clutter/clutter.h>
26+
27+
#include "fake-android-application.h"
28+
29+
struct _ClutterAndroidApplication
30+
{
31+
GObject parent;
32+
};
33+
34+
G_DEFINE_TYPE (ClutterAndroidApplication,
35+
clutter_android_application,
36+
G_TYPE_OBJECT)
37+
enum
38+
{
39+
READY,
40+
41+
LAST_SIGNAL,
42+
};
43+
44+
static guint signals[LAST_SIGNAL] = { 0, };
45+
46+
static void
47+
_clutter_marshal_BOOLEAN__VOID (GClosure *closure,
48+
GValue *return_value G_GNUC_UNUSED,
49+
guint n_param_values,
50+
const GValue *param_values,
51+
gpointer invocation_hint G_GNUC_UNUSED,
52+
gpointer marshal_data)
53+
{
54+
typedef gboolean (*GMarshalFunc_BOOLEAN__VOID) (gpointer data1,
55+
gpointer data2);
56+
register GMarshalFunc_BOOLEAN__VOID callback;
57+
register GCClosure *cc = (GCClosure*) closure;
58+
register gpointer data1, data2;
59+
gboolean v_return;
60+
61+
g_return_if_fail (return_value != NULL);
62+
g_return_if_fail (n_param_values == 1);
63+
64+
if (G_CCLOSURE_SWAP_DATA (closure))
65+
{
66+
data1 = closure->data;
67+
data2 = g_value_peek_pointer (param_values + 0);
68+
}
69+
else
70+
{
71+
data1 = g_value_peek_pointer (param_values + 0);
72+
data2 = closure->data;
73+
}
74+
callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback);
75+
76+
v_return = callback (data1,
77+
data2);
78+
79+
g_value_set_boolean (return_value, v_return);
80+
}
81+
82+
static gboolean
83+
clutter_android_application_ready (ClutterAndroidApplication *application)
84+
{
85+
return TRUE;
86+
}
87+
88+
static void
89+
clutter_android_application_finalize (GObject *object)
90+
{
91+
G_OBJECT_CLASS (clutter_android_application_parent_class)->finalize (object);
92+
}
93+
94+
static void
95+
clutter_android_application_class_init (ClutterAndroidApplicationClass *klass)
96+
{
97+
GObjectClass *object_class = G_OBJECT_CLASS (klass);
98+
99+
object_class->finalize = clutter_android_application_finalize;
100+
101+
klass->ready = clutter_android_application_ready;
102+
103+
signals[READY] =
104+
g_signal_new ("ready",
105+
G_TYPE_FROM_CLASS (object_class),
106+
G_SIGNAL_RUN_LAST,
107+
G_STRUCT_OFFSET (ClutterAndroidApplicationClass, ready),
108+
NULL, NULL,
109+
_clutter_marshal_BOOLEAN__VOID,
110+
G_TYPE_BOOLEAN, 0);
111+
}
112+
113+
static void
114+
clutter_android_application_init (ClutterAndroidApplication *self)
115+
{
116+
}
117+
118+
void
119+
clutter_android_application_run (ClutterAndroidApplication *application)
120+
{
121+
gboolean initialized;
122+
123+
g_return_if_fail (CLUTTER_IS_ANDROID_APPLICATION (application));
124+
125+
g_signal_emit (application, signals[READY], 0, &initialized);
126+
127+
clutter_main ();
128+
}
129+
130+
131+
int
132+
main (int argc, char *argv[])
133+
{
134+
ClutterAndroidApplication *application;
135+
136+
g_type_init ();
137+
138+
application = (ClutterAndroidApplication *) g_object_new (CLUTTER_TYPE_ANDROID_APPLICATION, NULL);
139+
140+
clutter_android_main (application);
141+
142+
return 0;
143+
}
144+
145+
146+
void
147+
clutter_android_application_show_keyboard (ClutterAndroidApplication *application,
148+
gboolean show_keyboard,
149+
gboolean implicit)
150+
{
151+
}
152+
153+
gpointer
154+
clutter_android_application_get_native_activity (ClutterAndroidApplication *application)
155+
{
156+
return NULL;
157+
}
158+
159+
void
160+
clutter_android_application_set_enable_touch ()
161+
{
162+
}
163+
164+
ClutterAndroidApplication *
165+
clutter_android_application_get_default (void)
166+
{
167+
return NULL;
168+
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/*
2+
* Clutter.
3+
*
4+
* An OpenGL based 'interactive canvas' library.
5+
*
6+
* Copyright (C) 2011 Intel Corporation.
7+
*
8+
* This library is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU Lesser General Public
10+
* License as published by the Free Software Foundation; either
11+
* version 2 of the License, or (at your option) any later version.
12+
*
13+
* This library is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16+
* Lesser General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Lesser General Public
19+
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
20+
*
21+
* Authors:
22+
* Damien Lespiau <damien.lespiau@intel.com>
23+
*/
24+
25+
#ifndef __CLUTTER_ANDROID_APPLICATION_H__
26+
#define __CLUTTER_ANDROID_APPLICATION_H__
27+
28+
#include <glib-object.h>
29+
30+
G_BEGIN_DECLS
31+
32+
#define CLUTTER_TYPE_ANDROID_APPLICATION clutter_android_application_get_type()
33+
34+
#define CLUTTER_ANDROID_APPLICATION(obj) \
35+
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
36+
CLUTTER_TYPE_ANDROID_APPLICATION, ClutterAndroidApplication))
37+
38+
#define CLUTTER_ANDROID_APPLICATION_CLASS(klass) \
39+
(G_TYPE_CHECK_CLASS_CAST ((klass), \
40+
CLUTTER_TYPE_ANDROID_APPLICATION, ClutterAndroidApplicationClass))
41+
42+
#define CLUTTER_IS_ANDROID_APPLICATION(obj) \
43+
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
44+
CLUTTER_TYPE_ANDROID_APPLICATION))
45+
46+
#define CLUTTER_IS_ANDROID_APPLICATION_CLASS(klass) \
47+
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
48+
CLUTTER_TYPE_ANDROID_APPLICATION))
49+
50+
#define CLUTTER_ANDROID_APPLICATION_GET_CLASS(obj) \
51+
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
52+
CLUTTER_TYPE_ANDROID_APPLICATION, ClutterAndroidApplicationClass))
53+
54+
typedef struct _ClutterAndroidApplication ClutterAndroidApplication;
55+
typedef struct _ClutterAndroidApplicationClass ClutterAndroidApplicationClass;
56+
typedef struct _ClutterAndroidApplicationPrivate ClutterAndroidApplicationPrivate;
57+
58+
struct _ClutterAndroidApplicationClass
59+
{
60+
GObjectClass parent_class;
61+
62+
/* signals */
63+
gboolean (*ready) (ClutterAndroidApplication *self);
64+
};
65+
66+
/* Entry point for android clutter applications */
67+
void clutter_android_main (ClutterAndroidApplication *application);
68+
69+
GType clutter_android_application_get_type (void) G_GNUC_CONST;
70+
71+
ClutterAndroidApplication *clutter_android_application_get_default (void);
72+
73+
void clutter_android_application_show_keyboard (ClutterAndroidApplication *application,
74+
gboolean show_keyboard,
75+
gboolean implicit);
76+
77+
gpointer clutter_android_application_get_native_activity (ClutterAndroidApplication *application);
78+
79+
void clutter_android_application_set_enable_touch ();
80+
void clutter_android_application_run (ClutterAndroidApplication *application);
81+
82+
G_END_DECLS
83+
84+
#endif /* __CLUTTER_ANDROID_APPLICATION_H__ */

‎install/Android.mk

Lines changed: 296 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,296 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
# gettext
4+
include $(CLEAR_VARS)
5+
6+
LOCAL_MODULE := gettext
7+
LOCAL_SRC_FILES := lib/libintl.a
8+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include
9+
10+
include $(PREBUILT_STATIC_LIBRARY)
11+
12+
13+
# libffi
14+
include $(CLEAR_VARS)
15+
16+
LOCAL_MODULE := libffi
17+
LOCAL_SRC_FILES := lib/libffi.a
18+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include
19+
20+
include $(PREBUILT_STATIC_LIBRARY)
21+
22+
# json-glib
23+
include $(CLEAR_VARS)
24+
25+
LOCAL_MODULE := json-glib
26+
LOCAL_SRC_FILES := lib/libjson-glib-1.0.a
27+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/json-glib-1.0
28+
29+
include $(PREBUILT_STATIC_LIBRARY)
30+
31+
32+
# atk
33+
include $(CLEAR_VARS)
34+
35+
LOCAL_MODULE := atk
36+
LOCAL_SRC_FILES := lib/libatk-1.0.a
37+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/atk-1.0
38+
39+
include $(PREBUILT_STATIC_LIBRARY)
40+
41+
42+
# clutter
43+
include $(CLEAR_VARS)
44+
45+
LOCAL_MODULE := clutter
46+
LOCAL_SRC_FILES := lib/libclutter-1.0.a
47+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/clutter-1.0
48+
49+
include $(PREBUILT_STATIC_LIBRARY)
50+
51+
52+
# mx
53+
include $(CLEAR_VARS)
54+
55+
LOCAL_MODULE := mx
56+
LOCAL_SRC_FILES := lib/libmx-2.0.a
57+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/mx-2.0
58+
59+
include $(PREBUILT_STATIC_LIBRARY)
60+
61+
62+
# gdk-pixbuf
63+
include $(CLEAR_VARS)
64+
65+
LOCAL_MODULE := gdk-pixbuf
66+
LOCAL_SRC_FILES := lib/libgdk_pixbuf-2.0.a
67+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/gdk-pixbuf-2.0
68+
69+
include $(PREBUILT_STATIC_LIBRARY)
70+
71+
72+
# libpng
73+
include $(CLEAR_VARS)
74+
75+
LOCAL_MODULE := png
76+
LOCAL_SRC_FILES := lib/libpng15.a
77+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/libpng15
78+
79+
include $(PREBUILT_STATIC_LIBRARY)
80+
81+
82+
# libjpeg
83+
include $(CLEAR_VARS)
84+
85+
LOCAL_MODULE := jpeg
86+
LOCAL_SRC_FILES := lib/libjpeg.a
87+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include
88+
89+
include $(PREBUILT_STATIC_LIBRARY)
90+
91+
92+
# libxml2
93+
include $(CLEAR_VARS)
94+
95+
LOCAL_MODULE := libxml2
96+
LOCAL_SRC_FILES := lib/libxml2.a
97+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/libxml2
98+
99+
include $(PREBUILT_STATIC_LIBRARY)
100+
101+
102+
# freetype
103+
include $(CLEAR_VARS)
104+
105+
LOCAL_MODULE := freetype
106+
LOCAL_SRC_FILES := lib/libfreetype.a
107+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/freetype2
108+
109+
include $(PREBUILT_STATIC_LIBRARY)
110+
111+
112+
# iconv
113+
include $(CLEAR_VARS)
114+
115+
LOCAL_MODULE := iconv
116+
LOCAL_SRC_FILES := lib/libiconv.a
117+
118+
include $(PREBUILT_STATIC_LIBRARY)
119+
120+
# glib
121+
include $(CLEAR_VARS)
122+
123+
LOCAL_MODULE := glib
124+
LOCAL_SRC_FILES := lib/libglib-2.0.a
125+
126+
LOCAL_EXPORT_CFLAGS := \
127+
-I$(LOCAL_PATH)/include/glib-2.0 \
128+
-I$(LOCAL_PATH)/lib/glib-2.0/include \
129+
$(NULL)
130+
131+
include $(PREBUILT_STATIC_LIBRARY)
132+
133+
134+
# gobject
135+
include $(CLEAR_VARS)
136+
137+
LOCAL_MODULE := gobject
138+
LOCAL_SRC_FILES := lib/libgobject-2.0.a
139+
140+
LOCAL_EXPORT_CFLAGS := \
141+
-I$(LOCAL_PATH)/include/glib-2.0 \
142+
$(NULL)
143+
144+
include $(PREBUILT_STATIC_LIBRARY)
145+
146+
147+
# gmodule
148+
include $(CLEAR_VARS)
149+
150+
LOCAL_MODULE := gmodule
151+
LOCAL_SRC_FILES := lib/libgmodule-2.0.a
152+
153+
LOCAL_EXPORT_CFLAGS := \
154+
-I$(LOCAL_PATH)/include/glib-2.0 \
155+
$(NULL)
156+
157+
include $(PREBUILT_STATIC_LIBRARY)
158+
159+
160+
# gthread
161+
include $(CLEAR_VARS)
162+
163+
LOCAL_MODULE := gthread
164+
LOCAL_SRC_FILES := lib/libgthread-2.0.a
165+
166+
LOCAL_EXPORT_CFLAGS := \
167+
-I$(LOCAL_PATH)/include/glib-2.0 \
168+
$(NULL)
169+
170+
include $(PREBUILT_STATIC_LIBRARY)
171+
172+
173+
# gio
174+
include $(CLEAR_VARS)
175+
176+
LOCAL_MODULE := gio
177+
LOCAL_SRC_FILES := lib/libgio-2.0.a
178+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/glib-2.0
179+
180+
include $(PREBUILT_STATIC_LIBRARY)
181+
182+
183+
# glib-android
184+
include $(CLEAR_VARS)
185+
186+
LOCAL_MODULE := glib-android
187+
LOCAL_SRC_FILES := lib/libglib-android-1.0.a
188+
LOCAL_EXPORT_CFLAGS := \
189+
-I$(LOCAL_PATH)/include/glib-android-1.0 \
190+
$(NULL)
191+
192+
include $(PREBUILT_STATIC_LIBRARY)
193+
194+
195+
# fontconfig
196+
include $(CLEAR_VARS)
197+
198+
LOCAL_MODULE := fontconfig
199+
LOCAL_SRC_FILES := lib/libfontconfig.a
200+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/fontconfig
201+
202+
include $(PREBUILT_STATIC_LIBRARY)
203+
204+
205+
# pango
206+
include $(CLEAR_VARS)
207+
208+
LOCAL_MODULE := pango
209+
LOCAL_SRC_FILES := lib/libpango-1.0.a
210+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/pango-1.0
211+
212+
include $(PREBUILT_STATIC_LIBRARY)
213+
214+
215+
# pangocairo
216+
include $(CLEAR_VARS)
217+
218+
LOCAL_MODULE := pangocairo
219+
LOCAL_SRC_FILES := lib/libpangocairo-1.0.a
220+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/pango-1.0
221+
222+
include $(PREBUILT_STATIC_LIBRARY)
223+
224+
225+
# pangoft2
226+
include $(CLEAR_VARS)
227+
228+
LOCAL_MODULE := pangoft2
229+
LOCAL_SRC_FILES := lib/libpangoft2-1.0.a
230+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/pango-1.0
231+
232+
include $(PREBUILT_STATIC_LIBRARY)
233+
234+
235+
# pixman
236+
include $(CLEAR_VARS)
237+
238+
LOCAL_MODULE := pixman
239+
LOCAL_SRC_FILES := lib/libpixman-1.a
240+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/pixman-1
241+
242+
include $(PREBUILT_STATIC_LIBRARY)
243+
244+
# cairo
245+
include $(CLEAR_VARS)
246+
247+
LOCAL_MODULE := cairo
248+
LOCAL_SRC_FILES := lib/libcairo.a
249+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/cairo
250+
251+
include $(PREBUILT_STATIC_LIBRARY)
252+
253+
# cairo-gobject
254+
include $(CLEAR_VARS)
255+
256+
LOCAL_MODULE := cairo-gobject
257+
LOCAL_SRC_FILES := lib/libcairo-gobject.a
258+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/cairo
259+
260+
include $(PREBUILT_STATIC_LIBRARY)
261+
262+
# cairo-script-interpreter
263+
include $(CLEAR_VARS)
264+
265+
LOCAL_MODULE := cairo-script-interpreter
266+
LOCAL_SRC_FILES := lib/libcairo-script-interpreter.a
267+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/cairo
268+
269+
include $(PREBUILT_STATIC_LIBRARY)
270+
271+
# cogl
272+
include $(CLEAR_VARS)
273+
274+
LOCAL_MODULE := cogl
275+
LOCAL_SRC_FILES := lib/libcogl.a
276+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/cogl
277+
278+
include $(PREBUILT_STATIC_LIBRARY)
279+
280+
# cogl-pango
281+
include $(CLEAR_VARS)
282+
283+
LOCAL_MODULE := cogl-pango
284+
LOCAL_SRC_FILES := lib/libcogl-pango.a
285+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/cogl
286+
287+
include $(PREBUILT_STATIC_LIBRARY)
288+
289+
# libsoup
290+
include $(CLEAR_VARS)
291+
292+
LOCAL_MODULE := soup
293+
LOCAL_SRC_FILES := lib/libsoup-2.4.a
294+
LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH)/include/libsoup-2.4
295+
296+
include $(PREBUILT_STATIC_LIBRARY)

‎jhbuildrc-android

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
moduleset = os.environ['PWD'] + '/modulesets/clutter-android.modules'
2+
checkoutroot = os.environ['PWD'] + '/sources'
3+
prefix = os.environ['PWD'] + '/install'
4+
5+
build_policy = 'updated'
6+
use_lib64 = False
7+
8+
use_local_modulesets = True
9+
partial_build = False
10+
autogenargs = '--disable-shared --disable-gtk-doc --host=arm-linux-androideabi gl_cv_header_working_stdint_h=yes --disable-introspection '
11+
makeargs = '-j 4'
12+
13+
14+
os.environ['ac_cv_path_GLIB_COMPILE_RESOURCES']='/usr/bin/glib-compile-resources'
15+
os.environ['ac_cv_path_GLIB_COMPILE_SCHEMAS']='/usr/bin/glib-compile-schemas'
16+
os.environ['ac_cv_path_GLIB_GENMARSHAL']='/usr/bin/glib-genmarshal'
17+
18+
os.environ['PATH'] += ':' + os.environ['PWD'] + '/toolchain/bin'
19+
os.environ['CC'] = 'arm-linux-androideabi-gcc'
20+
21+
os.environ['PKG_CONFIG'] = 'pkg-config --define-variable=glib_genmarshal=/usr/bin/glib-genmarshal --define-variable=gobject_query=/usr/bin/gobject-query --define-variable=glib_mkenums=/usr/bin/glib-mkenums --define-variable=glib_compile_resources=/usr/bin/glib-compile-resources'

‎jhbuildrc-pc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
moduleset = os.path.dirname(os.path.abspath(__file__)) + '/modulesets/clutter-pc.modules'
2+
checkoutroot = os.path.dirname(os.path.abspath(__file__)) + '/pc/sources'
3+
prefix = os.path.dirname(os.path.abspath(__file__)) + '/pc/install'
4+
5+
build_policy = 'updated'
6+
use_lib64 = False
7+
8+
use_local_modulesets = True
9+
partial_build = False
10+
autogenargs = '--disable-static --disable-gtk-doc '
11+
12+
# Use system libraries for the builds
13+
addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'lib', 'pkgconfig'))
14+
addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'lib64', 'pkgconfig'))
15+
addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'share', 'pkgconfig'))
16+
17+
addpath('XDG_DATA_DIRS', os.path.join(os.sep, 'usr', 'share'))

‎modulesets/clutter-android.modules

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<?xml version="1.0" ?>
2+
<moduleset>
3+
<repository href="http://download.gnome.org/sources/" name="gnome.org" type="tarball"/>
4+
<repository href="http://downloads.sourceforge.net/" name="sourceforge.net" type="tarball"/>
5+
<repository href="http://cairographics.org/" name="cairo.org" type="tarball"/>
6+
<repository href="http://www.fontconfig.org/" name="fontconfig.org" type="tarball"/>
7+
<repository href="http://ftp.gnu.org/pub/gnu/" name="gnu.org" type="tarball"/>
8+
<repository href="http://zlib.net/" name="zlib.net" type="tarball" />
9+
<repository type="tarball" name="savannah.gnu.org" href="http://download.savannah.gnu.org/releases/"/>
10+
<repository type="tarball" name="ijg.org" href="http://www.ijg.org/files/" />
11+
<repository type="tarball" name="xmlsoft.org" href="ftp://xmlsoft.org/"/>
12+
<repository type="git" name="github.com" href="git://github.com/"/>
13+
<repository type="git" name="git.gnome.org" href="git://git.gnome.org/"/>
14+
15+
<autotools id="iconv" autogen-sh="configure">
16+
<branch version="1.14" repo="gnu.org" module="libiconv/libiconv-1.14.tar.gz">
17+
<patch file="libiconv/update-config.patch" strip="1" />
18+
</branch>
19+
</autotools>
20+
21+
<tarball id="libffi" version="3.0.11">
22+
<source href="ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz" />
23+
</tarball>
24+
25+
<autotools id="zlib" version="1.2.7" autogen-template="%(srcdir)s/%(autogen-sh)s --prefix %(prefix)s --libdir %(libdir)s --static" makeargs="CC='arm-linux-androideabi-gcc' LD='arm-linux-androideabi-ld'">
26+
<branch repo="zlib.net" module="zlib-1.2.7.tar.gz" version="1.2.7" />
27+
</autotools>
28+
29+
<autotools id="gettext" autogenargs="--without-included-regex --disable-java --disable-openmp --without-libiconv-prefix --without-libintl-prefix --without-libglib-2.0-prefix --without-libcroco-0.6-prefix --with-included-libxml --without-libncurses-prefix --without-libtermcap-prefix --without-libcurses-prefix --without-libexpat-prefix --without-emacs" autogen-sh="autoreconf">
30+
<branch module="gettext/gettext-0.18.1.1.tar.gz" repo="gnu.org" source-subdir="gettext-tools" version="0.18.1.1" subdir="intl">
31+
<patch file="gettext/disable-everything-except-intl.patch" strip="1" />
32+
</branch>
33+
</autotools>
34+
35+
<autotools id="libpng" autogen-sh="configure">
36+
<branch module="libpng/libpng-1.5.10.tar.xz" repo="sourceforge.net" version="1.5.10" />
37+
</autotools>
38+
39+
<autotools id="libjpeg">
40+
<branch module="jpegsrc.v8d.tar.gz" repo="ijg.org" checkoutdir="jpeg-8d" version="8d"/>
41+
</autotools>
42+
43+
<autotools id="libxml2" autogenargs="--without-python --without-debug --without-legacy --without-catalog --without-docbook --with-c14n --with-gnu-ld --disable-tests" autogen-sh="autoreconf">
44+
<branch module="libxml2/libxml2-2.9.0.tar.gz"
45+
repo="xmlsoft.org"
46+
version="2.9.0">
47+
<patch file="libxml2/0001-add-option-to-disable-tests-build.patch" strip="1"/>
48+
</branch>
49+
</autotools>
50+
51+
<autotools id="cairo" autogenargs="--cache-file=config.cache --enable-test-surfaces --disable-xlib">
52+
<branch module="releases/cairo-1.12.2.tar.xz" repo="cairo.org" version="1.12.2">
53+
<patch file="cairo/0001-don-t-use-lconv.patch" strip="1" />
54+
</branch>
55+
<dependencies>
56+
<dep package="fontconfig"/>
57+
<dep package="pixman"/>
58+
<dep package="libpng"/>
59+
</dependencies>
60+
</autotools>
61+
62+
<autotools id="pango" autogenargs="--with-included-modules=yes --with-dynamic-modules=no --without-x">
63+
<branch hash="sha256:7c6d2ab024affaed0e942f9279b818235f9c6a36d9fc50688f48d387f4102dff" module="pango/1.30/pango-1.30.0.tar.xz" repo="gnome.org" size="1158224" version="1.30.0"/>
64+
<dependencies>
65+
<dep package="glib"/>
66+
<dep package="freetype"/>
67+
<dep package="cairo"/>
68+
</dependencies>
69+
</autotools>
70+
71+
<autotools autogenargs="--disable-gtk --disable-arm-neon --disable-arm-simd --disable-gcc-inline-asm CFLAGS='-DSIZE_MAX=4294967295U -U__ANDROID__ -UANDROID -U__linux__'" id="pixman" >
72+
<branch module="releases/pixman-0.26.0.tar.gz" repo="cairo.org" version="0.26.0"/>
73+
</autotools>
74+
75+
<autotools id="fontconfig" autogenargs="--with-default-fonts=/system/fonts --disable-docs --enable-libxml2">
76+
<branch hash="sha256:a1b824c1443868505b99872ae6759a5400554612fdac14a6481dba82284e98a3" module="release/fontconfig-2.9.92.tar.gz" repo="fontconfig.org" size="1698561" version="2.9.92">
77+
<patch file="fontconfig/0001-don-t-use-lconv.patch" strip="1" />
78+
</branch>
79+
<dependencies>
80+
<dep package="libxml2"/>
81+
</dependencies>
82+
</autotools>
83+
84+
<autotools id="gdk-pixbuf" autogenargs="--disable-glibtest --disable-modules --without-libtiff --without-gdiplus --with-included-loaders=png,jpeg --disable-gio-sniffing" autogen-sh="autoreconf">
85+
<branch hash="sha256:a22373a72621c6f73e8c216410aeb46e3bb05b477e600b6ac481a47ecd4c09cc" module="gdk-pixbuf/2.26/gdk-pixbuf-2.26.3.tar.xz" repo="gnome.org" size="1175376" version="2.26.3"/>
86+
<dependencies>
87+
<dep package="glib"/>
88+
<dep package="libpng"/>
89+
<dep package="libjpeg"/>
90+
</dependencies>
91+
</autotools>
92+
93+
<autotools id="glib" autogenargs="glib_cv_stack_grows=no glib_cv_uscore=no ac_cv_func_posix_getpwuid_r=no ac_cv_func_posix_getgrgid_r=no --with-libiconv=gnu --disable-modular-tests">
94+
<branch module="djdeath/glib" repo="github.com" revision="android"/>
95+
<dependencies>
96+
<dep package="gettext"/>
97+
<dep package="libffi"/>
98+
<dep package="iconv"/>
99+
<dep package="zlib"/>
100+
</dependencies>
101+
</autotools>
102+
103+
<autotools id="atk">
104+
<branch module="atk/2.5/atk-2.5.4.tar.xz" repo="gnome.org" version="2.5.4"/>
105+
<dependencies>
106+
<dep package="glib"/>
107+
</dependencies>
108+
</autotools>
109+
110+
<autotools id="cogl" autogenargs="--disable-gles1 --enable-gles2 --enable-android-egl-platform=yes --disable-gl --disable-gdk-pixbuf">
111+
<branch module="djdeath/cogl-android" repo="github.com" revision="android"/>
112+
<dependencies>
113+
<dep package="glib"/>
114+
<dep package="pango"/>
115+
</dependencies>
116+
</autotools>
117+
118+
<autotools id="freetype" autogen-sh="configure" autogenargs="CFLAGS=-std=gnu99">
119+
<branch module="freetype/freetype-2.4.6.tar.bz2" version="2.4.6"
120+
repo="savannah.gnu.org">
121+
</branch>
122+
</autotools>
123+
124+
<autotools id="glib-android">
125+
<branch repo="github.com" module="dlespiau/glib-android.git" checkoutdir="glib-android"/>
126+
<dependencies>
127+
<dep package="glib"/>
128+
</dependencies>
129+
</autotools>
130+
131+
<autotools id="clutter" autogenargs="--enable-android-backend --disable-conformance --disable-examples --disable-tests --disable-glibtest">
132+
<branch module="djdeath/clutter-android" repo="github.com" revision="android"/>
133+
<dependencies>
134+
<dep package="cogl"/>
135+
<dep package="atk"/>
136+
<dep package="glib"/>
137+
<dep package="cairo"/>
138+
<dep package="pango"/>
139+
<dep package="json-glib"/>
140+
<dep package="gdk-pixbuf"/>
141+
<dep package="glib-android"/>
142+
</dependencies>
143+
</autotools>
144+
145+
<autotools id="mx" autogenargs="--with-winsys=none --disable-tests --disable-tools --disable-default-style">
146+
<branch module="clutter-project/mx" repo="github.com" revision="master"/>
147+
<dependencies>
148+
<dep package="clutter"/>
149+
<dep package="gdk-pixbuf"/>
150+
</dependencies>
151+
</autotools>
152+
153+
<autotools id="libsoup" autogenargs="--disable-tls-check --without-gnome">
154+
<branch module="djdeath/libsoup" repo="github.com" version="master"/>
155+
<dependencies>
156+
<dep package="glib"/>
157+
<dep package="libxml2"/>
158+
</dependencies>
159+
</autotools>
160+
161+
<autotools id="json-glib" autogenargs="--disable-glibtest">
162+
<branch module="json-glib" repo="git.gnome.org" revision="0.15.2"/>
163+
<dependencies>
164+
<dep package="glib"/>
165+
</dependencies>
166+
</autotools>
167+
168+
</moduleset>

‎modulesets/clutter-pc.modules

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" ?>
2+
<moduleset>
3+
<repository href="http://download.gnome.org/sources/" name="gnome.org" type="tarball"/>
4+
<repository type="git" name="github.com" href="git://github.com/"/>
5+
<repository type="git" name="git.gnome.org" href="git://git.gnome.org/"/>
6+
7+
<autotools id="glib">
8+
<branch module="djdeath/glib" repo="github.com" revision="android"/>
9+
</autotools>
10+
11+
<autotools id="atk">
12+
<branch module="atk/2.5/atk-2.5.4.tar.xz" repo="gnome.org" version="2.5.4"/>
13+
<dependencies>
14+
<dep package="glib"/>
15+
</dependencies>
16+
</autotools>
17+
18+
<autotools id="cogl" autogenargs="--disable-conformance --disable-examples --disable-tests --disable-glibtest">
19+
<branch module="cogl" repo="git.gnome.org" revision="cogl-1.12" />
20+
<dependencies>
21+
<dep package="glib"/>
22+
</dependencies>
23+
</autotools>
24+
25+
<autotools id="clutter" autogenargs="--disable-conformance --disable-examples --disable-tests --disable-glibtest --disable-introspection">
26+
<branch module="djdeath/clutter-android" repo="github.com" revision="android" />
27+
<dependencies>
28+
<dep package="atk"/>
29+
<dep package="glib"/>
30+
<dep package="cogl"/>
31+
</dependencies>
32+
</autotools>
33+
34+
<autotools id="mx" autogenargs="--with-winsys=none --disable-tests --disable-tools --disable-default-style">
35+
<branch module="clutter-project/mx" repo="github.com" revision="master"/>
36+
<dependencies>
37+
<dep package="clutter"/>
38+
</dependencies>
39+
</autotools>
40+
41+
<autotools id="libsoup" autogenargs="--disable-tls-check --without-gnome">
42+
<branch module="djdeath/libsoup" repo="github.com" version="master"/>
43+
<dependencies>
44+
<dep package="glib"/>
45+
</dependencies>
46+
</autotools>
47+
48+
</moduleset>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 9fef1da277d283fd39df004e8bd575c45daf8eaf Mon Sep 17 00:00:00 2001
2+
From: Lionel Landwerlin <llandwerlin@gmail.com>
3+
Date: Wed, 23 May 2012 17:39:56 +0100
4+
Subject: [PATCH] don't use lconv
5+
6+
---
7+
src/cairo-output-stream.c | 4 ++++
8+
1 file changed, 4 insertions(+)
9+
10+
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c
11+
index 0adda36..8cc3692 100644
12+
--- a/src/cairo-output-stream.c
13+
+++ b/src/cairo-output-stream.c
14+
@@ -312,8 +312,12 @@ _cairo_dtostr (char *buffer, size_t size, double d, cairo_bool_t limited_precisi
15+
if (d == 0.0)
16+
d = 0.0;
17+
18+
+#ifndef __ANDROID__
19+
locale_data = localeconv ();
20+
decimal_point = locale_data->decimal_point;
21+
+#else
22+
+ decimal_point = ".";
23+
+#endif
24+
decimal_point_len = strlen (decimal_point);
25+
26+
assert (decimal_point_len != 0);
27+
--
28+
1.7.10
29+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
From 57de411d5b346afae7a2978c8e44fe44e70e6785 Mon Sep 17 00:00:00 2001
2+
From: Lionel Landwerlin <llandwerlin@gmail.com>
3+
Date: Wed, 23 May 2012 16:47:03 +0100
4+
Subject: [PATCH] don't use lconv
5+
6+
---
7+
src/fcxml.c | 4 ++++
8+
1 file changed, 4 insertions(+)
9+
10+
diff --git a/src/fcxml.c b/src/fcxml.c
11+
index f027270..eba51ad 100644
12+
--- a/src/fcxml.c
13+
+++ b/src/fcxml.c
14+
@@ -1212,6 +1212,7 @@ FcParseInt (FcConfigParse *parse)
15+
static double
16+
FcStrtod (char *s, char **end)
17+
{
18+
+#ifndef __ANDROID__
19+
struct lconv *locale_data;
20+
char *dot;
21+
double v;
22+
@@ -1258,6 +1259,9 @@ FcStrtod (char *s, char **end)
23+
else
24+
v = strtod (s, end);
25+
return v;
26+
+#else
27+
+ return strtod (s, end);
28+
+#endif
29+
}
30+
31+
static void
32+
--
33+
1.7.10
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff -ur gettext-0.18.1.1.old/gettext-tools/Makefile.am gettext-0.18.1.1/gettext-tools/Makefile.am
2+
--- gettext-0.18.1.1.old/gettext-tools/Makefile.am 2012-06-26 11:37:06.377329926 +0100
3+
+++ gettext-0.18.1.1/gettext-tools/Makefile.am 2012-06-26 11:37:38.181908637 +0100
4+
@@ -20,7 +20,7 @@
5+
ACLOCAL = ../build-aux/fixaclocal @ACLOCAL@
6+
ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
7+
8+
-SUBDIRS = doc intl gnulib-lib libgrep src libgettextpo po projects styles misc man m4 tests gnulib-tests examples
9+
+SUBDIRS = intl
10+
11+
EXTRA_DIST = misc/DISCLAIM
12+
MOSTLYCLEANFILES = core *.stackdump
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/jhbuild/modtypes/__init__.py b/jhbuild/modtypes/__init__.py
2+
index 9197f8f..98d21c5 100644
3+
--- a/jhbuild/modtypes/__init__.py
4+
+++ b/jhbuild/modtypes/__init__.py
5+
@@ -254,7 +254,7 @@ them into the prefix."""
6+
def process_install(self, buildscript, revision):
7+
assert self.supports_install_destdir
8+
destdir = self.get_destdir(buildscript)
9+
- self._clean_la_files(buildscript, destdir)
10+
+ #self._clean_la_files(buildscript, destdir)
11+
12+
stripped_prefix = buildscript.config.prefix[1:]
13+

‎modulesets/patches/libiconv/update-config.patch

Lines changed: 3101 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
diff --git a/Makefile.am b/Makefile.am
2+
index a4a9f87..168da9e 100644
3+
--- a/Makefile.am
4+
+++ b/Makefile.am
5+
@@ -10,10 +10,14 @@ AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include
6+
7+
AM_CFLAGS = $(THREAD_CFLAGS) $(Z_CFLAGS) $(LZMA_CFLAGS)
8+
9+
+if BUILD_TESTS
10+
noinst_PROGRAMS=testSchemas testRelax testSAX testHTML testXPath testURI \
11+
testThreads testC14N testAutomata testRegexp \
12+
testReader testapi testModule runtest runsuite testchar \
13+
testdict runxmlconf testrecurse testlimits
14+
+else
15+
+noinst_PROGRAMS=
16+
+endif
17+
18+
bin_PROGRAMS = xmllint xmlcatalog
19+
20+
diff --git a/configure.in b/configure.in
21+
index 6da057c..125eb90 100644
22+
--- a/configure.in
23+
+++ b/configure.in
24+
@@ -212,6 +212,10 @@ if test "$enable_rebuild_docs" = "yes" -a "$srcdir" != "."; then
25+
fi
26+
AM_CONDITIONAL([REBUILD_DOCS], [test "$enable_rebuild_docs" = "yes" -o "$USER" = "veillard"])
27+
28+
+AC_ARG_ENABLE(tests,
29+
+[ --enable-tests[[=yes/no]] build tests [[default=yes]]])
30+
+AM_CONDITIONAL([BUILD_TESTS], [test "$enable_tests" = "yes"])
31+
+
32+
dnl
33+
dnl hard dependancies on options
34+
dnl

‎ohand/.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
bin
2+
libs
3+
obj
4+
5+
default.properties
6+
local.properties
7+
proguard.cfg
8+
9+
*.sw?
10+
11+
build.xml
12+
proguard-project.txt
13+
project.properties

‎ohand/AndroidManifest.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- BEGIN_INCLUDE(manifest) -->
3+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
4+
package="org.clutter.OHand"
5+
android:versionCode="1"
6+
android:versionName="1.0">
7+
8+
<!-- This is the platform API where NativeActivity was introduced. -->
9+
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14" />
10+
11+
12+
<!-- This .apk has no Java code itself, so set hasCode to false. -->
13+
<application android:label="@string/app_name" android:hasCode="false">
14+
15+
<!-- Our activity is the built-in NativeActivity framework class.
16+
This will take care of integrating with our NDK code. -->
17+
<activity android:name="android.app.NativeActivity"
18+
android:label="@string/app_name"
19+
android:configChanges="orientation|keyboard|keyboardHidden|screenLayout|screenSize"
20+
android:screenOrientation="portrait"
21+
android:windowSoftInputMode="stateVisible|adjustResize">
22+
<!-- Tell NativeActivity the name of or .so -->
23+
<meta-data android:name="android.app.lib_name"
24+
android:value="clutter-ohand" />
25+
<intent-filter>
26+
<action android:name="android.intent.action.MAIN" />
27+
<category android:name="android.intent.category.LAUNCHER" />
28+
</intent-filter>
29+
</activity>
30+
</application>
31+
32+
</manifest>
33+
<!-- END_INCLUDE(manifest) -->

‎ohand/assets/redhand.png

8.06 KB
Loading

‎ohand/jni/Android.mk

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
include $(CLEAR_VARS)
4+
5+
LOCAL_MODULE := clutter-ohand
6+
LOCAL_SRC_FILES := main.c clutter-utils.c
7+
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv1_CM -lz
8+
LOCAL_STATIC_LIBRARIES := mx gdk-pixbuf clutter json-glib soup atk cogl-pango pangocairo pangoft2 pango fontconfig libxml2 cairo-gobject cairo pixman png jpeg freetype cogl gio gobject gmodule gthread glib-android glib iconv libffi gettext
9+
LOCAL_ARM_MODE := arm
10+
LOCAL_CFLAGS := \
11+
-Wall \
12+
-DCOGL_ENABLE_EXPERIMENTAL_API \
13+
$(NULL)
14+
15+
include $(BUILD_SHARED_LIBRARY)
16+
17+
$(call import-module,android/native_app_glue)
18+
$(call import-module,install)

‎ohand/jni/Application.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
APP_PLATFORM := android-9

‎ohand/jni/clutter-utils.c

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
/*
2+
* Copyright © 2012, Intel Corporation.
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms and conditions of the GNU Lesser General
6+
* Public License, version 2.1, as published by the Free Software
7+
* Foundation.
8+
*
9+
* This library is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#include <math.h>
19+
20+
#include <glib.h>
21+
#include <cogl/cogl.h>
22+
#include <clutter/clutter.h>
23+
#include <mx/mx.h>
24+
25+
#ifndef _PC_VERSION
26+
# include <android/asset_manager.h>
27+
# include <clutter/android/clutter-android.h>
28+
29+
extern unsigned char *stbi_load_from_memory (unsigned char const *buffer,
30+
int len,
31+
int *x,
32+
int *y,
33+
int *comp,
34+
int req_comp);
35+
36+
ClutterActor *
37+
clutter_texture_new_from_android_asset (ClutterAndroidApplication *application,
38+
const char *path)
39+
{
40+
const unsigned char *buffer, *pixels;
41+
int width, height, stb_pixel_format;
42+
GError *error = NULL;
43+
AAssetManager *asset_manager;
44+
AAsset *asset;
45+
ClutterActor *actor;
46+
47+
asset_manager =
48+
clutter_android_application_get_asset_manager (application);
49+
asset = AAssetManager_open (asset_manager, path, AASSET_MODE_BUFFER);
50+
51+
if (asset == NULL)
52+
g_critical ("Could not open %s", path);
53+
54+
buffer = AAsset_getBuffer (asset);
55+
pixels = stbi_load_from_memory (buffer,
56+
AAsset_getLength (asset),
57+
&width, &height,
58+
&stb_pixel_format,
59+
4 /* STBI_rgb_alpha */);
60+
61+
if (pixels == NULL)
62+
g_critical ("Could not decompress image");
63+
64+
actor = clutter_texture_new ();
65+
clutter_texture_set_from_rgb_data (CLUTTER_TEXTURE (actor),
66+
pixels,
67+
TRUE,
68+
width, height,
69+
width * 4,
70+
4,
71+
CLUTTER_TEXTURE_NONE,
72+
&error);
73+
AAsset_close (asset);
74+
75+
if (error)
76+
g_critical ("Could not create texure: %s", error->message);
77+
78+
79+
return actor;
80+
}
81+
82+
CoglTexture*
83+
cogl_texture_new_from_android_asset (ClutterAndroidApplication *application,
84+
const char *path)
85+
{
86+
const unsigned char *buffer, *pixels;
87+
int width, height, stb_pixel_format;
88+
AAssetManager *asset_manager;
89+
AAsset *asset;
90+
CoglTexture *texture;
91+
92+
asset_manager =
93+
clutter_android_application_get_asset_manager (application);
94+
asset = AAssetManager_open (asset_manager, path, AASSET_MODE_BUFFER);
95+
96+
if (asset == NULL)
97+
g_critical ("Could not open %s", path);
98+
99+
buffer = AAsset_getBuffer (asset);
100+
pixels = stbi_load_from_memory (buffer,
101+
AAsset_getLength (asset),
102+
&width, &height,
103+
&stb_pixel_format,
104+
4 /* STBI_rgb_alpha */);
105+
106+
if (pixels == NULL)
107+
g_critical ("Could not decompress image");
108+
109+
texture = cogl_texture_new_from_data (width, height,
110+
COGL_TEXTURE_NONE | COGL_TEXTURE_NO_SLICING,
111+
COGL_PIXEL_FORMAT_RGBA_8888,
112+
COGL_PIXEL_FORMAT_ANY,
113+
width * 4,
114+
pixels);
115+
AAsset_close (asset);
116+
117+
return texture;
118+
}
119+
120+
void
121+
mx_load_embedded_theme (ClutterAndroidApplication *application)
122+
{
123+
AAssetManager *asset_manager =
124+
clutter_android_application_get_asset_manager (application);
125+
AAsset* asset = AAssetManager_open (asset_manager, "default.css",
126+
AASSET_MODE_BUFFER);
127+
off_t length;
128+
const unsigned char *buffer;
129+
GError *error = NULL;
130+
131+
if (asset == NULL)
132+
g_critical ("Could not open mx-theme.css");
133+
134+
length = AAsset_getLength (asset);
135+
buffer = AAsset_getBuffer (asset);
136+
137+
mx_style_load_from_data (mx_style_get_default (),
138+
"default.css",
139+
(gchar *) buffer,
140+
&error);
141+
142+
143+
if (error)
144+
g_critical ("Could not create texure: %s", error->message);
145+
146+
AAsset_close (asset);
147+
}
148+
149+
#else
150+
151+
void
152+
mx_load_embedded_theme (ClutterAndroidApplication *application)
153+
{
154+
GError *error = NULL;
155+
156+
mx_style_load_from_file (mx_style_get_default (),
157+
"./ohand/assets/default.css",
158+
&error);
159+
160+
if (error)
161+
g_critical ("Loading Mx theme failed : %s", error->message);
162+
}
163+
164+
ClutterActor *
165+
clutter_texture_new_from_android_asset (ClutterAndroidApplication *application,
166+
const char *path)
167+
{
168+
gchar *epath = g_strdup_printf ("./ohand/assets/%s", path);
169+
ClutterActor *texture = clutter_texture_new_from_file (epath, NULL);
170+
171+
return texture;
172+
}
173+
174+
175+
176+
CoglTexture*
177+
cogl_texture_new_from_android_asset (ClutterAndroidApplication *application,
178+
const char *path)
179+
{
180+
gchar *epath = g_strdup_printf ("./ohand/assets/%s", path);
181+
CoglTexture *texture = cogl_texture_new_from_file (epath, COGL_TEXTURE_NONE,
182+
COGL_PIXEL_FORMAT_ANY,
183+
NULL);
184+
185+
return texture;
186+
}
187+
188+
#endif /* _PC_VERSION */

‎ohand/jni/clutter-utils.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright © 2012, Intel Corporation.
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms and conditions of the GNU Lesser General
6+
* Public License, version 2.1, as published by the Free Software
7+
* Foundation.
8+
*
9+
* This library is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#ifndef __CLUTTER_UTILS_H__
19+
#define __CLUTTER_UTILS_H__
20+
21+
#include <glib.h>
22+
#include <clutter/clutter.h>
23+
#ifndef _PC_VERSION
24+
# include <clutter/android/clutter-android.h>
25+
#endif
26+
27+
ClutterActor * clutter_texture_new_from_android_asset (ClutterAndroidApplication *application,
28+
const char *path);
29+
CoglTexture * cogl_texture_new_from_android_asset (ClutterAndroidApplication *application,
30+
const char *path);
31+
32+
void mx_load_embedded_theme (ClutterAndroidApplication *application);
33+
34+
#endif /* __CLUTTER_UTILS_H__ */

‎ohand/jni/main.c

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
/*
2+
* Copyright © 2012, Intel Corporation.
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms and conditions of the GNU Lesser General
6+
* Public License, version 2.1, as published by the Free Software
7+
* Foundation.
8+
*
9+
* This library is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#include <glib.h>
19+
#include <cogl/cogl.h>
20+
#include <clutter/clutter.h>
21+
#ifndef _PC_VERSION
22+
# include <clutter/android/clutter-android.h>
23+
#endif
24+
#include <mx/mx.h>
25+
26+
#include "clutter-utils.h"
27+
28+
typedef struct
29+
{
30+
ClutterAndroidApplication *application;
31+
32+
ClutterAction *drag_action;
33+
ClutterAction *rotate_action;
34+
ClutterAction *zoom_action;
35+
} TestData;
36+
37+
static gboolean
38+
toggle_fullscreen (ClutterActor *button,
39+
ClutterStage *stage)
40+
{
41+
clutter_stage_set_fullscreen (stage, !clutter_stage_get_fullscreen (stage));
42+
43+
return TRUE;
44+
}
45+
46+
static gboolean
47+
toggle_keyboard (ClutterActor *button,
48+
ClutterAndroidApplication *application)
49+
{
50+
static gboolean visible = FALSE;
51+
52+
visible = !visible;
53+
#ifndef _PC_VERSION
54+
clutter_android_application_show_keyboard (application, visible, FALSE);
55+
#endif
56+
57+
return TRUE;
58+
}
59+
60+
static gboolean
61+
_rotate_gesture_begin (ClutterAction *action,
62+
ClutterActor *actor,
63+
TestData *data)
64+
{
65+
clutter_actor_remove_action (actor, data->drag_action);
66+
67+
return TRUE;
68+
}
69+
70+
static gboolean
71+
_rotate_gesture_end (ClutterAction *action,
72+
ClutterActor *actor,
73+
TestData *data)
74+
{
75+
data->drag_action = clutter_drag_action_new ();
76+
clutter_actor_add_action (actor, data->drag_action);
77+
78+
return TRUE;
79+
}
80+
81+
static gboolean
82+
test_init (ClutterAndroidApplication *application,
83+
TestData* data)
84+
{
85+
ClutterInitError init_error;
86+
ClutterActor *square, *hand, *text, *clone;
87+
ClutterActor *stage;
88+
ClutterConstraint *constraint;
89+
ClutterVertex vertex;
90+
ClutterActor *box;
91+
92+
/* Initialize Clutter */
93+
init_error = clutter_init (NULL, NULL);
94+
if (init_error <= 0)
95+
{
96+
g_critical ("Could not initialize clutter");
97+
return FALSE;
98+
}
99+
100+
/* Set a background color on the stage */
101+
stage = clutter_stage_get_default ();
102+
clutter_actor_set_background_color (stage,
103+
CLUTTER_COLOR_LightSkyBlue);
104+
105+
#ifndef _PC_VERSION
106+
clutter_stage_set_fullscreen (CLUTTER_STAGE (stage), TRUE);
107+
#endif
108+
109+
box = mx_box_layout_new_with_orientation (MX_ORIENTATION_VERTICAL);
110+
mx_box_layout_set_spacing (MX_BOX_LAYOUT (box), 50);
111+
112+
/* Place it at the center of the stage */
113+
constraint = clutter_align_constraint_new (stage,
114+
CLUTTER_ALIGN_X_AXIS,
115+
0.5f);
116+
clutter_actor_add_constraint (box, constraint);
117+
118+
constraint = clutter_align_constraint_new (stage,
119+
CLUTTER_ALIGN_Y_AXIS,
120+
0.5f);
121+
clutter_actor_add_constraint (box, constraint);
122+
123+
clutter_actor_add_child (stage, box);
124+
125+
square = mx_button_new_with_label ("Fullscreen");
126+
clutter_actor_add_child (box, square);
127+
128+
g_signal_connect (square, "clicked",
129+
G_CALLBACK (toggle_fullscreen), stage);
130+
131+
132+
square = mx_button_new_with_label ("Keyboard");
133+
clutter_actor_add_child (box, square);
134+
135+
g_signal_connect (square, "clicked",
136+
G_CALLBACK (toggle_keyboard), application);
137+
138+
text = mx_entry_new ();
139+
mx_entry_set_placeholder (MX_ENTRY (text), "Entry");
140+
clutter_actor_add_child (box, text);
141+
142+
mx_focus_manager_push_focus (mx_focus_manager_get_for_stage (CLUTTER_STAGE (stage)),
143+
MX_FOCUSABLE (text));
144+
145+
/* Create a new ClutterTexture */
146+
hand = clutter_texture_new_from_android_asset (application, "redhand.png");
147+
148+
vertex.x = clutter_actor_get_width (hand)/2.0;
149+
vertex.y = clutter_actor_get_height (hand)/2.0;
150+
vertex.z = 0;
151+
152+
g_object_set (hand, "rotation-center-x", &vertex, "rotation-center-z",
153+
&vertex, NULL);
154+
clutter_actor_set_scale (hand, 2.0, 2.0);
155+
data->drag_action = clutter_drag_action_new ();
156+
data->rotate_action = clutter_rotate_action_new ();
157+
data->zoom_action = clutter_zoom_action_new ();
158+
159+
clutter_actor_add_action (hand, data->drag_action);
160+
/* clutter_actor_add_action (hand, data->rotate_action); */
161+
clutter_actor_add_action (hand, data->zoom_action);
162+
163+
/* g_signal_connect (data->rotate_action, "gesture-begin", */
164+
/* G_CALLBACK (_rotate_gesture_begin), data); */
165+
/* g_signal_connect (data->rotate_action, "gesture-end", */
166+
/* G_CALLBACK (_rotate_gesture_end), data); */
167+
168+
/* clutter_actor_animate (hand, CLUTTER_LINEAR, 4000.0 * 99.0, */
169+
/* "rotation-angle-z", 360.0 * 99.0, */
170+
/* "rotation-angle-x", 180.0 * 99.0, NULL); */
171+
clutter_actor_add_child (stage, hand);
172+
clutter_actor_set_reactive (hand, TRUE);
173+
clutter_actor_set_position (hand,
174+
clutter_actor_get_width (stage) / 2 -
175+
clutter_actor_get_width (hand),
176+
clutter_actor_get_height (stage) / 2 -
177+
clutter_actor_get_height (hand));
178+
179+
/**/
180+
clone = clutter_clone_new (hand);
181+
clutter_actor_set_reactive (clone, TRUE);
182+
clutter_actor_set_position (clone, 0, 0);
183+
clutter_actor_add_action (clone, clutter_zoom_action_new ());
184+
clutter_actor_add_child (stage, clone);
185+
186+
clone = clutter_clone_new (hand);
187+
clutter_actor_set_reactive (clone, TRUE);
188+
clutter_actor_set_position (clone,
189+
clutter_actor_get_width (stage) - clutter_actor_get_width (clone),
190+
0);
191+
clutter_actor_add_action (clone, clutter_zoom_action_new ());
192+
clutter_actor_add_child (stage, clone);
193+
194+
clone = clutter_clone_new (hand);
195+
clutter_actor_set_reactive (clone, TRUE);
196+
clutter_actor_set_position (clone,
197+
0,
198+
clutter_actor_get_height (stage) - clutter_actor_get_height (clone));
199+
clutter_actor_add_action (clone, clutter_zoom_action_new ());
200+
clutter_actor_add_child (stage, clone);
201+
202+
clone = clutter_clone_new (hand);
203+
clutter_actor_set_reactive (clone, TRUE);
204+
clutter_actor_set_position (clone,
205+
clutter_actor_get_width (stage) - clutter_actor_get_width (clone),
206+
clutter_actor_get_height (stage) - clutter_actor_get_height (clone));
207+
clutter_actor_add_action (clone, clutter_zoom_action_new ());
208+
clutter_actor_add_child (stage, clone);
209+
210+
/**/
211+
clutter_actor_show (stage);
212+
213+
return TRUE;
214+
}
215+
216+
void
217+
clutter_android_main (ClutterAndroidApplication *application)
218+
{
219+
TestData data;
220+
221+
memset (&data, 0, sizeof (TestData));
222+
data.application = application;
223+
224+
g_signal_connect_after (application, "ready", G_CALLBACK (test_init), &data);
225+
226+
clutter_android_application_run (application);
227+
}

‎ohand/res/values/strings.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<string name="app_name">OHand</string>
4+
</resources>

0 commit comments

Comments
 (0)
Please sign in to comment.