1*4882a593Smuzhiyun# SPDX-FileCopyrightText: Huawei Inc. 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# SPDX-License-Identifier: MIT 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunHOMEPAGE = "https://docs.lvgl.io/latest/en/html/porting/index.html" 6*4882a593SmuzhiyunSUMMARY = "LVGL's Display and Touch pad drivers" 7*4882a593SmuzhiyunDESCRIPTION = "Collection of drivers: SDL, framebuffer, wayland and more..." 8*4882a593SmuzhiyunLICENSE = "MIT" 9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2" 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun# TODO: Pin upstream release (current v7.11.0-80-g419a757) 12*4882a593SmuzhiyunSRC_URI = "git://github.com/lvgl/lv_drivers;destsuffix=${S};protocol=https;nobranch=1" 13*4882a593SmuzhiyunSRCREV = "419a757c23aaa67c676fe3a2196d64808fcf2254" 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunDEPENDS = "libxkbcommon lvgl wayland" 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "wayland" 18*4882a593Smuzhiyun 19*4882a593Smuzhiyuninherit cmake 20*4882a593Smuzhiyuninherit features_check 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunS = "${WORKDIR}/${PN}-${PV}" 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunLVGL_CONFIG_WAYLAND_HOR_RES ?= "480" 25*4882a593SmuzhiyunLVGL_CONFIG_WAYLAND_VER_RES ?= "320" 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunEXTRA_OECMAKE += "-Dinstall:BOOL=ON -DLIB_INSTALL_DIR=${BASELIB}" 28*4882a593Smuzhiyun 29*4882a593SmuzhiyunTARGET_CFLAGS += "-DLV_CONF_INCLUDE_SIMPLE=1" 30*4882a593SmuzhiyunTARGET_CFLAGS += "-I${RECIPE_SYSROOT}/${includedir}/lvgl" 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun# Upstream does not support a default configuration 33*4882a593Smuzhiyun# but propose a default "disabled" template, which is used as reference 34*4882a593Smuzhiyun# More configuration can be done using external configuration variables 35*4882a593Smuzhiyundo_configure:append() { 36*4882a593Smuzhiyun [ -r "${S}/lv_drv_conf.h" ] \ 37*4882a593Smuzhiyun || sed -e "s|#if 0 .*Set it to \"1\" to enable the content.*|#if 1 // Enabled by ${PN}|g" \ 38*4882a593Smuzhiyun -e "s|# define USE_WAYLAND 0|# define USE_WAYLAND 1|g" \ 39*4882a593Smuzhiyun -e "s|\(^ *# *define *WAYLAND_HOR_RES *\).*|\1${LVGL_CONFIG_WAYLAND_HOR_RES}|g" \ 40*4882a593Smuzhiyun -e "s|\(^ *# *define *WAYLAND_VER_RES *\).*|\1${LVGL_CONFIG_WAYLAND_VER_RES}|g" \ 41*4882a593Smuzhiyun < "${S}/lv_drv_conf_template.h" > "${S}/lv_drv_conf.h" 42*4882a593Smuzhiyun} 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunFILES:${PN}-dev += "\ 45*4882a593Smuzhiyun ${includedir}/lvgl/lv_drivers/ \ 46*4882a593Smuzhiyun " 47