1*4882a593Smuzhiyun# SPDX-FileCopyrightText: Huawei Inc. 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# SPDX-License-Identifier: MIT 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunHOMEPAGE = "https://lvgl.io/" 6*4882a593SmuzhiyunDESCRIPTION = "LVGL is an OSS graphics library to create embedded GUI" 7*4882a593SmuzhiyunSUMMARY = "Light and Versatile Graphics Library" 8*4882a593SmuzhiyunLICENSE = "MIT" 9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a" 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunSRC_URI = "gitsm://github.com/lvgl/lvgl;destsuffix=${S};protocol=https;nobranch=1" 12*4882a593SmuzhiyunSRCREV = "d38eb1e689fa5a64c25e677275172d9c8a4ab2f0" 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "wayland" 15*4882a593Smuzhiyun 16*4882a593Smuzhiyuninherit cmake 17*4882a593Smuzhiyuninherit features_check 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunEXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${BASELIB}" 20*4882a593SmuzhiyunS = "${WORKDIR}/${PN}-${PV}" 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunLVGL_CONFIG_LV_MEM_CUSTOM ?= "0" 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun# Upstream does not support a default configuration 25*4882a593Smuzhiyun# but propose a default "disabled" template, which is used as reference 26*4882a593Smuzhiyun# More configuration can be done using external configuration variables 27*4882a593Smuzhiyundo_configure:prepend() { 28*4882a593Smuzhiyun [ -r "${S}/lv_conf.h" ] \ 29*4882a593Smuzhiyun || sed -e 's|#if 0 .*Set it to "1" to enable .*|#if 1 // Enabled|g' \ 30*4882a593Smuzhiyun -e "s|\(#define LV_MEM_CUSTOM .*\)0|\1${LVGL_CONFIG_LV_MEM_CUSTOM}|g" \ 31*4882a593Smuzhiyun < "${S}/lv_conf_template.h" > "${S}/lv_conf.h" 32*4882a593Smuzhiyun} 33*4882a593Smuzhiyun 34*4882a593SmuzhiyunFILES:${PN}-dev += "\ 35*4882a593Smuzhiyun ${includedir}/${PN}/ \ 36*4882a593Smuzhiyun ${includedir}/${PN}/lvgl/ \ 37*4882a593Smuzhiyun " 38