poky: subtree update:a015ed7704..797916f93a

Adrian Bunk (4):
      poky-tiny.conf: Remove the removed irda feature from a comment
      musl: Add TEMP_FAILURE_RETRY from glibc
      systemd: Disable idn properly for musl instead of NI_IDN workarounds
      ofono: upgrade 1.25 -> 1.29

Alexander Kanavin (2):
      packagegroup-cross-canadian: repackage when TUNE_ARCH changes
      qemux86: use a Core 2 Duo CPU instead of the original circa-1993 Pentium

Fabio Berton (1):
      mesa: Convert recipe to use meson build system

Haiqing Bai (1):
      sysstat: Add PACKAGECONFIG[cron] for '--enable-install-cron' option

Khem Raj (2):
      mmc-utils: Fix build with clang
      epiphany: Do not bypass initialization of variable with __attribute__((cleanup))

Liwei Song (1):
      mdadm: install the systemd service through Makefile

Marco Felsch (1):
      mesa: fix imx gallium driver PACKAGECONFIG option

Mark Hatle (1):
      bitbake: gitsm: Fix a bug where the wrong path was used for the submodule init

Martin Jansa (2):
      grub-efi-cfg, systemd-boot-cfg: use MACHINE_ARCH
      tcmode-default.inc: use the same TUNE_PKGARCH variable as PN set in go-cross

Ming Liu (2):
      kernel.bbclass: adjust a condition checking
      dhcp: fix a NSUPDATE compiling issue

Richard Purdie (2):
      gettext/flex/m4/bzip2/gzip/parted/slang/attr: Add make to -ptest packages
      apr/apr-util: Add ptest dependency on libgcc

Ross Burton (1):
      glib-2.0: add missing libgcc dependency to glib-2.0-ptest

Tim Orling (1):
      libtest-needs-perl: upgrade 0.002005 -> 0.002006

Zang Ruochen (1):
      libinput: Upgrade 1.13.1 -> 1.13.2

Change-Id: Ic565210b5ca776c937445934910f602f424ecce1
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/poky/bitbake/lib/bb/fetch2/gitsm.py b/poky/bitbake/lib/bb/fetch2/gitsm.py
index 1f03ba7..c622771 100644
--- a/poky/bitbake/lib/bb/fetch2/gitsm.py
+++ b/poky/bitbake/lib/bb/fetch2/gitsm.py
@@ -117,7 +117,7 @@
 
             url += ';protocol=%s' % proto
             url += ";name=%s" % module
-            url += ";subpath=%s" % paths[module]
+            url += ";subpath=%s" % module
 
             ld = d.createCopy()
             # Not necessary to set SRC_URI, since we're passing the URI to
@@ -184,7 +184,7 @@
 
             try:
                 newfetch = Fetch([url], d, cache=False)
-                newfetch.unpack(root=os.path.dirname(os.path.join(repo_conf, 'modules', modpath)))
+                newfetch.unpack(root=os.path.dirname(os.path.join(repo_conf, 'modules', module)))
             except Exception as e:
                 logger.error('gitsm: submodule unpack failed: %s %s' % (type(e).__name__, str(e)))
                 raise
@@ -199,9 +199,9 @@
 
             # Ensure the submodule repository is NOT set to bare, since we're checking it out...
             try:
-                runfetchcmd("%s config core.bare false" % (ud.basecmd), d, quiet=True, workdir=os.path.join(repo_conf, 'modules', modpath))
+                runfetchcmd("%s config core.bare false" % (ud.basecmd), d, quiet=True, workdir=os.path.join(repo_conf, 'modules', module))
             except:
-                logger.error("Unable to set git config core.bare to false for %s" % os.path.join(repo_conf, 'modules', modpath))
+                logger.error("Unable to set git config core.bare to false for %s" % os.path.join(repo_conf, 'modules', module))
                 raise
 
         Git.unpack(self, ud, destdir, d)
@@ -209,5 +209,7 @@
         ret = self.process_submodules(ud, ud.destdir, unpack_submodules, d)
 
         if not ud.bareclone and ret:
-            # Run submodule update, this sets up the directories -- without touching the config
+            # All submodules should already be downloaded and configured in the tree.  This simply sets
+            # up the configuration and checks out the files.  The main project config should remain
+            # unmodified, and no download from the internet should occur.
             runfetchcmd("%s submodule update --recursive --no-fetch" % (ud.basecmd), d, quiet=True, workdir=ud.destdir)
diff --git a/poky/bitbake/lib/bb/tests/fetch.py b/poky/bitbake/lib/bb/tests/fetch.py
index 97656df..6bdf041 100644
--- a/poky/bitbake/lib/bb/tests/fetch.py
+++ b/poky/bitbake/lib/bb/tests/fetch.py
@@ -964,6 +964,33 @@
         self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/third_party/googletest/config')), msg='Missing submodule config "third_party/googletest/config"')
         self.assertTrue(os.path.exists(os.path.join(repo_path, '.git/modules/third_party/HdrHistogram_c/config')), msg='Missing submodule config "third_party/HdrHistogram_c/config"')
 
+    def test_git_submodule_iotedge(self):
+        """ Prevent regression on deeply nested submodules not being checked out properly, even though they were fetched. """
+
+        # This repository also has submodules where the module (name), path and url do not align
+        url = "gitsm://github.com/azure/iotedge.git;protocol=git;rev=d76e0316c6f324345d77c48a83ce836d09392699"
+        fetcher = bb.fetch.Fetch([url], self.d)
+        fetcher.download()
+        # Previous cwd has been deleted
+        os.chdir(os.path.dirname(self.unpackdir))
+        fetcher.unpack(self.unpackdir)
+
+        repo_path = os.path.join(self.tempdir, 'unpacked', 'git')
+
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared/README.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared/testtools/ctest/README.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared/testtools/testrunner/readme.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared/testtools/umock-c/readme.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared/testtools/umock-c/deps/ctest/README.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/c-shared/testtools/umock-c/deps/testrunner/readme.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/README.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/deps/c-utility/README.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/deps/c-utility/testtools/ctest/README.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/deps/c-utility/testtools/testrunner/readme.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/deps/c-utility/testtools/umock-c/readme.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/deps/c-utility/testtools/umock-c/deps/ctest/README.md')), msg='Missing submodule checkout')
+        self.assertTrue(os.path.exists(os.path.join(repo_path, 'edgelet/hsm-sys/azure-iot-hsm-c/deps/utpm/deps/c-utility/testtools/umock-c/deps/testrunner/readme.md')), msg='Missing submodule checkout')
+
 class TrustedNetworksTest(FetcherTest):
     def test_trusted_network(self):
         # Ensure trusted_network returns False when the host IS in the list.
diff --git a/poky/meta-poky/conf/distro/poky-tiny.conf b/poky/meta-poky/conf/distro/poky-tiny.conf
index a82d043..1f8b6e8 100644
--- a/poky/meta-poky/conf/distro/poky-tiny.conf
+++ b/poky/meta-poky/conf/distro/poky-tiny.conf
@@ -60,7 +60,7 @@
 
 # Comment out any of the lines below to disable them in the build
 # DISTRO_FEATURES options:
-# alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci
+# alsa bluetooth ext2 pcmcia usbgadget usbhost wifi nfs zeroconf pci
 DISTRO_FEATURES_TINY = "pci"
 DISTRO_FEATURES_NET = "ipv4 ipv6"
 DISTRO_FEATURES_USB = "usbhost"
