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 | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 11 | # TODO: Pin upstream release (current v7.11.0-80-g419a757) |
| 12 | SRC_URI = "git://github.com/lvgl/lv_drivers;destsuffix=${S};protocol=https;nobranch=1" |
| 13 | SRCREV = "419a757c23aaa67c676fe3a2196d64808fcf2254" |
| 14 | |
| 15 | DEPENDS = "libxkbcommon lvgl wayland" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 16 | |
| 17 | REQUIRED_DISTRO_FEATURES = "wayland" |
| 18 | |
| 19 | inherit cmake |
| 20 | inherit features_check |
| 21 | |
| 22 | S = "${WORKDIR}/${PN}-${PV}" |
| 23 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 24 | LVGL_CONFIG_WAYLAND_HOR_RES ?= "480" |
| 25 | LVGL_CONFIG_WAYLAND_VER_RES ?= "320" |
| 26 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 27 | EXTRA_OECMAKE += "-Dinstall:BOOL=ON -DLIB_INSTALL_DIR=${BASELIB}" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 28 | |
| 29 | TARGET_CFLAGS += "-DLV_CONF_INCLUDE_SIMPLE=1" |
| 30 | TARGET_CFLAGS += "-I${RECIPE_SYSROOT}/${includedir}/lvgl" |
| 31 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 32 | # Upstream does not support a default configuration |
| 33 | # but propose a default "disabled" template, which is used as reference |
| 34 | # More configuration can be done using external configuration variables |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 35 | do_configure:append() { |
| 36 | [ -r "${S}/lv_drv_conf.h" ] \ |
| 37 | || sed -e "s|#if 0 .*Set it to \"1\" to enable the content.*|#if 1 // Enabled by ${PN}|g" \ |
| 38 | -e "s|# define USE_WAYLAND 0|# define USE_WAYLAND 1|g" \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 39 | -e "s|\(^ *# *define *WAYLAND_HOR_RES *\).*|\1${LVGL_CONFIG_WAYLAND_HOR_RES}|g" \ |
| 40 | -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] | 41 | < "${S}/lv_drv_conf_template.h" > "${S}/lv_drv_conf.h" |
| 42 | } |
| 43 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 44 | FILES:${PN}-dev += "\ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 45 | ${includedir}/lvgl/lv_drivers/ \ |
| 46 | " |