aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-kivy/0001-add-support-for-glesv2.patch
blob: e38b31d34d24e02a68a33f67099665b0109a48fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From 98224fec48d6e0f32b28d81220bf1ee1637ce045 Mon Sep 17 00:00:00 2001
From: William Huang <whuang8933@gmail.com>
Date: Thu, 2 Sep 2021 07:25:07 -0400
Subject: [PATCH] recipes-devtools: python: add support for Kivy

Upstream-Status: Pending

---
 setup.py | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index 35e34afdd..0ba3aca72 100644
--- a/setup.py
+++ b/setup.py
@@ -730,7 +730,18 @@ def determine_gl_flags():
         c_options['use_x11'] = True
         c_options['use_egl'] = True
     else:
-        flags['libraries'] = ['GL']
+        if cross_sysroot:
+            flags['include_dirs'] = [cross_sysroot + '/usr/include']
+            flags['library_dirs'] = [cross_sysroot + '/usr/lib']
+
+        if c_options['use_opengl_es2']:
+            print("using GLESv2 libraries")
+            flags['libraries'] = ['GLESv2']
+        else:
+            flags['libraries'] = ['GL']
+
+
+    print("cross_sysroot: " + str(cross_sysroot))
     return flags, base_flags
 
 
@@ -774,14 +785,13 @@ def determine_sdl2():
             sdl_inc = join(include, 'SDL2')
             if isdir(sdl_inc):
                 sdl2_paths.append(sdl_inc)
-        sdl2_paths.extend(['/usr/local/include/SDL2', '/usr/include/SDL2'])
 
     flags['include_dirs'] = sdl2_paths
     flags['extra_link_args'] = []
     flags['extra_compile_args'] = []
     flags['library_dirs'] = (
         sdl2_paths if sdl2_paths else
-        ['/usr/local/lib/'])
+        [''])
 
     if kivy_sdl2_path:
         # If we have a custom path, we need to add the rpath to the linker