diff mbox series

[meta-oe,PATCHv2,1/3] lvgl: fix typo and install lv_conf.h

Message ID 20240314192153.202513-1-chris.chapuis@gmail.com
State New
Headers show
Series [meta-oe,PATCHv2,1/3] lvgl: fix typo and install lv_conf.h | expand

Commit Message

Christophe Chapuis March 14, 2024, 7:21 p.m. UTC
* Fix a typo in the first sed instruction,
  and therefore the #if 0 is never changed
  to #if 1 at the beginning of lv_conf.h.

* Add an install append to copy the generated
  lv_conf.h as part of the lvgl package, so that
  it will be found and used by the recipes that
  want to use lvgl.

Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
---
 meta-oe/recipes-graphics/lvgl/lv-conf.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Marek Vasut March 14, 2024, 11:24 p.m. UTC | #1
On 3/14/24 8:21 PM, Christophe Chapuis wrote:
> * Fix a typo in the first sed instruction,
>    and therefore the #if 0 is never changed
>    to #if 1 at the beginning of lv_conf.h.
> 
> * Add an install append to copy the generated
>    lv_conf.h as part of the lvgl package, so that
>    it will be found and used by the recipes that
>    want to use lvgl.

I'd probably split this in two patches.

> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
> ---
>   meta-oe/recipes-graphics/lvgl/lv-conf.inc | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> index cb676ac62..cd14412e1 100644
> --- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> +++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> @@ -24,7 +24,7 @@ do_configure:append() {
>       # If there is a configuration template, start from that
>       [ -r "${S}/lv_conf_template.h" ] && cp -Lv "${S}/lv_conf_template.h" "${S}/lv_conf.h"
>   
> -    sed -e "s|#if 0 .*Set it to \"1\" to enable the content.*|#if 1 // Enabled by ${PN}|g" \
> +    sed -e "s|#if 0 .*Set it to \"1\" to enable content.*|#if 1 // Enabled by ${PN}|g" \

Uh, the lv_demo_fb has this unconditionally enabled, so I never spotted 
this, thanks for finding and fixing it.

Reviewed-by: Marek Vasut <marex@denx.de>
diff mbox series

Patch

diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
index cb676ac62..cd14412e1 100644
--- a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
+++ b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
@@ -24,7 +24,7 @@  do_configure:append() {
     # If there is a configuration template, start from that
     [ -r "${S}/lv_conf_template.h" ] && cp -Lv "${S}/lv_conf_template.h" "${S}/lv_conf.h"
 
-    sed -e "s|#if 0 .*Set it to \"1\" to enable the content.*|#if 1 // Enabled by ${PN}|g" \
+    sed -e "s|#if 0 .*Set it to \"1\" to enable content.*|#if 1 // Enabled by ${PN}|g" \
         \
         -e "s|\(^#define LV_USE_LINUX_DRM \).*|#define LV_USE_LINUX_DRM ${LVGL_CONFIG_USE_DRM}|g" \
         \
@@ -52,3 +52,8 @@  do_configure:append() {
         \
         -i "${S}/lv_conf.h"
 }
+
+do_install:append() {
+    install -d "${D}${includedir}/lvgl"
+    install -m 0644 "${S}/lv_conf.h" "${D}${includedir}/lvgl/lv_conf.h"
+}