[OE-core] [oe-core 2/2] glib-networking:enable glib-networking complie as native package

Richard Purdie richard.purdie at linuxfoundation.org
Tue Mar 19 10:45:39 UTC 2019


On Tue, 2019-03-19 at 15:54 +0800, Jiang Lu wrote:
> 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.
> +#
> +# 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
> +}

This reads as if there is a bbappend in some layer which is now being
dumped verbatim into the upstream recipe with no thought as to what
makes sense.

We don't do PACKAGECONFIG_append in recipes and we don't hack .pc files
like this. The dependencies suggest we should also fix the
PACKAGECONFIG DEPENDS/RDEPENDS too.

This needs more work.

Also, for the first patch, its unclear why we need/want the patch
present there and the commit shortlog doesn't really describe the
multiple things the patch is doing.

Cheers,

Richard




More information about the Openembedded-core mailing list