meson does have a way to specify whether native pkg-config should be
used (defaulting to cross), so I think this should rather be fixed in
gstreamer source, particularly its meson files?

Alex

On Mon, 1 Apr 2024 at 09:14, Andreas Cord-Landwehr <cordlandw...@kde.org> wrote:
>
> Introduce PACKAGECONFIG option for Qt6 and provide meson cross-build
> file that helps meson to locate qt native binaries.
>
> Qt provides pkg-config files since Qt6.3+, but those files are not
> sufficient to detect native tools that are located in the
> recipe-sysroot-native location, because pkg-config does not know about
> the location of them. Thus, introduce a helper config that points mesons
> to those binaries.
>
> Signed-off-by: Andreas Cord-Landwehr <cordlandw...@kde.org>
> ---
>  .../gstreamer1.0-plugins-good_1.22.11.bb       | 18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git 
> a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb 
> b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb
> index edd8609b7c..3b95bd6e46 100644
> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.11.bb
> @@ -12,6 +12,17 @@ SRC_URI[sha256sum] = 
> "6ddd032381827d31820540735f0004b429436b0bdac19aaeab44fa22fa
>
>  S = "${WORKDIR}/gst-plugins-good-${PV}"
>
> +do_write_config:append() {
> +    cat >${WORKDIR}/meson-qt6.cross <<EOF
> +[binaries]
> +qmake = '${STAGING_BINDIR_NATIVE}/qmake'
> +moc = '${STAGING_DIR_NATIVE}/usr/libexec/moc'
> +rcc = '${STAGING_DIR_NATIVE}/usr/libexec/rcc'
> +uic = '${STAGING_DIR_NATIVE}/usr/libexec/uic'
> +lrelease = '${STAGING_BINDIR_NATIVE}/lrelease'
> +EOF
> +}
> +
>  LICENSE = "LGPL-2.1-or-later"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
>                      
> file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
> @@ -35,7 +46,7 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes 
> libxdamage"
>  X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled 
> -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled"
>  X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled 
> -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled"
>
> -QT5WAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", 
> "qtwayland", "", d)}"
> +QTWAYLANDDEPENDS = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", 
> "qtwayland", "", d)}"
>
>  PACKAGECONFIG[asm]        = "-Dasm=enabled,-Dasm=disabled,nasm-native"
>  PACKAGECONFIG[bz2]        = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
> @@ -52,7 +63,8 @@ PACKAGECONFIG[libpng]     = 
> "-Dpng=enabled,-Dpng=disabled,libpng"
>  PACKAGECONFIG[libv4l2]    = 
> "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils"
>  PACKAGECONFIG[mpg123]     = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123"
>  PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio"
> -PACKAGECONFIG[qt5]        = "-Dqt5=enabled,-Dqt5=disabled,qtbase 
> qtdeclarative qtbase-native ${QT5WAYLANDDEPENDS}"
> +PACKAGECONFIG[qt5]        = "-Dqt5=enabled,-Dqt5=disabled,qtbase 
> qtdeclarative qtbase-native ${QTWAYLANDDEPENDS}"
> +PACKAGECONFIG[qt6]        = "-Dqt6=enabled,-Dqt6=disabled,qtbase 
> qtdeclarative qtbase-native qttools-native ${QTWAYLANDDEPENDS}"
>  PACKAGECONFIG[soup2]      = "-Dsoup=enabled,,libsoup-2.4,,,soup3"
>  PACKAGECONFIG[soup3]      = "-Dsoup=enabled,,libsoup,,,soup2"
>  PACKAGECONFIG[speex]      = "-Dspeex=enabled,-Dspeex=disabled,speex"
> @@ -78,4 +90,6 @@ EXTRA_OEMESON += " \
>      -Dwaveform=disabled \
>  "
>
> +MESON_CROSS_FILE:class-target:append = 
> "${@bb.utils.contains('PACKAGECONFIG', 'qt6', ' --cross 
> ${WORKDIR}/meson-qt6.cross', '', d)}"
> +
>  FILES:${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
> --
> 2.40.1
>
>
> 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197878): 
https://lists.openembedded.org/g/openembedded-core/message/197878
Mute This Topic: https://lists.openembedded.org/mt/105259530/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to