Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | # SPDX-FileCopyrightText: Huawei Inc. |
| 2 | # |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | |
| 5 | HOMEPAGE = "https://lvgl.io/" |
| 6 | DESCRIPTION = "LVGL is an OSS graphics library to create embedded GUI" |
| 7 | SUMMARY = "Light and Versatile Graphics Library" |
| 8 | LICENSE = "MIT" |
| 9 | LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a" |
| 10 | |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 11 | SRC_URI = "git://github.com/lvgl/lvgl;protocol=https;branch=release/v8.3" |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 12 | SRCREV = "9ec3b8706b098f60940cee6ac211d3cb3141aedf" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 13 | |
| 14 | inherit cmake |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 15 | |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 16 | EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib}" |
| 17 | S = "${WORKDIR}/git" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 18 | |
| 19 | LVGL_CONFIG_LV_MEM_CUSTOM ?= "0" |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 20 | LVGL_CONFIG_LV_COLOR_DEPTH ?= "32" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 21 | |
| 22 | # Upstream does not support a default configuration |
| 23 | # but propose a default "disabled" template, which is used as reference |
| 24 | # More configuration can be done using external configuration variables |
| 25 | do_configure:prepend() { |
| 26 | [ -r "${S}/lv_conf.h" ] \ |
| 27 | || sed -e 's|#if 0 .*Set it to "1" to enable .*|#if 1 // Enabled|g' \ |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 28 | -e "s|\(#define LV_COLOR_DEPTH \).*|\1 ${LVGL_CONFIG_LV_COLOR_DEPTH}|g" \ |
| 29 | \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 30 | -e "s|\(#define LV_MEM_CUSTOM .*\)0|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \ |
Andrew Geissler | 3eeda90 | 2023-05-19 10:14:02 -0500 | [diff] [blame] | 31 | \ |
| 32 | -e "s|\(#define LV_TICK_CUSTOM \).*|\1 1|g" \ |
| 33 | -e "s|\(#define LV_TICK_CUSTOM_INCLUDE \).*|\1 <stdint.h>|g" \ |
| 34 | -e "s|\(#define LV_TICK_CUSTOM_SYS_TIME_EXPR \).*|extern uint32_t custom_tick_get(void);\n\1 (custom_tick_get())|g" \ |
| 35 | \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 36 | < "${S}/lv_conf_template.h" > "${S}/lv_conf.h" |
| 37 | } |
| 38 | |
| 39 | FILES:${PN}-dev += "\ |
| 40 | ${includedir}/${PN}/ \ |
| 41 | ${includedir}/${PN}/lvgl/ \ |
| 42 | " |