diff --git a/poky/meta/classes/grub-efi-cfg.bbclass b/poky/meta/classes/grub-efi-cfg.bbclass
index 5eeee6c..f661a69 100644
--- a/poky/meta/classes/grub-efi-cfg.bbclass
+++ b/poky/meta/classes/grub-efi-cfg.bbclass
@@ -27,6 +27,9 @@
 GRUB_ROOT ?= "${ROOT}"
 APPEND ?= ""
 
+# Uses MACHINE specific KERNEL_IMAGETYPE
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 # Need UUID utility code.
 inherit fs-uuid
 
diff --git a/poky/meta/classes/kernel.bbclass b/poky/meta/classes/kernel.bbclass
index b346a60..437b8c7 100644
--- a/poky/meta/classes/kernel.bbclass
+++ b/poky/meta/classes/kernel.bbclass
@@ -95,7 +95,8 @@
         d.setVar('ALLOW_EMPTY_%s-image-%s' % (kname, typelower), '1')
 
     image = d.getVar('INITRAMFS_IMAGE')
-    if image:
+    image_bundle = d.getVar('INITRAMFS_IMAGE_BUNDLE')
+    if image and bb.utils.to_boolean(image_bundle, False):
         d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
 
     # NOTE: setting INITRAMFS_TASK is for backward compatibility
diff --git a/poky/meta/classes/systemd-boot-cfg.bbclass b/poky/meta/classes/systemd-boot-cfg.bbclass
index 021c9f9..b3e0e6a 100644
--- a/poky/meta/classes/systemd-boot-cfg.bbclass
+++ b/poky/meta/classes/systemd-boot-cfg.bbclass
@@ -2,6 +2,9 @@
 SYSTEMD_BOOT_ENTRIES ?= ""
 SYSTEMD_BOOT_TIMEOUT ?= "10"
 
+# Uses MACHINE specific KERNEL_IMAGETYPE
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 # Need UUID utility code.
 inherit fs-uuid
 
diff --git a/poky/meta/conf/distro/include/tcmode-default.inc b/poky/meta/conf/distro/include/tcmode-default.inc
index daacfe2..668f313 100644
--- a/poky/meta/conf/distro/include/tcmode-default.inc
+++ b/poky/meta/conf/distro/include/tcmode-default.inc
@@ -68,7 +68,7 @@
 PREFERRED_VERSION_nativesdk-qemu ?= "${QEMUVERSION}"
 
 PREFERRED_VERSION_virtual/${TARGET_PREFIX}go ?= "${GOVERSION}"
-PREFERRED_VERSION_go-cross-${TARGET_ARCH} ?= "${GOVERSION}"
+PREFERRED_VERSION_go-cross-${TUNE_PKGARCH} ?= "${GOVERSION}"
 PREFERRED_VERSION_go-crosssdk-${SDK_ARCH} ?= "${GOVERSION}"
 PREFERRED_VERSION_go-cross-canadian-${TRANSLATED_TARGET_ARCH} ?= "${GOVERSION}"
 PREFERRED_VERSION_go ?= "${GOVERSION}"
diff --git a/poky/meta/conf/machine/include/qemuboot-x86.inc b/poky/meta/conf/machine/include/qemuboot-x86.inc
index 5fdbe4d..82ce46d 100644
--- a/poky/meta/conf/machine/include/qemuboot-x86.inc
+++ b/poky/meta/conf/machine/include/qemuboot-x86.inc
@@ -1,8 +1,8 @@
 # For runqemu
 IMAGE_CLASSES += "qemuboot"
 QB_SYSTEM_NAME_x86 = "qemu-system-i386"
-QB_CPU_x86 = "-cpu pentium2"
-QB_CPU_KVM_x86 = "-cpu pentium2"
+QB_CPU_x86 = "-cpu core2duo"
+QB_CPU_KVM_x86 = "-cpu core2duo"
 
 QB_SYSTEM_NAME_x86-64 = "qemu-system-x86_64"
 QB_CPU_x86-64 = "-cpu core2duo"
diff --git a/poky/meta/conf/machine/qemux86.conf b/poky/meta/conf/machine/qemux86.conf
index f2434a4..272ad1e 100644
--- a/poky/meta/conf/machine/qemux86.conf
+++ b/poky/meta/conf/machine/qemux86.conf
@@ -8,8 +8,7 @@
 PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"
 
 require conf/machine/include/qemu.inc
-DEFAULTTUNE ?= "i586"
-X86ARCH32 ?= "i586"
+DEFAULTTUNE ?= "core2-32"
 require conf/machine/include/tune-corei7.inc
 require conf/machine/include/qemuboot-x86.inc
 
