Skip to content

Enabling android-21 builds #410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions distribute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function push_arm() {
export CXXFLAGS="$CFLAGS"

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

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

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

info "Check NDK location"
if [ ! -d "$NDKPLATFORM" ]; then
Expand Down
24 changes: 24 additions & 0 deletions recipes/python/patches/android-21.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
--- Python-2.7.2/Modules/timemodule.orig.c 2015-06-17 09:45:56.170192962 +0200
+++ Python-2.7.2/Modules/timemodule.c 2015-06-17 09:49:25.069947821 +0200
@@ -27,6 +27,10 @@
#include <io.h>
#endif

+#ifdef ANDROID
+#undef HAVE_FTIME
+#endif /* ANdroid-21 has no timeb.h */
+
#ifdef HAVE_FTIME
#include <sys/timeb.h>
#if !defined(MS_WINDOWS) && !defined(PYOS_OS2)
--- Python-2.7.2/configure.orig 2015-06-24 17:47:39.181473779 +0200
+++ Python-2.7.2/configure 2015-06-24 17:48:31.646173137 +0200
@@ -5731,7 +5731,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -Werror"
+ CFLAGS="$CFLAGS -Werror -Wformat"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

3 changes: 3 additions & 0 deletions recipes/python/recipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ function prebuild_python() {
try patch -p1 < $RECIPE_python/patches/fix-dynamic-lookup.patch
try patch -p1 < $RECIPE_python/patches/fix-dlfcn.patch
try patch -p1 < $RECIPE_python/patches/ctypes-find-library.patch
if [ $ANDROIDAPI -gt 19 ]; then
try patch -p1 < $RECIPE_python/patches/android-21.patch
fi

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