Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: Huawei Inc. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 2 | # |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 3 | # SPDX-License-Identifier: MIT |
| 4 | |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 5 | HOMEPAGE = "https://docs.lvgl.io/latest/en/html/porting/index.html" |
| 6 | SUMMARY = "LVGL's Display and Touch pad drivers" |
| 7 | DESCRIPTION = "Collection of drivers: SDL, framebuffer, wayland and more..." |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 8 | LICENSE = "MIT" |
| 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 10 | |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 11 | SRC_URI = "git://github.com/lvgl/lv_drivers;protocol=https;branch=release/v8.3" |
| 12 | SRCREV = "71830257710f430b6d8d1c324f89f2eab52488f1" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 13 | |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 14 | DEPENDS = "lvgl" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 15 | |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 16 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland fbdev', d)}" |
| 17 | PACKAGECONFIG[fbdev] = ",," |
| 18 | PACKAGECONFIG[wayland] = ",,libxkbcommon wayland" |
| 19 | LVGL_CONFIG_USE_FBDEV = "${@bb.utils.contains('PACKAGECONFIG', 'fbdev', '1', '0', d)}" |
| 20 | LVGL_CONFIG_USE_WAYLAND = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', '1', '0', d)}" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 21 | |
| 22 | inherit cmake |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 23 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 24 | S = "${WORKDIR}/git" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 25 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 26 | LVGL_CONFIG_WAYLAND_HOR_RES ?= "480" |
| 27 | LVGL_CONFIG_WAYLAND_VER_RES ?= "320" |
| 28 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 29 | EXTRA_OECMAKE += "-Dinstall:BOOL=ON -DLIB_INSTALL_DIR=${baselib}" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 30 | |
| 31 | TARGET_CFLAGS += "-DLV_CONF_INCLUDE_SIMPLE=1" |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 32 | TARGET_CFLAGS += "-I${STAGING_INCDIR}/lvgl" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 33 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 34 | # Upstream does not support a default configuration |
| 35 | # but propose a default "disabled" template, which is used as reference |
| 36 | # More configuration can be done using external configuration variables |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 37 | do_configure:append() { |
| 38 | [ -r "${S}/lv_drv_conf.h" ] \ |
| 39 | || sed -e "s|#if 0 .*Set it to \"1\" to enable the content.*|#if 1 // Enabled by ${PN}|g" \ |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 40 | \ |
| 41 | -e "s|\(^# define USE_FBDEV \).*|# define USE_FBDEV ${LVGL_CONFIG_USE_FBDEV}|g" \ |
| 42 | -e "s|\(^# define USE_EVDEV \).*|# define USE_EVDEV ${LVGL_CONFIG_USE_FBDEV}|g" \ |
| 43 | \ |
| 44 | -e "s|\(^# define USE_WAYLAND \).*|# define USE_WAYLAND ${LVGL_CONFIG_USE_WAYLAND}|g" \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 45 | -e "s|\(^ *# *define *WAYLAND_HOR_RES *\).*|\1${LVGL_CONFIG_WAYLAND_HOR_RES}|g" \ |
| 46 | -e "s|\(^ *# *define *WAYLAND_VER_RES *\).*|\1${LVGL_CONFIG_WAYLAND_VER_RES}|g" \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 47 | < "${S}/lv_drv_conf_template.h" > "${S}/lv_drv_conf.h" |
| 48 | } |
| 49 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 50 | FILES:${PN}-dev += "\ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 51 | ${includedir}/lvgl/lv_drivers/ \ |
| 52 | " |