]> code.ossystems Code Review - meta-freescale.git/commitdiff
gstreamer1.0-plugins-bad: Transition to meson based builds
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Sat, 22 Feb 2020 14:33:25 +0000 (14:33 +0000)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 3 Mar 2020 21:26:17 +0000 (18:26 -0300)
This update follows [427eb30f9b59972b38ae3f25094470bb7034547d]
in upstream, which trasnitions the gstreamer1.0 plugins build
from autotools to meson build.

Additional patches included in meta-freescale are:
- Backport of 2 patches to allow using OpenCV version 4.1.0
- Adaptions required in NXP fork to use meson
- One patch which solves the data dir search on OpenCV.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch [new file with mode: 0644]
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch [new file with mode: 0644]
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch [new file with mode: 0644]
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-opencv-allow-compilation-against-4.1.x.patch [new file with mode: 0644]
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch [deleted file]
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch [new file with mode: 0644]
recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb

diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch
new file mode 100644 (file)
index 0000000..088976d
--- /dev/null
@@ -0,0 +1,60 @@
+From e637d9f6bb961afcecb74faa6dff38562f6ce796 Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+Date: Sun, 26 Jan 2020 10:45:28 +0000
+Subject: [PATCH] ext/wayland: fix meson build in nxp fork
+
+- Add Wayland protocols, which are not enabled in upstream
+- Add missing compilation unit, which in NXP-specific
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+---
+ ext/wayland/meson.build | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+diff --git a/ext/wayland/meson.build b/ext/wayland/meson.build
+index fa6fbf42f..eb425b14f 100644
+--- a/ext/wayland/meson.build
++++ b/ext/wayland/meson.build
+@@ -8,6 +8,11 @@ wl_sources = [
+     'wllinuxdmabuf.c'
+ ]
++imx_wl_sources = [
++    'wlutils.c',
++]
++wl_sources += imx_wl_sources
++
+ if use_wayland
+     protocols_datadir = wl_protocol_dep.get_pkgconfig_variable('pkgdatadir')
+@@ -19,6 +24,25 @@ if use_wayland
+          'fullscreen-shell-unstable-v1-protocol.c', 'fullscreen-shell-unstable-v1-client-protocol.h'],
+         ['/stable/xdg-shell/xdg-shell.xml', 'xdg-shell-protocol.c', 'xdg-shell-client-protocol.h'],
+     ]
++
++    imx_protocol_defs = [
++        [
++         '/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml',
++         'alpha-compositing-unstable-v1-protocol.c',
++         'alpha-compositing-unstable-v1-client-protocol.h'
++        ],
++        ['/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml',
++         'hdr10-metadata-unstable-v1-protocol.c',
++         'hdr10-metadata-unstable-v1-client-protocol.h'
++        ],
++        [
++         '/unstable/linux-explicit-synchronization/linux-explicit-synchronization-unstable-v1.xml',
++         'linux-explicit-synchronization-unstable-v1-protocol.c',
++         'linux-explicit-synchronization-unstable-v1-client-protocol.h'
++        ],
++    ]
++    protocol_defs += imx_protocol_defs
++
+     protocols_files = []
+     foreach protodef: protocol_defs
+-- 
+2.17.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch
new file mode 100644 (file)
index 0000000..1321852
--- /dev/null
@@ -0,0 +1,36 @@
+From 97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
+Date: Fri, 18 Oct 2019 00:39:12 +0100
+Subject: [PATCH 1/2] meson: build gir even when cross-compiling if
+ introspection was enabled explicitly
+
+This can be made to work in certain circumstances when
+cross-compiling, so default to not building g-i stuff
+when cross-compiling, but allow it if introspection was
+enabled explicitly via -Dintrospection=enabled.
+
+See gstreamer/gstreamer#454 and gstreamer/gstreamer#381.
+
+Upstream-Status: Backport [97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19]
+
+Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 67aeeb4d0..7b3314bd9 100644
+--- a/meson.build
++++ b/meson.build
+@@ -411,7 +411,7 @@ python3 = import('python').find_installation()
+ gir = find_program('g-ir-scanner', required : get_option('introspection'))
+ gnome = import('gnome')
+-build_gir = gir.found() and not meson.is_cross_build()
++build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
+ gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
+     'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
+     'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
+-- 
+2.17.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch
new file mode 100644 (file)
index 0000000..874b8ab
--- /dev/null
@@ -0,0 +1,45 @@
+From f41f356aebee916910453031c06c111000f2f261 Mon Sep 17 00:00:00 2001
+From: Christoph Reiter <reiter.christoph@gmail.com>
+Date: Sun, 5 May 2019 22:11:16 +0200
+Subject: [PATCH] meson: fix build with opencv=enabled and opencv4. Fixes #964
+
+Having the opencv feature enabled would lead to the opencv3 dependency
+being required which failed with only opencv4 being available.
+
+Instead don't require anything and error out at the end if the feature was enabled
+but no dependency was found.
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/22c6a4085f8792d8af0cdabfe1664d55ca2dee11]
+
+(cherry picked from commit 22c6a4085f8792d8af0cdabfe1664d55ca2dee11)
+Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+---
+ gst-libs/gst/opencv/meson.build | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build
+index 3fd472fda..8dc2ad99b 100644
+--- a/gst-libs/gst/opencv/meson.build
++++ b/gst-libs/gst/opencv/meson.build
+@@ -9,9 +9,9 @@ opencv_headers = [
+   'gstopencvvideofilter.h',
+ ]
+-opencv_dep = dependency('opencv', version : '>= 3.0.0', required : get_option('opencv'))
++opencv_dep = dependency('opencv', version : '>= 3.0.0', required : false)
+ if not opencv_dep.found()
+-  opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : get_option('opencv'))
++  opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : false)
+ endif
+ if opencv_dep.found()
+   gstopencv = library('gstopencv-' + api_version,
+@@ -30,4 +30,6 @@ if opencv_dep.found()
+     dependencies : [gstvideo_dep, opencv_dep])
+   install_headers(opencv_headers, subdir : 'gstreamer-1.0/gst/opencv')
++elif get_option('opencv').enabled()
++  error('OpenCV support enabled but required dependencies were not found.')
+ endif
+-- 
+2.17.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-opencv-allow-compilation-against-4.1.x.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-opencv-allow-compilation-against-4.1.x.patch
new file mode 100644 (file)
index 0000000..62705dd
--- /dev/null
@@ -0,0 +1,43 @@
+From eb404fd917fa3ab7ffa9433c9975ee49cfc9c41f Mon Sep 17 00:00:00 2001
+From: Nicola Murino <nicola.murino@gmail.com>
+Date: Tue, 23 Apr 2019 09:06:13 +0200
+Subject: [PATCH 1/2] opencv: allow compilation against 4.1.x
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/49a2baebf58d9288f75964fc40a547fde510a840]
+
+(cherry picked from commit 49a2baebf58d9288f75964fc40a547fde510a840)
+Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+---
+ configure.ac           | 2 +-
+ ext/opencv/meson.build | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 26f72eb0d..9e12d39a0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1852,7 +1852,7 @@ AG_GST_CHECK_FEATURE(OPENCV, [opencv plugins], opencv, [
+       HAVE_OPENCV="yes"
+     fi
+   ], [
+-    PKG_CHECK_MODULES([OPENCV], [opencv4 >= 4.0.0 opencv4 < 4.1.0] , [
++    PKG_CHECK_MODULES([OPENCV], [opencv4 >= 4.0.0 opencv4 < 4.2.0] , [
+     AC_PROG_CXX
+     AC_LANG([C++])
+     OLD_CPPFLAGS=$CPPFLAGS
+diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
+index d0ce1d3ee..f38b55dfe 100644
+--- a/ext/opencv/meson.build
++++ b/ext/opencv/meson.build
+@@ -65,7 +65,7 @@ if opencv_found
+     endif
+   endforeach
+ else
+-  opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.1.0'], required : false)
++  opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.2.0'], required : false)
+   opencv_found = opencv_dep.found()
+   if opencv_found
+     foreach h : libopencv4_headers
+-- 
+2.17.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch
deleted file mode 100644 (file)
index 25861b6..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-From f59c5269f92d59a5296cbfeeb682d42095cd88ad Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Thu, 18 Sep 2014 02:24:07 -0400
-Subject: [PATCH] gstreamer1.0-plugins-bad: allow to disable libssh2
-
-libssh2 is automatically linked to if present, this undetermined
-dependency may cause build errors like:
-
-  .../x86_64-poky-linux/4.9.0/ld: cannot find -lssh2
-
-libssh2 isn't an oe-core recipe, so allow to disable it from
-configure.
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- configure.ac |   23 +++++++++++++++++------
- 1 file changed, 17 insertions(+), 6 deletions(-)
-
-Index: gst-plugins-bad-1.12.3/configure.ac
-===================================================================
---- gst-plugins-bad-1.12.3.orig/configure.ac
-+++ gst-plugins-bad-1.12.3/configure.ac
-@@ -1202,6 +1202,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chrom
- ])
- dnl *** Curl ***
-+AC_ARG_ENABLE([libssh2],
-+     [  --enable-libssh2              enable LIBSSH2 support @<:@default=auto@:>@],
-+     [case "${enableval}" in
-+       yes)  NEED_SSH2=yes ;;
-+       no)   NEED_SSH2=no ;;
-+       auto) NEED_SSH2=auto ;;
-+       *) AC_MSG_ERROR([bad value ${enableval} for --enable-libssh2]) ;;
-+     esac],[NEED_SSH2=auto])
-+
- translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true)
- AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [
-   PKG_CHECK_MODULES(CURL, libcurl >= 7.35.0, [
-@@ -1224,12 +1233,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin]
-   ])
-   AC_SUBST(CURL_CFLAGS)
-   AC_SUBST(CURL_LIBS)
--  PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [
--    HAVE_SSH2="yes"
--    AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available])
--  ], [
--    HAVE_SSH2="no"
--  ])
-+  if test "x$NEED_SSH2" != "xno"; then
-+    PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [
-+      HAVE_SSH2="yes"
-+      AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available])
-+    ], [
-+      HAVE_SSH2="no"
-+    ])
-+  fi
-   AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes")
-   AC_SUBST(SSH2_CFLAGS)
-   AC_SUBST(SSH2_LIBS)
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
new file mode 100644 (file)
index 0000000..3fe3f64
--- /dev/null
@@ -0,0 +1,49 @@
+From 5830de9b1c8965683025082aeed7ccaf1dd85969 Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+Date: Sun, 26 Jan 2020 19:55:06 +0000
+Subject: [PATCH 2/2] opencv: resolve missing opencv data dir in yocto build
+
+When Yocto build is performed, opencv searches for data dir using simple
+test command, and this fails because pkg-config provides an absolute
+path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR
+in order for the 'test' utility to pick up the absolute path.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+---
+ ext/opencv/meson.build | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
+index f38b55dfe..a26403482 100644
+--- a/ext/opencv/meson.build
++++ b/ext/opencv/meson.build
+@@ -78,20 +78,21 @@ else
+ endif
+ if opencv_found
++  pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip()
+   opencv_prefix = opencv_dep.get_pkgconfig_variable('prefix')
+   gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"']
+   # Check the data dir used by opencv for its xml data files
+   # Use prefix from pkg-config to be compatible with cross-compilation
+-  r = run_command('test', '-d', opencv_prefix + '/share/opencv')
++  r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv')
+   if r.returncode() == 0
+     gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv"'
+   else
+-    r = run_command('test', '-d', opencv_prefix + '/share/OpenCV')
++    r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/OpenCV')
+     if r.returncode() == 0
+       gstopencv_cargs += '-DOPENCV_PATH_NAME="OpenCV"'
+     else
+-      r = run_command('test', '-d', opencv_prefix + '/share/opencv4')
++      r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv4')
+       if r.returncode() == 0
+         gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv4"'
+       else
+-- 
+2.17.1
+
index f18a70d1dbf9076cdd275659cd4ea05198de37b9..b9ac08c25eca8054ce9ff3eb7dcb09b6edab245e 100644 (file)
@@ -1,8 +1,5 @@
 require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
 
-LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
-                    file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 "
-
 DEPENDS_append_imxgpu2d = " virtual/libg2d"
 DEPENDS_append_mx8 = " libdrm"
 
@@ -10,39 +7,36 @@ PACKAGECONFIG_append_mx6q = " opencv"
 PACKAGECONFIG_append_mx6qp = " opencv"
 PACKAGECONFIG_append_mx8 = " opencv kms"
 
+DEFAULT_PREFERENCE = "-1"
+
+PACKAGE_ARCH_imxpxp = "${MACHINE_SOCARCH}"
+PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}"
+
 GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https"
 SRCBRANCH = "MM_04.05.01_1909_L4.19.35"
 
 SRC_URI = " \
     ${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} \
-    file://configure-allow-to-disable-libssh2.patch \
+    file://0001-ext-wayland-fix-meson-build-in-nxp-fork.patch \
+    file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \
+    file://0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch \
+    file://0002-opencv-allow-compilation-against-4.1.x.patch \
+    file://opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
     file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
     file://avoid-including-sys-poll.h-directly.patch \
     file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
-    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
 "
-
 SRCREV = "eba3db4034fc17b712808d5e90ed5ff22ef490ca"
 
-DEFAULT_PREFERENCE = "-1"
-
-# This remove "--exclude=autopoint" option from autoreconf argument to avoid
-# configure.ac:30: error: required file './ABOUT-NLS' not found
-EXTRA_AUTORECONF = ""
-
-# include fragment shaders
-FILES_${PN}-opengl += "/usr/share/*.fs"
-
-PACKAGE_ARCH_imxpxp = "${MACHINE_SOCARCH}"
-PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}"
-
 S = "${WORKDIR}/git"
 
 LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
