Skip to content

Commit 8cdf614

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 29f5fcb + 2e154cc commit 8cdf614

File tree

5 files changed

+41
-6
lines changed

5 files changed

+41
-6
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Global overview
1515

1616
#. Download Android NDK, SDK
1717

18-
* NDK: http://dl.google.com/android/ndk/android-ndk-r8c-linux-x86.tar.bz2
18+
* NDK: http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86.tar.bz2
1919
* More details at: http://developer.android.com/tools/sdk/ndk/index.html
2020
* SDK: http://dl.google.com/android/android-sdk_r21.0.1-linux.tgz
2121
* More details at:http://developer.android.com/sdk/index.html

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

src/src/org/renpy/android/PythonActivity.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,13 @@ public boolean onKeyUp(int keyCode, final KeyEvent event) {
333333
}
334334

335335
protected void onDestroy() {
336-
mPurchaseDatabase.close();
337-
mBillingService.unbind();
336+
if (mPurchaseDatabase != null) {
337+
mPurchaseDatabase.close();
338+
}
339+
340+
if (mBillingService != null) {
341+
mBillingService.unbind();
342+
}
338343

339344
if (mView != null) {
340345
mView.onDestroy();

0 commit comments

Comments
 (0)