[OE-core] [PATCH 02/12] gstreamer1.0: Transition to meson based builds

Peter Kjellerstedt peter.kjellerstedt at axis.com
Wed Jan 15 02:49:21 UTC 2020


> -----Original Message-----
> From: openembedded-core-bounces at lists.openembedded.org <openembedded-core-
> bounces at lists.openembedded.org> On Behalf Of Carlos Rafael Giani
> Sent: den 12 januari 2020 15:00
> To: openembedded-core at lists.openembedded.org
> Subject: [OE-core] [PATCH 02/12] gstreamer1.0: Transition to meson based
> builds
> 
> * Moved 0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
>   from files/ to gstreamer1.0/ since it is gstreamer1.0 recipe specific.
> 
> * Removed M4 specific patches:
>   - 0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
>   - gtk-doc-tweaks.patch
>   - add-a-target-to-compile-tests.patch
> 
> * Added patches:
>   - 0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch
>     Backport for enabling GIR support in meson based cross compilation
>   - 0002-meson-Add-valgrind-feature.patch
>     Make valgrind support configurable to be able to control it through
>     a "valgrind" packageconfig
>   - 0003-meson-Add-option-for-installed-tests.patch
>     Add support for installable tests and for generating .test and shell
>     scripts which can be used with the gnome-desktop-testing suite runner
> 
> * PTest support:
>   By default, GStreamer does not allow for installing tests, and requires
>   meson to run its unit tests. The 0003 patch fixes this by installing
>   the binaries themselves and by generating accompanying .test and shell
>   scripts. The scripts set up the required environment files and then
>   call the test binaries. The .test file list the shell scripts as
>   Exec= command line.
> 
> Signed-off-by: Carlos Rafael Giani <crg7475 at mailbox.org>
> ---
>  ...der.c-when-env-var-is-set-do-not-fal.patch |   0
>  ...even-when-cross-compiling-if-introsp.patch |  36 +++
>  .../0003-meson-Add-valgrind-feature.patch     |  74 +++++
>  ...meson-Add-option-for-installed-tests.patch | 257 ++++++++++++++++++
>  .../gstreamer/gstreamer1.0_1.16.1.bb          |  93 +++----
>  5 files changed, 404 insertions(+), 56 deletions(-)
>  rename meta/recipes-multimedia/gstreamer/{files => gstreamer1.0}/0001-
> gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch (100%)
>  create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-
> meson-build-gir-even-when-cross-compiling-if-introsp.patch
>  create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-
> meson-Add-valgrind-feature.patch
>  create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-
> meson-Add-option-for-installed-tests.patch

[cut]

> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.1.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.1.bb
> index ff92f63bac..dc3e8ffafd 100644
> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.1.bb
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.1.bb
> @@ -8,11 +8,7 @@ LICENSE = "LGPLv2+"
> 
>  DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
> 
> -inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc ptest
> -
> -# This way common/m4/introspection.m4 will come first
> -# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
> -acpaths = "-I ${S}/common/m4 -I ${S}/m4"
> +inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
> 
>  LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
> 
> file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
> @@ -21,71 +17,56 @@ S = "${WORKDIR}/gstreamer-${PV}"
> 
>  SRC_URI = " \
>      https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
> -    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
> -    file://gtk-doc-tweaks.patch \
>      file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
> -    file://add-a-target-to-compile-tests.patch \
> -    file://run-ptest \
> +    file://0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch \
> +    file://0003-meson-Add-valgrind-feature.patch \
> +    file://0004-meson-Add-option-for-installed-tests.patch \
>  "
>  SRC_URI[md5sum] = "c505fb818b36988daaa846e9e63eabe8"
>  SRC_URI[sha256sum] = "02211c3447c4daa55919c5c0f43a82a6fbb51740d57fc3af0639d46f1cf4377d"
> 
>  PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
> -                   "
> -
> -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
> -PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
> -PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
> -PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
> -PACKAGECONFIG[unwind] = "--with-unwind,--without-unwind,libunwind"
> -PACKAGECONFIG[dw] = "--with-dw,--without-dw,elfutils"
> -
> -EXTRA_OECONF = " \
> -    --disable-examples \
> +                   tools"
> +
> +PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false"

To avoid confusion, you might want to call that PACKAGECONFIG 
"gst-debug" instead since -Dgst_debug=true corresponds to the old 
--enable-gst-debug, not --enable-debug (for which there does not 
seem to be a corresponding new Meson option).

I find it interesting though that there does not seem to have ever 
been a PACKAGECONFIG for --enable-gst-debug, which means it used 
to default to being enabled. (We have always disabled it for our 
production code due to the performance overhead added by having 
the GStreamer debug system enabled.)

> +PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false"
> +PACKAGECONFIG[tests] = "-Dcheck=enabled -Dtests=enabled -Dinstalled-tests=true,-Dcheck=disabled -Dtests=disabled -Dinstalled-tests=false"
> +PACKAGECONFIG[valgrind] = "-Dvalgrind=enabled,-Dvalgrind=disabled,valgrind,"
> +PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
> +PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils"
> +PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion"
> +PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled"
> +

//Peter



More information about the Openembedded-core mailing list