From e146dd17f722e25932cad31a048153406f201c57 Mon Sep 17 00:00:00 2001 From: snuq Date: Wed, 22 Nov 2017 16:05:28 -0800 Subject: [PATCH 1/2] Update __init__.py --- pythonforandroid/recipes/audiostream/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonforandroid/recipes/audiostream/__init__.py b/pythonforandroid/recipes/audiostream/__init__.py index af38353ba2..f4d12236da 100644 --- a/pythonforandroid/recipes/audiostream/__init__.py +++ b/pythonforandroid/recipes/audiostream/__init__.py @@ -16,13 +16,13 @@ def get_recipe_env(self, arch): sdl_include = 'sdl' sdl_mixer_include = 'sdl_mixer' elif 'sdl2' in self.ctx.recipe_build_order: - sdl_include = 'SDL' + sdl_include = 'SDL2' sdl_mixer_include = 'SDL2_mixer' #note: audiostream library is not yet able to judge whether it is being used with sdl or with sdl2. #this causes linking to fail against SDL2 (compiling against SDL2 works) #need to find a way to fix this in audiostream's setup.py - raise RuntimeError('Audiostream library is not yet able to configure itself to link against SDL2. Patch on audiostream library needed - any help much appreciated!') + #raise RuntimeError('Audiostream library is not yet able to configure itself to link against SDL2. Patch on audiostream library needed - any help much appreciated!') env = super(AudiostreamRecipe, self).get_recipe_env(arch) env['CFLAGS'] += ' -I{jni_path}/{sdl_include}/include -I{jni_path}/{sdl_mixer_include}'.format( From aa9bcebb47410a120d88d0be6898c27aef84199b Mon Sep 17 00:00:00 2001 From: snuq Date: Fri, 8 Dec 2017 18:25:06 -0800 Subject: [PATCH 2/2] preliminary setting of the SDL_INCLUDE_DIR variable still not sure how to get that stupid directory... --- pythonforandroid/recipes/audiostream/__init__.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pythonforandroid/recipes/audiostream/__init__.py b/pythonforandroid/recipes/audiostream/__init__.py index f4d12236da..5629a97fb5 100644 --- a/pythonforandroid/recipes/audiostream/__init__.py +++ b/pythonforandroid/recipes/audiostream/__init__.py @@ -12,19 +12,16 @@ class AudiostreamRecipe(CythonRecipe): depends = ['python2', ('sdl', 'sdl2'), 'pyjnius'] def get_recipe_env(self, arch): + env = super(AudiostreamRecipe, self).get_recipe_env(arch) if 'sdl' in self.ctx.recipe_build_order: sdl_include = 'sdl' sdl_mixer_include = 'sdl_mixer' elif 'sdl2' in self.ctx.recipe_build_order: sdl_include = 'SDL2' sdl_mixer_include = 'SDL2_mixer' - - #note: audiostream library is not yet able to judge whether it is being used with sdl or with sdl2. - #this causes linking to fail against SDL2 (compiling against SDL2 works) - #need to find a way to fix this in audiostream's setup.py - #raise RuntimeError('Audiostream library is not yet able to configure itself to link against SDL2. Patch on audiostream library needed - any help much appreciated!') + env['USE_SDL2'] = 'True' + env['SDL2_INCLUDE_DIR'] = '/home/kivy/.buildozer/android/platform/android-ndk-r9c/sources/android/support/include' - env = super(AudiostreamRecipe, self).get_recipe_env(arch) env['CFLAGS'] += ' -I{jni_path}/{sdl_include}/include -I{jni_path}/{sdl_mixer_include}'.format( jni_path = join(self.ctx.bootstrap.build_dir, 'jni'), sdl_include = sdl_include,