diff --git a/poky/meta/recipes-connectivity/dhcp/dhcp/0001-Fix-a-NSUPDATE-compiling-issue.patch b/poky/meta/recipes-connectivity/dhcp/dhcp/0001-Fix-a-NSUPDATE-compiling-issue.patch
new file mode 100644
index 0000000..f12a112
--- /dev/null
+++ b/poky/meta/recipes-connectivity/dhcp/dhcp/0001-Fix-a-NSUPDATE-compiling-issue.patch
@@ -0,0 +1,68 @@
+From a59cb98a473caa2afd64d7ae368480b6e9f91b3f Mon Sep 17 00:00:00 2001
+From: Ming Liu <liu.ming50@gmail.com>
+Date: Tue, 14 May 2019 11:07:15 +0200
+Subject: [PATCH] Fix a NSUPDATE compiling issue
+
+Upstream-Status: Pending [Patch sent to: https://gitlab.isc.org/isc-projects/dhcp/issues/16]
+
+A following error was observed when NSUPDATE is not defined:
+| omapip/isclib.c: In function 'dns_client_init':
+| omapip/isclib.c:356:18: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'dnsclient'
+|   if (dhcp_gbl_ctx.dnsclient == NULL) {
+|                   ^
+| omapip/isclib.c:363:24: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'dnsclient'
+|            &dhcp_gbl_ctx.dnsclient,
+|                         ^
+| omapip/isclib.c:364:24: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'use_local4'
+|            (dhcp_gbl_ctx.use_local4 ?
+|                         ^
+| omapip/isclib.c:365:25: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'local4_sockaddr'
+|             &dhcp_gbl_ctx.local4_sockaddr
+|                          ^
+| omapip/isclib.c:367:24: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'use_local6'
+|            (dhcp_gbl_ctx.use_local6 ?
+|                         ^
+| omapip/isclib.c:368:25: error: 'dhcp_context_t {aka struct dhcp_context}' has no member named 'local6_sockaddr'
+|             &dhcp_gbl_ctx.local6_sockaddr
+
+Fix it by adding NSUPDATE conditional checking.
+
+Signed-off-by: Ming Liu <liu.ming50@gmail.com>
+---
+ includes/omapip/isclib.h | 2 ++
+ omapip/isclib.c          | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/includes/omapip/isclib.h b/includes/omapip/isclib.h
+index 538b927..6c20584 100644
+--- a/includes/omapip/isclib.h
++++ b/includes/omapip/isclib.h
+@@ -141,6 +141,8 @@ void isclib_cleanup(void);
+ void dhcp_signal_handler(int signal);
+ extern int shutdown_signal;
+ 
++#if defined (NSUPDATE)
+ isc_result_t dns_client_init();
++#endif
+ 
+ #endif /* ISCLIB_H */
+diff --git a/omapip/isclib.c b/omapip/isclib.c
+index db3b895..ce4b4a1 100644
+--- a/omapip/isclib.c
++++ b/omapip/isclib.c
+@@ -351,6 +351,7 @@ void dhcp_signal_handler(int signal) {
+ 	}
+ }
+ 
++#if defined (NSUPDATE)
+ isc_result_t dns_client_init() {
+ 	isc_result_t result;
+ 	if (dhcp_gbl_ctx.dnsclient == NULL) {
+@@ -387,3 +388,4 @@ isc_result_t dns_client_init() {
+ 
+ 	return ISC_R_SUCCESS;
+ }
++#endif
+-- 
+2.7.4
+
diff --git a/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb b/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb
index e8cc731..19524cb 100644
--- a/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb
+++ b/poky/meta/recipes-connectivity/dhcp/dhcp_4.4.1.bb
@@ -11,6 +11,7 @@
             file://0012-dhcp-correct-the-intention-for-xml2-lib-search.patch \
             file://0013-fixup_use_libbind.patch \
             file://0001-master-Added-includes-of-new-BIND9-compatibility-hea.patch \
+            file://0001-Fix-a-NSUPDATE-compiling-issue.patch \
 "
 
 SRC_URI[md5sum] = "18c7f4dcbb0a63df25098216d47b1ede"
diff --git a/poky/meta/recipes-connectivity/ofono/ofono/0001-build-Add-check-for-explicit_bzero-support.patch b/poky/meta/recipes-connectivity/ofono/ofono/0001-build-Add-check-for-explicit_bzero-support.patch
new file mode 100644
index 0000000..4676bb7
--- /dev/null
+++ b/poky/meta/recipes-connectivity/ofono/ofono/0001-build-Add-check-for-explicit_bzero-support.patch
@@ -0,0 +1,27 @@
+From dff595671bf5a46f7c9231966a6cd7d2a0183076 Mon Sep 17 00:00:00 2001
+From: Marcel Holtmann <marcel@holtmann.org>
+Date: Wed, 15 May 2019 09:39:44 +0200
+Subject: build: Add check for explicit_bzero support
+
+Upstream-Status: Backport
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index bacb7ac5..cad35c5d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -54,6 +54,8 @@ AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
+ 	fi
+ ])
+ 
++AC_CHECK_FUNCS(explicit_bzero)
++
+ AC_CHECK_FUNC(signalfd, dummy=yes,
+ 			AC_MSG_ERROR(signalfd support is required))
+ 
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-connectivity/ofono/ofono/0001-build-Fix-a-race-condition.patch b/poky/meta/recipes-connectivity/ofono/ofono/0001-build-Fix-a-race-condition.patch
new file mode 100644
index 0000000..2e2aa88
--- /dev/null
+++ b/poky/meta/recipes-connectivity/ofono/ofono/0001-build-Fix-a-race-condition.patch
@@ -0,0 +1,28 @@
+From 3e43e3342f3fada1624a28500a5337019fed7d89 Mon Sep 17 00:00:00 2001
+From: Adrian Bunk <bunk@kernel.org>
+Date: Thu, 9 May 2019 12:19:51 +0300
+Subject: build: Fix a race condition
+
+ell/ell.h was written before ell/ existed
+
+Upstream-Status: Backport
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index a569c4a3..d2e310d5 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1107,6 +1107,7 @@ ell/internal: Makefile
+ 	done > $@
+ 
+ ell/ell.h: Makefile
++	$(AM_V_at)$(MKDIR_P) ell
+ 	$(AM_V_at)echo -n > $@
+ 	$(AM_V_GEN)for f in $(ell_headers) ; do \
+ 		echo "#include <$$f>" >> $@ ; \
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-connectivity/ofono/ofono/use-python3.patch b/poky/meta/recipes-connectivity/ofono/ofono/use-python3.patch
deleted file mode 100644
index 7b84075..0000000
--- a/poky/meta/recipes-connectivity/ofono/ofono/use-python3.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-set-ddr should use Python3 like all the other tests.
-
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 17b69cd1da4c5c5f732acb38ca1602446c567ee7 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Mon, 29 Jan 2018 11:31:25 +0000
-Subject: [PATCH] test/setddr: use Python 3
-
-All the other tests use Python 3, so this should to.
----
- test/set-ddr | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/test/set-ddr b/test/set-ddr
-index 5d061b95..33631f31 100755
---- a/test/set-ddr
-+++ b/test/set-ddr
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python3
- 
- import sys
- import dbus
--- 
-2.11.0
diff --git a/poky/meta/recipes-connectivity/ofono/ofono_1.25.bb b/poky/meta/recipes-connectivity/ofono/ofono_1.25.bb
deleted file mode 100644
index 3688b9d..0000000
--- a/poky/meta/recipes-connectivity/ofono/ofono_1.25.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require ofono.inc
-
-SRC_URI  = "\
-  ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
-  file://ofono \
-  file://use-python3.patch \
-"
-SRC_URI[md5sum] = "31450cabdd8dbbf3f808ea2f2f066863"
-SRC_URI[sha256sum] = "eb011fcd3080e93f3a56f96be60350b6595a8b5f36b61646312ba41b0bcb0d75"
diff --git a/poky/meta/recipes-connectivity/ofono/ofono_1.29.bb b/poky/meta/recipes-connectivity/ofono/ofono_1.29.bb
new file mode 100644
index 0000000..a22b99a
--- /dev/null
+++ b/poky/meta/recipes-connectivity/ofono/ofono_1.29.bb
@@ -0,0 +1,10 @@
+require ofono.inc
+
+SRC_URI  = "\
+  ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+  file://ofono \
+  file://0001-build-Fix-a-race-condition.patch \
+  file://0001-build-Add-check-for-explicit_bzero-support.patch \
+"
+SRC_URI[md5sum] = "4fa0372630ff03f223452e4d05efa8f8"
+SRC_URI[sha256sum] = "67f0f8e5740dea5b46309e40667d1e560be39c90ef08dd01ff9e9ce8e61f0679"
diff --git a/poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
index 627568b..30121ad 100644
--- a/poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
+++ b/poky/meta/recipes-core/gettext/gettext_0.19.8.1.bb
@@ -166,6 +166,7 @@
     fi
 }
 
+RDEPENDS_${PN}-ptest += "make"
 RDEPENDS_${PN}-ptest_append_libc-glibc = "\
     glibc-gconv-big5 \
     glibc-charmap-big5 \
diff --git a/poky/meta/recipes-core/glib-2.0/glib.inc b/poky/meta/recipes-core/glib-2.0/glib.inc
index 9ffc456..82107a8 100644
--- a/poky/meta/recipes-core/glib-2.0/glib.inc
+++ b/poky/meta/recipes-core/glib-2.0/glib.inc
@@ -140,6 +140,7 @@
 RDEPENDS_${PN}-codegen += "${CODEGEN_PYTHON_RDEPENDS}"
 
 RDEPENDS_${PN}-ptest += "\
+            libgcc \
             dbus \
             gnome-desktop-testing \
             tzdata \
diff --git a/poky/meta/recipes-core/musl/musl/0001-unistd.h-Add-TEMP_FAILURE_RETRY.patch b/poky/meta/recipes-core/musl/musl/0001-unistd.h-Add-TEMP_FAILURE_RETRY.patch
new file mode 100644
index 0000000..4d48d61
--- /dev/null
+++ b/poky/meta/recipes-core/musl/musl/0001-unistd.h-Add-TEMP_FAILURE_RETRY.patch
@@ -0,0 +1,36 @@
+From 19cbebc3fa33c6a1a71a6036da4d67c98f859f06 Mon Sep 17 00:00:00 2001
+From: Adrian Bunk <bunk@stusta.de>
+Date: Wed, 15 May 2019 16:08:33 +0300
+Subject: unistd.h: Add TEMP_FAILURE_RETRY
+
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+Upstream-Status: Inappropriate [oe-specific]
+---
+ include/unistd.h | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/include/unistd.h b/include/unistd.h
+index 9485da7a..8a75af57 100644
+--- a/include/unistd.h
++++ b/include/unistd.h
+@@ -460,6 +460,17 @@ int eaccess(const char *, int);
+ #define _CS_V6_ENV	1148
+ #define _CS_V7_ENV	1149
+ 
++#ifdef _GNU_SOURCE
++#ifndef TEMP_FAILURE_RETRY
++# define TEMP_FAILURE_RETRY(expression) \
++  (__extension__                                                              \
++    ({ long int __result;                                                     \
++       do __result = (long int) (expression);                                 \
++       while (__result == -1L && errno == EINTR);                             \
++       __result; }))
++#endif
++#endif
++
+ #ifdef __cplusplus
+ }
+ #endif
+-- 
+2.20.1
+
diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb
index 1e32480..2b433ae 100644
--- a/poky/meta/recipes-core/musl/musl_git.bb
+++ b/poky/meta/recipes-core/musl/musl_git.bb
@@ -15,6 +15,7 @@
 SRC_URI = "git://git.musl-libc.org/musl \
            file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
            file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
+           file://0001-unistd.h-Add-TEMP_FAILURE_RETRY.patch \
           "
 
 S = "${WORKDIR}/git"
diff --git a/poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb b/poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
index d551147..3b430c0 100644
--- a/poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
+++ b/poky/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb
@@ -16,3 +16,9 @@
     ${@all_multilib_tune_values(d, 'GDB')} \
     meta-environment-${MACHINE} \
     "
+
+# When TUNE_ARCH changes but MACHINE does not (for example when a machine definition is updated), 
+# cross-canadian.bbclass prevents variable dependency propagation to TRANSLATED_TARGET_ARCH
+# This will result in erroneous reuse of previous sstate packages. The following line
+# establishes a direct dependency instead.
+do_package[vardeps] += "TUNE_ARCH"
diff --git a/poky/meta/recipes-core/systemd/systemd/0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch b/poky/meta/recipes-core/systemd/systemd/0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
deleted file mode 100644
index 1dedbd3..0000000
--- a/poky/meta/recipes-core/systemd/systemd/0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 6a2cadd6b70cb40ac74fc0d0f8557b914bd38ac2 Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Mon, 2 Jul 2018 13:22:41 +0800
-Subject: [PATCH 09/24] socket-util: don't fail if libc doesn't support IDN
-
-Upstream-Status: Inappropriate [musl specific]
-
-Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/basic/socket-util.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
-index 904bafb..a7a009d 100644
---- a/src/basic/socket-util.c
-+++ b/src/basic/socket-util.c
-@@ -34,6 +34,16 @@
- #include "user-util.h"
- #include "utf8.h"
- 
-+/* Don't fail if the standard library
-+ * doesn't support IDN */
-+#ifndef NI_IDN
-+#define NI_IDN 0
-+#endif
-+
-+#ifndef NI_IDN_USE_STD3_ASCII_RULES
-+#define NI_IDN_USE_STD3_ASCII_RULES 0
-+#endif
-+
- #if ENABLE_IDN
- #  define IDN_FLAGS NI_IDN
- #else
--- 
-2.11.0
-
diff --git a/poky/meta/recipes-core/systemd/systemd_242.bb b/poky/meta/recipes-core/systemd/systemd_242.bb
index 73e03c7..20714fc 100644
--- a/poky/meta/recipes-core/systemd/systemd_242.bb
+++ b/poky/meta/recipes-core/systemd/systemd_242.bb
@@ -36,7 +36,6 @@
                file://0006-Include-netinet-if_ether.h.patch \
                file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch \
                file://0008-add-missing-FTW_-macros-for-musl.patch \
-               file://0009-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
                file://0010-fix-missing-of-__register_atfork-for-non-glibc-build.patch \
                file://0011-Use-uintmax_t-for-handling-rlim_t.patch \
                file://0012-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch \
@@ -71,6 +70,7 @@
     gshadow \
     hibernate \
     hostnamed \
+    idn \
     ima \
     kmod \
     localed \
@@ -95,6 +95,7 @@
 
 PACKAGECONFIG_remove_libc-musl = " \
     gshadow \
+    idn \
     localed \
     myhostname \
     nss \
@@ -129,6 +130,7 @@
 PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false"
 PACKAGECONFIG[hibernate] = "-Dhibernate=true,-Dhibernate=false"
 PACKAGECONFIG[hostnamed] = "-Dhostnamed=true,-Dhostnamed=false"
+PACKAGECONFIG[idn] = "-Didn=true,-Didn=false"
 PACKAGECONFIG[ima] = "-Dima=true,-Dima=false"
 # importd requires curl/xz/zlib/bzip2/gcrypt
 PACKAGECONFIG[importd] = "-Dimportd=true,-Dimportd=false"
diff --git a/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
index a4f301d..10cdac6 100644
--- a/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
+++ b/poky/meta/recipes-devtools/elfutils/files/0008-build-Provide-alternatives-for-glibc-assumptions-hel.patch
@@ -64,18 +64,10 @@
  #include <stddef.h>
  #include <stdint.h>
  #include <sys/param.h>
-@@ -51,6 +51,16 @@
+@@ -51,6 +51,8 @@
  #else
  # error "Unknown byte order"
  #endif
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+  (__extension__							      \
-+    ({ long int __result;						      \
-+       do __result = (long int) (expression);				      \
-+       while (__result == -1L && errno == EINTR);			      \
-+       __result; }))
-+#endif
 +
 +#define error(status, errno, ...) err(status, __VA_ARGS__)
  
@@ -141,26 +133,6 @@
  #include "../libdw/libdwP.h"	/* DWARF_E_* values are here.  */
  #include "../libelf/libelfP.h"
  #include "system.h"
-diff --git a/libdwfl/libdwfl_crc32_file.c b/libdwfl/libdwfl_crc32_file.c
-index f849128..6f0aca1 100644
---- a/libdwfl/libdwfl_crc32_file.c
-+++ b/libdwfl/libdwfl_crc32_file.c
-@@ -29,6 +29,15 @@
- # include <config.h>
- #endif
- 
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+  (__extension__                                                             \
-+    ({ long int __result;                                                    \
-+       do __result = (long int) (expression);                                \
-+       while (__result == -1L && errno == EINTR);                            \
-+       __result; }))
-+#endif
-+
- #define crc32_file attribute_hidden __libdwfl_crc32_file
- #define crc32 __libdwfl_crc32
- #include <libdwflP.h>
 diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
 index 360e4ee..b5aa397 100644
 --- a/libdwfl/linux-kernel-modules.c
diff --git a/poky/meta/recipes-devtools/flex/flex_2.6.0.bb b/poky/meta/recipes-devtools/flex/flex_2.6.0.bb
index b89b751..b477cd8 100644
--- a/poky/meta/recipes-devtools/flex/flex_2.6.0.bb
+++ b/poky/meta/recipes-devtools/flex/flex_2.6.0.bb
@@ -48,7 +48,7 @@
 FILES_${PN}-libfl = "${libdir}/libfl.so.* ${libdir}/libfl_pic.so.*"
 
 RDEPENDS_${PN} += "m4"
-RDEPENDS_${PN}-ptest += "bash gawk"
+RDEPENDS_${PN}-ptest += "bash gawk make"
 
 do_compile_ptest() {
 	oe_runmake -C ${B}/tests -f ${B}/tests/Makefile top_builddir=${B} INCLUDES=-I${S}/src buildtests
diff --git a/poky/meta/recipes-devtools/m4/m4-1.4.18.inc b/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
index f433b3f..af0ff45 100644
--- a/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
+++ b/poky/meta/recipes-devtools/m4/m4-1.4.18.inc
@@ -52,6 +52,8 @@
                      ${D}${PTEST_PATH}/tests/test-xalloc-die
 }
 
+
+RDEPENDS_${PN}-ptest += "make"
 RDEPENDS_${PN}-ptest_append_libc-glibc = "\
      locale-base-fr-fr.iso-8859-1 \
 "
diff --git a/poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch b/poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch
new file mode 100644
index 0000000..1270735
--- /dev/null
+++ b/poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch
@@ -0,0 +1,32 @@
+From 04fbe6ddb5f1e02efbcae3cdf5beb16757a98948 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 10 May 2019 12:58:01 -0700
+Subject: [PATCH] mmc_cmd.c: Use extra braces when initializing subobjects
+
+clang warns with -Werror,-Wmissing-braces, as following error
+| mmc_cmds.c:1886:36: error: suggest braces around initialization of subobject [-Werror,-W
+missing-braces]
+|         struct rpmb_frame frame_status = {0};
+|                                           ^
+|                                           {}
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ mmc_cmds.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mmc_cmds.c b/mmc_cmds.c
+index 19a9da1..838e8c3 100644
+--- a/mmc_cmds.c
++++ b/mmc_cmds.c
+@@ -1883,7 +1883,7 @@ static int do_rpmb_op(int fd,
+ 	u_int16_t rpmb_type;
+ 	struct mmc_ioc_multi_cmd *mioc;
+ 	struct mmc_ioc_cmd *ioc;
+-	struct rpmb_frame frame_status = {0};
++	struct rpmb_frame frame_status = {{0}};
+ 
+ 	if (!frame_in || !frame_out || !out_cnt)
+ 		return -EINVAL;
diff --git a/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb b/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
index f3a7234..0c401c8 100644
--- a/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -9,6 +9,7 @@
 PV = "0.1+git${SRCPV}"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH} \
+           file://0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch \
            "
 UPSTREAM_CHECK_COMMITS = "1"
 
diff --git a/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb b/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb
similarity index 72%
rename from poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb
rename to poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb
index e5ab7a3..3abb9aa 100644
--- a/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002005.bb
+++ b/poky/meta/recipes-devtools/perl/libtest-needs-perl_0.002006.bb
@@ -11,14 +11,14 @@
 CPAN_NAME = "Test-Needs"
 CPAN_AUTHOR = "HAARG"
 
-LIC_FILES_CHKSUM = "file://README;md5=3f3ccd21a0a48aa313db212cc3b1bc09;beginline=81;endline=82"
+LIC_FILES_CHKSUM = "file://README;md5=3f3ccd21a0a48aa313db212cc3b1bc09;beginline=88;endline=89"
 
 DEPENDS += "perl"
 
-SRC_URI = "http://www.cpan.org/authors/id/H/HA/${CPAN_AUTHOR}/${CPAN_NAME}-${PV}.tar.gz"
+SRC_URI = "https://cpan.metacpan.org/authors/id/H/HA/${CPAN_AUTHOR}/${CPAN_NAME}-${PV}.tar.gz"
 
-SRC_URI[md5sum] = "356634a56c99282e8059f290f5d534c8"
-SRC_URI[sha256sum] = "5a4f33983586edacdbe00a3b429a9834190140190dab28d0f873c394eb7df399"
+SRC_URI[md5sum] = "d5c96d51d8d5510f7c0b7f354c49af1c"
+SRC_URI[sha256sum] = "77f9fff0c96c5e09f34d0416b3533c3319f7cd0bb1f7fe8f8072ad59f433f0e5"
 
 S = "${WORKDIR}/${CPAN_NAME}-${PV}"
 
diff --git a/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index 7d04e30..15a8e51 100644
--- a/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -40,6 +40,8 @@
 
 FILES_libbz2 = "${libdir}/lib*${SOLIBS}"
 
+RDEPENDS_${PN}-ptest += "make"
+
 PROVIDES_append_class-native = " bzip2-replacement-native"
 BBCLASSEXTEND = "native nativesdk"
 
diff --git a/poky/meta/recipes-extended/gzip/gzip_1.10.bb b/poky/meta/recipes-extended/gzip/gzip_1.10.bb
index 75de970..6a5b245 100644
--- a/poky/meta/recipes-extended/gzip/gzip_1.10.bb
+++ b/poky/meta/recipes-extended/gzip/gzip_1.10.bb
@@ -12,6 +12,8 @@
 
 PROVIDES_append_class-native = " gzip-replacement-native"
 
+RDEPENDS_${PN}-ptest += "make"
+
 BBCLASSEXTEND = "native"
 
 inherit ptest
diff --git a/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb b/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb
index ef5ddf5..597faf7 100644
--- a/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb
+++ b/poky/meta/recipes-extended/mdadm/mdadm_4.1.bb
@@ -57,13 +57,15 @@
 do_install_append() {
         install -d ${D}/${sysconfdir}/
         install -m 644 ${S}/mdadm.conf-example ${D}${sysconfdir}/mdadm.conf
-        install -d ${D}/${systemd_unitdir}/system
-        install -m 644 ${WORKDIR}/mdmonitor.service ${D}/${systemd_unitdir}/system
-        install -m 644 ${S}/systemd/mdmon@.service ${D}/${systemd_unitdir}/system
         install -d ${D}/${sysconfdir}/init.d
         install -m 755 ${WORKDIR}/mdadm.init ${D}${sysconfdir}/init.d/mdmonitor
 }
 
+do_install_append() {
+        oe_runmake install-systemd DESTDIR=${D}
+}
+
+
 do_compile_ptest() {
 	oe_runmake test
 }
@@ -90,3 +92,5 @@
     kernel-module-raid10 \
     kernel-module-raid456 \
 "
+
+FILES_${PN} += "/lib/systemd/*"
diff --git a/poky/meta/recipes-extended/parted/parted_3.2.bb b/poky/meta/recipes-extended/parted/parted_3.2.bb
index 6189fd2..ceac528 100644
--- a/poky/meta/recipes-extended/parted/parted_3.2.bb
+++ b/poky/meta/recipes-extended/parted/parted_3.2.bb
@@ -47,7 +47,7 @@
 	sed -e 's| ../parted||' -i $t/tests/*.sh
 }
 
-RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3"
+RDEPENDS_${PN}-ptest = "bash coreutils perl util-linux-losetup python3 make"
 
 inherit update-alternatives
 
diff --git a/poky/meta/recipes-extended/slang/slang_2.3.2.bb b/poky/meta/recipes-extended/slang/slang_2.3.2.bb
index e53c432..e329310 100644
--- a/poky/meta/recipes-extended/slang/slang_2.3.2.bb
+++ b/poky/meta/recipes-extended/slang/slang_2.3.2.bb
@@ -75,6 +75,8 @@
 
 FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
 
+RDEPENDS_${PN}-ptest += "make"
+
 PARALLEL_MAKE = ""
 PARALLEL_MAKEINST = ""
 
diff --git a/poky/meta/recipes-extended/sysstat/sysstat.inc b/poky/meta/recipes-extended/sysstat/sysstat.inc
index 9228fc2..7f4749f 100644
--- a/poky/meta/recipes-extended/sysstat/sysstat.inc
+++ b/poky/meta/recipes-extended/sysstat/sysstat.inc
@@ -18,6 +18,7 @@
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[lm-sensors] = "--enable-sensors,--disable-sensors,lmsensors,lmsensors-libsensors"
+PACKAGECONFIG[cron] = "--enable-install-cron --enable-copy-only,--disable-install-cron --disable-copy-only"
 
 EXTRA_OECONF += "--disable-stripping"
 
@@ -58,7 +59,6 @@
         fi
 }
 
-
-FILES_${PN} += "${libdir}/sa"
+FILES_${PN} += "${libdir}/sa ${systemd_system_unitdir}"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
diff --git a/poky/meta/recipes-gnome/epiphany/epiphany_3.32.1.2.bb b/poky/meta/recipes-gnome/epiphany/epiphany_3.32.1.2.bb
index ba2e851..49631d9 100644
--- a/poky/meta/recipes-gnome/epiphany/epiphany_3.32.1.2.bb
+++ b/poky/meta/recipes-gnome/epiphany/epiphany_3.32.1.2.bb
@@ -12,6 +12,7 @@
 
 SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \
            file://0002-help-meson.build-disable-the-use-of-yelp.patch \
+           file://0001-web-app-utils-Clean-up-ephy_web_application_create.patch \
            "
 SRC_URI[archive.md5sum] = "93faec353e9f62519859e6164350fd5d"
 SRC_URI[archive.sha256sum] = "a8284fb9bbc8b7914a154a8eac1598c8b59ae421e0d685146fb48198427926be"
diff --git a/poky/meta/recipes-gnome/epiphany/files/0001-web-app-utils-Clean-up-ephy_web_application_create.patch b/poky/meta/recipes-gnome/epiphany/files/0001-web-app-utils-Clean-up-ephy_web_application_create.patch
new file mode 100644
index 0000000..ea644fb
--- /dev/null
+++ b/poky/meta/recipes-gnome/epiphany/files/0001-web-app-utils-Clean-up-ephy_web_application_create.patch
@@ -0,0 +1,79 @@
+From 49f435217873e679b142f64d3e7def919fb642bb Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro@igalia.com>
+Date: Wed, 8 May 2019 15:58:32 +0000
+Subject: [PATCH] web-app-utils: Clean up ephy_web_application_create()
+
+Fixes #764
+
+(cherry picked from commit 4e998d45e4cc549a7ca561a33895b0fbcf7ba6bb)
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/epiphany/commit/a6a022c9c498ad5dcf7f2220644a7520df74ca31]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/ephy-web-app-utils.c | 24 ++++++++++--------------
+ 1 file changed, 10 insertions(+), 14 deletions(-)
+
+diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c
+index 97f3f24..fc68a96 100644
+--- a/lib/ephy-web-app-utils.c
++++ b/lib/ephy-web-app-utils.c
+@@ -374,46 +374,42 @@ ephy_web_application_create (const char *id,
+                              const char *name,
+                              GdkPixbuf  *icon)
+ {
+-  char *profile_dir;
+-  char *desktop_file_path = NULL;
++  g_autofree char *app_file = NULL;
++  g_autofree char *profile_dir = NULL;
++  g_autofree char *desktop_file_path = NULL;
+ 
+   /* If there's already a WebApp profile for the contents of this
+    * view, do nothing. */
+   profile_dir = ephy_web_application_get_profile_directory (id);
+   if (g_file_test (profile_dir, G_FILE_TEST_IS_DIR)) {
+     g_warning ("Profile directory %s already exists", profile_dir);
+-    goto out;
++    return NULL;
+   }
+ 
+   /* Create the profile directory, populate it. */
+   if (g_mkdir_with_parents (profile_dir, 488) == -1) {
+     g_warning ("Failed to create directory %s", profile_dir);
+-    goto out;
++    return NULL;
+   }
+ 
+   /* Skip migration for new web apps. */
+   ephy_profile_utils_set_migration_version_for_profile_dir (EPHY_PROFILE_MIGRATION_VERSION, profile_dir);
+ 
+   /* Create an .app file. */
+-  g_autofree char *app_file = g_build_filename (profile_dir, ".app", NULL);
++  app_file = g_build_filename (profile_dir, ".app", NULL);
+   int fd = g_open (app_file, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+   if (fd < 0) {
+-    LOG ("Failed to create .app file: %s", g_strerror (errno));
+-    goto out;
+-  } else {
+-    close (fd);
++    g_warning ("Failed to create .app file: %s", g_strerror (errno));
++    return NULL;
+   }
++  close (fd);
+ 
+   /* Create the deskop file. */
+   desktop_file_path = create_desktop_file (id, name, address, profile_dir, icon);
+   if (desktop_file_path)
+     ephy_web_application_initialize_settings (profile_dir);
+ 
+- out:
+-  if (profile_dir)
+-    g_free (profile_dir);
+-
+-  return desktop_file_path;
++  return g_steal_pointer (&desktop_file_path);
+ }
+ 
+ char *
+-- 
+2.21.0
+
diff --git a/poky/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch b/poky/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
deleted file mode 100644
index d065e22..0000000
--- a/poky/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e53837ad7b01364f34a533b95f4817c1795789de Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton@ossystems.com.br>
-Date: Wed, 20 Feb 2019 16:17:00 -0300
-Subject: [PATCH 1/4] Simplify wayland-scanner lookup
-Organization: O.S. Systems Software LTDA.
-
-Don't use pkg-config to lookup the path of a binary that's in the path.
-
-Alternatively we'd have to prefix the path returned by pkg-config with
-PKG_CONFIG_SYSROOT_DIR.
-
-Upstream-Status: Pending
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- configure.ac | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1ef68fe68e6..1816a4cd475 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1854,16 +1854,11 @@ for plat in $platforms; do
-         fi
-         WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
- 
--        PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
--                          WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
--                          WAYLAND_SCANNER='')
-         PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
-                           AC_SUBST(SCANNER_ARG, 'private-code'),
-                           AC_SUBST(SCANNER_ARG, 'code'))
- 
--        if test "x$WAYLAND_SCANNER" = x; then
--            AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
--        fi
-+        AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
- 
-         if test "x$WAYLAND_SCANNER" = "x:"; then
-                 AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
--- 
-2.21.0
-
diff --git a/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
new file mode 100644
index 0000000..61e24c6
--- /dev/null
+++ b/poky/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
@@ -0,0 +1,51 @@
+From 498f230c9446fc7a1b4dc77ff6b84ee1a3b53bf4 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Wed, 24 Apr 2019 17:01:24 -0300
+Subject: [PATCH] meson.build: check for all linux host_os combinations
+Organization: O.S. Systems Software LTDA.
+
+Make sure that we are also looking for our host_os combinations like
+linux-musl etc. when assuming support for DRM/KMS.
+
+Also delete a duplicate line.
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+---
+ meson.build | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 53d02e31097..c41f6b4e402 100644
+--- a/meson.build
++++ b/meson.build
+@@ -34,6 +34,8 @@ cpp = meson.get_compiler('cpp')
+ 
+ null_dep = dependency('', required : false)
+ 
++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
++
+ # Arguments for the preprocessor, put these in a separate array from the C and
+ # C++ (cpp in meson terminology) arguments since they need to be added to the
+ # default arguments for both C and C++.
+@@ -89,8 +91,6 @@ if (with_gles1 or with_gles2) and not with_opengl
+   error('building OpenGL ES without OpenGL is not supported.')
+ endif
+ 
+-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].contains(host_machine.system())
+-
+ _drivers = get_option('dri-drivers')
+ if _drivers.contains('auto')
+   if system_has_kms_drm
+@@ -792,7 +792,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));',
+ endif
+ 
+ # TODO: this is very incomplete
+-if ['linux', 'cygwin', 'gnu'].contains(host_machine.system())
++if ['cygwin', 'gnu'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+   pre_args += '-D_GNU_SOURCE'
+ endif
+ 
+-- 
+2.21.0
+
diff --git a/poky/meta/recipes-graphics/mesa/files/0001-meson.build-make-TLS-GLX-optional-again.patch b/poky/meta/recipes-graphics/mesa/files/0001-meson.build-make-TLS-GLX-optional-again.patch
new file mode 100644
index 0000000..8fabafc
--- /dev/null
+++ b/poky/meta/recipes-graphics/mesa/files/0001-meson.build-make-TLS-GLX-optional-again.patch
@@ -0,0 +1,44 @@
+From 48318f1a5c9042a8e1bb4456c2584362b25c4a59 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 15 May 2019 17:21:51 +0200
+Subject: [PATCH] meson.build: make TLS GLX optional again
+
+This was optional with autotools, and needs to be disabled
+when using musl C library, for instance.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ meson.build       | 4 +++-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index c41f6b4..8843f3c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -336,7 +336,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless)
+   endif
+ endif
+ 
+-pre_args += '-DGLX_USE_TLS'
++if get_option('glx-tls')
++  pre_args += '-DGLX_USE_TLS'
++endif
+ if with_glx != 'disabled'
+   if not (with_platform_x11 and with_any_opengl)
+     error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
+diff --git a/meson_options.txt b/meson_options.txt
+index ccf7065..0f1e800 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -324,3 +324,9 @@ option(
+   value : true,
+   description : 'Enable direct rendering in GLX and EGL for DRI',
+ )
++option(
++  'glx-tls',
++  type : 'boolean',
++  value : true,
++  description : 'Enable TLS support in GLX',
++)
diff --git a/poky/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch b/poky/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
deleted file mode 100644
index aaeb0f1..0000000
--- a/poky/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f212b6bed4bf265aec069c21cdc4b7c2d9cb32df Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 16 Aug 2017 18:58:20 -0700
-Subject: [PATCH 2/4] winsys/svga/drm: Include sys/types.h
-Organization: O.S. Systems Software LTDA.
-
-vmw_screen.h uses dev_t which is defines in sys/types.h
-this header is required to be included for getting dev_t
-definition. This issue happens on musl C library, it is hidden
-on glibc since sys/types.h is included through another
-system headers
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport [7dfdfbf8c37e52e7b9b09f7d1d434edad3ebc864]
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- src/gallium/winsys/svga/drm/vmw_screen.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h
-index a87c087d9c5..cb34fec48e7 100644
---- a/src/gallium/winsys/svga/drm/vmw_screen.h
-+++ b/src/gallium/winsys/svga/drm/vmw_screen.h
-@@ -41,6 +41,7 @@
- #include "svga_winsys.h"
- #include "pipebuffer/pb_buffer_fenced.h"
- #include <os/os_thread.h>
-+#include <sys/types.h>
- 
- #define VMW_GMR_POOL_SIZE (16*1024*1024)
- #define VMW_QUERY_POOL_SIZE (8192)
--- 
-2.21.0
-
diff --git a/poky/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch b/poky/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
deleted file mode 100644
index 96edc21..0000000
--- a/poky/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From ce7b9ff6517fda089f296b2af2c1c49604872514 Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Tue, 5 Jun 2018 11:11:10 -0300
-Subject: [PATCH 3/4] Properly get LLVM version when using LLVM Git releases
-Organization: O.S. Systems Software LTDA.
-
-$ llvm-config-host --version
-5.0.0git-9a5c333388c
-
-We need to ignore everything after 5.0.0 which is what the cut cmd is
-doing
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1816a4cd475..13fed9daf59 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1124,7 +1124,7 @@ strip_unwanted_llvm_flags() {
- 
- llvm_set_environment_variables() {
-     if test "x$LLVM_CONFIG" != xno; then
--        LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
-+        LLVM_VERSION=`$LLVM_CONFIG --version | cut -c1-5`
-         LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
-         LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
-         LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
-@@ -2870,7 +2870,7 @@ detect_old_buggy_llvm() {
-     dnl ourselves.
-     dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
-     dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
--    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
-+    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version | cut -c1-5`
-     AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
- 
-     if test "x$llvm_have_one_so" = xyes; then
--- 
-2.21.0
-
diff --git a/poky/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch b/poky/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
deleted file mode 100644
index 45bcd46..0000000
--- a/poky/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5489e1d22e18740a1924628c5c97096d48dcfbf8 Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton@ossystems.com.br>
-Date: Fri, 15 Feb 2019 10:57:06 -0200
-Subject: [PATCH 4/4] use PKG_CHECK_VAR for defining WAYLAND_PROTOCOLS_DATADIR
-Organization: O.S. Systems Software LTDA.
-
-This allows to override the wayland-protocols pkgdatadir with the
-WAYLAND_PROTOCOLS_DATADIR from environment.
-
-pkgconfig would return an absolute path in
-/usr/share/wayland-protocols
-for the pkgdatadir value, which is not suitable for cross-compiling.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 13fed9daf59..6cff8afb7cf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1852,7 +1852,7 @@ for plat in $platforms; do
-         if test "x$enable_egl" = xyes; then
-           PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED])
-         fi
--        WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
-+        PKG_CHECK_VAR([WAYLAND_PROTOCOLS_DATADIR], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], pkgdatadir)
- 
-         PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
-                           AC_SUBST(SCANNER_ARG, 'private-code'),
--- 
-2.21.0
-
diff --git a/poky/meta/recipes-graphics/mesa/mesa.inc b/poky/meta/recipes-graphics/mesa/mesa.inc
index ece7497..cd3ddfd 100644
--- a/poky/meta/recipes-graphics/mesa/mesa.inc
+++ b/poky/meta/recipes-graphics/mesa/mesa.inc
@@ -14,7 +14,7 @@
 
 PE = "2"
 
-DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native"
+DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native"
 EXTRANATIVEPATH += "chrpath-native"
 PROVIDES = " \
     ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
@@ -24,7 +24,7 @@
     virtual/mesa \
     "
 
-inherit autotools pkgconfig python3native gettext distro_features_check
+inherit meson pkgconfig python3native gettext distro_features_check
 
 BBCLASSEXTEND = "native nativesdk"
 
@@ -34,64 +34,66 @@
                ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
                surfaceless"
 
-export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}"
 export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config"
 export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}"
-EXTRA_OECONF = "--enable-shared-glapi \
-                --disable-opencl \
-                --enable-glx-read-only-text \
-                PYTHON2=python2 \
-                --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \
-                --with-platforms='${PLATFORMS}' \
-                --enable-autotools \
+
+EXTRA_OEMESON = " \
+    -Dshared-glapi=true \
+    -Dgallium-opencl=disabled \
+    -Dglx-read-only-text=true \
+    -Dplatforms='${@",".join("${PLATFORMS}".split())}' \
 "
 
 PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
+                   glx-tls \
 		   "
 PACKAGECONFIG_class-native ?= "gbm dri egl opengl"
 PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl"
 
+PACKAGECONFIG_remove_libc-musl = "glx-tls"
+
 # "gbm" requires "dri", "opengl"
-PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
+PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false"
 
 X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
 # "x11" requires "opengl"
-PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
-PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
+PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
+PACKAGECONFIG[glx-tls] = "-Dglx-tls=true, -Dglx-tls=false"
+PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc"
 PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
 
 DRIDRIVERS_class-native = "swrast"
 DRIDRIVERS_class-nativesdk = "swrast"
-DRIDRIVERS_append_x86_class-target = ",radeon,r200,nouveau,i965,i915"
-DRIDRIVERS_append_x86-64_class-target = ",radeon,r200,nouveau,i965,i915"
+DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915"
+DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915"
 # "dri" requires "opengl"
-PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, xorgproto libdrm"
-PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence"
+PACKAGECONFIG[dri] = "-Ddri-drivers=${DRIDRIVERS}, -Ddri-drivers='', xorgproto libdrm"
+PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence"
 
 # Vulkan drivers need dri3 enabled
 # radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9
 VULKAN_DRIVERS = ""
 VULKAN_DRIVERS_append_x86_class-target = ",intel"
 VULKAN_DRIVERS_append_x86-64_class-target = ",intel"
-PACKAGECONFIG[vulkan] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native"
+PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers='',"
 
-PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl"
+PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
 
 # "gles" requires "opengl"
-PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2"
+PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false"
 
 # "egl" requires "dri", "opengl"
-PACKAGECONFIG[egl] = "--enable-egl, --disable-egl"
+PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
 
 PACKAGECONFIG[etnaviv] = ""
-PACKAGECONFIG[imx] = ""
+PACKAGECONFIG[kmsro] = ""
 
 GALLIUMDRIVERS = "swrast"
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
-GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'imx', ',imx', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
 
 # radeonsi requires LLVM
 GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
@@ -104,28 +106,25 @@
 GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}"
 GALLIUMDRIVERS_append = ",virgl"
 
-# keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
-PACKAGECONFIG[gallium] = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
+PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''"
 MESA_LLVM_RELEASE ?= "8.0.0"
-PACKAGECONFIG[gallium-llvm] = "--enable-llvm --enable-llvm-shared-libs, --disable-llvm, llvm${MESA_LLVM_RELEASE} llvm-native \
+PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \
                                ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
 export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
-PACKAGECONFIG[xa]  = "--enable-xa, --disable-xa"
+PACKAGECONFIG[xa]  = "-Dgallium-xa=true, -Dgallium-xa=false"
 
-OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium-osmesa', 'osmesa', d)}"
-PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
+OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}"
+PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none"
 
-PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
+PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind"
 
-EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
-EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
-EXTRA_OECONF_append_libc-musl_x86 = " --disable-asm"
+# mesa tries to run cross-built gen_matypes on build machine to get struct size information
+EXTRA_OEMESON_append = " -Dasm=false"
 
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
 
 CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
-EXTRA_OEMAKE += "WAYLAND_PROTOCOLS_DATADIR=${STAGING_DATADIR}/wayland-protocols"
 
 # Remove the mesa dependency on mesa-dev, as mesa is empty
 RDEPENDS_${PN}-dev = ""
@@ -158,7 +157,6 @@
     # libwayland-egl has been moved to wayland 1.15+
     rm -f ${D}${libdir}/libwayland-egl*
     rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
-    rmdir --ignore-fail-on-non-empty ${D}${libdir}/pkgconfig
 }
 
 # For the packages that make up the OpenGL interfaces, inject variables so that
diff --git a/poky/meta/recipes-graphics/mesa/mesa_19.0.3.bb b/poky/meta/recipes-graphics/mesa/mesa_19.0.3.bb
index 585c3ed..36faa4a 100644
--- a/poky/meta/recipes-graphics/mesa/mesa_19.0.3.bb
+++ b/poky/meta/recipes-graphics/mesa/mesa_19.0.3.bb
@@ -1,11 +1,9 @@
 require ${BPN}.inc
 
 SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
-           file://0001-Simplify-wayland-scanner-lookup.patch \
-           file://0002-winsys-svga-drm-Include-sys-types.h.patch \
-           file://0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch \
-           file://0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch \
-"
+           file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
+           file://0001-meson.build-make-TLS-GLX-optional-again.patch \
+           "
 
 SRC_URI[md5sum] = "d03bf14e42c0e54ebae5730712ccc408"
 SRC_URI[sha256sum] = "f027244e38dc309a4c12db45ef79be81ab62c797a50a88d566e4edb6159fc4d5"
diff --git a/poky/meta/recipes-graphics/wayland/libinput_1.13.1.bb b/poky/meta/recipes-graphics/wayland/libinput_1.13.2.bb
similarity index 86%
rename from poky/meta/recipes-graphics/wayland/libinput_1.13.1.bb
rename to poky/meta/recipes-graphics/wayland/libinput_1.13.2.bb
index 5a6dd9a..049674c 100644
--- a/poky/meta/recipes-graphics/wayland/libinput_1.13.1.bb
+++ b/poky/meta/recipes-graphics/wayland/libinput_1.13.2.bb
@@ -8,8 +8,8 @@
 DEPENDS = "libevdev udev mtdev"
 
 SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz"
-SRC_URI[md5sum] = "869a7e68c4290d99868500a369645def"
-SRC_URI[sha256sum] = "e1d487d478ee2bb118890a64211c2b7f2348aaed7363b214bed4d642274841ab"
+SRC_URI[md5sum] = "8b745894f5d1b2e883bfc686aebadcfe"
+SRC_URI[sha256sum] = "1d9fa0698348dea46f75321d98788f8ac7181c069b70c4d10736910a12bb6a6d"
 
 UPSTREAM_CHECK_REGEX = "libinput-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
 
diff --git a/poky/meta/recipes-support/apr/apr-util_1.6.1.bb b/poky/meta/recipes-support/apr/apr-util_1.6.1.bb
index 0c90f8d..1f9fea2 100644
--- a/poky/meta/recipes-support/apr/apr-util_1.6.1.bb
+++ b/poky/meta/recipes-support/apr/apr-util_1.6.1.bb
@@ -79,6 +79,7 @@
 inherit ptest
 
 RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
+RDEPENDS_${PN}-ptest += "libgcc"
 
 do_compile_ptest() {
 	cd ${B}/test
diff --git a/poky/meta/recipes-support/apr/apr_1.7.0.bb b/poky/meta/recipes-support/apr/apr_1.7.0.bb
index a58651d..09a65bf 100644
--- a/poky/meta/recipes-support/apr/apr_1.7.0.bb
+++ b/poky/meta/recipes-support/apr/apr_1.7.0.bb
@@ -53,6 +53,8 @@
 FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
 RDEPENDS_${PN}-dev += "bash"
 
+RDEPENDS_${PN}-ptest += "libgcc"
+
 #for some reason, build/libtool.m4 handled by buildconf still be overwritten
 #when autoconf, so handle it again.
 do_configure_append() {
diff --git a/poky/meta/recipes-support/attr/attr.inc b/poky/meta/recipes-support/attr/attr.inc
index cfa38a7..1a29eb3 100644
--- a/poky/meta/recipes-support/attr/attr.inc
+++ b/poky/meta/recipes-support/attr/attr.inc
@@ -41,6 +41,6 @@
 	sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
 }
 
-RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
+RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix make"
 
 BBCLASSEXTEND = "native nativesdk"