[meta-oe,v2] wxwidgets: enable to use private fonts

Message ID 20220511074522.28499-1-kai.kang@windriver.com
State Under Review
Headers show
Series [meta-oe,v2] wxwidgets: enable to use private fonts | expand

Commit Message

Kai May 11, 2022, 7:45 a.m. UTC
From: Kai Kang <kai.kang@windriver.com>

Enable option wxUSE_PRIVATE_FONTS of wxwidgets if build with gtk. It
allows application to use the font from the given file even if it is
not globally installed on the system.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
v2:
* use upper case 'ON' to align with others in oe

 meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb | 1 +
 1 file changed, 1 insertion(+)

Comments

Khem Raj May 11, 2022, 3:21 p.m. UTC | #1
On Wed, May 11, 2022 at 12:45 AM kai <kai.kang@windriver.com> wrote:
>
> From: Kai Kang <kai.kang@windriver.com>
>
> Enable option wxUSE_PRIVATE_FONTS of wxwidgets if build with gtk. It
> allows application to use the font from the given file even if it is
> not globally installed on the system.
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
> v2:
> * use upper case 'ON' to align with others in oe
>
>  meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
> index 6b57cb54c..b9b1dcf0d 100644
> --- a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
> +++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
> @@ -39,6 +39,7 @@ EXTRA_OECMAKE += " \
>      -DwxUSE_LIBTIFF=sys \
>      -DwxUSE_REGEX=builtin \
>      -DwxPLATFORM_LIB_DIR=${@d.getVar('baselib').replace('lib', '')} \
> +    ${@bb.utils.contains('PACKAGECONFIG', 'gtk', '-DwxUSE_PRIVATE_FONTS=ON', '', d)} \

why not add it to the packageconfig setting itself ?

>  "
>  EXTRA_OECMAKE:append:libc-musl = " \
>      -DHAVE_LOCALE_T=OFF \
> --
> 2.17.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#97033): https://lists.openembedded.org/g/openembedded-devel/message/97033
> Mute This Topic: https://lists.openembedded.org/mt/91031050/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Kai May 12, 2022, 6:22 a.m. UTC | #2
On 5/11/22 11:21 PM, Khem Raj wrote:
> On Wed, May 11, 2022 at 12:45 AM kai <kai.kang@windriver.com> wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> Enable option wxUSE_PRIVATE_FONTS of wxwidgets if build with gtk. It
>> allows application to use the font from the given file even if it is
>> not globally installed on the system.
>>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>> v2:
>> * use upper case 'ON' to align with others in oe
>>
>>   meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
>> index 6b57cb54c..b9b1dcf0d 100644
>> --- a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
>> +++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
>> @@ -39,6 +39,7 @@ EXTRA_OECMAKE += " \
>>       -DwxUSE_LIBTIFF=sys \
>>       -DwxUSE_REGEX=builtin \
>>       -DwxPLATFORM_LIB_DIR=${@d.getVar('baselib').replace('lib', '')} \
>> +    ${@bb.utils.contains('PACKAGECONFIG', 'gtk', '-DwxUSE_PRIVATE_FONTS=ON', '', d)} \
> why not add it to the packageconfig setting itself ?
It is an useful feature for wxwidgets with gui, so I want it  to be 
enabled by default. And it requires pango to make it work.

I can see gtk3 depends on pango but qtbase doesn't. So only check 'gtk' 
here.

Regards,
Kai

>
>>   "
>>   EXTRA_OECMAKE:append:libc-musl = " \
>>       -DHAVE_LOCALE_T=OFF \
>> --
>> 2.17.1
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#97033): https://lists.openembedded.org/g/openembedded-devel/message/97033
>> Mute This Topic: https://lists.openembedded.org/mt/91031050/1997914
>> Group Owner: openembedded-devel+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
Khem Raj May 12, 2022, 4:15 p.m. UTC | #3
On Wed, May 11, 2022 at 11:23 PM Kai <kai.kang@windriver.com> wrote:
>
> On 5/11/22 11:21 PM, Khem Raj wrote:
> > On Wed, May 11, 2022 at 12:45 AM kai <kai.kang@windriver.com> wrote:
> >> From: Kai Kang <kai.kang@windriver.com>
> >>
> >> Enable option wxUSE_PRIVATE_FONTS of wxwidgets if build with gtk. It
> >> allows application to use the font from the given file even if it is
> >> not globally installed on the system.
> >>
> >> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> >> ---
> >> v2:
> >> * use upper case 'ON' to align with others in oe
> >>
> >>   meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb | 1 +
> >>   1 file changed, 1 insertion(+)
> >>
> >> diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
> >> index 6b57cb54c..b9b1dcf0d 100644
> >> --- a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
> >> +++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
> >> @@ -39,6 +39,7 @@ EXTRA_OECMAKE += " \
> >>       -DwxUSE_LIBTIFF=sys \
> >>       -DwxUSE_REGEX=builtin \
> >>       -DwxPLATFORM_LIB_DIR=${@d.getVar('baselib').replace('lib', '')} \
> >> +    ${@bb.utils.contains('PACKAGECONFIG', 'gtk', '-DwxUSE_PRIVATE_FONTS=ON', '', d)} \
> > why not add it to the packageconfig setting itself ?
> It is an useful feature for wxwidgets with gui, so I want it  to be
> enabled by default. And it requires pango to make it work.
>
> I can see gtk3 depends on pango but qtbase doesn't. So only check 'gtk'

