blob: 991aa0f7d8ff98dd985cf10165550062bebfb6c8 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001SUMMARY = "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"
Patrick Williams705982a2024-01-12 09:51:57 -06005LIC_FILES_CHKSUM = "file://LICENSE;md5=6d3bc49400e35d5a2279d14c40dcfb09"
Patrick Williamsac13d5f2023-11-24 18:59:46 -06006
7inherit setuptools3 pkgconfig features_check
Patrick Williamsac13d5f2023-11-24 18:59:46 -06008
9# Kivy's setup files only look for GLES libraries for Android, iOS, RPi,
10# and mali-based OS's. We need to patch the setup file to tell Kivy setup
11# that our machine has GLES libaries installed as well
12# Also, if using SDL2 as backend, SDL2 needs to be configured with gles
13SRC_URI = "git://github.com/kivy/kivy.git;protocol=https;branch=stable \
14 file://0001-add-support-for-glesv2.patch \
15 "
16
Patrick Williams705982a2024-01-12 09:51:57 -060017SRCREV = "9ef218027178115a66b417ae34b21f488bdd3617"
Patrick Williamsac13d5f2023-11-24 18:59:46 -060018
19S = "${WORKDIR}/git"
20
21PACKAGES += "${PN}-examples"
22FILES:${PN}-examples = "/usr/share/kivy-examples"
23
24USE_WAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '1', '0', d)}"
25export USE_WAYLAND
26
27# if using Wayland, let's use pure Wayland (and not XWayland)
28# so do not build using X11 flag when we detect Wayland
29USE_X11 = " \
30 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '0', \
31 bb.utils.contains('DISTRO_FEATURES', 'x11', '1', \
32 '0', d), d)}"
33export USE_X11
34
35# Use OpenGL ES 2.0 library
36KIVY_GRAPHICS = "gles"
37export KIVY_GRAPHICS
38
39KIVY_CROSS_SYSROOT="${RECIPE_SYSROOT}"
40export KIVY_CROSS_SYSROOT
41
42REQUIRED_DISTRO_FEATURES += "opengl gobject-introspection-data"
43
44ANY_OF_DISTRO_FEATURES = "x11 wayland"
45
46DEPENDS += " \
47 gstreamer1.0 \
48 gstreamer1.0-python \
49 libsdl2 \
50 libsdl2-ttf \
51 libsdl2-image \
52 libsdl2-mixer \
53 pango \
54 python3 \
55 python3-cython-native \
56"
57
58RDEPENDS:${PN} = " \
59 gstreamer1.0 \
60 gstreamer1.0-python \
61 libsdl2 \
62 libsdl2-ttf \
63 libsdl2-image \
64 libsdl2-mixer \
65 pango \
66 python3 \
67 python3-docutils \
68 python3-fcntl \
69 python3-image \
70 python3-pillow \
71 python3-pygments \
72"