[OE-core] [oe-core 2/2] glib-networking:enable glib-networking complie as native package
Jiang
Lu.Jiang at windriver.com
Wed Mar 20 09:27:55 UTC 2019
在 2019/3/19 下午11:36, Peter Kjellerstedt 写道:
>> -----Original Message-----
>> From: openembedded-core-bounces at lists.openembedded.org <openembedded-
>> core-bounces at lists.openembedded.org> On Behalf Of Jiang Lu
>> Sent: den 19 mars 2019 08:55
>> To: lu.jiang at windriver.com; openembedded-core at lists.openembedded.org
>> Subject: [OE-core] [oe-core 2/2] glib-networking:enable glib-networking
>> complie as native package
>>
>> Enable glib-networking compile as a native package, for it is depended
>> by
>> libsoup.
>>
>> Signed-off-by: Jiang Lu <lu.jiang at windriver.com>
>> ---
>> .../glib-networking/glib-networking_2.58.0.bb | 31 +++++++++++++++++++
>> 1 file changed, 31 insertions(+)
>>
>> diff --git a/meta/recipes-core/glib-networking/glib-
>> networking_2.58.0.bb b/meta/recipes-core/glib-networking/glib-
>> networking_2.58.0.bb
>> index f3190e1cae..35b4a3fa76 100644
>> --- a/meta/recipes-core/glib-networking/glib-networking_2.58.0.bb
>> +++ b/meta/recipes-core/glib-networking/glib-networking_2.58.0.bb
>> @@ -29,3 +29,34 @@ FILES_${PN} += "\
>> "
>> FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
>> FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
>> +
>> +# Make sure we compile with ca-certificates support enabled.
>> +PACKAGECONFIG_append = " ca-certificates"
>> +
>> +DEPENDS += "ca-certificates"
>> +RDEPENDS_${PN} += "ca-certificates"
>> +
>> +# We need native version for ostree-/flatpak-native.
>> +BBCLASSEXTEND = "native"
>> +# OE-core's relocatable.bbclass assumes that every package which
>> +# ends up creating a ${libdir}/pkgconfig directory in its sysroot
>> +# will always also install .pc-files there and tries to uncondi-
>> +# tionally update paths in those files using globbing that fails
>> +# if no such files are present. This presumption is not true for
>> +# glib-networking which happens to create a directory by dereferencing
>> +# a GIO pkgconfig variable which in turn is defined relative to
>> +# the pkgconfig directory (${pcfiledir}/../...), causing pkgconfig
>> +# to get created.
> How about fixing relocatable_native_pcfiles() in relocatable.bbclass
> instead so that it ignores empty pkgconfig directories?
Thanks,
I prefer add a .pc file existence checking in relocatable_native_pcfiles()
- if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
+ filecnt=`ls -l ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
2>/dev/null | wc -l`
+ if [ $filecnt -gt 0 ]; then
Thanks
Jiang Lu
>
>> +#
>> +# Could be worked around in the upatream recipe but since that
>> +# does not provide/create native versions of the package and since
>> +# this problem is related to native packages, we work around it here.
>> +#
>> +do_install_append_class-native () {
>> + for _pc in ${D}${libdir}/pkgconfig/*.pc; do
>> + case $_pc in
>> + *'*.pc') rm -fr ${D}${libdir}/pkgconfig;;
>> + *.pc) break;;
>> + esac
>> + done
> Why complicate things? Just remove the directory if it exists
> and is empty:
>
> rmdir ${D}${libdir}/pkgconfig 2>/dev/null || :
>
>> +}
>> --
>> 2.17.1
> //Peter
>
>
More information about the Openembedded-core
mailing list