+                    file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 "
 
-DEPENDS += "gstreamer1.0-plugins-base jpeg"
+DEPENDS += "gstreamer1.0-plugins-base"
 
-inherit gettext
+inherit gobject-introspection
 
 PACKAGECONFIG ??= " \
     ${GSTREAMER_ORC} \
@@ -50,121 +44,129 @@ PACKAGECONFIG ??= " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
-    bz2 curl dash dtls hls rsvg sbc smoothstreaming sndfile ttml uvch264 webp \
+    bz2 closedcaption curl dash dtls hls rsvg sbc smoothstreaming sndfile \
+    ttml uvch264 webp \
 "
 
+PACKAGECONFIG[assrender]       = "-Dassrender=enabled,-Dassrender=disabled,libass"
+PACKAGECONFIG[bluez]           = "-Dbluez=enabled,-Dbluez=disabled,bluez5"
+PACKAGECONFIG[bz2]             = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
+PACKAGECONFIG[closedcaption]   = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo"
+PACKAGECONFIG[curl]            = "-Dcurl=enabled,-Dcurl=disabled,curl"
+PACKAGECONFIG[dash]            = "-Ddash=enabled,-Ddash=disabled,libxml2"
+PACKAGECONFIG[dc1394]          = "-Ddc1394=enabled,-Ddc1394=disabled,libdc1394"
+PACKAGECONFIG[directfb]        = "-Ddirectfb=enabled,-Ddirectfb=disabled,directfb"
+PACKAGECONFIG[dtls]            = "-Ddtls=enabled,-Ddtls=disabled,openssl"
+PACKAGECONFIG[faac]            = "-Dfaac=enabled,-Dfaac=disabled,faac"
+PACKAGECONFIG[faad]            = "-Dfaad=enabled,-Dfaad=disabled,faad2"
+PACKAGECONFIG[fluidsynth]      = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth"
+PACKAGECONFIG[hls]             = "-Dhls=enabled -Dhls-crypto=nettle,-Dhls=disabled,nettle"
 # the gl packageconfig enables OpenGL elements that haven't been ported
 # to -base yet. They depend on the gstgl library in -base, so we do
 # not add GL dependencies here, since these are taken care of in -base.
