1From 98224fec48d6e0f32b28d81220bf1ee1637ce045 Mon Sep 17 00:00:00 2001 2From: William Huang <whuang8933@gmail.com> 3Date: Thu, 2 Sep 2021 07:25:07 -0400 4Subject: [PATCH] recipes-devtools: python: add support for Kivy 5 6Upstream-Status: Pending 7 8--- 9 setup.py | 16 +++++++++++++--- 10 1 file changed, 13 insertions(+), 3 deletions(-) 11 12diff --git a/setup.py b/setup.py 13index 35e34afdd..0ba3aca72 100644 14--- a/setup.py 15+++ b/setup.py 16@@ -730,7 +730,18 @@ def determine_gl_flags(): 17 c_options['use_x11'] = True 18 c_options['use_egl'] = True 19 else: 20- flags['libraries'] = ['GL'] 21+ if cross_sysroot: 22+ flags['include_dirs'] = [cross_sysroot + '/usr/include'] 23+ flags['library_dirs'] = [cross_sysroot + '/usr/lib'] 24+ 25+ if c_options['use_opengl_es2']: 26+ print("using GLESv2 libraries") 27+ flags['libraries'] = ['GLESv2'] 28+ else: 29+ flags['libraries'] = ['GL'] 30+ 31+ 32+ print("cross_sysroot: " + str(cross_sysroot)) 33 return flags, base_flags 34 35 36@@ -774,14 +785,13 @@ def determine_sdl2(): 37 sdl_inc = join(include, 'SDL2') 38 if isdir(sdl_inc): 39 sdl2_paths.append(sdl_inc) 40- sdl2_paths.extend(['/usr/local/include/SDL2', '/usr/include/SDL2']) 41 42 flags['include_dirs'] = sdl2_paths 43 flags['extra_link_args'] = [] 44 flags['extra_compile_args'] = [] 45 flags['library_dirs'] = ( 46 sdl2_paths if sdl2_paths else 47- ['/usr/local/lib/']) 48+ ['']) 49 50 if kivy_sdl2_path: 51 # If we have a custom path, we need to add the rpath to the linker 52