diff --git a/pythonforandroid/recipes/pyjnius/__init__.py b/pythonforandroid/recipes/pyjnius/__init__.py index b5afdca665..12f3717872 100644 --- a/pythonforandroid/recipes/pyjnius/__init__.py +++ b/pythonforandroid/recipes/pyjnius/__init__.py @@ -8,7 +8,7 @@ class PyjniusRecipe(CythonRecipe): # "6553ad4" is one commit after last release (1.2.0) # it fixes method resolution, required for resolving requestPermissions() - version = '6553ad4' + version = '1.2.1' url = 'https://github.com/kivy/pyjnius/archive/{version}.zip' name = 'pyjnius' depends = [('genericndkbuild', 'sdl2'), 'six'] diff --git a/pythonforandroid/recipes/pyjnius/genericndkbuild_jnienv_getter.patch b/pythonforandroid/recipes/pyjnius/genericndkbuild_jnienv_getter.patch index ff2699415b..3d41dbb64c 100644 --- a/pythonforandroid/recipes/pyjnius/genericndkbuild_jnienv_getter.patch +++ b/pythonforandroid/recipes/pyjnius/genericndkbuild_jnienv_getter.patch @@ -10,16 +10,17 @@ index ac89fec..71daa43 100644 cdef JNIEnv *get_platform_jnienv(): - return SDL_ANDROID_GetJNIEnv() + return WebView_AndroidGetJNIEnv() -diff --git a/setup.py b/setup.py -index 740510f..0c8e55f 100644 ---- a/setup.py -+++ b/setup.py -@@ -53,7 +53,7 @@ except ImportError: +diff --git a/jnius/env.py b/jnius/env.py +--- a/jnius/env.py ++++ b/jnius/env.py +@@ -185,10 +185,10 @@ except ImportError: - if PLATFORM == 'android': - # for android, we use SDL... -- LIBRARIES = ['sdl', 'log'] -+ LIBRARIES = ['main', 'log'] - LIBRARY_DIRS = ['libs/' + getenv('ARCH')] - elif PLATFORM == 'darwin': - import subprocess + def get_libraries(platform): + if platform == 'android': + # for android, we use SDL... +- return ['sdl', 'log'] ++ return ['main', 'log'] + + elif platform == 'win32': + return ['jvm'] + diff --git a/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch b/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch index d208e5f69c..3fc63a2935 100644 --- a/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch +++ b/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch @@ -10,16 +10,18 @@ index ac89fec..71daa43 100644 cdef JNIEnv *get_platform_jnienv(): - return SDL_ANDROID_GetJNIEnv() + return SDL_AndroidGetJNIEnv() -diff --git a/setup.py b/setup.py +diff --git a/env.py b/env.py index 740510f..0c8e55f 100644 ---- a/setup.py -+++ b/setup.py -@@ -53,7 +53,7 @@ except ImportError: +--- a/jnius/env.py ++++ b/jnius/env.py +@@ -185,10 +185,10 @@ except ImportError: - if PLATFORM == 'android': - # for android, we use SDL... -- LIBRARIES = ['sdl', 'log'] -+ LIBRARIES = ['SDL2', 'log'] - LIBRARY_DIRS = ['libs/' + getenv('ARCH')] - elif PLATFORM == 'darwin': - import subprocess + def get_libraries(platform): + if platform == 'android': + # for android, we use SDL... +- return ['sdl', 'log'] ++ return ['SDL2', 'log'] + + elif platform == 'win32': + return ['jvm'] +