-
-PACKAGECONFIG[assrender]       = "--enable-assrender,--disable-assrender,libass"
-PACKAGECONFIG[bluez]           = "--enable-bluez,--disable-bluez,bluez5"
-PACKAGECONFIG[bz2]             = "--enable-bz2,--disable-bz2,bzip2"
-PACKAGECONFIG[curl]            = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[dash]            = "--enable-dash,--disable-dash,libxml2"
-PACKAGECONFIG[dc1394]          = "--enable-dc1394,--disable-dc1394,libdc1394"
-PACKAGECONFIG[directfb]        = "--enable-directfb,--disable-directfb,directfb"
-PACKAGECONFIG[dtls]            = "--enable-dtls,--disable-dtls,openssl"
-PACKAGECONFIG[faac]            = "--enable-faac,--disable-faac,faac"
-PACKAGECONFIG[faad]            = "--enable-faad,--disable-faad,faad2"
-PACKAGECONFIG[flite]           = "--enable-flite,--disable-flite,flite-alsa"
-PACKAGECONFIG[fluidsynth]      = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth"
-PACKAGECONFIG[hls]             = "--enable-hls --with-hls-crypto=nettle,--disable-hls,nettle"
-PACKAGECONFIG[gl]              = "--enable-gl,--disable-gl,"
-PACKAGECONFIG[kms]             = "--enable-kms,--disable-kms,libdrm"
-PACKAGECONFIG[libde265]        = "--enable-libde265,--disable-libde265,libde265"
-PACKAGECONFIG[libmms]          = "--enable-libmms,--disable-libmms,libmms"
-PACKAGECONFIG[libssh2]         = "--enable-libssh2,--disable-libssh2,libssh2"
-PACKAGECONFIG[modplug]         = "--enable-modplug,--disable-modplug,libmodplug"
-PACKAGECONFIG[neon]            = "--enable-neon,--disable-neon,neon"
-PACKAGECONFIG[openal]          = "--enable-openal,--disable-openal,openal-soft"
-PACKAGECONFIG[opencv]          = "--enable-opencv,--disable-opencv,opencv"
-PACKAGECONFIG[openh264]        = "--enable-openh264,--disable-openh264,openh264"
-PACKAGECONFIG[openjpeg]        = "--enable-openjpeg,--disable-openjpeg,openjpeg"
+PACKAGECONFIG[gl]              = "-Dgl=enabled,-Dgl=disabled,"
+PACKAGECONFIG[kms]             = "-Dkms=enabled,-Dkms=disabled,libdrm"
+PACKAGECONFIG[libde265]        = "-Dlibde265=enabled,-Dlibde265=disabled,libde265"
+PACKAGECONFIG[libmms]          = "-Dlibmms=enabled,-Dlibmms=disabled,libmms"
+PACKAGECONFIG[libssh2]         = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2"
+PACKAGECONFIG[modplug]         = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug"
+PACKAGECONFIG[msdk]            = "-Dmsdk=enabled,-Dmsdk=disabled,intel-mediasdk"
+PACKAGECONFIG[neon]            = "-Dneon=enabled,-Dneon=disabled,neon"
+PACKAGECONFIG[openal]          = "-Dopenal=enabled,-Dopenal=disabled,openal-soft"
+PACKAGECONFIG[opencv]          = "-Dopencv=enabled,-Dopencv=disabled,opencv"
+PACKAGECONFIG[openh264]        = "-Dopenh264=enabled,-Dopenh264=disabled,openh264"
+PACKAGECONFIG[openjpeg]        = "-Dopenjpeg=enabled,-Dopenjpeg=disabled,openjpeg"
+PACKAGECONFIG[openmpt]         = "-Dopenmpt=enabled,-Dopenmpt=disabled,libopenmpt"
 # the opus encoder/decoder elements are now in the -base package,
 # but the opus parser remains in -bad
