summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-python/recipes-devtools/python/python3-kivy/0001-add-support-for-glesv2.patch24
-rw-r--r--meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb71
2 files changed, 95 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-kivy/0001-add-support-for-glesv2.patch b/meta-python/recipes-devtools/python/python3-kivy/0001-add-support-for-glesv2.patch
new file mode 100644
index 0000000000..e50c7e7e24
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-kivy/0001-add-support-for-glesv2.patch
@@ -0,0 +1,24 @@
1diff --git a/setup.py b/setup.py
2index 9a507c6c4..3f5b70866 100644
3--- a/setup.py
4+++ b/setup.py
5@@ -680,7 +680,18 @@ def determine_gl_flags():
6 c_options['use_x11'] = True
7 c_options['use_egl'] = True
8 else:
9- flags['libraries'] = ['GL']
10+ if cross_sysroot:
11+ flags['include_dirs'] = [cross_sysroot + '/usr/include']
12+ flags['library_dirs'] = [cross_sysroot + '/usr/lib']
13+
14+ if c_options['use_opengl_es2']:
15+ print("using GLESv2 libraries")
16+ flags['libraries'] = ['GLESv2']
17+ else:
18+ flags['libraries'] = ['GL']
19+
20+
21+ print("cross_sysroot: " + str(cross_sysroot))
22 return flags, base_flags
23
24
diff --git a/meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb b/meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb
new file mode 100644
index 0000000000..3f6bafda81
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb
@@ -0,0 +1,71 @@
1SUMMARY = "Open source Python library for rapid development of applications \
2 that make use of innovative user interfaces, such as multi-touch apps."
3HOMEPAGE = "https://kivy.org/"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=f0c851d60495c7e27225a819e179208a"
6
7inherit setuptools3
8
9SRC_URI = "\
10 git://github.com/kivy/kivy.git;protocol=git;\
11"
12
13# Kivy's setup files only look for GLES libraries for Android, iOS, RPi,
14# and mali-based OS's. We need to patch the setup file to tell Kivy setup
15# that our machine has GLES libaries installed as well
16# Also, if using SDL2 as backend, SDL2 needs to be configured wth gles
17SRC_URI += " \
18 file://0001-add-support-for-glesv2.patch \
19"
20SRCREV = "dedcb6bcabe3d8d6758dcee607e8c33b174d782b"
21
22S = "${WORKDIR}/git"
23
24PACKAGES += "${PN}-examples"
25FILES:${PN}-examples = "/usr/share/kivy-examples"
26
27USE_WAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '1', '0', d)}"
28export USE_WAYLAND
29
30# if using Wayland, let's use pure Wayland (and not XWayland)
31# so do not build using X11 flag when we detect Wayland
32USE_X11 = " \
33 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '0', \
34 bb.utils.contains('DISTRO_FEATURES', 'x11', '1', \
35 '0', d), d)}"
36export USE_X11
37
38# Use OpenGL ES 2.0 library
39KIVY_GRAPHICS = "gles"
40export KIVY_GRAPHICS
41
42KIVY_CROSS_SYSROOT="${WORKDIR}/recipe-sysroot"
43export KIVY_CROSS_SYSROOT
44
45DEPENDS += " \
46 gstreamer1.0 \
47 gstreamer1.0-python \
48 libsdl2 \
49 libsdl2-ttf \
50 libsdl2-image \
51 libsdl2-mixer \
52 pango \
53 python3 \
54 python3-cython-native \
55"
56
57RDEPENDS_${PN} = " \
58 gstreamer1.0 \
59 gstreamer1.0-python \
60 libsdl2 \
61 libsdl2-ttf \
62 libsdl2-image \
63 libsdl2-mixer \
64 pango \
65 python3 \
66 python3-docutils \
67 python3-fcntl \
68 python3-image \
69 python3-pillow \
70 python3-pygments \
71"