diff mbox series

[meta-oe,v3,1/5] lvgl: fix typo in lv-conf.inc

Message ID 20240315180314.9111-1-chris.chapuis@gmail.com
State New
Headers show
Series [meta-oe,v3,1/5] lvgl: fix typo in lv-conf.inc | expand

Commit Message

Christophe Chapuis March 15, 2024, 6:03 p.m. UTC
Fix a typo in the first sed instruction, where the #if 0 is
never changed to #if 1 at the beginning of lv_conf.h.

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

Comments

Marek Vasut March 16, 2024, 2:53 a.m. UTC | #1
On 3/15/24 7:03 PM, Christophe Chapuis wrote:
> Fix a typo in the first sed instruction, where the #if 0 is
> never changed to #if 1 at the beginning of lv_conf.h.
> 
> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
> ---
>   meta-oe/recipes-graphics/lvgl/lv-conf.inc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> index cb676ac62..3dbdf769f 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" \

Just to be on the safe side, can you please check if this also modifies 
the lv_conf.h in lvgl-demo-fb recipe correctly ? (I think it does not, 
but the fix is something like:

sed -e "s|#if 0 .*Set it to \"1\" to enable.*content.*|#if 1 // Enabled 
by ${PN}|g" \
Christophe Chapuis March 16, 2024, 8:21 a.m. UTC | #2
On Sat, Mar 16, 2024 at 3:59 AM Marek Vasut <marex@denx.de> wrote:

> On 3/15/24 7:03 PM, Christophe Chapuis wrote:
> > Fix a typo in the first sed instruction, where the #if 0 is
> > never changed to #if 1 at the beginning of lv_conf.h.
> >
> > Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
> > ---
> >   meta-oe/recipes-graphics/lvgl/lv-conf.inc | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
> > index cb676ac62..3dbdf769f 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" \
>
> Just to be on the safe side, can you please check if this also modifies
> the lv_conf.h in lvgl-demo-fb recipe correctly ? (I think it does not,
>
>
It does not, but this won't be a problem: it's already activated in
lvgl-demo-fb's source code. More generally, if a lv_conf.h file already
exists, it means the app has already customized it a bit, so we can
consider it to be already active.

However, this pointed to a little issue I introduced: the do_install:append
for lv_conf.h is only needed for lvgl.bb, not for other recipes that use
lv-conf.inc. I'll move it to the main lvgl recipe.

I'll also generalize the sed instructions a bit more, to catch spaces and
tabs. So in the end, each sed line would look like this:
   -e "s|\(^[ \t]*#define LV_USE_ASSERT_OBJ[ \t]\).*|\1${DEBUG_BUILD}|g"

What is the preferred way to do this ? Do I do a v4, or do I add two more
patches?
Marek Vasut March 16, 2024, 8:39 p.m. UTC | #3
On 3/16/24 9:21 AM, Christophe Chapuis wrote:
> On Sat, Mar 16, 2024 at 3:59 AM Marek Vasut <marex@denx.de> wrote:
> 
>> On 3/15/24 7:03 PM, Christophe Chapuis wrote:
>>> Fix a typo in the first sed instruction, where the #if 0 is
>>> never changed to #if 1 at the beginning of lv_conf.h.
>>>
>>> Signed-off-by: Christophe Chapuis <chris.chapuis@gmail.com>
>>> ---
>>>    meta-oe/recipes-graphics/lvgl/lv-conf.inc | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/meta-oe/recipes-graphics/lvgl/lv-conf.inc
>> b/meta-oe/recipes-graphics/lvgl/lv-conf.inc
>>> index cb676ac62..3dbdf769f 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" \
>>
>> Just to be on the safe side, can you please check if this also modifies
>> the lv_conf.h in lvgl-demo-fb recipe correctly ? (I think it does not,
>>
>>
> It does not, but this won't be a problem: it's already activated in
> lvgl-demo-fb's source code. More generally, if a lv_conf.h file already
> exists, it means the app has already customized it a bit, so we can
> consider it to be already active.

OK

> However, this pointed to a little issue I introduced: the do_install:append
> for lv_conf.h is only needed for lvgl.bb, not for other recipes that use
> lv-conf.inc. I'll move it to the main lvgl recipe.
> 
> I'll also generalize the sed instructions a bit more, to catch spaces and
> tabs. So in the end, each sed line would look like this:
>     -e "s|\(^[ \t]*#define LV_USE_ASSERT_OBJ[ \t]\).*|\1${DEBUG_BUILD}|g"
> 
> What is the preferred way to do this ? Do I do a v4, or do I add two more
> patches?

V4 please.

Also please collect Reviewed-by tags in each new version .
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..3dbdf769f 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" \
         \