-PACKAGECONFIG[opusparse]       = "--enable-opus,--disable-opus,libopus"
-PACKAGECONFIG[resindvd]        = "--enable-resindvd,--disable-resindvd,libdvdread libdvdnav"
-PACKAGECONFIG[rsvg]            = "--enable-rsvg,--disable-rsvg,librsvg"
-PACKAGECONFIG[rtmp]            = "--enable-rtmp,--disable-rtmp,rtmpdump"
-PACKAGECONFIG[sbc]             = "--enable-sbc,--disable-sbc,sbc"
-PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2"
-PACKAGECONFIG[sndfile]         = "--enable-sndfile,--disable-sndfile,libsndfile1"
-PACKAGECONFIG[srtp]            = "--enable-srtp,--disable-srtp,libsrtp"
-PACKAGECONFIG[tinyalsa]        = "--enable-tinyalsa,--disable-tinyalsa,tinyalsa"
-PACKAGECONFIG[ttml]            = "--enable-ttml,--disable-ttml,libxml2 pango cairo"
-PACKAGECONFIG[uvch264]         = "--enable-uvch264,--disable-uvch264,libusb1 libgudev"
-PACKAGECONFIG[voaacenc]        = "--enable-voaacenc,--disable-voaacenc,vo-aacenc"
-PACKAGECONFIG[voamrwbenc]      = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc"
-PACKAGECONFIG[vulkan]          = "--enable-vulkan,--disable-vulkan,vulkan-headers"
-PACKAGECONFIG[lcms2]           = "--enable-lcms2,--disable-lcms2,lcms"
-PACKAGECONFIG[openmpt]         = "--enable-openmpt,--disable-openmpt,libopenmpt"
-PACKAGECONFIG[wayland]         = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm"
-PACKAGECONFIG[webp]            = "--enable-webp,--disable-webp,libwebp"
-PACKAGECONFIG[webrtc]          = "--enable-webrtc,--disable-webrtc,libnice"
-PACKAGECONFIG[webrtcdsp]       = "--enable-webrtcdsp,--disable-webrtcdsp,webrtc-audio-processing"
-
-# these plugins have no corresponding library in OE-core or meta-openembedded:
-#   openni2 winks direct3d directsound winscreencap apple_media iqa
-#   android_media avc bs2b chromaprint dts fdkaac gme gsm kate ladspa
-#   lv2 mpeg2enc mplex msdk musepack nvenc ofa openmpt opensles soundtouch
-#   spandsp teletextdec vdpau wasapi x265 zbar
-
-EXTRA_OECONF += " \
-    --enable-decklink \
-    --enable-dvb \
-    --enable-fbdev \
-    --enable-ipcpipeline \
-    --enable-netsim \
-    --enable-shm \
-    --disable-android_media \
-    --disable-aom \
-    --disable-apple_media \
-    --disable-avc \
-    --disable-bs2b \
-    --disable-chromaprint \
-    --disable-direct3d \
-    --disable-directsound \
-    --disable-dts \
-    --disable-fdk_aac \
-    --disable-gme \
-    --disable-gsm \
-    --disable-iqa \
-    --disable-kate \
-    --disable-ladspa \
-    --disable-lv2 \
-    --disable-mpeg2enc \
-    --disable-mplex \
-    --disable-msdk \
-    --disable-musepack \
-    --disable-nvenc \
-    --disable-ofa \
-    --disable-openexr \
-    --disable-openmpt \
-    --disable-openni2 \
-    --disable-opensles \
-    --disable-soundtouch \
-    --disable-spandsp \
-    --disable-srt \
-    --disable-teletextdec \
-    --disable-vdpau \
-    --disable-wasapi \
-    --disable-wildmidi \
-    --disable-winks \
-    --disable-winscreencap \
-    --disable-x265 \
-    --disable-zbar \
-    ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--disable-yadif", "", d)} \
-    --disable-introspection \
+PACKAGECONFIG[opusparse]       = "-Dopus=enabled,-Dopus=disabled,libopus"
+PACKAGECONFIG[resindvd]        = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdread libdvdnav"
+PACKAGECONFIG[rsvg]            = "-Drsvg=enabled,-Drsvg=disabled,librsvg"
+PACKAGECONFIG[rtmp]            = "-Drtmp=enabled,-Drtmp=disabled,rtmpdump"
+PACKAGECONFIG[sbc]             = "-Dsbc=enabled,-Dsbc=disabled,sbc"
+PACKAGECONFIG[sctp]            = "-Dsctp=enabled,-Dsctp=disabled,usrsctp"
+PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=disabled,libxml2"
+PACKAGECONFIG[sndfile]         = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
+PACKAGECONFIG[srtp]            = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp"
+PACKAGECONFIG[tinyalsa]        = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa"
+PACKAGECONFIG[ttml]            = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo"
+PACKAGECONFIG[uvch264]         = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev"
+PACKAGECONFIG[voaacenc]        = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc"
+PACKAGECONFIG[voamrwbenc]      = "-Dvoamrwbenc=enabled,-Dvoamrwbenc=disabled,vo-amrwbenc"
+PACKAGECONFIG[vulkan]          = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader"
+PACKAGECONFIG[wayland]         = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols libdrm"
+PACKAGECONFIG[webp]            = "-Dwebp=enabled,-Dwebp=disabled,libwebp"
+PACKAGECONFIG[webrtc]          = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice"
+PACKAGECONFIG[webrtcdsp]       = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing"
+PACKAGECONFIG[zbar]            = "-Dzbar=enabled,-Dzbar=disabled,zbar"
+
+# Following package config in not available in NXP fork:
+#PACKAGECONFIG[lcms2]           = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms"
+
+# these plugins currently have no corresponding library in OE-core or meta-openembedded:
+#   aom androidmedia applemedia bs2b chromaprint d3dvideosink
+#   directsound dts fdkaac gme gsm iq kate ladspa lv2 mpeg2enc
+#   mplex musepack nvdec nvenc ofa openexr openni2 opensles
+#   soundtouch spandsp srt teletext vdpau wasapi wildmidi winks
+#   winscreencap wpe x265
+
+EXTRA_OEMESON += " \
+    -Ddecklink=enabled \
+    -Ddvb=enabled \
+    -Dfbdev=enabled \
+    -Dipcpipeline=enabled \
+    -Dnetsim=enabled \
+    -Dshm=enabled \
+    -Daom=disabled \
+    -Dandroidmedia=disabled \
+    -Dapplemedia=disabled \
+    -Dbs2b=disabled \
+    -Dchromaprint=disabled \
+    -Dd3dvideosink=disabled \
+    -Ddirectsound=disabled \
+    -Ddts=disabled \
+    -Dfdkaac=disabled \
+    -Dflite=disabled \
+    -Dgme=disabled \
+    -Dgsm=disabled \
+    -Diqa=disabled \
+    -Dkate=disabled \
+    -Dladspa=disabled \
+    -Dlv2=disabled \
+    -Dmpeg2enc=disabled \
+    -Dmplex=disabled \
+    -Dmsdk=disabled \
+    -Dmusepack=disabled \
+    -Dnvdec=disabled \
+    -Dnvenc=disabled \
+    -Dofa=disabled \
+    -Dopenexr=disabled \
+    -Dopenmpt=disabled \
+    -Dopenni2=disabled \
+    -Dopensles=disabled \
+    -Dsoundtouch=disabled \
+    -Dspandsp=disabled \
+    -Dsrt=disabled \
+    -Dteletext=disabled \
+    -Dvdpau=disabled \
+    -Dwasapi=disabled \
+    -Dwildmidi=disabled \
+    -Dwinks=disabled \
+    -Dwinscreencap=disabled \
+    -Dwpe=disabled \
+    -Dx265=disabled \
+    -Dzbar=disabled \
+    ${@bb.utils.contains("TUNE_FEATURES", "mx32", "-Dyadif=disabled", "", d)} \
 "
+
 export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
 
 ARM_INSTRUCTION_SET_armv4 = "arm"
 ARM_INSTRUCTION_SET_armv5 = "arm"
 
-FILES_${PN}-freeverb += "${datadir}/gstreamer-${LIBV}/presets/GstFreeverb.prs"
-FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/${LIBV}/opencv*"
-FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-${LIBV}/presets/GstVoAmrwbEnc.prs"
+FILES_${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs"
+FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*"
+FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs"
 # include fragment shaders
 FILES_${PN}-opengl += "/usr/share/*.fs"