diff options
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-kivy/0001-add-support-for-glesv2.patch | 24 | ||||
| -rw-r--r-- | meta-python/recipes-devtools/python/python3-kivy_2.0.0.bb | 71 |
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 @@ | |||
| 1 | diff --git a/setup.py b/setup.py | ||
| 2 | index 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 @@ | |||
| 1 | SUMMARY = "Open source Python library for rapid development of applications \ | ||
| 2 | that make use of innovative user interfaces, such as multi-touch apps." | ||
| 3 | HOMEPAGE = "https://kivy.org/" | ||
| 4 | LICENSE = "MIT" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=f0c851d60495c7e27225a819e179208a" | ||
| 6 | |||
| 7 | inherit setuptools3 | ||
| 8 | |||
| 9 | SRC_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 | ||
| 17 | SRC_URI += " \ | ||
| 18 | file://0001-add-support-for-glesv2.patch \ | ||
| 19 | " | ||
| 20 | SRCREV = "dedcb6bcabe3d8d6758dcee607e8c33b174d782b" | ||
| 21 | |||
| 22 | S = "${WORKDIR}/git" | ||
| 23 | |||
| 24 | PACKAGES += "${PN}-examples" | ||
| 25 | FILES:${PN}-examples = "/usr/share/kivy-examples" | ||
| 26 | |||
| 27 | USE_WAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '1', '0', d)}" | ||
| 28 | export 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 | ||
| 32 | USE_X11 = " \ | ||
| 33 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '0', \ | ||
| 34 | bb.utils.contains('DISTRO_FEATURES', 'x11', '1', \ | ||
| 35 | '0', d), d)}" | ||
| 36 | export USE_X11 | ||
| 37 | |||
| 38 | # Use OpenGL ES 2.0 library | ||
| 39 | KIVY_GRAPHICS = "gles" | ||
| 40 | export KIVY_GRAPHICS | ||
| 41 | |||
| 42 | KIVY_CROSS_SYSROOT="${WORKDIR}/recipe-sysroot" | ||
| 43 | export KIVY_CROSS_SYSROOT | ||
| 44 | |||
| 45 | DEPENDS += " \ | ||
| 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 | |||
| 57 | RDEPENDS_${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 | " | ||