I meant to do something like below instead of this patch.

PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON
-DwxUSE_PRIVATE_FONTS=ON,,gtk+3,,,no_gui qt"

> here.
>
> Regards,
> Kai
>
> >
> >>   "
> >>   EXTRA_OECMAKE:append:libc-musl = " \
> >>       -DHAVE_LOCALE_T=OFF \
> >> --
> >> 2.17.1
> >>
> >>
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >> Links: You receive all messages sent to this group.
> >> View/Reply Online (#97033): https://lists.openembedded.org/g/openembedded-devel/message/97033
> >> Mute This Topic: https://lists.openembedded.org/mt/91031050/1997914
> >> Group Owner: openembedded-devel+owner@lists.openembedded.org
> >> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >>
>
> --
> Kai Kang
> Wind River Linux
>
Kai May 13, 2022, 3:01 a.m. UTC | #4
On 5/13/22 12:15 AM, Khem Raj wrote:
> On Wed, May 11, 2022 at 11:23 PM Kai <kai.kang@windriver.com> wrote:
>> On 5/11/22 11:21 PM, Khem Raj wrote:
>>> On Wed, May 11, 2022 at 12:45 AM kai <kai.kang@windriver.com> wrote:
>>>> From: Kai Kang <kai.kang@windriver.com>
>>>>
>>>> Enable option wxUSE_PRIVATE_FONTS of wxwidgets if build with gtk. It
>>>> allows application to use the font from the given file even if it is
>>>> not globally installed on the system.
>>>>
>>>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>>>> ---
>>>> v2:
>>>> * use upper case 'ON' to align with others in oe
>>>>
>>>>    meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb | 1 +
>>>>    1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
>>>> index 6b57cb54c..b9b1dcf0d 100644
>>>> --- a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
>>>> +++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
>>>> @@ -39,6 +39,7 @@ EXTRA_OECMAKE += " \
>>>>        -DwxUSE_LIBTIFF=sys \
>>>>        -DwxUSE_REGEX=builtin \
>>>>        -DwxPLATFORM_LIB_DIR=${@d.getVar('baselib').replace('lib', '')} \
>>>> +    ${@bb.utils.contains('PACKAGECONFIG', 'gtk', '-DwxUSE_PRIVATE_FONTS=ON', '', d)} \
>>> why not add it to the packageconfig setting itself ?
>> It is an useful feature for wxwidgets with gui, so I want it  to be
>> enabled by default. And it requires pango to make it work.
>>
>> I can see gtk3 depends on pango but qtbase doesn't. So only check 'gtk'
> I meant to do something like below instead of this patch.
>
> PACKAGECONFIG[gtk] = "-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_GUI=ON
> -DwxUSE_PRIVATE_FONTS=ON,,gtk+3,,,no_gui qt"

OK. v3 will be sent.

Thanks,
Kai

>
>> here.
>>
>> Regards,
>> Kai
>>
>>>>    "
>>>>    EXTRA_OECMAKE:append:libc-musl = " \
>>>>        -DHAVE_LOCALE_T=OFF \
>>>> --
>>>> 2.17.1
>>>>
>>>>
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>> Links: You receive all messages sent to this group.
>>>> View/Reply Online (#97033): https://lists.openembedded.org/g/openembedded-devel/message/97033
>>>> Mute This Topic: https://lists.openembedded.org/mt/91031050/1997914
>>>> Group Owner: openembedded-devel+owner@lists.openembedded.org
>>>> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>>
>> --
>> Kai Kang
>> Wind River Linux
>>

Patch

diff --git a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
index 6b57cb54c..b9b1dcf0d 100644
--- a/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
+++ b/meta-oe/recipes-extended/wxwidgets/wxwidgets_3.1.5.bb
@@ -39,6 +39,7 @@  EXTRA_OECMAKE += " \
     -DwxUSE_LIBTIFF=sys \
     -DwxUSE_REGEX=builtin \
     -DwxPLATFORM_LIB_DIR=${@d.getVar('baselib').replace('lib', '')} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'gtk', '-DwxUSE_PRIVATE_FONTS=ON', '', d)} \
 "
 EXTRA_OECMAKE:append:libc-musl = " \
     -DHAVE_LOCALE_T=OFF \