Skip to content

Commit e406180

Browse files
committed
Merge pull request kivy#410 from dl1ksv/android21
Enabling android-21 builds
2 parents 5c8fa66 + d425a12 commit e406180

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

distribute.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function push_arm() {
168168
export CXXFLAGS="$CFLAGS"
169169

170170
# that could be done only for darwin platform, but it doesn't hurt.
171-
export LDFLAGS="-lm"
171+
# export LDFLAGS="-lm"
172172

173173
# this must be something depending of the API level of Android
174174
PYPLATFORM=$($PYTHON -c 'from __future__ import print_function; import sys; print(sys.platform)')
@@ -338,8 +338,11 @@ function run_prepare() {
338338
debug "API level set to $ANDROIDAPI"
339339

340340
export NDKPLATFORM="$ANDROIDNDK/platforms/android-$ANDROIDAPI/arch-arm"
341-
export ARCH="armeabi"
342-
#export ARCH="armeabi-v7a" # not tested yet.
341+
if [ $ANDROIDAPI -lt 21 ]; then
342+
export ARCH="armeabi"
343+
else
344+
export ARCH="armeabi-v7a" # Required for android 21
345+
fi
343346

344347
info "Check NDK location"
345348
if [ ! -d "$NDKPLATFORM" ]; then
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--- Python-2.7.2/Modules/timemodule.orig.c 2015-06-17 09:45:56.170192962 +0200
2+
+++ Python-2.7.2/Modules/timemodule.c 2015-06-17 09:49:25.069947821 +0200
3+
@@ -27,6 +27,10 @@
4+
#include <io.h>
5+
#endif
6+
7+
+#ifdef ANDROID
8+
+#undef HAVE_FTIME
9+
+#endif /* ANdroid-21 has no timeb.h */
10+
+
11+
#ifdef HAVE_FTIME
12+
#include <sys/timeb.h>
13+
#if !defined(MS_WINDOWS) && !defined(PYOS_OS2)
14+
--- Python-2.7.2/configure.orig 2015-06-24 17:47:39.181473779 +0200
15+
+++ Python-2.7.2/configure 2015-06-24 17:48:31.646173137 +0200
16+
@@ -5731,7 +5731,7 @@
17+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
18+
$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
19+
save_CFLAGS=$CFLAGS
20+
- CFLAGS="$CFLAGS -Werror"
21+
+ CFLAGS="$CFLAGS -Werror -Wformat"
22+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23+
/* end confdefs.h. */
24+

recipes/python/recipe.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ function prebuild_python() {
3333
try patch -p1 < $RECIPE_python/patches/fix-dynamic-lookup.patch
3434
try patch -p1 < $RECIPE_python/patches/fix-dlfcn.patch
3535
try patch -p1 < $RECIPE_python/patches/ctypes-find-library.patch
36+
if [ $ANDROIDAPI -gt 19 ]; then
37+
try patch -p1 < $RECIPE_python/patches/android-21.patch
38+
fi
3639

3740
system=$(uname -s)
3841
if [ "X$system" == "XDarwin" ]; then

0 commit comments

Comments
 (0)