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