8000 fix hard coded python2 path in sdl2 Android.mk by kived · Pull Request #517 · kivy/python-for-android · GitHub
[go: up one dir, main page]

Skip to content

fix hard coded python2 path in sdl2 Android.mk #517

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
Dec 9, 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
4 changes: 2 additions & 2 deletions pythonforandroid/bootstraps/sdl2/build/jni/src/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \
start.c

LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../../../other_builds/python2/$(ARCH)/python2/python-install/include/python2.7
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../../../other_builds/$(PYTHON2_NAME)/$(ARCH)/python2/python-install/include/python2.7

LOCAL_SHARED_LIBRARIES := SDL2

LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog -lpython2.7

LOCAL_LDFLAGS += -L$(LOCAL_PATH)/../../../../other_builds/python2/$(ARCH)/python2/python-install/lib $(APPLICATION_ADDITIONAL_LDFLAGS)
LOCAL_LDFLAGS += -L$(LOCAL_PATH)/../../../../other_builds/$(PYTHON2_NAME)/$(ARCH)/python2/python-install/lib $(APPLICATION_ADDITIONAL_LDFLAGS)

include $(BUILD_SHARED_LIBRARY)
6 changes: 6 additions & 0 deletions pythonforandroid/recipes/sdl2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ def prebuild_arch(self, arch):
self.apply_patch('add_nativeSetEnv.patch', arch.arch)
shprint(sh.touch, join(build_dir, '.patched'))

def get_recipe_env(self, arch=None):
env = super(LibSDL2Recipe, self).get_recipe_env(arch)
py2 = self.get_recipe('python2', arch.ctx)
env['PYTHON2_NAME'] = py2.get_dir_name()
return env

def build_arch(self, arch):
env = self.get_recipe_env(arch)

Expand Down
6 changes: 5 additions & 1 deletion pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -1809,9 +1809,13 @@ def get_build_container_dir(self, arch):
This returns a different directory depending on what
alternative or optional dependencies are being built.
'''
dir_name = self.get_dir_name()
return join(self.ctx.build_dir, 'other_builds', dir_name, arch)

def get_dir_name(self):
choices = self.check_recipe_choices()
dir_name = '-'.join([self.name] + choices)
return join(self.ctx.build_dir, 'other_builds', dir_name, arch)
return dir_name

def get_build_dir(self, arch):
'''Given the arch name, returns the directory where the
Expand Down
0