summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-support
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-support')
-rw-r--r--poky/meta/recipes-support/apr/apr-util/configfix.patch51
-rw-r--r--poky/meta/recipes-support/apr/apr-util/configure_fixes.patch31
-rw-r--r--poky/meta/recipes-support/apr/apr-util/run-ptest6
-rw-r--r--poky/meta/recipes-support/apr/apr-util_1.6.1.bb93
-rw-r--r--poky/meta/recipes-support/apr/apr/0001-build-buildcheck.sh-improve-libtool-detection.patch32
-rw-r--r--poky/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch74
-rw-r--r--poky/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch63
-rw-r--r--poky/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch39
-rw-r--r--poky/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch36
-rw-r--r--poky/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch78
-rw-r--r--poky/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch50
-rw-r--r--poky/meta/recipes-support/apr/apr/run-ptest6
-rw-r--r--poky/meta/recipes-support/apr/apr_1.6.3.bb117
-rw-r--r--poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb32
-rw-r--r--poky/meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch84
-rw-r--r--poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch51
-rw-r--r--poky/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch19
-rw-r--r--poky/meta/recipes-support/aspell/aspell/gcc7.patch40
-rw-r--r--poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb31
-rw-r--r--poky/meta/recipes-support/atk/at-spi2-atk_2.26.1.bb22
-rw-r--r--poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch52
-rw-r--r--poky/meta/recipes-support/atk/at-spi2-core_2.26.2.bb29
-rw-r--r--poky/meta/recipes-support/atk/atk_2.26.1.bb19
-rw-r--r--poky/meta/recipes-support/attr/acl/Makefile-libacl-should-depend-on-include.patch51
-rw-r--r--poky/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch198
-rw-r--r--poky/meta/recipes-support/attr/acl/configure.ac49
-rw-r--r--poky/meta/recipes-support/attr/acl/run-ptest64
-rw-r--r--poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch37
-rw-r--r--poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch100
-rw-r--r--poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch84
-rw-r--r--poky/meta/recipes-support/attr/acl_2.2.52.bb55
-rw-r--r--poky/meta/recipes-support/attr/attr.inc45
-rw-r--r--poky/meta/recipes-support/attr/attr/0001-Use-stdint-types-consistently.patch69
-rw-r--r--poky/meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch63
-rw-r--r--poky/meta/recipes-support/attr/attr/dont-use-decl-macros.patch56
-rw-r--r--poky/meta/recipes-support/attr/attr_2.4.47.bb15
-rw-r--r--poky/meta/recipes-support/attr/ea-acl.inc49
-rw-r--r--poky/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch70
-rw-r--r--poky/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch240
-rw-r--r--poky/meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch666
-rw-r--r--poky/meta/recipes-support/attr/files/relative-libdir.patch25
-rw-r--r--poky/meta/recipes-support/attr/files/run-ptest5
-rw-r--r--poky/meta/recipes-support/bash-completion/bash-completion_2.7.bb42
-rw-r--r--poky/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch34
-rw-r--r--poky/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch37
-rw-r--r--poky/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch43
-rw-r--r--poky/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch39
-rw-r--r--poky/meta/recipes-support/beecrypt/beecrypt/fix-security.patch47
-rw-r--r--poky/meta/recipes-support/beecrypt/beecrypt/run-ptest5
-rw-r--r--poky/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb48
-rw-r--r--poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb24
-rw-r--r--poky/meta/recipes-support/boost/bjam-native_1.66.0.bb19
-rw-r--r--poky/meta/recipes-support/boost/boost-1.66.0.inc21
-rw-r--r--poky/meta/recipes-support/boost/boost.inc200
-rw-r--r--poky/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch100
-rw-r--r--poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch65
-rw-r--r--poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch151
-rw-r--r--poky/meta/recipes-support/boost/boost/arm-intrinsics.patch55
-rw-r--r--poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch112
-rw-r--r--poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch31
-rw-r--r--poky/meta/recipes-support/boost/boost_1.66.0.bb11
-rw-r--r--poky/meta/recipes-support/boost/files/0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch37
-rw-r--r--poky/meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch50
-rw-r--r--poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch34
-rw-r--r--poky/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch46
-rw-r--r--poky/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch71
-rw-r--r--poky/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch50
-rw-r--r--poky/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch20
-rw-r--r--poky/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch34
-rw-r--r--poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb88
-rw-r--r--poky/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch33
-rw-r--r--poky/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch19
-rw-r--r--poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb49
-rw-r--r--poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch44
-rw-r--r--poky/meta/recipes-support/curl/curl_7.60.0.bb70
-rw-r--r--poky/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch45
-rw-r--r--poky/meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch42
-rw-r--r--poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch50
-rw-r--r--poky/meta/recipes-support/db/db/fix-parallel-build.patch21
-rw-r--r--poky/meta/recipes-support/db/db/sequence-type.patch59
-rw-r--r--poky/meta/recipes-support/db/db_5.3.28.bb123
-rw-r--r--poky/meta/recipes-support/debianutils/debianutils_4.8.4.bb57
-rw-r--r--poky/meta/recipes-support/enchant/enchant_1.6.0.bb34
-rw-r--r--poky/meta/recipes-support/gdbm/files/ptest.patch50
-rwxr-xr-xpoky/meta/recipes-support/gdbm/files/run-ptest7
-rw-r--r--poky/meta/recipes-support/gdbm/gdbm_1.14.1.bb43
-rw-r--r--poky/meta/recipes-support/gmp/gmp-6.1.2/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch61
-rw-r--r--poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch49
-rw-r--r--poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch18
-rw-r--r--poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch15
-rw-r--r--poky/meta/recipes-support/gmp/gmp.inc12
-rw-r--r--poky/meta/recipes-support/gmp/gmp_6.1.2.bb41
-rw-r--r--poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch35
-rw-r--r--poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch27
-rw-r--r--poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb22
-rw-r--r--poky/meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch105
-rw-r--r--poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch30
-rw-r--r--poky/meta/recipes-support/gnupg/gnupg/0002-use-pkgconfig-instead-of-npth-config.patch85
-rw-r--r--poky/meta/recipes-support/gnupg/gnupg/0003-dirmngr-uses-libgpg-error.patch32
-rw-r--r--poky/meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch34
-rw-r--r--poky/meta/recipes-support/gnupg/gnupg_2.2.4.bb50
-rw-r--r--poky/meta/recipes-support/gnutls/gnutls.inc59
-rw-r--r--poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch29
-rw-r--r--poky/meta/recipes-support/gnutls/gnutls/arm_eabi.patch19
-rw-r--r--poky/meta/recipes-support/gnutls/gnutls_3.6.1.bb9
-rw-r--r--poky/meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch63
-rw-r--r--poky/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch14
-rw-r--r--poky/meta/recipes-support/gnutls/libtasn1_4.13.bb23
-rw-r--r--poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch303
-rw-r--r--poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch51
-rw-r--r--poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch33
-rw-r--r--poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch34
-rw-r--r--poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch31
-rw-r--r--poky/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch37
-rw-r--r--poky/meta/recipes-support/gpgme/gpgme/0007-qt-python-Add-variables-to-tests.patch78
-rw-r--r--poky/meta/recipes-support/gpgme/gpgme_1.10.0.bb86
-rw-r--r--poky/meta/recipes-support/icu/icu.inc87
-rw-r--r--poky/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch28
-rw-r--r--poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch34
-rw-r--r--poky/meta/recipes-support/icu/icu/fix-install-manx.patch57
-rw-r--r--poky/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch49
-rw-r--r--poky/meta/recipes-support/icu/icu_60.2.bb29
-rw-r--r--poky/meta/recipes-support/iso-codes/iso-codes_3.77.bb15
-rw-r--r--poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch159
-rw-r--r--poky/meta/recipes-support/libassuan/libassuan_2.5.1.bb32
-rw-r--r--poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.2.bb21
-rw-r--r--poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch376
-rw-r--r--poky/meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch33
-rw-r--r--poky/meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch52
-rw-r--r--poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb50
-rw-r--r--poky/meta/recipes-support/libcap-ng/libcap-ng/python.patch58
-rw-r--r--poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb37
-rw-r--r--poky/meta/recipes-support/libcap/files/0001-Fix-build-with-gperf-3.1.patch41
-rw-r--r--poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch32
-rw-r--r--poky/meta/recipes-support/libcap/libcap_2.25.bb74
-rw-r--r--poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb23
-rw-r--r--poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb20
-rw-r--r--poky/meta/recipes-support/libdaemon/libdaemon/fix-includes.patch20
-rw-r--r--poky/meta/recipes-support/libdaemon/libdaemon_0.14.bb18
-rw-r--r--poky/meta/recipes-support/libevdev/libevdev_1.5.8.bb14
-rw-r--r--poky/meta/recipes-support/libevent/libevent/0001-test-fix-32bit-linux-regress.patch48
-rw-r--r--poky/meta/recipes-support/libevent/libevent/Makefile-missing-test-dir.patch27
-rw-r--r--poky/meta/recipes-support/libevent/libevent/run-ptest18
-rw-r--r--poky/meta/recipes-support/libevent/libevent_2.1.8.bb43
-rw-r--r--poky/meta/recipes-support/libexif/libexif_0.6.21.bb17
-rw-r--r--poky/meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch30
-rw-r--r--poky/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch32
-rw-r--r--poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch177
-rw-r--r--poky/meta/recipes-support/libffi/libffi/not-win32.patch26
-rw-r--r--poky/meta/recipes-support/libffi/libffi_3.2.1.bb34
-rw-r--r--poky/meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch54
-rw-r--r--poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb23
-rw-r--r--poky/meta/recipes-support/libfm/libfm/0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch28
-rw-r--r--poky/meta/recipes-support/libfm/libfm/0001-Enclose-text-in-programlisting-into-CDATA.patch76
-rw-r--r--poky/meta/recipes-support/libfm/libfm_1.2.5.bb54
-rw-r--r--poky/meta/recipes-support/libgcrypt/files/0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch183
-rw-r--r--poky/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch41
-rw-r--r--poky/meta/recipes-support/libgcrypt/files/0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch79
-rw-r--r--poky/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch28
-rw-r--r--poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.2.bb53
-rw-r--r--poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch150
-rw-r--r--poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb62
-rw-r--r--poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch44
-rw-r--r--poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch30
-rw-r--r--poky/meta/recipes-support/libical/libical_2.0.0.bb19
-rw-r--r--poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch152
-rw-r--r--poky/meta/recipes-support/libksba/libksba_1.3.5.bb28
-rw-r--r--poky/meta/recipes-support/libmpc/libmpc.inc7
-rw-r--r--poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb15
-rw-r--r--poky/meta/recipes-support/libnl/libnl/0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch38
-rw-r--r--poky/meta/recipes-support/libnl/libnl/fix-pc-file.patch17
-rw-r--r--poky/meta/recipes-support/libnl/libnl_3.4.0.bb46
-rw-r--r--poky/meta/recipes-support/libpcre/libpcre/Makefile183
-rw-r--r--poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch41
-rw-r--r--poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch48
-rw-r--r--poky/meta/recipes-support/libpcre/libpcre/run-ptest3
-rw-r--r--poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch65
-rw-r--r--poky/meta/recipes-support/libpcre/libpcre2_10.30.bb61
-rw-r--r--poky/meta/recipes-support/libpcre/libpcre_8.41.bb87
-rw-r--r--poky/meta/recipes-support/libproxy/libproxy_0.4.15.bb36
-rw-r--r--poky/meta/recipes-support/libsoup/libsoup-2.4_2.60.3.bb35
-rw-r--r--poky/meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch30
-rw-r--r--poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch56
-rw-r--r--poky/meta/recipes-support/libunistring/libunistring_0.9.9.bb30
-rw-r--r--poky/meta/recipes-support/libunwind/libunwind.inc23
-rw-r--r--poky/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch81
-rw-r--r--poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch69
-rw-r--r--poky/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch45
-rw-r--r--poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch248
-rw-r--r--poky/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch54
-rw-r--r--poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch59
-rw-r--r--poky/meta/recipes-support/libunwind/libunwind/libunwind-1.1-x32.patch31
-rw-r--r--poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch37
-rw-r--r--poky/meta/recipes-support/libunwind/libunwind_1.2.1.bb23
-rw-r--r--poky/meta/recipes-support/liburcu/liburcu_0.10.1.bb19
-rw-r--r--poky/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch30
-rw-r--r--poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb42
-rw-r--r--poky/meta/recipes-support/libusb/libusb1/no-dll.patch19
-rw-r--r--poky/meta/recipes-support/libusb/libusb1_1.0.21.bb35
-rw-r--r--poky/meta/recipes-support/libxslt/libxslt_1.1.32.bb46
-rw-r--r--poky/meta/recipes-support/libyaml/libyaml_0.1.7.bb20
-rw-r--r--poky/meta/recipes-support/lz4/files/0001-tests-Makefile-don-t-use-LIBDIR-as-variable.patch82
-rw-r--r--poky/meta/recipes-support/lz4/files/run-ptest43
-rw-r--r--poky/meta/recipes-support/lz4/lz4_1.7.4.bb27
-rw-r--r--poky/meta/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch27
-rw-r--r--poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch70
-rw-r--r--poky/meta/recipes-support/lzo/lzo/run-ptest33
-rw-r--r--poky/meta/recipes-support/lzo/lzo_2.10.bb31
-rw-r--r--poky/meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch100
-rw-r--r--poky/meta/recipes-support/lzop/lzop/acinclude.m4390
-rw-r--r--poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch37
-rw-r--r--poky/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch36
-rw-r--r--poky/meta/recipes-support/lzop/lzop_1.03.bb29
-rw-r--r--poky/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch39
-rw-r--r--poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb20
-rw-r--r--poky/meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch38
-rw-r--r--poky/meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch36
-rw-r--r--poky/meta/recipes-support/nettle/nettle-3.4/dlopen-test.patch20
-rw-r--r--poky/meta/recipes-support/nettle/nettle-3.4/run-ptest36
-rw-r--r--poky/meta/recipes-support/nettle/nettle_3.4.bb47
-rw-r--r--poky/meta/recipes-support/npth/npth/pkgconfig.patch49
-rw-r--r--poky/meta/recipes-support/npth/npth_1.5.bb23
-rw-r--r--poky/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch31
-rw-r--r--poky/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch105
-rw-r--r--poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch52
-rw-r--r--poky/meta/recipes-support/nspr/nspr/nspr.pc.in11
-rw-r--r--poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch26
-rw-r--r--poky/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch19
-rw-r--r--poky/meta/recipes-support/nspr/nspr_4.19.bb190
-rw-r--r--poky/meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch53
-rw-r--r--poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb31
-rw-r--r--poky/meta/recipes-support/nss/nss/0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch119
-rw-r--r--poky/meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch48
-rw-r--r--poky/meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch33
-rw-r--r--poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch33
-rw-r--r--poky/meta/recipes-support/nss/nss/nss-build-hacl-poly1305-aarch64.patch30
-rw-r--r--poky/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch110
-rw-r--r--poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch36
-rw-r--r--poky/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch26
-rw-r--r--poky/meta/recipes-support/nss/nss/nss.pc.in11
-rw-r--r--poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch23
-rw-r--r--poky/meta/recipes-support/nss/nss/signlibs.sh20
-rw-r--r--poky/meta/recipes-support/nss/nss_3.35.bb255
-rw-r--r--poky/meta/recipes-support/p11-kit/p11-kit/0001-LINGUAS-drop-the-languages-for-which-upstream-does-n.patch32
-rw-r--r--poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb46
-rw-r--r--poky/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch100
-rw-r--r--poky/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch153
-rw-r--r--poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb38
-rw-r--r--poky/meta/recipes-support/popt/popt/disable_tests.patch21
-rw-r--r--poky/meta/recipes-support/popt/popt/pkgconfig_fix.patch15
-rw-r--r--poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch21
-rw-r--r--poky/meta/recipes-support/popt/popt_1.16.bb22
-rw-r--r--poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.1.bb26
-rw-r--r--poky/meta/recipes-support/re2c/re2c/mkdir.patch36
-rw-r--r--poky/meta/recipes-support/re2c/re2c_0.16.bb15
-rw-r--r--poky/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch60
-rw-r--r--poky/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch92
-rw-r--r--poky/meta/recipes-support/rng-tools/rng-tools/default2
-rw-r--r--poky/meta/recipes-support/rng-tools/rng-tools/init49
-rw-r--r--poky/meta/recipes-support/rng-tools/rng-tools/read_error_msg.patch98
-rw-r--r--poky/meta/recipes-support/rng-tools/rng-tools/rng-tools-5-fix-textrels-on-PIC-x86.patch103
-rw-r--r--poky/meta/recipes-support/rng-tools/rng-tools/rngd.service9
-rw-r--r--poky/meta/recipes-support/rng-tools/rng-tools/underquote.patch33
-rw-r--r--poky/meta/recipes-support/rng-tools/rng-tools_5.bb55
-rw-r--r--poky/meta/recipes-support/serf/serf/env.patch28
-rw-r--r--poky/meta/recipes-support/serf/serf/norpath.patch42
-rw-r--r--poky/meta/recipes-support/serf/serf_1.3.9.bb26
-rw-r--r--poky/meta/recipes-support/shared-mime-info/shared-mime-info.inc35
-rw-r--r--poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch25
-rw-r--r--poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch33
-rw-r--r--poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.9.bb7
-rw-r--r--poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch30
-rw-r--r--poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb28
-rw-r--r--poky/meta/recipes-support/sqlite/sqlite3.inc57
-rw-r--r--poky/meta/recipes-support/sqlite/sqlite3_3.22.0.bb10
-rw-r--r--poky/meta/recipes-support/taglib/taglib/CVE-2017-12678.patch40
-rw-r--r--poky/meta/recipes-support/taglib/taglib_1.11.1.bb43
-rw-r--r--poky/meta/recipes-support/user-creation/files/system-xuser.conf11
-rw-r--r--poky/meta/recipes-support/user-creation/xuser-account_0.1.bb28
-rw-r--r--poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch119
-rw-r--r--poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch29
-rw-r--r--poky/meta/recipes-support/vte/vte_0.50.2.bb48
282 files changed, 15475 insertions, 0 deletions
diff --git a/poky/meta/recipes-support/apr/apr-util/configfix.patch b/poky/meta/recipes-support/apr/apr-util/configfix.patch
new file mode 100644
index 000000000..dbb114880
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr-util/configfix.patch
@@ -0,0 +1,51 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: apr-util-1.3.4/apu-config.in
+===================================================================
+--- apr-util-1.3.4.orig/apu-config.in 2009-01-12 17:08:06.000000000 +0000
++++ apr-util-1.3.4/apu-config.in 2009-01-12 17:09:00.000000000 +0000
+@@ -134,14 +134,7 @@
+ exit 0
+ ;;
+ --includes)
+- if test "$location" = "installed"; then
+ flags="$flags -I$includedir $INCLUDES"
+- elif test "$location" = "source"; then
+- flags="$flags -I$APU_SOURCE_DIR/include $INCLUDES"
+- else
+- # this is for VPATH builds
+- flags="$flags -I$APU_BUILD_DIR/include -I$APU_SOURCE_DIR/include $INCLUDES"
+- fi
+ ;;
+ --ldflags)
+ flags="$flags $LDFLAGS"
+@@ -155,28 +148,10 @@
+ exit 0
+ ;;
+ --link-ld)
+- if test "$location" = "installed"; then
+- ### avoid using -L if libdir is a "standard" location like /usr/lib
+ flags="$flags -L$libdir -l$APRUTIL_LIBNAME"
+- else
+- flags="$flags -L$APU_BUILD_DIR -l$APRUTIL_LIBNAME"
+- fi
+ ;;
+ --link-libtool)
+- # If the LA_FILE exists where we think it should be, use it. If we're
+- # installed and the LA_FILE does not exist, assume to use -L/-l
+- # (the LA_FILE may not have been installed). If we're building ourselves,
+- # we'll assume that at some point the .la file be created.
+- if test -f "$LA_FILE"; then
+- flags="$flags $LA_FILE"
+- elif test "$location" = "installed"; then
+- ### avoid using -L if libdir is a "standard" location like /usr/lib
+- # Since the user is specifying they are linking with libtool, we
+- # *know* that -R will be recognized by libtool.
+- flags="$flags -L$libdir -R$libdir -l$APRUTIL_LIBNAME"
+- else
+- flags="$flags $LA_FILE"
+- fi
++ flags="$flags -l$APRUTIL_LIBNAME"
+ ;;
+ --apu-la-file)
+ if test -f "$LA_FILE"; then
diff --git a/poky/meta/recipes-support/apr/apr-util/configure_fixes.patch b/poky/meta/recipes-support/apr/apr-util/configure_fixes.patch
new file mode 100644
index 000000000..91e244ce2
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr-util/configure_fixes.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: apr-util-1.4.1/configure.in
+===================================================================
+--- apr-util-1.4.1.orig/configure.in 2009-12-18 03:15:19.000000000 +0800
++++ apr-util-1.4.1/configure.in 2011-12-30 13:32:07.000000000 +0800
+@@ -8,15 +8,15 @@
+ AC_CONFIG_HEADER(include/private/apu_config.h)
+ AC_CONFIG_AUX_DIR(build)
+
+-sinclude(build/apu-conf.m4)
+-sinclude(build/apu-iconv.m4)
+-sinclude(build/apu-hints.m4)
+-sinclude(build/apr_common.m4)
+-sinclude(build/find_apr.m4)
+-sinclude(build/crypto.m4)
+-sinclude(build/dbm.m4)
+-sinclude(build/dbd.m4)
+-sinclude(build/dso.m4)
++#sinclude(build/apu-conf.m4)
++#sinclude(build/apu-iconv.m4)
++#sinclude(build/apu-hints.m4)
++#sinclude(build/apr_common.m4)
++#sinclude(build/find_apr.m4)
++#sinclude(build/crypto.m4)
++#sinclude(build/dbm.m4)
++#sinclude(build/dbd.m4)
++#sinclude(build/dso.m4)
+
+ dnl Generate ./config.nice for reproducing runs of configure
+ dnl
diff --git a/poky/meta/recipes-support/apr/apr-util/run-ptest b/poky/meta/recipes-support/apr/apr-util/run-ptest
new file mode 100644
index 000000000..ae19a1d11
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr-util/run-ptest
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd test
+./testall |sed \
+ -e 's|\(.*\): SUCCESS|PASS: \1|' \
+ -e 's|\(.*\): FAILED|FAIL: \1|'
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
new file mode 100644
index 000000000..88b4300f9
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr-util_1.6.1.bb
@@ -0,0 +1,93 @@
+SUMMARY = "Apache Portable Runtime (APR) companion library"
+HOMEPAGE = "http://apr.apache.org/"
+SECTION = "libs"
+DEPENDS = "apr expat gdbm"
+
+BBCLASSEXTEND = "native nativesdk"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=158aa0b1efe0c12f23d4b007ddb9a5db \
+ file://include/apu_version.h;endline=17;md5=806685a84e71f10c80144c48eb35df42"
+
+SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
+ file://configfix.patch \
+ file://configure_fixes.patch \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f"
+SRC_URI[sha256sum] = "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459"
+
+EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
+ --without-odbc \
+ --without-pgsql \
+ --with-dbm=gdbm \
+ --with-gdbm=${STAGING_DIR_HOST}${prefix} \
+ --without-sqlite2 \
+ --with-expat=${STAGING_DIR_HOST}${prefix}"
+
+
+inherit autotools lib_package binconfig
+
+OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+
+do_configure_append() {
+ if [ "${CLASSOVERRIDE}" = "class-target" ]; then
+ cp ${STAGING_DATADIR}/apr/apr_rules.mk ${B}/build/rules.mk
+ fi
+}
+do_configure_prepend_class-native() {
+ mkdir ${B}/build
+ cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${B}/build/rules.mk
+}
+do_configure_append_class-native() {
+ sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
+ # sometimes there isn't SHELL
+ sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${B}/build/rules.mk
+}
+
+do_configure_prepend_class-nativesdk() {
+ cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
+}
+
+do_configure_append_class-nativesdk() {
+ sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+ sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+ sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+ sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk
+}
+
+do_install_append_class-target() {
+ sed -i -e 's,${STAGING_DIR_HOST},,g' \
+ -e 's,APU_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
+ -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config
+}
+
+PACKAGECONFIG ??= "crypto"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl"
+PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3"
+
+#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN}
+FILES_${PN} += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}"
+FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la"
+FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a"
+
+INSANE_SKIP_${PN} += "dev-so"
+
+inherit ptest
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
+
+do_compile_ptest() {
+ cd ${B}/test
+ oe_runmake
+}
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}/test
+ mkdir $t
+ for i in testall data; do \
+ cp -r ${B}/test/$i $t; \
+ done
+}
diff --git a/poky/meta/recipes-support/apr/apr/0001-build-buildcheck.sh-improve-libtool-detection.patch b/poky/meta/recipes-support/apr/apr/0001-build-buildcheck.sh-improve-libtool-detection.patch
new file mode 100644
index 000000000..097c195a1
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr/0001-build-buildcheck.sh-improve-libtool-detection.patch
@@ -0,0 +1,32 @@
+From 4efdc06fb17b8a00a9eca923caa176be741d1e04 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 1 Feb 2018 14:56:13 +0800
+Subject: [PATCH 1/7] build/buildcheck.sh: improve libtool detection
+
+Support customize libtool by variable assigning, it is helpful
+for cross compileing (such as libtool=aarch64-linux-libtool)
+
+Upstream-Status: Submitted [https://github.com/apache/apr/pull/8]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ build/buildcheck.sh | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/build/buildcheck.sh b/build/buildcheck.sh
+index ab5df44..f191a41 100755
+--- a/build/buildcheck.sh
++++ b/build/buildcheck.sh
+@@ -40,7 +40,9 @@ fi
+ # output is multiline from 1.5 onwards
+
+ # Require libtool 1.4 or newer
+-libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
++if test -z "$libtool"; then
++ libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
++fi
+ lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
+ if test -z "$lt_pversion"; then
+ echo "buildconf: libtool not found."
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch b/poky/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
new file mode 100644
index 000000000..72e706f96
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr/0002-apr-Remove-workdir-path-references-from-installed-ap.patch
@@ -0,0 +1,74 @@
+From 5925b20da8bbc34d9bf5a5dca123ef38864d43c6 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 09:39:06 +0800
+Subject: [PATCH 2/7] apr: Remove workdir path references from installed apr
+ files
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+The generated `apr-1-config' is used by other recipes at build time or
+packages at target run time, the workdir path caused confusion.
+
+Rebase to 1.6.3
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ apr-config.in | 26 ++------------------------
+ 1 file changed, 2 insertions(+), 24 deletions(-)
+
+diff --git a/apr-config.in b/apr-config.in
+index 84b4073..bbbf651 100644
+--- a/apr-config.in
++++ b/apr-config.in
+@@ -152,14 +152,7 @@ while test $# -gt 0; do
+ flags="$flags $LDFLAGS"
+ ;;
+ --includes)
+- if test "$location" = "installed"; then
+ flags="$flags -I$includedir $EXTRA_INCLUDES"
+- elif test "$location" = "source"; then
+- flags="$flags -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+- else
+- # this is for VPATH builds
+- flags="$flags -I$APR_BUILD_DIR/include -I$APR_SOURCE_DIR/include $EXTRA_INCLUDES"
+- fi
+ ;;
+ --srcdir)
+ echo $APR_SOURCE_DIR
+@@ -181,29 +174,14 @@ while test $# -gt 0; do
+ exit 0
+ ;;
+ --link-ld)
+- if test "$location" = "installed"; then
+- ### avoid using -L if libdir is a "standard" location like /usr/lib
+- flags="$flags -L$libdir -l${APR_LIBNAME}"
+- else
+- ### this surely can't work since the library is in .libs?
+- flags="$flags -L$APR_BUILD_DIR -l${APR_LIBNAME}"
+- fi
++ flags="$flags -l${APR_LIBNAME}"
+ ;;
+ --link-libtool)
+ # If the LA_FILE exists where we think it should be, use it. If we're
+ # installed and the LA_FILE does not exist, assume to use -L/-l
+ # (the LA_FILE may not have been installed). If we're building ourselves,
+ # we'll assume that at some point the .la file be created.
+- if test -f "$LA_FILE"; then
+- flags="$flags $LA_FILE"
+- elif test "$location" = "installed"; then
+- ### avoid using -L if libdir is a "standard" location like /usr/lib
+- # Since the user is specifying they are linking with libtool, we
+- # *know* that -R will be recognized by libtool.
+- flags="$flags -L$libdir -R$libdir -l${APR_LIBNAME}"
+- else
+- flags="$flags $LA_FILE"
+- fi
++ flags="$flags -l${APR_LIBNAME}"
+ ;;
+ --shlib-path-var)
+ echo "$SHLIBPATH_VAR"
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch b/poky/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
new file mode 100644
index 000000000..4dd53bd8e
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr/0003-Makefile.in-configure.in-support-cross-compiling.patch
@@ -0,0 +1,63 @@
+From d5028c10f156c224475b340cfb1ba025d6797243 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 2 Feb 2018 15:51:42 +0800
+Subject: [PATCH 3/7] Makefile.in/configure.in: support cross compiling
+
+While cross compiling, the tools/gen_test_char could not
+be executed at build time, use AX_PROG_CC_FOR_BUILD to
+build native tools/gen_test_char
+
+Upstream-Status: Submitted [https://github.com/apache/apr/pull/8]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.in | 10 +++-------
+ configure.in | 3 +++
+ 2 files changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 5fb760e..8675f90 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -46,7 +46,7 @@ LT_VERSION = @LT_VERSION@
+
+ CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
+ build/apr_rules.out tools/gen_test_char@EXEEXT@ \
+- tools/gen_test_char.o tools/gen_test_char.lo \
++ tools/gen_test_char.o \
+ include/private/apr_escape_test_char.h
+ DISTCLEAN_TARGETS = config.cache config.log config.status \
+ include/apr.h include/arch/unix/apr_private.h \
+@@ -131,13 +131,9 @@ check: $(TARGET_LIB)
+ etags:
+ etags `find . -name '*.[ch]'`
+
+-OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS)
+-tools/gen_test_char.lo: tools/gen_test_char.c
++tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
+ $(APR_MKDIR) tools
+- $(LT_COMPILE)
+-
+-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
+- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
+
+ include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
+ $(APR_MKDIR) include/private
+diff --git a/configure.in b/configure.in
+index 719f331..361120f 100644
+--- a/configure.in
++++ b/configure.in
+@@ -183,6 +183,9 @@ dnl can only be used once within a configure script, so this prevents a
+ dnl preload section from invoking the macro to get compiler info.
+ AC_PROG_CC
+
++dnl Check build CC for gen_test_char compiling which is executed at build time.
++AX_PROG_CC_FOR_BUILD
++
+ dnl AC_PROG_SED is only avaliable in recent autoconf versions.
+ dnl Use AC_CHECK_PROG instead if AC_PROG_SED is not present.
+ ifdef([AC_PROG_SED],
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch b/poky/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch
new file mode 100644
index 000000000..30fc07d4a
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr/0004-Fix-packet-discards-HTTP-redirect.patch
@@ -0,0 +1,39 @@
+From 7925eb1766a00ccee05c6e80b1d34f163a04b7b1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 09:43:34 +0800
+Subject: [PATCH 4/7] Fix packet discards HTTP redirect.
+
+Disconnect the connection by poll() timeout.
+If timeout=0 and apr_wait_for_io_or_timeout()=APR_TIMEUP then
+apr_socket_recv() returns EAGAIN.
+
+Upstream-Status: Pending
+
+Signed-off-by: Noriaki Yoshitane <yoshitane.nrs@cnt.ncos.nec.co.jp>
+Signed-off-by: Li Wang <li.wang@windriver.com>
+
+Rebase to 1.6.3
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ network_io/unix/sendrecv.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/network_io/unix/sendrecv.c b/network_io/unix/sendrecv.c
+index 4c0e0a6..1bdafba 100644
+--- a/network_io/unix/sendrecv.c
++++ b/network_io/unix/sendrecv.c
+@@ -85,6 +85,10 @@ apr_status_t apr_socket_recv(apr_socket_t *sock, char *buf, apr_size_t *len)
+ && (sock->timeout > 0)) {
+ do_select:
+ arv = apr_wait_for_io_or_timeout(NULL, sock, 1);
++ if ((arv == APR_TIMEUP) && (sock->timeout == 0)) {
++ *len = 0;
++ return EAGAIN;
++ }
+ if (arv != APR_SUCCESS) {
+ *len = 0;
+ return arv;
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch b/poky/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
new file mode 100644
index 000000000..02634e6fd
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr/0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
@@ -0,0 +1,36 @@
+From 2e66cece0c3adff92733332111204ddc1d730a07 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 19 Nov 2015 18:25:38 -0800
+Subject: [PATCH 5/7] configure.in: fix LTFLAGS to make it work with ccache
+
+When ccache is enabled, libtool requires --tag=CC when use ccache,
+otherwise when building apr-util with ccache enabled:
+
+| libtool: compile: unable to infer tagged configuration
+| libtool: error: specify a tag with '--tag'
+| libtool: compile: unable to infer tagged configuration
+| make[1]: *** [buckets/apr_buckets.lo] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 361120f..3b10422 100644
+--- a/configure.in
++++ b/configure.in
+@@ -249,7 +249,7 @@ case $host in
+ ;;
+ *)
+ if test "x$LTFLAGS" = "x"; then
+- LTFLAGS='--silent'
++ LTFLAGS='--silent --tag=CC'
+ fi
+ if test "$experimental_libtool" = "yes"; then
+ # Use a custom-made libtool replacement
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch b/poky/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
new file mode 100644
index 000000000..5f5e7eac3
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr/0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch
@@ -0,0 +1,78 @@
+From f4d6e45ed5d2ccffd1af4c2ccdf7099ba0dce137 Mon Sep 17 00:00:00 2001
+From: Dengke Du <dengke.du@windriver.com>
+Date: Wed, 14 Dec 2016 18:13:08 +0800
+Subject: [PATCH 6/7] apr: fix off_t size doesn't match in glibc when cross
+ compiling
+
+In configure.in, it contains the following:
+
+ APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
+
+the macro "APR_CHECK_SIZEOF_EXTENDED" was defined in build/apr_common.m4,
+it use the "AC_TRY_RUN" macro, this macro let the off_t to 8, when cross
+compiling enable.
+
+So it was hardcoded for cross compiling, we should detect it dynamic based on
+the sysroot's glibc. We change it to the following:
+
+ AC_CHECK_SIZEOF(off_t)
+
+The same for the following hardcoded types for cross compiling:
+
+ pid_t 8
+ ssize_t 8
+ size_t 8
+ off_t 8
+
+Change the above correspondingly.
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+
+Upstream-Status: Pending
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 3b10422..a227e72 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1769,7 +1769,7 @@ else
+ socklen_t_value="int"
+ fi
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], pid_t, 8)
++AC_CHECK_SIZEOF(pid_t)
+
+ if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then
+ pid_t_fmt='#define APR_PID_T_FMT "hd"'
+@@ -1838,7 +1838,7 @@ APR_CHECK_TYPES_COMPATIBLE(ssize_t, long, [ssize_t_fmt="ld"])
+ APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned int, [size_t_fmt="u"])
+ APR_CHECK_TYPES_COMPATIBLE(size_t, unsigned long, [size_t_fmt="lu"])
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
++AC_CHECK_SIZEOF(ssize_t)
+
+ AC_MSG_CHECKING([which format to use for apr_ssize_t])
+ if test -n "$ssize_t_fmt"; then
+@@ -1855,7 +1855,7 @@ fi
+
+ ssize_t_fmt="#define APR_SSIZE_T_FMT \"$ssize_t_fmt\""
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
++AC_CHECK_SIZEOF(size_t)
+
+ AC_MSG_CHECKING([which format to use for apr_size_t])
+ if test -n "$size_t_fmt"; then
+@@ -1872,7 +1872,7 @@ fi
+
+ size_t_fmt="#define APR_SIZE_T_FMT \"$size_t_fmt\""
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], off_t, 8)
++AC_CHECK_SIZEOF(off_t)
+
+ if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
+ # Enable LFS
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch b/poky/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch
new file mode 100644
index 000000000..8760b0140
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr/0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch
@@ -0,0 +1,50 @@
+From c6afc4a4a766478cb6aa6b43a50051881b6318d7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Fri, 3 Mar 2017 22:24:17 +0100
+Subject: [PATCH 7/7] explicitly link libapr against phtread to make gold happy
+ on test
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_init'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_settype'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutexattr_destroy'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_mutex_trylock'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_attr_setstacksize'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_create'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_join'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_detach'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_sigmask'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_once'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_create'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_getspecific'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_key_delete'
+| ../.libs/libapr-1.so: error: undefined reference to 'pthread_setspecific'
+| collect2: error: ld returned 1 exit status
+| Makefile:114: recipe for target 'globalmutexchild' failed
+| make[1]: *** [globalmutexchild] Error 1
+| make[1]: Leaving directory '/home/superandy/tmp/oe-core-glibc/work/cortexa7t2hf-neon-vfpv4-angstrom-linux-gnueabi/apr/1.5.2-r0/apr-1.5.2/test'
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ configure.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.in b/configure.in
+index a227e72..cbc0f90 100644
+--- a/configure.in
++++ b/configure.in
+@@ -784,6 +784,7 @@ else
+ APR_PTHREADS_CHECK_RESTORE ] )
+ fi
+ if test "$pthreadh" = "1"; then
++ APR_ADDTO(LIBS,[-lpthread])
+ APR_CHECK_PTHREAD_GETSPECIFIC_TWO_ARGS
+ APR_CHECK_PTHREAD_ATTR_GETDETACHSTATE_ONE_ARG
+ APR_CHECK_PTHREAD_RECURSIVE_MUTEX
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/apr/apr/run-ptest b/poky/meta/recipes-support/apr/apr/run-ptest
new file mode 100644
index 000000000..ae19a1d11
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr/run-ptest
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+cd test
+./testall |sed \
+ -e 's|\(.*\): SUCCESS|PASS: \1|' \
+ -e 's|\(.*\): FAILED|FAIL: \1|'
diff --git a/poky/meta/recipes-support/apr/apr_1.6.3.bb b/poky/meta/recipes-support/apr/apr_1.6.3.bb
new file mode 100644
index 000000000..87b878723
--- /dev/null
+++ b/poky/meta/recipes-support/apr/apr_1.6.3.bb
@@ -0,0 +1,117 @@
+SUMMARY = "Apache Portable Runtime (APR) library"
+HOMEPAGE = "http://apr.apache.org/"
+SECTION = "libs"
+DEPENDS = "util-linux"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4dfd4cd216828c8cae5de5a12f3844c8 \
+ file://include/apr_lib.h;endline=17;md5=ee42fa7575dc40580a9e01c1b75fae96"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.bz2 \
+ file://run-ptest \
+ file://0001-build-buildcheck.sh-improve-libtool-detection.patch \
+ file://0002-apr-Remove-workdir-path-references-from-installed-ap.patch \
+ file://0003-Makefile.in-configure.in-support-cross-compiling.patch \
+ file://0004-Fix-packet-discards-HTTP-redirect.patch \
+ file://0005-configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
+ file://0006-apr-fix-off_t-size-doesn-t-match-in-glibc-when-cross.patch \
+ file://0007-explicitly-link-libapr-against-phtread-to-make-gold-.patch \
+"
+
+SRC_URI[md5sum] = "12f2a349483ad6f12db49ba01fbfdbfa"
+SRC_URI[sha256sum] = "131f06d16d7aabd097fa992a33eec2b6af3962f93e6d570a9bd4d85e95993172"
+
+inherit autotools-brokensep lib_package binconfig multilib_header ptest
+
+OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+
+# Added to fix some issues with cmake. Refer to https://github.com/bmwcarit/meta-ros/issues/68#issuecomment-19896928
+CACHED_CONFIGUREVARS += "apr_cv_mutex_recursive=yes"
+
+# Also suppress trying to use sctp.
+#
+CACHED_CONFIGUREVARS += "ac_cv_header_netinet_sctp_h=no ac_cv_header_netinet_sctp_uio_h=no"
+
+CACHED_CONFIGUREVARS += "ac_cv_sizeof_struct_iovec=yes"
+CACHED_CONFIGUREVARS += "ac_cv_file__dev_zero=yes"
+
+# Otherwise libtool fails to compile apr-utils
+# x86_64-linux-libtool: compile: unable to infer tagged configuration
+# x86_64-linux-libtool: error: specify a tag with '--tag'
+CCACHE = ""
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_configure_prepend() {
+ # Avoid absolute paths for grep since it causes failures
+ # when using sstate between different hosts with different
+ # install paths for grep.
+ export GREP="grep"
+
+ cd ${S}
+ libtool='${HOST_SYS}-libtool' ./buildconf
+}
+
+FILES_${PN}-dev += "${libdir}/apr.exp ${datadir}/build-1/*"
+RDEPENDS_${PN}-dev += "bash"
+
+#for some reason, build/libtool.m4 handled by buildconf still be overwritten
+#when autoconf, so handle it again.
+do_configure_append() {
+ sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/libtool.m4
+ sed -i -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' ${S}/build/apr_rules.mk
+}
+
+do_install_append() {
+ oe_multilib_header apr.h
+ install -d ${D}${datadir}/apr
+}
+
+do_install_append_class-target() {
+ sed -i -e 's,${DEBUG_PREFIX_MAP},,g' \
+ -e 's,${STAGING_DIR_HOST},,g' ${D}${datadir}/build-1/apr_rules.mk
+ sed -i -e 's,${STAGING_DIR_HOST},,g' \
+ -e 's,APR_SOURCE_DIR=.*,APR_SOURCE_DIR=,g' \
+ -e 's,APR_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apr-1-config
+}
+
+SSTATE_SCAN_FILES += "apr_rules.mk libtool"
+
+SYSROOT_PREPROCESS_FUNCS += "apr_sysroot_preprocess"
+
+apr_sysroot_preprocess () {
+ d=${SYSROOT_DESTDIR}${datadir}/apr
+ install -d $d/
+ cp ${S}/build/apr_rules.mk $d/
+ sed -i s,apr_builddir=.*,apr_builddir=,g $d/apr_rules.mk
+ sed -i s,apr_builders=.*,apr_builders=,g $d/apr_rules.mk
+ sed -i s,LIBTOOL=.*,LIBTOOL=${HOST_SYS}-libtool,g $d/apr_rules.mk
+ sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g $d/apr_rules.mk
+ cp ${S}/build/mkdir.sh $d/
+ cp ${S}/build/make_exports.awk $d/
+ cp ${S}/build/make_var_export.awk $d/
+ cp ${S}/${HOST_SYS}-libtool ${SYSROOT_DESTDIR}${datadir}/build-1/libtool
+}
+
+do_compile_ptest() {
+ cd ${S}/test
+ oe_runmake
+}
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}/test
+ mkdir -p $t/.libs
+ cp -r ${S}/test/data $t/
+ cp -r ${S}/test/.libs/*.so $t/.libs/
+ cp ${S}/test/proc_child $t/
+ cp ${S}/test/readchild $t/
+ cp ${S}/test/sockchild $t/
+ cp ${S}/test/sockperf $t/
+ cp ${S}/test/testall $t/
+ cp ${S}/test/tryread $t/
+}
+
+export CONFIG_SHELL="/bin/bash"
diff --git a/poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb b/poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
new file mode 100644
index 000000000..21bbcab3d
--- /dev/null
+++ b/poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
@@ -0,0 +1,32 @@
+# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Glibc hierarchical argument parsing standalone library"
+HOMEPAGE = "http://www.lysator.liu.se/~nisse/misc/"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://argp.h;beginline=1;endline=20;md5=008b7e53dea6f9e1d9fdef0d9cf3184a"
+SECTION = "libs"
+
+SRC_URI = "http://www.lysator.liu.se/~nisse/misc/argp-standalone-${PV}.tar.gz \
+ file://0001-throw-in-funcdef.patch \
+ file://0002-isprint.patch \
+ file://out_of_tree_build.patch \
+ "
+SRC_URI[md5sum] = "720704bac078d067111b32444e24ba69"
+SRC_URI[sha256sum] = "dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be"
+
+inherit autotools
+
+CFLAGS += "-fPIC -U__OPTIMIZE__"
+
+RDEPENDS_${PN}-dev = ""
+RDEPENDS_${PN}-staticdev = ""
+
+do_install() {
+ install -D -m 0644 ${B}/libargp.a ${D}${libdir}/libargp.a
+ install -D -m 0644 ${S}/argp.h ${D}${includedir}/argp.h
+}
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
diff --git a/poky/meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch b/poky/meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch
new file mode 100644
index 000000000..a6e2759c5
--- /dev/null
+++ b/poky/meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch
@@ -0,0 +1,84 @@
+# --- T2-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+#
+# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone
+# Copyright (C) 2006 The T2 SDE Project
+#
+# More information can be found in the files COPYING and README.
+#
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
+# of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+# --- T2-COPYRIGHT-NOTE-END ---
+
+
+No __THROW in function implementation.
+ --jsaw
+
+Taken from buildroot
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100
++++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100
+@@ -560,17 +560,17 @@
+ # endif
+
+ # ifndef ARGP_EI
+-# define ARGP_EI extern __inline__
++# define ARGP_EI extern inline
+ # endif
+
+ ARGP_EI void
+-__argp_usage (__const struct argp_state *__state) __THROW
++__argp_usage (__const struct argp_state *__state)
+ {
+ __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+ }
+
+ ARGP_EI int
+-__option_is_short (__const struct argp_option *__opt) __THROW
++__option_is_short (__const struct argp_option *__opt)
+ {
+ if (__opt->flags & OPTION_DOC)
+ return 0;
+@@ -582,7 +582,7 @@
+ }
+
+ ARGP_EI int
+-__option_is_end (__const struct argp_option *__opt) __THROW
++__option_is_end (__const struct argp_option *__opt)
+ {
+ return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+ }
+--- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100
++++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100
+@@ -1290,13 +1290,13 @@
+ /* Defined here, in case a user is not inlining the definitions in
+ * argp.h */
+ void
+-__argp_usage (__const struct argp_state *__state) __THROW
++__argp_usage (__const struct argp_state *__state)
+ {
+ __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+ }
+
+ int
+-__option_is_short (__const struct argp_option *__opt) __THROW
++__option_is_short (__const struct argp_option *__opt)
+ {
+ if (__opt->flags & OPTION_DOC)
+ return 0;
+@@ -1310,7 +1310,7 @@
+ }
+
+ int
+-__option_is_end (__const struct argp_option *__opt) __THROW
++__option_is_end (__const struct argp_option *__opt)
+ {
+ return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+ }
diff --git a/poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch b/poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch
new file mode 100644
index 000000000..1c07eea3c
--- /dev/null
+++ b/poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch
@@ -0,0 +1,51 @@
+Subject: restrict value range passed to isprint function
+
+According to C standards isprint argument shall be representable as an
+unsigned char or be equal to EOF, otherwise the behaviour is undefined.
+
+Passing arbitrary ints leads to segfault in nm program from elfutils.
+
+Restrict isprint argument range to values representable by unsigned char.
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+
+Taken from buildroot
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+Index: b/argp.h
+===================================================================
+--- a/argp.h
++++ b/argp.h
+@@ -23,6 +23,7 @@
+
+ #include <stdio.h>
+ #include <ctype.h>
++#include <limits.h>
+
+ #define __need_error_t
+ #include <errno.h>
+@@ -577,7 +578,7 @@
+ else
+ {
+ int __key = __opt->key;
+- return __key > 0 && isprint (__key);
++ return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
+ }
+ }
+
+Index: b/argp-parse.c
+===================================================================
+--- a/argp-parse.c
++++ b/argp-parse.c
+@@ -1292,7 +1292,7 @@
+ int __key = __opt->key;
+ /* FIXME: whether or not a particular key implies a short option
+ * ought not to be locale dependent. */
+- return __key > 0 && isprint (__key);
++ return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
+ }
+ }
+
diff --git a/poky/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch b/poky/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch
new file mode 100644
index 000000000..b7777cbd9
--- /dev/null
+++ b/poky/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch
@@ -0,0 +1,19 @@
+Fix the testsuite to built out of tree
+in OE S != B
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: argp-standalone-1.3/testsuite/Makefile.am
+===================================================================
+--- argp-standalone-1.3.orig/testsuite/Makefile.am
++++ argp-standalone-1.3/testsuite/Makefile.am
+@@ -5,7 +5,8 @@ TS_ALL = $(TS_PROGS) $(TS_SH)
+
+ noinst_PROGRAMS = $(TS_PROGS) ex1 ex3 ex4
+
+-LDADD = ../libargp.a
++AM_CPPFLAGS = -I$(top_srcdir)
++LDADD = $(top_builddir)/libargp.a
+
+ EXTRA_DIST = $(TS_SH) run-tests
+ CLEANFILES = test.out
diff --git a/poky/meta/recipes-support/aspell/aspell/gcc7.patch b/poky/meta/recipes-support/aspell/aspell/gcc7.patch
new file mode 100644
index 000000000..6ffd0772f
--- /dev/null
+++ b/poky/meta/recipes-support/aspell/aspell/gcc7.patch
@@ -0,0 +1,40 @@
+From 8089fa02122fed0a6394eba14bbedcb1d18e2384 Mon Sep 17 00:00:00 2001
+From: Kevin Atkinson <kevina@gnu.org>
+Date: Thu, 29 Dec 2016 00:50:31 -0500
+Subject: [PATCH] Compile Fixes for GCC 7.
+
+Closes #519.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ modules/filter/tex.cpp | 2 +-
+ prog/check_funs.cpp | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp
+index a979539..19ab63c 100644
+--- a/modules/filter/tex.cpp
++++ b/modules/filter/tex.cpp
+@@ -174,7 +174,7 @@ namespace {
+
+ if (c == '{') {
+
+- if (top.in_what == Parm || top.in_what == Opt || top.do_check == '\0')
++ if (top.in_what == Parm || top.in_what == Opt || *top.do_check == '\0')
+ push_command(Parm);
+
+ top.in_what = Parm;
+diff --git a/prog/check_funs.cpp b/prog/check_funs.cpp
+index db54f3d..89ee09d 100644
+--- a/prog/check_funs.cpp
++++ b/prog/check_funs.cpp
+@@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * word, int width) {
+ }
+ }
+ if (i == width-1) {
+- if (word == '\0')
++ if (*word == '\0')
+ put(out,' ');
+ else if (word[len] == '\0')
+ put(out, word, len);
diff --git a/poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb b/poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb
new file mode 100644
index 000000000..19a7155d6
--- /dev/null
+++ b/poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb
@@ -0,0 +1,31 @@
+SUMMARY = "GNU Aspell spell-checker"
+SECTION = "console/utils"
+
+LICENSE = "LGPLv2 | LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+PR = "r1"
+
+SRC_URI = "${GNU_MIRROR}/aspell/aspell-${PV}.tar.gz \
+ file://gcc7.patch \
+ "
+SRC_URI[md5sum] = "e66a9c9af6a60dc46134fdacf6ce97d7"
+SRC_URI[sha256sum] = "f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses"
+
+PACKAGES += "libaspell libpspell aspell-utils"
+
+RDEPENDS_${PN}-utils += "perl"
+
+FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
+FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
+FILES_${PN} = "${bindir}/aspell"
+FILES_libpspell = "${libdir}/libpspell.so.*"
+FILES_${PN}-dev += "${bindir}/pspell-config"
+
+ARM_INSTRUCTION_SET = "arm"
+inherit autotools-brokensep gettext texinfo binconfig-disabled
+
+BINCONFIG = "${bindir}/pspell-config"
diff --git a/poky/meta/recipes-support/atk/at-spi2-atk_2.26.1.bb b/poky/meta/recipes-support/atk/at-spi2-atk_2.26.1.bb
new file mode 100644
index 000000000..8617bb871
--- /dev/null
+++ b/poky/meta/recipes-support/atk/at-spi2-atk_2.26.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "AT-SPI 2 Toolkit Bridge"
+HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "eeec6cead3350dca48a235271c105b3e"
+SRC_URI[sha256sum] = "b4f0c27b61dbffba7a5b5ba2ff88c8cee10ff8dac774fa5b79ce906853623b75"
+
+DEPENDS = "dbus glib-2.0 glib-2.0-native atk at-spi2-core"
+
+inherit autotools pkgconfig distro_features_check upstream-version-is-even
+
+# The at-spi2-core requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
+
+FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
+FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
diff --git a/poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch b/poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
new file mode 100644
index 000000000..1f8c9f374
--- /dev/null
+++ b/poky/meta/recipes-support/atk/at-spi2-core/0001-build-Add-with-systemduserunitdir.patch
@@ -0,0 +1,52 @@
+From fa376762b92404b9e3c430054b8c3341ca0fdd8b Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 21 Jun 2016 16:00:02 +0300
+Subject: [PATCH] build: Add --with-systemduserunitdir
+
+Default to "pkg-config --variable=systemduserunitdir systemd" but
+allow overriding the value.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=767911]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+---
+ bus/Makefile.am | 2 +-
+ configure.ac | 9 +++++++++
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/bus/Makefile.am b/bus/Makefile.am
+index 688f82a..10cde62 100644
+--- a/bus/Makefile.am
++++ b/bus/Makefile.am
+@@ -29,7 +29,7 @@ org.a11y.Bus.service: org.a11y.Bus.service.in
+ EXTRA_DIST += org.a11y.Bus.service.in
+ CLEANFILES += org.a11y.Bus.service
+
+-systemd_userdir = $(prefix)/lib/systemd/user
++systemd_userdir = $(systemduserunitdir)
+ systemd_user_DATA = at-spi-dbus-bus.service
+ at-spi-dbus-bus.service: at-spi-dbus-bus.service.in Makefile
+ $(AM_V_GEN) $(SED) -e $(substitutions) $< > $@.tmp && mv $@.tmp $@
+diff --git a/configure.ac b/configure.ac
+index 8c4fca2..1415cca 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -146,6 +146,15 @@ else
+ fi
+ AC_SUBST(DBUS_SERVICES_DIR)
+
++AC_ARG_WITH([systemduserunitdir],
++ AS_HELP_STRING([--with-systemduserunitdir=DIR],
++ [Directory for systemd service files]),
++ [],
++ [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)])
++AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
++
++AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
++
+ GOBJECT_INTROSPECTION_CHECK([1.32.0])
+
+ AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
+--
+2.14.1
+
diff --git a/poky/meta/recipes-support/atk/at-spi2-core_2.26.2.bb b/poky/meta/recipes-support/atk/at-spi2-core_2.26.2.bb
new file mode 100644
index 000000000..521ee3b96
--- /dev/null
+++ b/poky/meta/recipes-support/atk/at-spi2-core_2.26.2.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
+HOMEPAGE = "https://wiki.linuxfoundation.org/accessibility/d-bus"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+ file://0001-build-Add-with-systemduserunitdir.patch \
+ "
+
+SRC_URI[md5sum] = "4a042e4c801fdb793788b749eab21485"
+SRC_URI[sha256sum] = "c80e0cdf5e3d713400315b63c7deffa561032a6c37289211d8afcfaa267c2615"
+
+DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst"
+
+inherit autotools gtk-doc gettext systemd pkgconfig distro_features_check upstream-version-is-even gobject-introspection
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = " \
+ --with-systemduserunitdir=${systemd_user_unitdir} \
+ --with-dbus-daemondir=${bindir}"
+
+FILES_${PN} += "${datadir}/dbus-1/services/*.service \
+ ${datadir}/dbus-1/accessibility-services/*.service \
+ ${datadir}/defaults/at-spi2 \
+ ${systemd_user_unitdir}/at-spi-dbus-bus.service \
+ "
diff --git a/poky/meta/recipes-support/atk/atk_2.26.1.bb b/poky/meta/recipes-support/atk/atk_2.26.1.bb
new file mode 100644
index 000000000..685b5991d
--- /dev/null
+++ b/poky/meta/recipes-support/atk/atk_2.26.1.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Accessibility toolkit for GNOME"
+HOMEPAGE = "http://live.gnome.org/GAP/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/libs"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
+ file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
+
+DEPENDS = "glib-2.0"
+
+inherit gnomebase gtk-doc gettext upstream-version-is-even gobject-introspection
+
+SRC_URI[archive.md5sum] = "7cddcc313b9a3efd19b2ddf079ba68f5"
+SRC_URI[archive.sha256sum] = "ef00ff6b83851dddc8db38b4d9faeffb99572ba150b0664ee02e46f015ea97cb"
+
+BBCLASSEXTEND = "native"
+
diff --git a/poky/meta/recipes-support/attr/acl/Makefile-libacl-should-depend-on-include.patch b/poky/meta/recipes-support/attr/acl/Makefile-libacl-should-depend-on-include.patch
new file mode 100644
index 000000000..4c7cba3b8
--- /dev/null
+++ b/poky/meta/recipes-support/attr/acl/Makefile-libacl-should-depend-on-include.patch
@@ -0,0 +1,51 @@
+From d82457ce5ca7455e336da5e244d95f90e52aaef8 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 18 Apr 2017 01:17:26 -0700
+Subject: [PATCH] Makefile: libacl should depend on include
+
+Fixed race issue:
+ In file included from acl_copy_entry.c:22:0:
+ libacl.h:19:21: fatal error: sys/acl.h: No such file or directory
+ #include <sys/acl.h>
+
+[snip]
+
+ compilation terminated.
+ acl_get_file.c:27:24: fatal error: acl/libacl.h: No such file or directory
+ #include <acl/libacl.h>
+ ^
+
+The acl.h is in "include" directory, and include/Makefile creates
+symlink "sys" and "acl" poinst to current dirctory:
+$ ls include/ -l
+acl -> .
+sys -> .
+
+So if "libacl" target runs before "include", the error would happen
+since no "acl" or "sys" directory.
+
+Let libacl depend on include can fix the problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index dce32d3..8a79379 100644
+--- a/Makefile
++++ b/Makefile
+@@ -48,7 +48,7 @@ else
+ endif
+
+ # tool/lib dependencies
+-libacl: libmisc
++libacl: include libmisc
+ getfacl setfacl chacl: libacl
+
+ ifeq ($(HAVE_BUILDDEFS), yes)
+--
+2.10.2
+
diff --git a/poky/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch b/poky/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch
new file mode 100644
index 000000000..cf765fdbb
--- /dev/null
+++ b/poky/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch
@@ -0,0 +1,198 @@
+acl: fix the order of expected output of getfacl
+
+The result of getfacl is sorted by user id.
+In Centos or RHEL, bin user id is 1 and daemon user id is 2.
+But in our image, bin user id is 2 and daemon user id is 1.
+The patch fixes this issue to make ptest pass.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ test/misc.test | 38 +++++++++++++++++++-------------------
+ 1 file changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/test/misc.test b/test/misc.test
+index 6e98053..53ae5b0 100644
+--- a/test/misc.test
++++ b/test/misc.test
+@@ -79,8 +79,8 @@ Multiple users
+
+ $ getfacl --omit-header f
+ > user::rw-
+- > user:bin:rw-
+ > user:daemon:r--
++ > user:bin:rw-
+ > group::r--
+ > mask::rw-
+ > other::r--
+@@ -94,8 +94,8 @@ Multiple groups
+
+ $ getfacl --omit-header f
+ > user::rw-
+- > user:bin:rw-
+ > user:daemon:r--
++ > user:bin:rw-
+ > group::r--
+ > group:daemon:r--
+ > group:users:rw-
+@@ -111,8 +111,8 @@ Remove one group
+
+ $ getfacl --omit-header f
+ > user::rw-
+- > user:bin:rw-
+ > user:daemon:r--
++ > user:bin:rw-
+ > group::r--
+ > group:daemon:r--
+ > mask::rw-
+@@ -146,8 +146,8 @@ Default ACL
+
+ $ getfacl --omit-header d
+ > user::rwx
+- > user:bin:rwx
+ > user:daemon:rw-
++ > user:bin:rwx
+ > group::r-x
+ > mask::rwx
+ > other::---
+@@ -236,16 +236,16 @@ Add some users and groups
+
+ $ getfacl --omit-header d/d
+ > user::rwx
+- > user:bin:rwx #effective:r-x
+ > user:daemon:r-x
++ > user:bin:rwx #effective:r-x
+ > group::r-x
+ > group:daemon:rwx #effective:r-x
+ > group:users:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:rwx #effective:r-x
+ > default:user:daemon:r-x
++ > default:user:bin:rwx #effective:r-x
+ > default:group::r-x
+ > default:mask::r-x
+ > default:other::---
+@@ -262,16 +262,16 @@ Symlink in directory with default ACL?
+
+ $ getfacl --omit-header d/l
+ > user::rwx
+- > user:bin:rwx #effective:r-x
+ > user:daemon:r-x
++ > user:bin:rwx #effective:r-x
+ > group::r-x
+ > group:daemon:rwx #effective:r-x
+ > group:users:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:rwx #effective:r-x
+ > default:user:daemon:r-x
++ > default:user:bin:rwx #effective:r-x
+ > default:group::r-x
+ > default:mask::r-x
+ > default:other::---
+@@ -287,16 +287,16 @@ Does mask manipulation work?
+
+ $ getfacl --omit-header d/d
+ > user::rwx
+- > user:bin:r-x
+ > user:daemon:r-x
++ > user:bin:r-x
+ > group::r-x
+ > group:daemon:r-x
+ > group:users:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:rwx #effective:r-x
+ > default:user:daemon:r-x
++ > default:user:bin:rwx #effective:r-x
+ > default:group::r-x
+ > default:mask::r-x
+ > default:other::---
+@@ -308,16 +308,16 @@ Does mask manipulation work?
+
+ $ getfacl --omit-header d/d
+ > user::rwx
+- > user:bin:r-x
+ > user:daemon:r-x
++ > user:bin:r-x
+ > group::r-x
+ > group:daemon:r-x
+ > group:users:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:rwx
+ > default:user:daemon:r-x
++ > default:user:bin:rwx
+ > default:group::r-x
+ > default:mask::rwx
+ > default:other::---
+@@ -333,8 +333,8 @@ Remove the default ACL
+
+ $ getfacl --omit-header d
+ > user::rwx
+- > user:bin:rwx
+ > user:daemon:rw-
++ > user:bin:rwx
+ > group::r-x
+ > mask::rwx
+ > other::---
+@@ -373,14 +373,14 @@ Now, chmod should change the group_obj entry
+
+ $ getfacl --omit-header d
+ > user::rwx
+- > user:bin:r-x
+ > user:daemon:rwx
++ > user:bin:r-x
+ > group::rwx
+ > mask::rwx
+ > other::r-x
+ > default:user::rwx
+- > default:user:bin:r-x
+ > default:user:daemon:rwx
++ > default:user:bin:r-x
+ > default:group::rwx
+ > default:mask::rwx
+ > default:other::r-x
+@@ -392,14 +392,14 @@ Now, chmod should change the group_obj entry
+
+ $ getfacl --omit-header d
+ > user::rwx
+- > user:bin:r-x
+ > user:daemon:rwx #effective:r-x
++ > user:bin:r-x
+ > group::rwx #effective:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:r-x
+ > default:user:daemon:rwx
++ > default:user:bin:r-x
+ > default:group::rwx
+ > default:mask::rwx
+ > default:other::r-x
+@@ -411,14 +411,14 @@ Now, chmod should change the group_obj entry
+
+ $ getfacl --omit-header d
+ > user::rwx
+- > user:bin:r-x
+ > user:daemon:rwx #effective:r-x
++ > user:bin:r-x
+ > group::rwx #effective:r-x
+ > mask::r-x
+ > other::---
+ > default:user::rwx
+- > default:user:bin:r-x
+ > default:user:daemon:rwx
++ > default:user:bin:r-x
+ > default:group::rwx
+ > default:mask::rwx
+ > default:other::r-x
+--
+1.7.9.5
+
diff --git a/poky/meta/recipes-support/attr/acl/configure.ac b/poky/meta/recipes-support/attr/acl/configure.ac
new file mode 100644
index 000000000..7af2e8d88
--- /dev/null
+++ b/poky/meta/recipes-support/attr/acl/configure.ac
@@ -0,0 +1,49 @@
+# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+AC_INIT(include/acl.h)
+AC_CONFIG_AUX_DIR([.])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_HEADER(include/config.h)
+AC_PREFIX_DEFAULT(/usr)
+
+AC_PROG_LIBTOOL
+
+AC_ARG_ENABLE(shared,
+[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
+ enable_shared=yes)
+AC_SUBST(enable_shared)
+
+AC_ARG_ENABLE(gettext,
+[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
+ enable_gettext=yes)
+AC_SUBST(enable_gettext)
+
+AC_ARG_ENABLE(lib64,
+[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
+ enable_lib64=no)
+AC_SUBST(enable_lib64)
+
+AC_PACKAGE_GLOBALS(acl)
+AC_PACKAGE_UTILITIES(acl)
+AC_PACKAGE_NEED_ATTR_XATTR_H
+AC_PACKAGE_NEED_ATTR_ERROR_H
+AC_MULTILIB($enable_lib64)
+AC_PACKAGE_NEED_GETXATTR_LIBATTR
+AC_MANUAL_FORMAT
+
+AC_FUNC_GCC_VISIBILITY
+
+AC_OUTPUT(include/builddefs)
diff --git a/poky/meta/recipes-support/attr/acl/run-ptest b/poky/meta/recipes-support/attr/acl/run-ptest
new file mode 100644
index 000000000..a56946d8e
--- /dev/null
+++ b/poky/meta/recipes-support/attr/acl/run-ptest
@@ -0,0 +1,64 @@
+#!/bin/sh
+#
+#This script is used to run acl test suites
+
+#umask 077
+
+EXT3_IMAGE=ext3.img
+EXT3_MOUNT_POINT=/mnt/ext3
+
+trap 'rm -f ${EXT3_IMAGE}' EXIT
+
+dd if=/dev/zero of=${EXT3_IMAGE} bs=1M count=1
+if [ "$?" -eq 0 ]; then
+ echo "PASS: dump ext3.img"
+else
+ echo "FAIL: dump ext3.img"
+ exit 1
+fi
+
+mkfs.ext3 -F ${EXT3_IMAGE}
+if [ "$?" -eq 0 ]; then
+ echo "PASS: mkfs.ext3 -F ext3.img"
+else
+ echo "FAIL: mkfs.ext3 -F ext3.img"
+ exit 1
+fi
+
+if [ -d $EXT3_MOUNT_POINT ]; then
+ echo "mount point exist"
+else
+ mkdir -p $EXT3_MOUNT_POINT
+fi
+
+
+mount -o loop,rw,acl ${EXT3_IMAGE} $EXT3_MOUNT_POINT
+if [ "$?" -eq 0 ]; then
+ echo "PASS: mount ext3.img"
+else
+ echo "FAIL: mount ext3.img"
+ exit 1
+fi
+
+cp -rf ./test/ $EXT3_MOUNT_POINT
+
+cd $EXT3_MOUNT_POINT/test/
+
+if sed -e 's!^bin:x:2:$!bin:x:2:daemon!' < /etc/group > gtmp
+then if cp /etc/group group.orig;
+ then cp gtmp /etc/group
+ make -k tests root-tests | sed \
+ -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
+ -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
+ cp group.orig /etc/group
+ else echo "FAIL: couldn't save original group file."
+ exit 1
+ fi
+else echo "FAIL: couldn't create modified group file."
+ exit 1
+fi
+
+cd -
+umount $EXT3_MOUNT_POINT
+rm -rf $EXT3_MOUNT_POINT
+rm $EXT3_IMAGE
diff --git a/poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch b/poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch
new file mode 100644
index 000000000..e64990ad5
--- /dev/null
+++ b/poky/meta/recipes-support/attr/acl/test-fix-directory-permissions.patch
@@ -0,0 +1,37 @@
+From 311589fedf196168382d8f0db303ab328bcf9d83 Mon Sep 17 00:00:00 2001
+From: Peter Seebach <peter.seebach@windriver.com>
+Date: Wed, 11 May 2016 15:16:06 -0500
+Subject: [PATCH] acl.inc, run-ptest: improve ptest functionality on limited
+
+commit c45bae84817a70fef6c2b661a07a492a0d23ae85
+
+ Fix permissions on temporary directory
+
+ The temporary directory's permissions have to allow other users to
+ view the directory. A default umask of 022 is common, but not mandatory,
+ and secure systems may have more restrictive defaults.
+
+ Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
+
+Upstream-Status: Backport [ http://git.savannah.gnu.org/cgit/acl.git/commit/?id=c6772a958800de064482634f77c20a0faafc5af6 ]
+
+Signed-off-by: Dengke Du <dengke.du@windriver.com>
+---
+ test/root/permissions.test | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test/root/permissions.test b/test/root/permissions.test
+index 42615f5..098b52a 100644
+--- a/test/root/permissions.test
++++ b/test/root/permissions.test
+@@ -16,6 +16,7 @@ Cry immediately if we are not running as root.
+ First, set up a temporary directory and create a regular file with
+ defined permissions.
+
++ $ umask 022
+ $ mkdir d
+ $ cd d
+ $ umask 027
+--
+2.8.1
+
diff --git a/poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch b/poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
new file mode 100644
index 000000000..f392465b5
--- /dev/null
+++ b/poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
@@ -0,0 +1,100 @@
+From e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Mon, 20 May 2013 16:38:06 +0200
+Subject: [PATCH] test: fix insufficient quoting of '\'
+
+This is a follow-up to 7f2c91b8369242a8dbc2b304a5b71b2a85f5b855, which
+caused sbits-restore.test to fail in the following way in case SELinux
+was disabled:
+
+*** sbits-restore.test ***
+[3] $ umask 022 -- ok
+[4] $ mkdir d -- ok
+[5] $ touch d/g -- ok
+[6] $ touch d/u -- ok
+[7] $ chmod u+s d/u -- ok
+[8] $ chmod g+s d/g -- ok
+[9] $ chmod +t d -- ok
+[10] $ getfacl -R d > d.acl -- ok
+[11] $ rm -R d -- ok
+[12] $ mkdir d -- ok
+[13] $ touch d/g -- ok
+[14] $ touch d/u -- ok
+[15] $ setfacl --restore d.acl -- ok
+[16] $ ls -dl d | awk '{print $1}' | sed 's/.$//g' -- failed
+drwxr-xr- != drwxr-xr-t
+[18] $ ls -dl d/u | awk '{print $1}' | sed 's/.$//g' -- failed
+-rwSr--r- != -rwSr--r--
+[20] $ ls -dl d/g | awk '{print $1}' | sed 's/.$//g' -- failed
+-rw-r-Sr- != -rw-r-Sr--
+[22] $ rm -Rf d -- ok
+17 commands (14 passed, 3 failed)
+
+Upstream-Status: Backport
+http://git.savannah.gnu.org/cgit/acl.git/commit/?id=e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+
+Index: acl-2.2.52/test/cp.test
+===================================================================
+--- acl-2.2.52.orig/test/cp.test
++++ acl-2.2.52/test/cp.test
+@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if
+ > -rw-rw-r--+
+
+ $ cp f g
+- $ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
++ $ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g'
+ > -rw-r--r--
+
+ $ rm g
+Index: acl-2.2.52/test/misc.test
+===================================================================
+--- acl-2.2.52.orig/test/misc.test
++++ acl-2.2.52/test/misc.test
+@@ -254,7 +254,7 @@ Add some users and groups
+ Symlink in directory with default ACL?
+
+ $ ln -s d d/l
+- $ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g'
+ > lrwxrwxrwx
+
+ $ ls -dl -L d/l | awk '{print $1}'
+@@ -343,7 +343,7 @@ Remove the default ACL
+ Reset to base entries
+
+ $ setfacl -b d
+- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+ > drwxr-x---
+
+ $ getfacl --omit-header d
+@@ -355,7 +355,7 @@ Reset to base entries
+ Now, chmod should change the group_obj entry
+
+ $ chmod 775 d
+- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+ > drwxrwxr-x
+
+ $ getfacl --omit-header d
+Index: acl-2.2.52/test/sbits-restore.test
+===================================================================
+--- acl-2.2.52.orig/test/sbits-restore.test
++++ acl-2.2.52/test/sbits-restore.test
+@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via -
+ $ touch d/g
+ $ touch d/u
+ $ setfacl --restore d.acl
+- $ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+ > drwxr-xr-t
+- $ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d/u | awk '{print $1}' | sed 's/\\.$//g'
+ > -rwSr--r--
+- $ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
++ $ ls -dl d/g | awk '{print $1}' | sed 's/\\.$//g'
+ > -rw-r-Sr--
+ $ rm -Rf d
diff --git a/poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch b/poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch
new file mode 100644
index 000000000..8cc11a63e
--- /dev/null
+++ b/poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch
@@ -0,0 +1,84 @@
+From d2f49ee6fe4850b8dda5b08676b36201d3c43710 Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Wed, 2 Mar 2016 15:46:57 +0800
+Subject: [PATCH] test: fixups on SELinux machines for root testcases
+
+ls adds a '.' at the end of the permission field list on SELinux
+machines, filter this out so root tests work on SELinux machines.
+
+Upstream-Status: Accepted
+http://git.savannah.gnu.org/cgit/acl.git/commit/?id=26a87d36f80d5e98bccb5878834d9e69dadfe3e9
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ test/root/permissions.test | 8 ++++----
+ test/root/restore.test | 2 +-
+ test/root/setfacl.test | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/test/root/permissions.test b/test/root/permissions.test
+index 9b9e3de..665339a 100644
+--- a/test/root/permissions.test
++++ b/test/root/permissions.test
+@@ -19,7 +19,7 @@ defined permissions.
+ $ cd d
+ $ umask 027
+ $ touch f
+- $ ls -l f | awk -- '{ print $1, $3, $4 }'
++ $ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ > -rw-r----- root root
+
+
+@@ -39,7 +39,7 @@ Now, change the ownership of the file to bin:bin and verify that this
+ gives user bin write access.
+
+ $ chown bin:bin f
+- $ ls -l f | awk -- '{ print $1, $3, $4 }'
++ $ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ > -rw-r----- bin bin
+ $ su bin
+ $ echo bin >> f
+@@ -256,12 +256,12 @@ directories if the file has an ACL and only CAP_FOWNER would grant them.
+ $ mkdir -m 600 x
+ $ chown daemon:daemon x
+ $ echo j > x/j
+- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
++ $ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ > -rw-r----- root root
+
+ $ setfacl -m u:daemon:r x
+
+- $ ls -l x/j | awk -- '{ print $1, $3, $4 }'
++ $ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ > -rw-r----- root root
+ (With the bug this gives: `ls: x/j: Permission denied'.)
+
+diff --git a/test/root/restore.test b/test/root/restore.test
+index 63a9d01..c85097c 100644
+--- a/test/root/restore.test
++++ b/test/root/restore.test
+@@ -21,7 +21,7 @@ Cry immediately if we are not running as root.
+ $ chown bin passwd
+ $ chmod u+s passwd
+ $ setfacl --restore passwd.acl
+- $ ls -dl passwd | awk '{print $1 " " $3 " " $4}'
++ $ ls -dl passwd | awk '{print $1 " " $3 " " $4}' | sed 's/\\.//g'
+ > -rwsr-xr-x root root
+
+ $ rm passwd passwd.acl
+diff --git a/test/root/setfacl.test b/test/root/setfacl.test
+index a46a9f4..7efbad7 100644
+--- a/test/root/setfacl.test
++++ b/test/root/setfacl.test
+@@ -12,7 +12,7 @@ Cry immediately if we are not running as root.
+ $ sg bin
+ $ umask 027
+ $ touch g
+- $ ls -dl g | awk '{print $1}'
++ $ ls -dl g | awk '{print $1}' | sed 's/\\.//g'
+ > -rw-r-----
+
+ $ setfacl -m m:- g
+--
+1.9.1
+
diff --git a/poky/meta/recipes-support/attr/acl_2.2.52.bb b/poky/meta/recipes-support/attr/acl_2.2.52.bb
new file mode 100644
index 000000000..8f3dc45cf
--- /dev/null
+++ b/poky/meta/recipes-support/attr/acl_2.2.52.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Utilities for managing POSIX Access Control Lists"
+HOMEPAGE = "http://savannah.nongnu.org/projects/acl/"
+SECTION = "libs"
+
+LICENSE = "LGPLv2.1+ & GPLv2+"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_lib${BPN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
+ file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
+
+DEPENDS = "attr"
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.src.tar.gz \
+ file://configure.ac;subdir=${S} \
+ file://run-ptest \
+ file://acl-fix-the-order-of-expected-output-of-getfacl.patch \
+ file://test-fix-insufficient-quoting-of.patch \
+ file://test-fixups-on-SELinux-machines-for-root-testcases.patch \
+ file://test-fix-directory-permissions.patch \
+ file://Makefile-libacl-should-depend-on-include.patch \
+"
+
+SRC_URI[md5sum] = "a61415312426e9c2212bd7dc7929abda"
+SRC_URI[sha256sum] = "179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23"
+
+require ea-acl.inc
+
+# avoid RPATH hardcode to staging dir
+do_configure_append() {
+ sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
+ ${S}/config.status
+}
+
+# libdir should point to .la
+do_install_append() {
+ sed -i ${D}${libdir}/libacl.la -e \
+ s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
+}
+
+inherit ptest
+
+do_install_ptest() {
+ tar -c --exclude=nfs test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ mkdir ${D}${PTEST_PATH}/include
+ cp ${S}/include/builddefs ${S}/include/buildmacros ${S}/include/buildrules ${D}${PTEST_PATH}/include/
+ # Remove any build host references
+ sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -i ${D}${PTEST_PATH}/include/builddefs
+}
+
+RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/attr/attr.inc b/poky/meta/recipes-support/attr/attr.inc
new file mode 100644
index 000000000..24ef5adfd
--- /dev/null
+++ b/poky/meta/recipes-support/attr/attr.inc
@@ -0,0 +1,45 @@
+SUMMARY = "Utilities for manipulating filesystem extended attributes"
+HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
+SECTION = "libs"
+
+DEPENDS = "virtual/libintl"
+
+LICENSE = "LGPLv2.1+ & GPLv2+"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_lib${BPN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \
+ file://attr/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
+ file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb"
+
+SRC_URI = "${SAVANNAH_GNU_MIRROR}/attr/${BP}.src.tar.gz \
+ file://run-ptest \
+"
+
+require ea-acl.inc
+
+# libdir should point to .la
+do_install_append() {
+ sed -i ${D}${libdir}/libattr.la -e \
+ s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
+}
+
+inherit ptest
+
+do_install_ptest() {
+ tar -c --exclude=ext test/ | ( cd ${D}${PTEST_PATH} && tar -xf - )
+ mkdir ${D}${PTEST_PATH}/include
+ for i in builddefs buildmacros buildrules; \
+ do cp ${S}/include/$i ${D}${PTEST_PATH}/include/; \
+ done
+ sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
+
+ # Remove any build host references
+ sed -e "s:--sysroot=${STAGING_DIR_TARGET}::g" \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+ -i ${D}${PTEST_PATH}/include/builddefs
+}
+
+RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/attr/attr/0001-Use-stdint-types-consistently.patch b/poky/meta/recipes-support/attr/attr/0001-Use-stdint-types-consistently.patch
new file mode 100644
index 000000000..dcd6507bc
--- /dev/null
+++ b/poky/meta/recipes-support/attr/attr/0001-Use-stdint-types-consistently.patch
@@ -0,0 +1,69 @@
+From 37a27b6fd09ecb37097b85e5db74e4f77b80fe0a Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Tue, 12 Jan 2016 22:20:33 +0100
+Subject: [PATCH] Use stdint types consistently
+
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ include/attributes.h | 6 ++++--
+ man/man3/attr_list.3 | 8 ++++----
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+Index: attr-2.4.47/include/attributes.h
+===================================================================
+--- attr-2.4.47.orig/include/attributes.h
++++ attr-2.4.47/include/attributes.h
+@@ -22,6 +22,7 @@
+ extern "C" {
+ #endif
+
++#include <stdint.h>
+ /*
+ * An almost-IRIX-compatible extended attributes API
+ * (the IRIX attribute "list" operation is missing, added ATTR_SECURE).
+@@ -69,7 +70,7 @@ typedef struct attrlist {
+ * al_offset[i] entry points to.
+ */
+ typedef struct attrlist_ent { /* data from attr_list() */
+- u_int32_t a_valuelen; /* number bytes in value of attr */
++ uint32_t a_valuelen; /* number bytes in value of attr */
+ char a_name[1]; /* attr name (NULL terminated) */
+ } attrlist_ent_t;
+
+@@ -90,7 +91,7 @@ typedef struct attrlist_ent { /* data fr
+ * operation on a cursor is to bzero() it.
+ */
+ typedef struct attrlist_cursor {
+- u_int32_t opaque[4]; /* an opaque cookie */
++ uint32_t opaque[4]; /* an opaque cookie */
+ } attrlist_cursor_t;
+
+ /*
+Index: attr-2.4.47/man/man3/attr_list.3
+===================================================================
+--- attr-2.4.47.orig/man/man3/attr_list.3
++++ attr-2.4.47/man/man3/attr_list.3
+@@ -72,9 +72,9 @@ The contents of an \f4attrlist_t\fP stru
+ .nf
+ .ft 4
+ .ta 9n 22n
+-__int32_t al_count; /\(** number of entries in attrlist \(**/
+-__int32_t al_more; /\(** T/F: more attrs (do syscall again) \(**/
+-__int32_t al_offset[1]; /\(** byte offsets of attrs [var-sized] \(**/
++int32_t al_count; /\(** number of entries in attrlist \(**/
++int32_t al_more; /\(** T/F: more attrs (do syscall again) \(**/
++int32_t al_offset[1]; /\(** byte offsets of attrs [var-sized] \(**/
+ .ft 1
+ .fi
+ .RE
+@@ -113,7 +113,7 @@ include the following members:
+ .nf
+ .ft 4
+ .ta 9n 22n
+-u_int32_t a_valuelen; /\(** number bytes in value of attr \(**/
++uint32_t a_valuelen; /\(** number bytes in value of attr \(**/
+ char a_name[]; /\(** attr name (NULL terminated) \(**/
+ .ft 1
+ .fi
diff --git a/poky/meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch b/poky/meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch
new file mode 100644
index 000000000..20fcc3cee
--- /dev/null
+++ b/poky/meta/recipes-support/attr/attr/attr-Missing-configure.ac.patch
@@ -0,0 +1,63 @@
+Subject: [PATCH] attr: Missing configure.ac
+
+Upstream-Status: Backport [Upstream released tarball missing this file]
+Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
+---
+ configure.ac | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 48 insertions(+)
+ create mode 100644 configure.ac
+
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 0000000..b966d0e
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,48 @@
++# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
++#
++# This program is free software: you can redistribute it and/or modify it
++# under the terms of the GNU General Public License as published by
++# the Free Software Foundation, either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program. If not, see <http://www.gnu.org/licenses/>.
++#
++AC_INIT(include/attributes.h)
++AC_CONFIG_AUX_DIR([.])
++AC_CONFIG_MACRO_DIR([m4])
++AC_CONFIG_HEADER(include/config.h)
++AC_PREFIX_DEFAULT(/usr)
++
++AC_PROG_LIBTOOL
++
++AC_ARG_ENABLE(shared,
++[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
++ enable_shared=yes)
++AC_SUBST(enable_shared)
++
++AC_ARG_ENABLE(gettext,
++[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
++ enable_gettext=yes)
++AC_SUBST(enable_gettext)
++
++AC_ARG_ENABLE(lib64,
++[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
++ enable_lib64=no)
++AC_SUBST(enable_lib64)
++
++AC_PACKAGE_GLOBALS(attr)
++AC_PACKAGE_UTILITIES(attr)
++AC_MANUAL_FORMAT
++AC_MULTILIB($enable_lib64)
++
++AC_C_CONST
++AC_TYPE_MODE_T
++AC_FUNC_ALLOCA
++
++AC_OUTPUT(include/builddefs)
diff --git a/poky/meta/recipes-support/attr/attr/dont-use-decl-macros.patch b/poky/meta/recipes-support/attr/attr/dont-use-decl-macros.patch
new file mode 100644
index 000000000..9d4b8929e
--- /dev/null
+++ b/poky/meta/recipes-support/attr/attr/dont-use-decl-macros.patch
@@ -0,0 +1,56 @@
+Use extern "C" instead of __BEGIN_DECL/__END_DECL macros
+these macros are defined in sys/cdefs.h for glibc and this header is not available on all libc
+
+anyway they defined like below
+
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS /* empty */
+# define __END_DECLS /* empty */
+#endif
+
+__THROW macro is also not available on musl, defined thusly
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: attr-2.4.47/include/xattr.h
+===================================================================
+--- attr-2.4.47.orig/include/xattr.h 2014-04-02 00:01:30.252091280 -0700
++++ attr-2.4.47/include/xattr.h 2014-04-02 00:12:57.985428099 -0700
+@@ -30,8 +30,20 @@
+ #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
+ #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
+
+-
+-__BEGIN_DECLS
++#ifndef __THROW
++# ifndef __GNUC_PREREQ
++# define __GNUC_PREREQ(maj, min) (0)
++# endif
++# if defined __cplusplus && __GNUC_PREREQ (2,8)
++# define __THROW throw ()
++# else
++# define __THROW
++# endif
++#endif
++
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ extern int setxattr (const char *__path, const char *__name,
+ const void *__value, size_t __size, int __flags) __THROW;
+@@ -58,6 +70,8 @@
+ extern int lremovexattr (const char *__path, const char *__name) __THROW;
+ extern int fremovexattr (int __filedes, const char *__name) __THROW;
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* __XATTR_H__ */
diff --git a/poky/meta/recipes-support/attr/attr_2.4.47.bb b/poky/meta/recipes-support/attr/attr_2.4.47.bb
new file mode 100644
index 000000000..fc88bef83
--- /dev/null
+++ b/poky/meta/recipes-support/attr/attr_2.4.47.bb
@@ -0,0 +1,15 @@
+require attr.inc
+
+# configure.ac was missing from the release tarball. This should be fixed in
+# future releases of attr, remove this when updating the recipe.
+SRC_URI += "file://attr-Missing-configure.ac.patch \
+ file://dont-use-decl-macros.patch \
+ file://Remove-the-section-2-man-pages.patch \
+ file://Remove-the-attr.5-man-page-moved-to-man-pages.patch \
+ file://0001-Use-stdint-types-consistently.patch \
+ "
+
+SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
+SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/attr/ea-acl.inc b/poky/meta/recipes-support/attr/ea-acl.inc
new file mode 100644
index 000000000..1339eccdb
--- /dev/null
+++ b/poky/meta/recipes-support/attr/ea-acl.inc
@@ -0,0 +1,49 @@
+# this build system is mostly shared by attr and acl
+
+SRC_URI += "file://relative-libdir.patch;striplevel=0 \
+ "
+# This patch should be applied after '(attr\|acl)-Missing-configure.ac.patch'
+SRC_URI_append = " file://0001-Added-configure-option-to-enable-disable-static-libr.patch"
+
+inherit autotools-brokensep gettext
+
+# the package comes with a custom config.h.in, it cannot be
+# overwritten by autoheader
+EXTRA_AUTORECONF += "--exclude=autoheader"
+EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
+EXTRA_OECONF_append_class-native = " --enable-gettext=no"
+EXTRA_OECONF_append_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS') == 'no')]}"
+
+EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
+
+do_install () {
+ oe_runmake install install-lib install-dev DIST_ROOT="${D}" ZIP="gzip -n"
+}
+
+do_install_append_class-native () {
+ if test "${libdir}" = "${base_libdir}" ; then
+ return
+ fi
+ librelpath=${@os.path.relpath(d.getVar('libdir'), d.getVar('base_libdir'))}
+ baselibrelpath=${@os.path.relpath(d.getVar('base_libdir'), d.getVar('libdir'))}
+
+ # Remove bad symlinks & create the correct symlinks
+ if test -L ${D}${libdir}/lib${BPN}.so ; then
+ rm -rf ${D}${libdir}/lib${BPN}.so
+ ln -sf $baselibrelpath/lib${BPN}.so ${D}${libdir}/lib${BPN}.so
+ fi
+ if test -L ${D}${base_libdir}/lib${BPN}.a ; then
+ rm -rf ${D}${base_libdir}/lib${BPN}.a
+ ln -sf $librelpath/lib${BPN}.a ${D}${base_libdir}/lib${BPN}.a
+ fi
+ if test -L ${D}${base_libdir}/lib${BPN}.la ; then
+ rm -rf ${D}${base_libdir}/lib${BPN}.la
+ ln -sf $librelpath/lib${BPN}.la ${D}${base_libdir}/lib${BPN}.la
+ fi
+}
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch b/poky/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch
new file mode 100644
index 000000000..1c1159f2c
--- /dev/null
+++ b/poky/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch
@@ -0,0 +1,70 @@
+From 01256c61ba126449c46dd4ab5d5e145488b981fa Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri <amarnath.valluri@intel.com>
+Date: Mon, 23 Jan 2017 13:25:13 +0200
+Subject: [PATCH] Added configure option to enable/disable static library
+
+Create static library archive only in case of --enable-static.
+
+Upstream-Status: Pending
+
+Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
+---
+ configure.ac | 6 ++++++
+ include/builddefs.in | 1 +
+ include/buildmacros | 3 +++
+ 3 files changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index b966d0e..e48268b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,6 +26,12 @@ AC_ARG_ENABLE(shared,
+ enable_shared=yes)
+ AC_SUBST(enable_shared)
+
++AC_ARG_ENABLE(static,
++[ --enable-static=[yes/no] Enable use of static libraries [default=yes]],,
++ enable_static=yes)
++AC_SUBST(enable_static)
++
++
+ AC_ARG_ENABLE(gettext,
+ [ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
+ enable_gettext=yes)
+diff --git a/include/builddefs.in b/include/builddefs.in
+index d9931db..3b3dbd2 100644
+--- a/include/builddefs.in
++++ b/include/builddefs.in
+@@ -71,6 +71,7 @@ RPMBUILD = @rpmbuild@
+ RPM_VERSION = @rpm_version@
+
+ ENABLE_SHARED = @enable_shared@
++ENABLE_STATIC = @enable_static@
+ ENABLE_GETTEXT = @enable_gettext@
+
+ HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
+diff --git a/include/buildmacros b/include/buildmacros
+index 39fa7e2..b0f25c5 100644
+--- a/include/buildmacros
++++ b/include/buildmacros
+@@ -80,6 +80,7 @@ endif
+ # /usr/lib.
+ ifeq ($(ENABLE_SHARED),yes)
+ INSTALL_LTLIB_DEV = \
++ set -x; \
+ cd $(TOPDIR)/$(LIBNAME)/.libs; \
+ ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \
+ ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_DEVLIB_DIR); \
+@@ -88,7 +89,9 @@ INSTALL_LTLIB_DEV = \
+ ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
+ if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
+ rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
++ if test "$(ENABLE_STATIC)" = "yes" ; then \
+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
++ fi ;\
+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
+ rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
+ ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
+--
+2.7.4
+
diff --git a/poky/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch b/poky/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
new file mode 100644
index 000000000..d5ab83d7c
--- /dev/null
+++ b/poky/meta/recipes-support/attr/files/Remove-the-attr.5-man-page-moved-to-man-pages.patch
@@ -0,0 +1,240 @@
+From 6047c8522b91235ad1e835f44f5e36472d9d49b2 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
+Date: Wed, 22 Apr 2015 11:46:59 +0200
+Subject: [PATCH 2/2] Remove the attr.5 man page (moved to man-pages)
+
+Commit dce9b4448c7f2b22bd206cd068fb05cb2f3255b9 from
+https://git.savannah.nongnu.org/git/attr.git
+
+The attr.5 page is part of the extended attribute system call documentation,
+which has been moved into the man-pages package. Move the attr.5 page there
+as well.
+
+Upstream-Status: Backport
+
+[MA: updated to apply directly to v2.4.47]
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ man/Makefile | 2 +-
+ man/man5/Makefile | 35 -------------
+ man/man5/attr.5 | 153 ------------------------------------------------------
+ 3 files changed, 1 insertion(+), 189 deletions(-)
+ delete mode 100644 man/man5/Makefile
+ delete mode 100644 man/man5/attr.5
+
+diff --git a/man/Makefile b/man/Makefile
+index 755daed..9301f09 100644
+--- a/man/Makefile
++++ b/man/Makefile
+@@ -19,7 +19,7 @@
+ TOPDIR = ..
+ include $(TOPDIR)/include/builddefs
+
+-SUBDIRS = man1 man3 man5
++SUBDIRS = man1 man3
+
+ default : $(SUBDIRS)
+
+diff --git a/man/man5/Makefile b/man/man5/Makefile
+deleted file mode 100644
+index 6b70d3d..0000000
+--- a/man/man5/Makefile
++++ /dev/null
+@@ -1,35 +0,0 @@
+-#
+-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
+-# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
+-#
+-# This program is free software: you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+-#
+-
+-TOPDIR = ../..
+-include $(TOPDIR)/include/builddefs
+-
+-MAN_SECTION = 5
+-
+-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
+-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
+-LSRCFILES = $(MAN_PAGES)
+-
+-default : $(MAN_PAGES)
+-
+-include $(BUILDRULES)
+-
+-install : default
+- $(INSTALL) -m 755 -d $(MAN_DEST)
+- $(INSTALL_MAN)
+-install-dev install-lib:
+diff --git a/man/man5/attr.5 b/man/man5/attr.5
+deleted file mode 100644
+index a02757d..0000000
+--- a/man/man5/attr.5
++++ /dev/null
+@@ -1,153 +0,0 @@
+-.\" Extended attributes manual page
+-.\"
+-.\" Copyright (C) 2000, 2002, 2007 Andreas Gruenbacher <agruen@suse.de>
+-.\" Copyright (C) 2001, 2002, 2004, 2007 Silicon Graphics, Inc.
+-.\" All rights reserved.
+-.\"
+-.\" This is free documentation; you can redistribute it and/or
+-.\" modify it under the terms of the GNU General Public License as
+-.\" published by the Free Software Foundation; either version 2 of
+-.\" the License, or (at your option) any later version.
+-.\"
+-.\" The GNU General Public License's references to "object code"
+-.\" and "executables" are to be interpreted as the output of any
+-.\" document formatting or typesetting system, including
+-.\" intermediate and printed output.
+-.\"
+-.\" This manual is distributed in the hope that it will be useful,
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-.\" GNU General Public License for more details.
+-.\"
+-.\" You should have received a copy of the GNU General Public
+-.\" License along with this manual. If not, see
+-.\" <http://www.gnu.org/licenses/>.
+-.\"
+-.TH ATTR 5
+-.SH NAME
+-attr - Extended attributes
+-.SH DESCRIPTION
+-Extended attributes are name:value pairs associated permanently with
+-files and directories, similar to the environment strings associated
+-with a process.
+-An attribute may be defined or undefined.
+-If it is defined, its value may be empty or non-empty.
+-.PP
+-Extended attributes are extensions to the normal attributes which are
+-associated with all inodes in the system (i.e. the
+-.BR stat (2)
+-data).
+-They are often used to provide additional functionality
+-to a filesystem \- for example, additional security features such as
+-Access Control Lists (ACLs) may be implemented using extended attributes.
+-.PP
+-Users with search access to a file or directory may retrieve a list of
+-attribute names defined for that file or directory.
+-.PP
+-Extended attributes are accessed as atomic objects.
+-Reading retrieves the whole value of an attribute and stores it in a buffer.
+-Writing replaces any previous value with the new value.
+-.PP
+-Space consumed for extended attributes is counted towards the disk quotas
+-of the file owner and file group.
+-.PP
+-Currently, support for extended attributes is implemented on Linux by the
+-ext2, ext3, ext4, XFS, JFS and reiserfs filesystems.
+-.SH EXTENDED ATTRIBUTE NAMESPACES
+-Attribute names are zero-terminated strings.
+-The attribute name is always specified in the fully qualified
+-.IR namespace.attribute
+-form, eg.
+-.IR user.mime_type ,
+-.IR trusted.md5sum ,
+-.IR system.posix_acl_access ,
+-or
+-.IR security.selinux .
+-.PP
+-The namespace mechanism is used to define different classes of extended
+-attributes.
+-These different classes exist for several reasons, e.g. the permissions
+-and capabilities required for manipulating extended attributes of one
+-namespace may differ to another.
+-.PP
+-Currently the
+-.IR security ,
+-.IR system ,
+-.IR trusted ,
+-and
+-.IR user
+-extended attribute classes are defined as described below. Additional
+-classes may be added in the future.
+-.SS Extended security attributes
+-The security attribute namespace is used by kernel security modules,
+-such as Security Enhanced Linux.
+-Read and write access permissions to security attributes depend on the
+-policy implemented for each security attribute by the security module.
+-When no security module is loaded, all processes have read access to
+-extended security attributes, and write access is limited to processes
+-that have the CAP_SYS_ADMIN capability.
+-.SS Extended system attributes
+-Extended system attributes are used by the kernel to store system
+-objects such as Access Control Lists and Capabilities. Read and write
+-access permissions to system attributes depend on the policy implemented
+-for each system attribute implemented by filesystems in the kernel.
+-.SS Trusted extended attributes
+-Trusted extended attributes are visible and accessible only to processes that
+-have the CAP_SYS_ADMIN capability (the super user usually has this
+-capability).
+-Attributes in this class are used to implement mechanisms in user
+-space (i.e., outside the kernel) which keep information in extended attributes
+-to which ordinary processes should not have access.
+-.SS Extended user attributes
+-Extended user attributes may be assigned to files and directories for
+-storing arbitrary additional information such as the mime type,
+-character set or encoding of a file. The access permissions for user
+-attributes are defined by the file permission bits.
+-.PP
+-The file permission bits of regular files and directories are
+-interpreted differently from the file permission bits of special files
+-and symbolic links. For regular files and directories the file
+-permission bits define access to the file's contents, while for device special
+-files they define access to the device described by the special file.
+-The file permissions of symbolic links are not used in access
+-checks. These differences would allow users to consume filesystem resources in
+-a way not controllable by disk quotas for group or world writable special files and directories.
+-.PP
+-For this reason, extended user attributes are only allowed for regular files and directories, and access to extended user attributes is restricted to the
+-owner and to users with appropriate capabilities for directories with the
+-sticky bit set (see the
+-.BR chmod (1)
+-manual page for an explanation of Sticky Directories).
+-.SH FILESYSTEM DIFFERENCES
+-The kernel and the filesystem may place limits on the maximum number
+-and size of extended attributes that can be associated with a file.
+-Some file systems, such as ext2/3 and reiserfs, require the filesystem
+-to be mounted with the
+-.B user_xattr
+-mount option in order for extended user attributes to be used.
+-.PP
+-In the current ext2, ext3 and ext4 filesystem implementations, each
+-extended attribute must fit on a single filesystem block (1024, 2048
+-or 4096 bytes, depending on the block size specified when the
+-filesystem was created).
+-.PP
+-In the XFS and reiserfs filesystem implementations, there is no
+-practical limit on the number or size of extended attributes
+-associated with a file, and the algorithms used to store extended
+-attribute information on disk are scalable.
+-.PP
+-In the JFS filesystem implementation, names can be up to 255 bytes and
+-values up to 65,535 bytes.
+-.SH ADDITIONAL NOTES
+-Since the filesystems on which extended attributes are stored might also
+-be used on architectures with a different byte order and machine word
+-size, care should be taken to store attribute values in an architecture
+-independent format.
+-.SH AUTHORS
+-Andreas Gruenbacher,
+-.RI < a.gruenbacher@bestbits.at >
+-and the SGI XFS development team,
+-.RI < linux-xfs@oss.sgi.com >.
+-.SH SEE ALSO
+-getfattr(1),
+-setfattr(1).
+--
+2.7.4
+
diff --git a/poky/meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch b/poky/meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch
new file mode 100644
index 000000000..044c5a037
--- /dev/null
+++ b/poky/meta/recipes-support/attr/files/Remove-the-section-2-man-pages.patch
@@ -0,0 +1,666 @@
+From b972600a26f3a930e53e2fce2625266a5d29813e Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <andreas.gruenbacher@gmail.com>
+Date: Tue, 14 Apr 2015 23:53:11 +0200
+Subject: [PATCH 1/2] Remove the section 2 man pages
+
+Commit 8d1263bca95722d66a6f8e83450f49d0956ea534 from upstream
+https://git.savannah.nongnu.org/git/attr.git/
+
+The section 2 man pages have long since been added to the man-pages package
+which documents all system calls; they were disabled in attr by default since
+January 2014. Get rid of them here.
+
+Upstream-Status: Backport
+
+[MA: modified to apply directly to v2.4.47]
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ man/Makefile | 2 +-
+ man/man2/Makefile | 35 -----------
+ man/man2/getxattr.2 | 143 --------------------------------------------
+ man/man2/listxattr.2 | 158 -------------------------------------------------
+ man/man2/removexattr.2 | 111 ----------------------------------
+ man/man2/setxattr.2 | 143 --------------------------------------------
+ 6 files changed, 1 insertion(+), 591 deletions(-)
+ delete mode 100644 man/man2/Makefile
+ delete mode 100644 man/man2/getxattr.2
+ delete mode 100644 man/man2/listxattr.2
+ delete mode 100644 man/man2/removexattr.2
+ delete mode 100644 man/man2/setxattr.2
+
+diff --git a/man/Makefile b/man/Makefile
+index 9535426..755daed 100644
+--- a/man/Makefile
++++ b/man/Makefile
+@@ -19,7 +19,7 @@
+ TOPDIR = ..
+ include $(TOPDIR)/include/builddefs
+
+-SUBDIRS = man1 man2 man3 man5
++SUBDIRS = man1 man3 man5
+
+ default : $(SUBDIRS)
+
+diff --git a/man/man2/Makefile b/man/man2/Makefile
+deleted file mode 100644
+index d77309d..0000000
+--- a/man/man2/Makefile
++++ /dev/null
+@@ -1,35 +0,0 @@
+-#
+-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
+-# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
+-#
+-# This program is free software: you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 2 of the License, or
+-# (at your option) any later version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+-#
+-
+-TOPDIR = ../..
+-include $(TOPDIR)/include/builddefs
+-
+-MAN_SECTION = 2
+-
+-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
+-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
+-LSRCFILES = $(MAN_PAGES)
+-
+-default install : $(MAN_PAGES)
+-
+-include $(BUILDRULES)
+-
+-install-dev : default
+- $(INSTALL) -m 755 -d $(MAN_DEST)
+- $(INSTALL_MAN)
+-install-lib:
+diff --git a/man/man2/getxattr.2 b/man/man2/getxattr.2
+deleted file mode 100644
+index 405ad89..0000000
+--- a/man/man2/getxattr.2
++++ /dev/null
+@@ -1,143 +0,0 @@
+-.\"
+-.\" Extended attributes system calls manual pages
+-.\"
+-.\" (C) Andreas Gruenbacher, February 2001
+-.\" (C) Silicon Graphics Inc, September 2001
+-.\"
+-.\" This is free documentation; you can redistribute it and/or
+-.\" modify it under the terms of the GNU General Public License as
+-.\" published by the Free Software Foundation; either version 2 of
+-.\" the License, or (at your option) any later version.
+-.\"
+-.\" The GNU General Public License's references to "object code"
+-.\" and "executables" are to be interpreted as the output of any
+-.\" document formatting or typesetting system, including
+-.\" intermediate and printed output.
+-.\"
+-.\" This manual is distributed in the hope that it will be useful,
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-.\" GNU General Public License for more details.
+-.\"
+-.\" You should have received a copy of the GNU General Public
+-.\" License along with this manual. If not, see
+-.\" <http://www.gnu.org/licenses/>.
+-.\"
+-.TH GETXATTR 2 "Extended Attributes" "Dec 2001" "System calls"
+-.SH NAME
+-getxattr, lgetxattr, fgetxattr \- retrieve an extended attribute value
+-.SH SYNOPSIS
+-.fam C
+-.nf
+-.B #include <sys/types.h>
+-.B #include <attr/xattr.h>
+-.sp
+-.BI "ssize_t getxattr (const char\ *" path ", const char\ *" name ",
+-.BI "\t\t\t\t void\ *" value ", size_t " size );
+-.BI "ssize_t lgetxattr (const char\ *" path ", const char\ *" name ",
+-.BI "\t\t\t\t void\ *" value ", size_t " size );
+-.BI "ssize_t fgetxattr (int " filedes ", const char\ *" name ",
+-.BI "\t\t\t\t void\ *" value ", size_t " size );
+-.fi
+-.fam T
+-.SH DESCRIPTION
+-Extended attributes are
+-.IR name :\c
+-.I value
+-pairs associated with inodes (files, directories, symlinks, etc).
+-They are extensions to the normal attributes which are associated
+-with all inodes in the system (i.e. the
+-.BR stat (2)
+-data).
+-A complete overview of extended attributes concepts can be found in
+-.BR attr (5).
+-.PP
+-.B getxattr
+-retrieves the
+-.I value
+-of the extended attribute identified by
+-.I name
+-and associated with the given
+-.I path
+-in the filesystem.
+-The length of the attribute
+-.I value
+-is returned.
+-.PP
+-.B lgetxattr
+-is identical to
+-.BR getxattr ,
+-except in the case of a symbolic link, where the link itself is
+-interrogated, not the file that it refers to.
+-.PP
+-.B fgetxattr
+-is identical to
+-.BR getxattr ,
+-only the open file pointed to by
+-.I filedes
+-(as returned by
+-.BR open (2))
+-is interrogated in place of
+-.IR path .
+-.PP
+-An extended attribute
+-.I name
+-is a simple NULL-terminated string.
+-The name includes a namespace prefix \- there may be several, disjoint
+-namespaces associated with an individual inode.
+-The value of an extended attribute is a chunk of arbitrary textual or
+-binary data of specified length.
+-.PP
+-An empty buffer of
+-.I size
+-zero can be passed into these calls to return the current size of the
+-named extended attribute, which can be used to estimate the size of a
+-buffer which is sufficiently large to hold the value associated with
+-the extended attribute.
+-.PP
+-The interface is designed to allow guessing of initial buffer
+-sizes, and to enlarge buffers when the return value indicates
+-that the buffer provided was too small.
+-.SH RETURN VALUE
+-On success, a positive number is returned indicating the size of the
+-extended attribute value.
+-On failure, \-1 is returned and
+-.I errno
+-is set appropriately.
+-.PP
+-If the named attribute does not exist, or the process has no access to
+-this attribute,
+-.I errno
+-is set to ENOATTR.
+-.PP
+-If the
+-.I size
+-of the
+-.I value
+-buffer is too small to hold the result,
+-.I errno
+-is set to ERANGE.
+-.PP
+-If extended attributes are not supported by the filesystem, or are disabled,
+-.I errno
+-is set to ENOTSUP.
+-.PP
+-The errors documented for the
+-.BR stat (2)
+-system call are also applicable here.
+-.SH AUTHORS
+-Andreas Gruenbacher,
+-.RI < a.gruenbacher@bestbits.at >
+-and the SGI XFS development team,
+-.RI < linux-xfs@oss.sgi.com >.
+-Please send any bug reports or comments to these addresses.
+-.SH SEE ALSO
+-.BR getfattr (1),
+-.BR setfattr (1),
+-.BR open (2),
+-.BR stat (2),
+-.BR setxattr (2),
+-.BR listxattr (2),
+-.BR removexattr (2),
+-and
+-.BR attr (5).
+diff --git a/man/man2/listxattr.2 b/man/man2/listxattr.2
+deleted file mode 100644
+index 8b4371c..0000000
+--- a/man/man2/listxattr.2
++++ /dev/null
+@@ -1,158 +0,0 @@
+-.\"
+-.\" Extended attributes system calls manual pages
+-.\"
+-.\" (C) Andreas Gruenbacher, February 2001
+-.\" (C) Silicon Graphics Inc, September 2001
+-.\"
+-.\" This is free documentation; you can redistribute it and/or
+-.\" modify it under the terms of the GNU General Public License as
+-.\" published by the Free Software Foundation; either version 2 of
+-.\" the License, or (at your option) any later version.
+-.\"
+-.\" The GNU General Public License's references to "object code"
+-.\" and "executables" are to be interpreted as the output of any
+-.\" document formatting or typesetting system, including
+-.\" intermediate and printed output.
+-.\"
+-.\" This manual is distributed in the hope that it will be useful,
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-.\" GNU General Public License for more details.
+-.\"
+-.\" You should have received a copy of the GNU General Public
+-.\" License along with this manual. If not, see
+-.\" <http://www.gnu.org/licenses/>.
+-.\"
+-.TH LISTXATTR 2 "Extended Attributes" "Dec 2001" "System calls"
+-.SH NAME
+-listxattr, llistxattr, flistxattr \- list extended attribute names
+-.SH SYNOPSIS
+-.fam C
+-.nf
+-.B #include <sys/types.h>
+-.B #include <attr/xattr.h>
+-.sp
+-.BI "ssize_t listxattr (const char\ *" path ",
+-.BI "\t\t\t\t char\ *" list ", size_t " size );
+-.BI "ssize_t llistxattr (const char\ *" path ",
+-.BI "\t\t\t\t char\ *" list ", size_t " size );
+-.BI "ssize_t flistxattr (int " filedes ",
+-.BI "\t\t\t\t char\ *" list ", size_t " size );
+-.fi
+-.fam T
+-.SH DESCRIPTION
+-Extended attributes are name:value
+-pairs associated with inodes (files, directories, symlinks, etc).
+-They are extensions to the normal attributes which are associated
+-with all inodes in the system (i.e. the
+-.BR stat (2)
+-data).
+-A complete overview of extended attributes concepts can be found in
+-.BR attr (5).
+-.PP
+-.B listxattr
+-retrieves the
+-.I list
+-of extended attribute names associated with the given
+-.I path
+-in the filesystem.
+-The list is the set of (NULL-terminated) names, one after the other.
+-Names of extended attributes to which the calling process does not
+-have access may be omitted from the list.
+-The length of the attribute name
+-.I list
+-is returned.
+-.PP
+-.B llistxattr
+-is identical to
+-.BR listxattr ,
+-except in the case of a symbolic link, where the list of names of
+-extended attributes associated with the link itself is retrieved,
+-not the file that it refers to.
+-.I list
+-is a caller-allocated buffer of size
+-.IR size .
+-.PP
+-.B flistxattr
+-is identical to
+-.BR listxattr ,
+-only the open file pointed to by
+-.I filedes
+-(as returned by
+-.BR open (2))
+-is interrogated in place of
+-.IR path .
+-.PP
+-A single extended attribute
+-.I name
+-is a simple NULL-terminated string.
+-The name includes a namespace prefix \- there may be several, disjoint
+-namespaces associated with an individual inode.
+-.PP
+-An empty buffer of
+-.I size
+-zero can be passed into these calls to return the current size of the
+-list of extended attribute names, which can be used to estimate the
+-size of a buffer which is sufficiently large to hold the list of names.
+-.SH EXAMPLES
+-The
+-.I list
+-of names is returned as an unordered array of NULL-terminated character
+-strings (attribute names are separated by NULL characters), like this:
+-.fam C
+-.RS
+-.nf
+-user.name1\\0system.name1\\0user.name2\\0
+-.fi
+-.RE
+-.fam T
+-.P
+-Filesystems like ext2, ext3 and XFS which implement POSIX ACLs using
+-extended attributes, might return a
+-.I list
+-like this:
+-.fam C
+-.RS
+-.nf
+-system.posix_acl_access\\0system.posix_acl_default\\0
+-.fi
+-.RE
+-.fam T
+-.SH RETURN VALUE
+-On success, a positive number is returned indicating the size of the
+-extended attribute name list.
+-On failure, \-1 is returned and
+-.I errno
+-is set appropriately.
+-.PP
+-If the
+-.I size
+-of the
+-.I list
+-buffer is too small to hold the result,
+-.I errno
+-is set to ERANGE.
+-.PP
+-If extended attributes are not supported by the filesystem, or are disabled,
+-.I errno
+-is set to ENOTSUP.
+-.PP
+-The errors documented for the
+-.BR stat (2)
+-system call are also applicable here.
+-.SH AUTHORS
+-Andreas Gruenbacher,
+-.RI < a.gruenbacher@bestbits.at >
+-and the SGI XFS development team,
+-.RI < linux-xfs@oss.sgi.com >.
+-Please send any bug reports or comments to these addresses.
+-.SH SEE ALSO
+-.BR getfattr (1),
+-.BR setfattr (1),
+-.BR open (2),
+-.BR stat (2),
+-.BR getxattr (2),
+-.BR setxattr (2),
+-.BR removexattr (2),
+-and
+-.BR attr (5).
+diff --git a/man/man2/removexattr.2 b/man/man2/removexattr.2
+deleted file mode 100644
+index 2c7d934..0000000
+--- a/man/man2/removexattr.2
++++ /dev/null
+@@ -1,111 +0,0 @@
+-.\"
+-.\" Extended attributes system calls manual pages
+-.\"
+-.\" (C) Andreas Gruenbacher, February 2001
+-.\" (C) Silicon Graphics Inc, September 2001
+-.\"
+-.\" This is free documentation; you can redistribute it and/or
+-.\" modify it under the terms of the GNU General Public License as
+-.\" published by the Free Software Foundation; either version 2 of
+-.\" the License, or (at your option) any later version.
+-.\"
+-.\" The GNU General Public License's references to "object code"
+-.\" and "executables" are to be interpreted as the output of any
+-.\" document formatting or typesetting system, including
+-.\" intermediate and printed output.
+-.\"
+-.\" This manual is distributed in the hope that it will be useful,
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-.\" GNU General Public License for more details.
+-.\"
+-.\" You should have received a copy of the GNU General Public
+-.\" License along with this manual. If not, see
+-.\" <http://www.gnu.org/licenses/>.
+-.\"
+-.TH REMOVEXATTR 2 "Extended Attributes" "Dec 2001" "System calls"
+-.SH NAME
+-removexattr, lremovexattr, fremovexattr \- remove an extended attribute
+-.SH SYNOPSIS
+-.fam C
+-.nf
+-.B #include <sys/types.h>
+-.B #include <attr/xattr.h>
+-.sp
+-.BI "int removexattr (const char\ *" path ", const char\ *" name );
+-.BI "int lremovexattr (const char\ *" path ", const char\ *" name );
+-.BI "int fremovexattr (int " filedes ", const char\ *" name );
+-.fi
+-.fam T
+-.SH DESCRIPTION
+-Extended attributes are
+-.IR name :\c
+-value pairs associated with inodes (files, directories, symlinks, etc).
+-They are extensions to the normal attributes which are associated
+-with all inodes in the system (i.e. the
+-.BR stat (2)
+-data).
+-A complete overview of extended attributes concepts can be found in
+-.BR attr (5).
+-.PP
+-.B removexattr
+-removes the extended attribute identified by
+-.I name
+-and associated with the given
+-.I path
+-in the filesystem.
+-.PP
+-.B lremovexattr
+-is identical to
+-.BR removexattr ,
+-except in the case of a symbolic link, where the extended attribute is
+-removed from the link itself, not the file that it refers to.
+-.PP
+-.B fremovexattr
+-is identical to
+-.BR removexattr ,
+-only the extended attribute is removed from the open file pointed to by
+-.I filedes
+-(as returned by
+-.BR open (2))
+-in place of
+-.IR path .
+-.PP
+-An extended attribute name is a simple NULL-terminated string.
+-The
+-.I name
+-includes a namespace prefix \- there may be several, disjoint
+-namespaces associated with an individual inode.
+-.SH RETURN VALUE
+-On success, zero is returned.
+-On failure, \-1 is returned and
+-.I errno
+-is set appropriately.
+-.PP
+-If the named attribute does not exist,
+-.I errno
+-is set to ENOATTR.
+-.PP
+-If extended attributes are not supported by the filesystem, or are disabled,
+-.I errno
+-is set to ENOTSUP.
+-.PP
+-The errors documented for the
+-.BR stat (2)
+-system call are also applicable here.
+-.SH AUTHORS
+-Andreas Gruenbacher,
+-.RI < a.gruenbacher@bestbits.at >
+-and the SGI XFS development team,
+-.RI < linux-xfs@oss.sgi.com >.
+-Please send any bug reports or comments to these addresses.
+-.SH SEE ALSO
+-.BR getfattr (1),
+-.BR setfattr (1),
+-.BR open (2),
+-.BR stat (2),
+-.BR setxattr (2),
+-.BR getxattr (2),
+-.BR listxattr (2),
+-and
+-.BR attr (5).
+diff --git a/man/man2/setxattr.2 b/man/man2/setxattr.2
+deleted file mode 100644
+index b20dc9f..0000000
+--- a/man/man2/setxattr.2
++++ /dev/null
+@@ -1,143 +0,0 @@
+-.\"
+-.\" Extended attributes system calls manual pages
+-.\"
+-.\" (C) Andreas Gruenbacher, February 2001
+-.\" (C) Silicon Graphics Inc, September 2001
+-.\"
+-.\" This is free documentation; you can redistribute it and/or
+-.\" modify it under the terms of the GNU General Public License as
+-.\" published by the Free Software Foundation; either version 2 of
+-.\" the License, or (at your option) any later version.
+-.\"
+-.\" The GNU General Public License's references to "object code"
+-.\" and "executables" are to be interpreted as the output of any
+-.\" document formatting or typesetting system, including
+-.\" intermediate and printed output.
+-.\"
+-.\" This manual is distributed in the hope that it will be useful,
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-.\" GNU General Public License for more details.
+-.\"
+-.\" You should have received a copy of the GNU General Public
+-.\" License along with this manual. If not, see
+-.\" <http://www.gnu.org/licenses/>.
+-.\"
+-.TH SETXATTR 2 "Extended Attributes" "Dec 2001" "System calls"
+-.SH NAME
+-setxattr, lsetxattr, fsetxattr \- set an extended attribute value
+-.SH SYNOPSIS
+-.fam C
+-.nf
+-.B #include <sys/types.h>
+-.B #include <attr/xattr.h>
+-.sp
+-.BI "int setxattr (const char\ *" path ", const char\ *" name ",
+-.BI "\t\t\t const void\ *" value ", size_t " size ", int " flags );
+-.BI "int lsetxattr (const char\ *" path ", const char\ *" name ",
+-.BI "\t\t\t const void\ *" value ", size_t " size ", int " flags );
+-.BI "int fsetxattr (int " filedes ", const char\ *" name ",
+-.BI "\t\t\t const void\ *" value ", size_t " size ", int " flags );
+-.fi
+-.fam T
+-.SH DESCRIPTION
+-Extended attributes are
+-.IR name :\c
+-.I value
+-pairs associated with inodes (files, directories, symlinks, etc).
+-They are extensions to the normal attributes which are associated
+-with all inodes in the system (i.e. the
+-.BR stat (2)
+-data).
+-A complete overview of extended attributes concepts can be found in
+-.BR attr (5).
+-.PP
+-.B setxattr
+-sets the
+-.I value
+-of the extended attribute identified by
+-.I name
+-and associated with the given
+-.I path
+-in the filesystem.
+-The
+-.I size
+-of the
+-.I value
+-must be specified.
+-.PP
+-.B lsetxattr
+-is identical to
+-.BR setxattr ,
+-except in the case of a symbolic link, where the extended attribute is
+-set on the link itself, not the file that it refers to.
+-.PP
+-.B fsetxattr
+-is identical to
+-.BR setxattr ,
+-only the extended attribute is set on the open file pointed to by
+-.I filedes
+-(as returned by
+-.BR open (2))
+-in place of
+-.IR path .
+-.PP
+-An extended attribute name is a simple NULL-terminated string.
+-The
+-.I name
+-includes a namespace prefix \- there may be several, disjoint
+-namespaces associated with an individual inode.
+-The
+-.I value
+-of an extended attribute is a chunk of arbitrary textual or
+-binary data of specified length.
+-.PP
+-The
+-.I flags
+-parameter can be used to refine the semantics of the operation.
+-XATTR_CREATE specifies a pure create, which fails if the named
+-attribute exists already.
+-XATTR_REPLACE specifies a pure replace operation, which fails if the
+-named attribute does not already exist.
+-By default (no flags), the extended attribute will be created if
+-need be, or will simply replace the value if the attribute exists.
+-.SH RETURN VALUE
+-On success, zero is returned.
+-On failure, \-1 is returned and
+-.I errno
+-is set appropriately.
+-.PP
+-If XATTR_CREATE is specified, and the attribute exists already,
+-.I errno
+-is set to EEXIST.
+-If XATTR_REPLACE is specified, and the attribute does not exist,
+-.I errno
+-is set to ENOATTR.
+-.PP
+-If there is insufficient space remaining to store the extended attribute,
+-.I errno
+-is set to either ENOSPC, or EDQUOT if quota enforcement was the cause.
+-.PP
+-If extended attributes are not supported by the filesystem, or are disabled,
+-.I errno
+-is set to ENOTSUP.
+-.PP
+-The errors documented for the
+-.BR stat (2)
+-system call are also applicable here.
+-.SH AUTHORS
+-Andreas Gruenbacher,
+-.RI < a.gruenbacher@bestbits.at >
+-and the SGI XFS development team,
+-.RI < linux-xfs@oss.sgi.com >.
+-Please send any bug reports or comments to these addresses.
+-.SH SEE ALSO
+-.BR getfattr (1),
+-.BR setfattr (1),
+-.BR open (2),
+-.BR stat (2),
+-.BR getxattr (2),
+-.BR listxattr (2),
+-.BR removexattr (2),
+-and
+-.BR attr (5).
+--
+2.7.4
+
diff --git a/poky/meta/recipes-support/attr/files/relative-libdir.patch b/poky/meta/recipes-support/attr/files/relative-libdir.patch
new file mode 100644
index 000000000..b72bf184d
--- /dev/null
+++ b/poky/meta/recipes-support/attr/files/relative-libdir.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Pending
+
+use relative path in symbolic links, or it fails in staging
+sed expression from udev
+
+7/29/2010 - created by Qing He <qing.he@intel.com>
+
+diff -u include.orig/buildmacros include/buildmacros
+--- include.orig/buildmacros 2010-07-29 17:39:48.000000000 +0800
++++ include/buildmacros 2010-07-29 18:20:34.000000000 +0800
+@@ -88,9 +88,11 @@
+ ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
+ ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
+ if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
+- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
+- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
+- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
++ rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
++ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
++ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
++ rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
++ ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
+ fi
+ else
+ INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
diff --git a/poky/meta/recipes-support/attr/files/run-ptest b/poky/meta/recipes-support/attr/files/run-ptest
new file mode 100644
index 000000000..a6c6867f2
--- /dev/null
+++ b/poky/meta/recipes-support/attr/files/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+make -C test -k tests root-tests |sed \
+ -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
+ -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
diff --git a/poky/meta/recipes-support/bash-completion/bash-completion_2.7.bb b/poky/meta/recipes-support/bash-completion/bash-completion_2.7.bb
new file mode 100644
index 000000000..f519b3f3d
--- /dev/null
+++ b/poky/meta/recipes-support/bash-completion/bash-completion_2.7.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Programmable Completion for Bash 4"
+HOMEPAGE = "http://bash-completion.alioth.debian.org/"
+BUGTRACKER = "https://alioth.debian.org/projects/bash-completion/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SECTION = "console/utils"
+
+SRC_URI = "https://github.com/scop/bash-completion/releases/download/${PV}/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "28117492bdc9408438e6041683a423ce"
+SRC_URI[sha256sum] = "41ba892d3f427d4a686de32673f35401bc947a7801f684127120cdb13641441e"
+UPSTREAM_CHECK_REGEX = "bash-completion-(?P<pver>(?!2008).+)\.tar"
+UPSTREAM_CHECK_URI = "https://github.com/scop/bash-completion/releases"
+
+PARALLEL_MAKE = ""
+
+inherit autotools
+
+do_install_append() {
+ # compatdir
+ install -d ${D}${sysconfdir}/bash_completion.d/
+ echo '. ${datadir}/${BPN}/bash_completion' >${D}${sysconfdir}/bash_completion
+
+ # Delete files already provided by util-linux
+ local i
+ for i in mount umount rfkill; do
+ rm ${D}${datadir}/${BPN}/completions/$i
+ done
+}
+
+RDEPENDS_${PN} = "bash"
+
+# Some recipes are providing ${PN}-bash-completion packages
+PACKAGES =+ "${PN}-extra"
+FILES_${PN}-extra = "${datadir}/${BPN}/completions/ \
+ ${datadir}/${BPN}/helpers/"
+
+FILES_${PN}-dev += "${datadir}/cmake"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/poky/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch b/poky/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
new file mode 100644
index 000000000..b3298ce2d
--- /dev/null
+++ b/poky/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
@@ -0,0 +1,34 @@
+Add config option --with-dev-dsp.
+
+Upstream-Status: Pending
+
+Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
+---
+--- a/configure.ac
++++ b/configure.ac
+@@ -106,6 +106,16 @@ AC_ARG_WITH(python,[ --with-python[[=AR
+ fi
+ ])
+
++AC_ARG_WITH(dev-dsp,[ --with-dev-dsp enables dev/dsp for entropy producing. auto for auto-detecting dev/dep on host. [[default=no]]],[
++ if test "$withval" = yes; then
++ AC_DEFINE([HAVE_DEV_DSP], 1)
++ else
++ if test "$withval" = auto; then
++ ac_detect_dev_dsp=yes
++ fi
++ fi
++ ],[ac_detect_dev_dsp=no])
++
+ # Check for expert mode
+ if test "$ac_enable_expert_mode" = yes; then
+ BEE_EXPERT_MODE
+@@ -464,7 +474,7 @@ linux*)
+ ac_cv_have_dev_dsp=no
+ fi
+ ])
+- if test "$ac_cv_have_dev_dsp" = yes; then
++ if test "$ac_cv_have_dev_dsp" = yes && test "$ac_detect_dev_dsp" = yes; then
+ AC_DEFINE([HAVE_DEV_DSP], 1)
+ fi
+ ;;
diff --git a/poky/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch b/poky/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch
new file mode 100644
index 000000000..3e5513fce
--- /dev/null
+++ b/poky/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch
@@ -0,0 +1,37 @@
+beecrypt: enable ptest support
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Add install-ptest rules.
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ Makefile.am | 3 +++
+ tests/Makefile.am | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index b7e7869..5076f59 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -73,3 +73,6 @@ DISTCLEANFILES = mpopt.s blowfishopt.s sha1opt.s
+
+ bench:
+ (cd tests && $(MAKE) $(AM_MAKEFLAGS) bench)
++
++install-ptest:
++ (cd tests && $(MAKE) $(AM_MAKEFLAGS) check_PROGRAMS)
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 1604e5e..d8db8d8 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -101,3 +101,6 @@ bench: benchme benchrsa benchhf benchbc
+ ./benchbc AES 128
+ ./benchbc Blowfish 128
+ ./benchbc Blowfish 128
++
++check_PROGRAMS:
++ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+--
+1.8.1.2
+
diff --git a/poky/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch b/poky/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch
new file mode 100644
index 000000000..91b1fa6ef
--- /dev/null
+++ b/poky/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch
@@ -0,0 +1,43 @@
+We are unable to run code at configure time in a cross environemnt, but as we
+control the build we can be fairly certain this dependency is met.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+JL 05/07/10
+Index: beecrypt-4.2.1/configure.ac
+===================================================================
+--- beecrypt-4.2.1.orig/configure.ac 2010-11-26 17:12:25.000000000 +0800
++++ beecrypt-4.2.1/configure.ac 2010-11-26 17:12:30.000000000 +0800
+@@ -292,32 +292,6 @@
+ # Predefines and checks for C++ API support
+ AH_TEMPLATE([CPPGLUE],[Define to 1 if you want to include the C++ code])
+
+-if test "$ac_with_cplusplus" = yes; then
+- AC_MSG_CHECKING([for IBM's ICU library version >= 2.8])
+- AC_LANG_PUSH(C)
+- AC_RUN_IFELSE([
+- AC_LANG_PROGRAM([[#include <unicode/uversion.h>]],[[
+- #if U_ICU_VERSION_MAJOR_NUM < 2
+- exit(1);
+- #elif U_ICU_VERSION_MAJOR_NUM == 2
+- # if U_ICU_VERSION_MINOR_NUM < 8
+- exit(1);
+- # else
+- exit(0);
+- # endif
+- #else
+- exit(0);
+- #endif
+- ]])],[
+- AC_MSG_RESULT([yes])
+- ],[
+- AC_MSG_RESULT([no])
+- AC_MSG_WARN([disabling cplusplus])
+- ac_with_cplusplus=no
+- ])
+- AC_LANG_POP(C)
+-fi
+-
+ AM_CONDITIONAL([WITH_CPLUSPLUS],[test "$ac_with_cplusplus" = yes])
+
+ if test "$ac_with_cplusplus" = yes ; then
diff --git a/poky/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch b/poky/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch
new file mode 100644
index 000000000..8144e39be
--- /dev/null
+++ b/poky/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch
@@ -0,0 +1,39 @@
+
+gcc-4.7 seems to be stricter about some things, so follow
+the suggestion from the error/note information.
+
+ ../../x86_64-linux-libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..
+ x86_64-linux-libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -isyst
+ In file included from ../../include/beecrypt/c++/util/Hashtable.h:42:0,
+ from ../../include/beecrypt/c++/util/Properties.h:36,
+ from Properties.cxx:25:
+ ../../include/beecrypt/c++/util/AbstractSet.h: In instantiation of 'bool beecrypt::uti
+ Properties.cxx:228:1: required from here
+ ../../include/beecrypt/c++/util/AbstractSet.h:59:27: error: 'containsAll' was not decl
+ ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: declarations in dependent b
+ ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: use 'this->containsAll' ins
+ ../../include/beecrypt/c++/util/AbstractSet.h: In instantiation of 'bool beecrypt::uti
+ Properties.cxx:228:1: required from here
+ ../../include/beecrypt/c++/util/AbstractSet.h:59:27: error: 'containsAll' was not decl
+ ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: declarations in dependent b
+ ../../include/beecrypt/c++/util/AbstractSet.h:59:27: note: use 'this->containsAll' ins
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+
+Index: beecrypt-4.2.1/include/beecrypt/c++/util/AbstractSet.h
+===================================================================
+--- beecrypt-4.2.1.orig/include/beecrypt/c++/util/AbstractSet.h
++++ beecrypt-4.2.1/include/beecrypt/c++/util/AbstractSet.h
+@@ -56,7 +56,7 @@ namespace beecrypt {
+ if (c->size() != size())
+ return false;
+
+- return containsAll(*c);
++ return this->containsAll(*c);
+ }
+ return false;
+ }
diff --git a/poky/meta/recipes-support/beecrypt/beecrypt/fix-security.patch b/poky/meta/recipes-support/beecrypt/beecrypt/fix-security.patch
new file mode 100644
index 000000000..6cb0c0020
--- /dev/null
+++ b/poky/meta/recipes-support/beecrypt/beecrypt/fix-security.patch
@@ -0,0 +1,47 @@
+Fix visibility of various C++ functions, inspired by a similar patch in the Fink
+project:
+http://www.mail-archive.com/fink-commits@lists.sourceforge.net/msg75742.html
+
+JL 05/07/10
+
+Upstream-Status: Pending
+
+Index: beecrypt-4.2.1/include/beecrypt/c++/beeyond/BeeCertificate.h
+===================================================================
+--- beecrypt-4.2.1.orig/include/beecrypt/c++/beeyond/BeeCertificate.h 2010-11-26 17:22:57.000000000 +0800
++++ beecrypt-4.2.1/include/beecrypt/c++/beeyond/BeeCertificate.h 2010-11-26 17:23:01.000000000 +0800
+@@ -147,13 +147,13 @@
+ mutable bytearray* enc;
+
+ BeeCertificate();
+- BeeCertificate(InputStream& in) throw (IOException);
+
+ void encodeTBS(DataOutputStream& out) const throw (IOException);
+
+ bytearray* encodeTBS() const throw (CertificateEncodingException);
+
+ public:
++ BeeCertificate(InputStream& in) throw (IOException);
+ BeeCertificate(const BeeCertificate&) throw (CloneNotSupportedException);
+ virtual ~BeeCertificate();
+
+Index: beecrypt-4.2.1/include/beecrypt/c++/security/Security.h
+===================================================================
+--- beecrypt-4.2.1.orig/include/beecrypt/c++/security/Security.h 2010-11-26 17:20:55.000000000 +0800
++++ beecrypt-4.2.1/include/beecrypt/c++/security/Security.h 2010-11-26 17:21:36.000000000 +0800
+@@ -61,7 +61,6 @@
+ friend class SecureRandom;
+ friend class Signature;
+
+- private:
+ struct spi
+ {
+ Object* cspi;
+@@ -76,6 +75,7 @@
+ static spi* getSpi(const String& algo, const String& type, const Provider&) throw (NoSuchAlgorithmException);
+ static spi* getFirstSpi(const String& type);
+
++ private:
+ static const String& getKeyStoreDefault();
+
+ static bool _init;
diff --git a/poky/meta/recipes-support/beecrypt/beecrypt/run-ptest b/poky/meta/recipes-support/beecrypt/beecrypt/run-ptest
new file mode 100644
index 000000000..2ee294d99
--- /dev/null
+++ b/poky/meta/recipes-support/beecrypt/beecrypt/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd tests
+for i in `ls`; do ./$i; if [ $? -eq 0 ]; then echo "PASS: $i"; \
+ else echo "FAIL: $i"; fi; done
diff --git a/poky/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb b/poky/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
new file mode 100644
index 000000000..1e626f154
--- /dev/null
+++ b/poky/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
@@ -0,0 +1,48 @@
+# Beecrypt OE build file
+# Copyright (C) 2004-2005, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+
+SUMMARY = "A general-purpose cryptography library"
+HOMEPAGE = "http://sourceforge.net/projects/beecrypt"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/beecrypt/beecrypt-${PV}.tar.gz \
+ file://disable-icu-check.patch \
+ file://fix-security.patch \
+ file://fix-for-gcc-4.7.patch \
+ file://run-ptest \
+ file://beecrypt-enable-ptest-support.patch \
+ file://add-option-dev-dsp.patch \
+ "
+
+SRC_URI[md5sum] = "8441c014170823f2dff97e33df55af1e"
+SRC_URI[sha256sum] = "286f1f56080d1a6b1d024003a5fa2158f4ff82cae0c6829d3c476a4b5898c55d"
+
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=9894370afd5dfe7d02b8d14319e729a1 \
+ file://COPYING.LIB;md5=dcf3c825659e82539645da41a7908589 \
+ file://include/beecrypt/beecrypt.h;endline=20;md5=47a93eef539aac237eef86297a4d71c1"
+
+PR = "r3"
+
+inherit autotools multilib_header ptest
+acpaths=""
+
+do_install_append() {
+ oe_multilib_header beecrypt/gnu.h
+}
+
+EXTRA_OECONF = "--without-python --enable-shared --enable-static --disable-openmp --with-java=no"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[cplusplus] = "--with-cplusplus,--without-cplusplus,icu"
+
+FILES_${PN} = "${sysconfdir} ${libdir}/*.so.* ${libdir}/${BPN}/*.so.*"
+FILES_${PN}-dev += "${libdir}/${BPN}/*.so ${libdir}/${BPN}/*.la"
+FILES_${PN}-staticdev += "${libdir}/${BPN}/*.a"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_ptest () {
+ mkdir ${D}${PTEST_PATH}/tests
+ cp -r ${B}/tests/.libs/test* ${D}${PTEST_PATH}/tests
+}
diff --git a/poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb b/poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
new file mode 100644
index 000000000..9d8191f33
--- /dev/null
+++ b/poky/meta/recipes-support/bmap-tools/bmap-tools_3.4.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Tools to generate block map (AKA bmap) and flash images using bmap"
+DESCRIPTION = "Bmap-tools - tools to generate block map (AKA bmap) and flash images using \
+bmap. Bmaptool is a generic tool for creating the block map (bmap) for a file, \
+and copying files using the block map. The idea is that large file containing \
+unused blocks, like raw system image files, can be copied or flashed a lot \
+faster with bmaptool than with traditional tools like "dd" or "cp"."
+HOMEPAGE = "https://github.com/01org/bmap-tools"
+SECTION = "console/utils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "https://github.com/intel/${BPN}/releases/download/v${PV}/${BP}.tgz"
+
+SRC_URI[md5sum] = "883420183611aa137cbaf68a91ef0d7e"
+SRC_URI[sha256sum] = "0064891270c180c190f41925b0f6fb9cecac3056f1168d2592dbe90e5f226c0a"
+
+UPSTREAM_CHECK_URI = "https://github.com/intel/${BPN}/releases"
+
+RDEPENDS_${PN} = "python3-core python3-compression python3-mmap python3-setuptools"
+
+inherit python3native
+inherit setuptools3
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-support/boost/bjam-native_1.66.0.bb b/poky/meta/recipes-support/boost/bjam-native_1.66.0.bb
new file mode 100644
index 000000000..92c86a3ef
--- /dev/null
+++ b/poky/meta/recipes-support/boost/bjam-native_1.66.0.bb
@@ -0,0 +1,19 @@
+require boost-${PV}.inc
+
+SUMMARY = "Portable Boost.Jam build tool for boost"
+SECTION = "devel"
+
+inherit native
+
+SRC_URI += "file://bjam-native-build-bjam.debug.patch \
+ file://0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch"
+
+do_compile() {
+ ./bootstrap.sh --with-toolset=gcc
+}
+
+do_install() {
+ install -d ${D}${bindir}/
+ # install unstripped version for bjam
+ install -c -m 755 bjam.debug ${D}${bindir}/bjam
+}
diff --git a/poky/meta/recipes-support/boost/boost-1.66.0.inc b/poky/meta/recipes-support/boost/boost-1.66.0.inc
new file mode 100644
index 000000000..fe2b8639f
--- /dev/null
+++ b/poky/meta/recipes-support/boost/boost-1.66.0.inc
@@ -0,0 +1,21 @@
+# The Boost web site provides free peer-reviewed portable
+# C++ source libraries. The emphasis is on libraries which
+# work well with the C++ Standard Library. The libraries are
+# intended to be widely useful, and are in regular use by
+# thousands of programmers across a broad spectrum of applications.
+HOMEPAGE = "http://www.boost.org/"
+LICENSE = "BSL-1.0 & MIT & Python-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+
+BOOST_VER = "${@"_".join(d.getVar("PV").split("."))}"
+BOOST_MAJ = "${@"_".join(d.getVar("PV").split(".")[0:2])}"
+BOOST_P = "boost_${BOOST_VER}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/boost/boost/${PV}/${BOOST_P}.tar.bz2"
+SRC_URI[md5sum] = "b2dfbd6c717be4a7bb2d88018eaccf75"
+SRC_URI[sha256sum] = "5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9"
+
+UPSTREAM_CHECK_URI = "http://www.boost.org/users/download/"
+UPSTREAM_CHECK_REGEX = "boostorg/release/(?P<pver>.*)/source/"
+
+S = "${WORKDIR}/${BOOST_P}"
diff --git a/poky/meta/recipes-support/boost/boost.inc b/poky/meta/recipes-support/boost/boost.inc
new file mode 100644
index 000000000..0461ec6fc
--- /dev/null
+++ b/poky/meta/recipes-support/boost/boost.inc
@@ -0,0 +1,200 @@
+SUMMARY = "Free peer-reviewed portable C++ source libraries"
+SECTION = "libs"
+DEPENDS = "bjam-native zlib bzip2"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+BOOST_LIBS = "\
+ atomic \
+ chrono \
+ container \
+ date_time \
+ exception \
+ filesystem \
+ graph \
+ iostreams \
+ log \
+ math \
+ program_options \
+ random \
+ regex \
+ serialization \
+ signals \
+ system \
+ timer \
+ test \
+ thread \
+ wave \
+ "
+
+# only supported by x86 and powerpc
+BOOST_LIBS_append_x86 = " context coroutine"
+BOOST_LIBS_append_x86-64 = " context coroutine"
+BOOST_LIBS_append_powerpc = " context coroutine"
+# need consistent settings for native builds (x86 override not applied for native)
+BOOST_LIBS_remove_class-native = " context coroutine"
+# does not compile
+BOOST_LIBS_remove_mips16e = "wave"
+
+# optional libraries
+PACKAGECONFIG ??= "locale python"
+PACKAGECONFIG[locale] = ",,icu"
+PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich"
+PACKAGECONFIG[mpi] = ",,mpich"
+PACKAGECONFIG[python] = ",,python3"
+
+BOOST_LIBS += "\
+ ${@bb.utils.filter('PACKAGECONFIG', 'locale python', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \
+ bb.utils.filter('PACKAGECONFIG', 'mpi', d), d)} \
+"
+
+inherit python3-dir
+PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
+
+# Make a package for each library, plus -dev
+PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}"
+python __anonymous () {
+ packages = []
+ extras = []
+ for lib in d.getVar('BOOST_LIBS').split():
+ extras.append("--with-%s" % lib)
+ pkg = "boost-%s" % lib.replace("_", "-")
+ packages.append(pkg)
+ if not d.getVar("FILES_%s" % pkg):
+ d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib)
+ d.setVar("BOOST_PACKAGES", " ".join(packages))
+ d.setVar("BJAM_EXTRA", " ".join(extras))
+}
+
+# Override the contents of specific packages
+FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*"
+FILES_${PN}-locale = "${libdir}/libboost_locale.so.*"
+FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*"
+FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \
+ ${libdir}/libboost_wserialization*.so.*"
+FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \
+ ${libdir}/libboost_unit_test_framework*.so.*"
+
+# -dev last to pick up the remaining stuff
+PACKAGES += "${PN}-dev ${PN}-staticdev"
+FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so"
+FILES_${PN}-staticdev = "${libdir}/libboost_*.a"
+
+# "boost" is a metapackage which pulls in all boost librabries
+PACKAGES += "${PN}"
+FILES_${PN} = ""
+ALLOW_EMPTY_${PN} = "1"
+RRECOMMENDS_${PN} += "${BOOST_PACKAGES}"
+RRECOMMENDS_${PN}_class-native = ""
+
+# to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+# Oh yippee, a new build system, it's sooo cooool I could eat my own
+# foot. inlining=on lets the compiler choose, I think. At least this
+# stuff is documented...
+# NOTE: if you leave <debug-symbols>on then in a debug build the build sys
+# objcopy will be invoked, and that won't work. Building debug apparently
+# requires hacking gcc-tools.jam
+#
+# Sometimes I wake up screaming. Famous figures are gathered in the nightmare,
+# Steve Bourne, Larry Wall, the whole of the ANSI C committee. They're just
+# standing there, waiting, but the truely terrifying thing is what they carry
+# in their hands. At first sight each seems to bear the same thing, but it is
+# not so for the forms in their grasp are ever so slightly different one from
+# the other. Each is twisted in some grotesque way from the other to make each
+# an unspeakable perversion impossible to perceive without the onset of madness.
+# True insanity awaits anyone who perceives all of these horrors together.
+#
+# Quotation marks, there might be an easier way to do this, but I can't find
+# it. The problem is that the user.hpp configuration file must receive a
+# pre-processor macro defined as the appropriate string - complete with "'s
+# around it. (<> is a possibility here but the danger to that is that the
+# failure case interprets the < and > as shell redirections, creating
+# random files in the source tree.)
+#
+#bjam: '-DBOOST_PLATFORM_CONFIG=\"config\"'
+#do_compile: '-sGCC=... '"'-DBOOST_PLATFORM_CONFIG=\"config\"'"
+SQD = '"'
+EQD = '\"'
+#boost.bb: "... '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..."
+BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}"
+
+BJAM_TOOLS = "--ignore-site-config \
+ '-sTOOLS=gcc' \
+ '-sGCC=${CC} '${BJAM_CONF} \
+ '-sGXX=${CXX} '${BJAM_CONF} \
+ '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
+ '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \
+ '-sBUILD=release <optimization>space <threading>multi <inlining>on <debug-symbols>off' \
+ '-sPYTHON_ROOT=${PYTHON_ROOT}' \
+ '--layout=system' \
+ "
+
+# use PARALLEL_MAKE to speed up the build, but limit it by -j 64, greater parallelism causes bjam to segfault or to ignore -j
+# https://svn.boost.org/trac/boost/ticket/7634
+BOOST_PARALLEL_MAKE = "${@oe.utils.parallel_make_argument(d, '-j%d', limit=64)}"
+BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \
+ ${BJAM_TOOLS} \
+ -sBOOST_BUILD_USER_CONFIG=${WORKDIR}/user-config.jam \
+ --build-dir=${S}/${TARGET_SYS} \
+ --disable-icu \
+ ${BJAM_EXTRA}'
+
+# Native compilation of bzip2 isn't working
+BJAM_OPTS_append_class-native = ' -sNO_BZIP2=1'
+
+# Adjust the build for x32
+BJAM_OPTS_append_x86-x32 = " abi=x32 address-model=64"
+
+do_configure() {
+ cp -f ${S}/boost/config/platform/linux.hpp ${S}/boost/config/platform/linux-gnueabi.hpp
+
+ # D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
+ rm -f ${WORKDIR}/user-config.jam
+ echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${WORKDIR}/user-config.jam
+
+ # If we want Python then we need to tell Boost *exactly* where to find it
+ if ${@bb.utils.contains('BOOST_LIBS', 'python', 'true', 'false', d)}; then
+ echo "using python : ${PYTHON_BASEVERSION} : ${STAGING_DIR_HOST}${bindir}/python3 : ${STAGING_DIR_HOST}${includedir}/${PYTHON_DIR}${PYTHON_ABI} : ${STAGING_DIR_HOST}${libdir}/${PYTHON_DIR} ;" >> ${WORKDIR}/user-config.jam
+ fi
+
+ if ${@bb.utils.contains('BOOST_LIBS', 'mpi', 'true', 'false', d)}; then
+ echo "using mpi : : <find-shared-library>mpi ;" >> ${WORKDIR}/user-config.jam
+ fi
+
+ CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc
+
+ # Boost can't be trusted to find Python on it's own, so remove any mention
+ # of it from the boost configuration
+ sed -i '/using python/d' ${S}/project-config.jam
+}
+
+do_compile() {
+ rm -rf ${S}/${TARGET_SYS}
+ bjam ${BJAM_OPTS} --prefix=${prefix} \
+ --exec-prefix=${exec_prefix} \
+ --libdir=${libdir} \
+ --includedir=${includedir} \
+ --debug-configuration
+}
+
+do_install() {
+ bjam ${BJAM_OPTS} \
+ --libdir=${D}${libdir} \
+ --includedir=${D}${includedir} \
+ install
+ for lib in ${BOOST_LIBS}; do
+ if [ -e ${D}${libdir}/libboost_${lib}.a ]; then
+ ln -s libboost_${lib}.a ${D}${libdir}/libboost_${lib}-mt.a
+ fi
+ if [ -e ${D}${libdir}/libboost_${lib}.so ]; then
+ ln -s libboost_${lib}.so ${D}${libdir}/libboost_${lib}-mt.so
+ fi
+ done
+
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch b/poky/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch
new file mode 100644
index 000000000..169906344
--- /dev/null
+++ b/poky/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch
@@ -0,0 +1,100 @@
+From 8845a786598f1d9e83aa1b7d2966b0d1eb765ba0 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 10:14:31 -0700
+Subject: [PATCH 1/3] Apply boost-1.62.0-no-forced-flags.patch
+
+Upstream-Status: Inappropriate
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ libs/log/build/Jamfile.v2 | 4 ++--
+ libs/log/config/x86-ext/Jamfile.jam | 16 ++++++++--------
+ libs/log/src/dump_avx2.cpp | 4 ++++
+ libs/log/src/dump_ssse3.cpp | 4 ++++
+ 4 files changed, 18 insertions(+), 10 deletions(-)
+
+diff --git a/libs/log/build/Jamfile.v2 b/libs/log/build/Jamfile.v2
+index 4abbdbc..b3016fc 100644
+--- a/libs/log/build/Jamfile.v2
++++ b/libs/log/build/Jamfile.v2
+@@ -373,7 +373,7 @@ rule avx2-targets-cond ( properties * )
+ }
+ else if <toolset>clang in $(properties)
+ {
+- result = <cxxflags>"-mavx -mavx2" ;
++ result = <cxxflags> ;
+ }
+ else if <toolset>intel in $(properties)
+ {
+@@ -383,7 +383,7 @@ rule avx2-targets-cond ( properties * )
+ }
+ else
+ {
+- result = <cxxflags>"-xCORE-AVX2 -fabi-version=0" ;
++ result = <cxxflags>"-fabi-version=0" ;
+ }
+ }
+ else if <toolset>msvc in $(properties)
+diff --git a/libs/log/config/x86-ext/Jamfile.jam b/libs/log/config/x86-ext/Jamfile.jam
+index 0e9695a..dcc394d 100644
+--- a/libs/log/config/x86-ext/Jamfile.jam
++++ b/libs/log/config/x86-ext/Jamfile.jam
+@@ -15,19 +15,19 @@ project /boost/log/x86-extensions
+
+ obj ssse3 : ssse3.cpp
+ :
+- <toolset>gcc:<cxxflags>"-msse -msse2 -msse3 -mssse3"
+- <toolset>clang:<cxxflags>"-msse -msse2 -msse3 -mssse3"
+- <toolset>intel-linux:<cxxflags>"-xSSSE3"
+- <toolset>intel-darwin:<cxxflags>"-xSSSE3"
++ <toolset>gcc:<cxxflags>
++ <toolset>clang:<cxxflags>
++ <toolset>intel-linux:<cxxflags>
++ <toolset>intel-darwin:<cxxflags>
+ <toolset>intel-win:<cxxflags>"/QxSSSE3"
+ ;
+
+ obj avx2 : avx2.cpp
+ :
+- <toolset>gcc:<cxxflags>"-mavx -mavx2 -fabi-version=0"
+- <toolset>clang:<cxxflags>"-mavx -mavx2"
+- <toolset>intel-linux:<cxxflags>"-xCORE-AVX2 -fabi-version=0"
+- <toolset>intel-darwin:<cxxflags>"-xCORE-AVX2 -fabi-version=0"
++ <toolset>gcc:<cxxflags>"-fabi-version=0"
++ <toolset>clang:<cxxflags>
++ <toolset>intel-linux:<cxxflags>"-fabi-version=0"
++ <toolset>intel-darwin:<cxxflags>"-fabi-version=0"
+ <toolset>intel-win:<cxxflags>"/arch:CORE-AVX2"
+ <toolset>msvc:<cxxflags>"/arch:AVX"
+ ;
+diff --git a/libs/log/src/dump_avx2.cpp b/libs/log/src/dump_avx2.cpp
+index 4ab1250..610fc6d 100644
+--- a/libs/log/src/dump_avx2.cpp
++++ b/libs/log/src/dump_avx2.cpp
+@@ -22,6 +22,10 @@
+ #include <boost/cstdint.hpp>
+ #include <boost/log/detail/header.hpp>
+
++#if !defined(__AVX2__)
++#error "AVX2 Unsupported!"
++#endif
++
+ #if defined(__x86_64) || defined(__x86_64__) || \
+ defined(__amd64__) || defined(__amd64) || \
+ defined(_M_X64)
+diff --git a/libs/log/src/dump_ssse3.cpp b/libs/log/src/dump_ssse3.cpp
+index 1325b49..60d4112 100644
+--- a/libs/log/src/dump_ssse3.cpp
++++ b/libs/log/src/dump_ssse3.cpp
+@@ -22,6 +22,10 @@
+ #include <boost/cstdint.hpp>
+ #include <boost/log/detail/header.hpp>
+
++#if !defined(__SSSE3__)
++#error "SSSE3 Unsupported!"
++#endif
++
+ #if defined(__x86_64) || defined(__x86_64__) || \
+ defined(__amd64__) || defined(__amd64) || \
+ defined(_M_X64)
+--
+2.8.0
diff --git a/poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch b/poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
new file mode 100644
index 000000000..26f3cbb05
--- /dev/null
+++ b/poky/meta/recipes-support/boost/boost/0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch
@@ -0,0 +1,65 @@
+From e4d3a7470b307693660d0412732e7266d1738d8c Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 10:29:17 -0700
+Subject: [PATCH 6/6] Don't set up -m32/-m64, we do that ourselves
+
+Upstream-Status: Inappropriate
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+---
+ tools/build/src/tools/gcc.jam | 39 ---------------------------------------
+ 1 file changed, 39 deletions(-)
+
+diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
+index e4fc6c32..37914fd0 100644
+--- a/tools/build/src/tools/gcc.jam
++++ b/tools/build/src/tools/gcc.jam
+@@ -337,45 +337,6 @@ rule set-address-model-options ( targets * : sources * : properties * )
+ {
+ local option ;
+ local target-os = [ feature.get-values target-os : $(properties) ] ;
+- if $(target-os) = aix
+- {
+- if $(model) = 32
+- {
+- option = -maix32 ;
+- }
+- else
+- {
+- option = -maix64 ;
+- }
+- }
+- else if $(target-os) = hpux
+- {
+- if $(model) = 32
+- {
+- option = -milp32 ;
+- }
+- else
+- {
+- option = -mlp64 ;
+- }
+- }
+- else
+- {
+- local arch = [ feature.get-values architecture : $(properties) ] ;
+- if $(arch) = power || $(arch) = sparc || $(arch) = x86
+- {
+- if $(model) = 32
+- {
+- option = -m32 ;
+- }
+- else if $(model) = 64
+- {
+- option = -m64 ;
+- }
+- }
+- # For darwin, the model can be 32_64. darwin.jam will handle that
+- # on its own.
+- }
+ OPTIONS on $(targets) += $(option) ;
+ }
+ }
+--
+2.15.1
+
diff --git a/poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch b/poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
new file mode 100644
index 000000000..fb6d9711b
--- /dev/null
+++ b/poky/meta/recipes-support/boost/boost/0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch
@@ -0,0 +1,151 @@
+From 0868761e7d2d75d472090e3ef96f3d2f9ced27f3 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 10:29:32 -0700
+Subject: [PATCH 5/6] Don't set up arch/instruction-set flags, we do that
+ ourselves
+
+Upstream-Status: Inappropriate
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+---
+ tools/build/src/tools/gcc.jam | 127 ------------------------------------------
+ 1 file changed, 127 deletions(-)
+
+diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
+index e3b1b952..e4fc6c32 100644
+--- a/tools/build/src/tools/gcc.jam
++++ b/tools/build/src/tools/gcc.jam
+@@ -1276,130 +1276,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + :
+ <architecture>$(architecture)/<instruction-set>$(instruction-set)
+ : $(values) ;
+ }
+-
+-
+-# Set architecture/instruction-set options.
+-#
+-# x86 and compatible
+-# The 'native' option appeared in gcc 4.2 so we cannot safely use it as default.
+-# Use i686 instead for 32-bit.
+-toolset.flags gcc OPTIONS <architecture>x86/<address-model>32/<instruction-set> : -march=i686 ;
+-cpu-flags gcc OPTIONS : x86 : native : -march=native ;
+-cpu-flags gcc OPTIONS : x86 : i486 : -march=i486 ;
+-cpu-flags gcc OPTIONS : x86 : i586 : -march=i586 ;
+-cpu-flags gcc OPTIONS : x86 : i686 : -march=i686 ;
+-cpu-flags gcc OPTIONS : x86 : pentium : -march=pentium ;
+-cpu-flags gcc OPTIONS : x86 : pentium-mmx : -march=pentium-mmx ;
+-cpu-flags gcc OPTIONS : x86 : pentiumpro : -march=pentiumpro ;
+-cpu-flags gcc OPTIONS : x86 : pentium2 : -march=pentium2 ;
+-cpu-flags gcc OPTIONS : x86 : pentium3 : -march=pentium3 ;
+-cpu-flags gcc OPTIONS : x86 : pentium3m : -march=pentium3m ;
+-cpu-flags gcc OPTIONS : x86 : pentium-m : -march=pentium-m ;
+-cpu-flags gcc OPTIONS : x86 : pentium4 : -march=pentium4 ;
+-cpu-flags gcc OPTIONS : x86 : pentium4m : -march=pentium4m ;
+-cpu-flags gcc OPTIONS : x86 : prescott : -march=prescott ;
+-cpu-flags gcc OPTIONS : x86 : nocona : -march=nocona ;
+-cpu-flags gcc OPTIONS : x86 : core2 : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : conroe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : conroe-xe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : conroe-l : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : allendale : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : wolfdale : -march=core2 -msse4.1 ;
+-cpu-flags gcc OPTIONS : x86 : merom : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : merom-xe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : kentsfield : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : kentsfield-xe : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : yorksfield : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : penryn : -march=core2 ;
+-cpu-flags gcc OPTIONS : x86 : corei7 : -march=corei7 ;
+-cpu-flags gcc OPTIONS : x86 : nehalem : -march=corei7 ;
+-cpu-flags gcc OPTIONS : x86 : corei7-avx : -march=corei7-avx ;
+-cpu-flags gcc OPTIONS : x86 : sandy-bridge : -march=corei7-avx ;
+-cpu-flags gcc OPTIONS : x86 : core-avx-i : -march=core-avx-i ;
+-cpu-flags gcc OPTIONS : x86 : ivy-bridge : -march=core-avx-i ;
+-cpu-flags gcc OPTIONS : x86 : haswell : -march=core-avx-i -mavx2 -mfma -mbmi -mbmi2 -mlzcnt ;
+-cpu-flags gcc OPTIONS : x86 : broadwell : -march=broadwell ;
+-cpu-flags gcc OPTIONS : x86 : skylake : -march=skylake ;
+-cpu-flags gcc OPTIONS : x86 : skylake-avx512 : -march=skylake-avx512 ;
+-cpu-flags gcc OPTIONS : x86 : cannonlake : -march=skylake-avx512 -mavx512vbmi -mavx512ifma -msha ;
+-cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ;
+-cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ;
+-cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ;
+-cpu-flags gcc OPTIONS : x86 : athlon : -march=athlon ;
+-cpu-flags gcc OPTIONS : x86 : athlon-tbird : -march=athlon-tbird ;
+-cpu-flags gcc OPTIONS : x86 : athlon-4 : -march=athlon-4 ;
+-cpu-flags gcc OPTIONS : x86 : athlon-xp : -march=athlon-xp ;
+-cpu-flags gcc OPTIONS : x86 : athlon-mp : -march=athlon-mp ;
+-##
+-cpu-flags gcc OPTIONS : x86 : k8 : -march=k8 ;
+-cpu-flags gcc OPTIONS : x86 : opteron : -march=opteron ;
+-cpu-flags gcc OPTIONS : x86 : athlon64 : -march=athlon64 ;
+-cpu-flags gcc OPTIONS : x86 : athlon-fx : -march=athlon-fx ;
+-cpu-flags gcc OPTIONS : x86 : k8-sse3 : -march=k8-sse3 ;
+-cpu-flags gcc OPTIONS : x86 : opteron-sse3 : -march=opteron-sse3 ;
+-cpu-flags gcc OPTIONS : x86 : athlon64-sse3 : -march=athlon64-sse3 ;
+-cpu-flags gcc OPTIONS : x86 : amdfam10 : -march=amdfam10 ;
+-cpu-flags gcc OPTIONS : x86 : barcelona : -march=barcelona ;
+-cpu-flags gcc OPTIONS : x86 : bdver1 : -march=bdver1 ;
+-cpu-flags gcc OPTIONS : x86 : bdver2 : -march=bdver2 ;
+-cpu-flags gcc OPTIONS : x86 : bdver3 : -march=bdver3 ;
+-cpu-flags gcc OPTIONS : x86 : bdver4 : -march=bdver4 ;
+-cpu-flags gcc OPTIONS : x86 : btver1 : -march=btver1 ;
+-cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ;
+-cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ;
+-cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ;
+-cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ;
+-cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ;
+-cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ;
+-##
+-cpu-flags gcc OPTIONS : x86 : atom : -march=atom ;
+-# Sparc
+-cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 : default ;
+-cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ;
+-cpu-flags gcc OPTIONS : sparc : v8 : -mcpu=v8 ;
+-cpu-flags gcc OPTIONS : sparc : supersparc : -mcpu=supersparc ;
+-cpu-flags gcc OPTIONS : sparc : sparclite : -mcpu=sparclite ;
+-cpu-flags gcc OPTIONS : sparc : hypersparc : -mcpu=hypersparc ;
+-cpu-flags gcc OPTIONS : sparc : sparclite86x : -mcpu=sparclite86x ;
+-cpu-flags gcc OPTIONS : sparc : f930 : -mcpu=f930 ;
+-cpu-flags gcc OPTIONS : sparc : f934 : -mcpu=f934 ;
+-cpu-flags gcc OPTIONS : sparc : sparclet : -mcpu=sparclet ;
+-cpu-flags gcc OPTIONS : sparc : tsc701 : -mcpu=tsc701 ;
+-cpu-flags gcc OPTIONS : sparc : v9 : -mcpu=v9 ;
+-cpu-flags gcc OPTIONS : sparc : ultrasparc : -mcpu=ultrasparc ;
+-cpu-flags gcc OPTIONS : sparc : ultrasparc3 : -mcpu=ultrasparc3 ;
+-# RS/6000 & PowerPC
+-cpu-flags gcc OPTIONS : power : 403 : -mcpu=403 ;
+-cpu-flags gcc OPTIONS : power : 505 : -mcpu=505 ;
+-cpu-flags gcc OPTIONS : power : 601 : -mcpu=601 ;
+-cpu-flags gcc OPTIONS : power : 602 : -mcpu=602 ;
+-cpu-flags gcc OPTIONS : power : 603 : -mcpu=603 ;
+-cpu-flags gcc OPTIONS : power : 603e : -mcpu=603e ;
+-cpu-flags gcc OPTIONS : power : 604 : -mcpu=604 ;
+-cpu-flags gcc OPTIONS : power : 604e : -mcpu=604e ;
+-cpu-flags gcc OPTIONS : power : 620 : -mcpu=620 ;
+-cpu-flags gcc OPTIONS : power : 630 : -mcpu=630 ;
+-cpu-flags gcc OPTIONS : power : 740 : -mcpu=740 ;
+-cpu-flags gcc OPTIONS : power : 7400 : -mcpu=7400 ;
+-cpu-flags gcc OPTIONS : power : 7450 : -mcpu=7450 ;
+-cpu-flags gcc OPTIONS : power : 750 : -mcpu=750 ;
+-cpu-flags gcc OPTIONS : power : 801 : -mcpu=801 ;
+-cpu-flags gcc OPTIONS : power : 821 : -mcpu=821 ;
+-cpu-flags gcc OPTIONS : power : 823 : -mcpu=823 ;
+-cpu-flags gcc OPTIONS : power : 860 : -mcpu=860 ;
+-cpu-flags gcc OPTIONS : power : 970 : -mcpu=970 ;
+-cpu-flags gcc OPTIONS : power : 8540 : -mcpu=8540 ;
+-cpu-flags gcc OPTIONS : power : power : -mcpu=power ;
+-cpu-flags gcc OPTIONS : power : power2 : -mcpu=power2 ;
+-cpu-flags gcc OPTIONS : power : power3 : -mcpu=power3 ;
+-cpu-flags gcc OPTIONS : power : power4 : -mcpu=power4 ;
+-cpu-flags gcc OPTIONS : power : power5 : -mcpu=power5 ;
+-cpu-flags gcc OPTIONS : power : powerpc : -mcpu=powerpc ;
+-cpu-flags gcc OPTIONS : power : powerpc64 : -mcpu=powerpc64 ;
+-cpu-flags gcc OPTIONS : power : rios : -mcpu=rios ;
+-cpu-flags gcc OPTIONS : power : rios1 : -mcpu=rios1 ;
+-cpu-flags gcc OPTIONS : power : rios2 : -mcpu=rios2 ;
+-cpu-flags gcc OPTIONS : power : rsc : -mcpu=rsc ;
+-cpu-flags gcc OPTIONS : power : rs64a : -mcpu=rs64 ;
+-# AIX variant of RS/6000 & PowerPC
+-toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ;
+--
+2.15.1
+
diff --git a/poky/meta/recipes-support/boost/boost/arm-intrinsics.patch b/poky/meta/recipes-support/boost/boost/arm-intrinsics.patch
new file mode 100644
index 000000000..fe85c69a8
--- /dev/null
+++ b/poky/meta/recipes-support/boost/boost/arm-intrinsics.patch
@@ -0,0 +1,55 @@
+Upstream-Status: Backport
+
+8/17/2010 - rebased to 1.44 by Qing He <qing.he@intel.com>
+
+diff --git a/boost/smart_ptr/detail/atomic_count_sync.hpp b/boost/smart_ptr/detail/atomic_count_sync.hpp
+index b6359b5..78b1cc2 100644
+--- a/boost/smart_ptr/detail/atomic_count_sync.hpp
++++ b/boost/smart_ptr/detail/atomic_count_sync.hpp
+@@ -33,17 +33,46 @@ public:
+
+ long operator++()
+ {
++#ifdef __ARM_ARCH_7A__
++ int v1, tmp;
++ asm volatile ("1: \n\t"
++ "ldrex %0, %1 \n\t"
++ "add %0 ,%0, #1 \n\t"
++ "strex %2, %0, %1 \n\t"
++ "cmp %2, #0 \n\t"
++ "bne 1b \n\t"
++ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
++ );
++#else
+ return __sync_add_and_fetch( &value_, 1 );
++#endif
+ }
+
+ long operator--()
+ {
++#ifdef __ARM_ARCH_7A__
++ int v1, tmp;
++ asm volatile ("1: \n\t"
++ "ldrex %0, %1 \n\t"
++ "sub %0 ,%0, #1 \n\t"
++ "strex %2, %0, %1 \n\t"
++ "cmp %2, #0 \n\t"
++ "bne 1b \n\t"
++ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
++ );
++ return value_;
++#else
+ return __sync_add_and_fetch( &value_, -1 );
++#endif
+ }
+
+ operator long() const
+ {
++#if __ARM_ARCH_7A__
++ return value_;
++#else
+ return __sync_fetch_and_add( &value_, 0 );
++#endif
+ }
+
+ private:
diff --git a/poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch b/poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch
new file mode 100644
index 000000000..917617a04
--- /dev/null
+++ b/poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch
@@ -0,0 +1,112 @@
+Reference
+
+https://svn.boost.org/trac/boost/changeset/78326
+
+Upstream-Status: Backport
+CVE: CVE-2012-2677
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff --git a/boost/pool/pool.hpp.old b/boost/pool/pool.hpp
+index c47b11f..417a1e0 100644
+--- a/boost/pool/pool.hpp.old
++++ b/boost/pool/pool.hpp
+@@ -26,6 +26,8 @@
+
+ #include <boost/pool/poolfwd.hpp>
+
++// std::numeric_limits
++#include <boost/limits.hpp>
+ // boost::integer::static_lcm
+ #include <boost/integer/common_factor_ct.hpp>
+ // boost::simple_segregated_storage
+@@ -355,6 +357,15 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ return s;
+ }
+
++ size_type max_chunks() const
++ { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool.
++ size_type partition_size = alloc_size();
++ size_type POD_size = integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type);
++ size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size();
++
++ return max_chunks;
++ }
++
+ static void * & nextof(void * const ptr)
+ { //! \returns Pointer dereferenced.
+ //! (Provided and used for the sake of code readability :)
+@@ -375,6 +386,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ //! the first time that object needs to allocate system memory.
+ //! The default is 32. This parameter may not be 0.
+ //! \param nmax_size is the maximum number of chunks to allocate in one block.
++ set_next_size(nnext_size);
++ set_max_size(nmax_size);
+ }
+
+ ~pool()
+@@ -398,8 +411,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ }
+ void set_next_size(const size_type nnext_size)
+ { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0.
+- //! \returns nnext_size.
+- next_size = start_size = nnext_size;
++ BOOST_USING_STD_MIN();
++ next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks());
+ }
+ size_type get_max_size() const
+ { //! \returns max_size.
+@@ -407,7 +420,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t
+ }
+ void set_max_size(const size_type nmax_size)
+ { //! Set max_size.
+- max_size = nmax_size;
++ BOOST_USING_STD_MIN();
++ max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks());
+ }
+ size_type get_requested_size() const
+ { //! \returns the requested size passed into the constructor.
+@@ -708,9 +722,9 @@ void * pool<UserAllocator>::malloc_need_resize()
+
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // initialize it,
+ store().add_block(node.begin(), node.element_size(), partition_size);
+@@ -748,9 +762,9 @@ void * pool<UserAllocator>::ordered_malloc_need_resize()
+
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // initialize it,
+ // (we can use "add_block" here because we know that
+@@ -792,6 +806,8 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n)
+ { //! Gets address of a chunk n, allocating new memory if not already available.
+ //! \returns Address of chunk n if allocated ok.
+ //! \returns 0 if not enough memory for n chunks.
++ if (n > max_chunks())
++ return 0;
+
+ const size_type partition_size = alloc_size();
+ const size_type total_req_size = n * requested_size;
+@@ -840,9 +856,9 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n)
+
+ BOOST_USING_STD_MIN();
+ if(!max_size)
+- next_size <<= 1;
++ set_next_size(next_size << 1);
+ else if( next_size*partition_size/requested_size < max_size)
+- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size);
++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size));
+
+ // insert it into the list,
+ // handle border case.
diff --git a/poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch b/poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch
new file mode 100644
index 000000000..595ba1786
--- /dev/null
+++ b/poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch
@@ -0,0 +1,31 @@
+From cabfcba1ff7511ffd6b91ca244288d44f585aad2 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Fri, 23 Sep 2016 01:04:50 -0700
+Subject: [PATCH] boost-math: disable pch for gcc
+
+Upstream-Status: Inappropriate [*]
+
+* It's a work around for a defect when build in parallel:
+https://svn.boost.org/trac/boost/ticket/12477
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ libs/math/build/Jamfile.v2 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/math/build/Jamfile.v2 b/libs/math/build/Jamfile.v2
+index e19fb2e..82472a7 100644
+--- a/libs/math/build/Jamfile.v2
++++ b/libs/math/build/Jamfile.v2
+@@ -13,7 +13,7 @@ project
+ #<toolset>intel-linux:<pch>off
+ <toolset>intel-darwin:<pch>off
+ <toolset>msvc-7.1:<pch>off
+- <toolset>gcc,<target-os>windows:<pch>off
++ <toolset>gcc:<pch>off
+ #<toolset>gcc:<cxxflags>-fvisibility=hidden
+ <toolset>intel-linux:<cxxflags>-fvisibility=hidden
+ #<toolset>sun:<cxxflags>-xldscope=hidden
+--
+2.7.4
+
diff --git a/poky/meta/recipes-support/boost/boost_1.66.0.bb b/poky/meta/recipes-support/boost/boost_1.66.0.bb
new file mode 100644
index 000000000..63b82a599
--- /dev/null
+++ b/poky/meta/recipes-support/boost/boost_1.66.0.bb
@@ -0,0 +1,11 @@
+require boost-${PV}.inc
+require boost.inc
+
+SRC_URI += "\
+ file://arm-intrinsics.patch \
+ file://boost-CVE-2012-2677.patch \
+ file://boost-math-disable-pch-for-gcc.patch \
+ file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \
+ file://0003-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \
+ file://0002-Don-t-set-up-m32-m64-we-do-that-ourselves.patch \
+"
diff --git a/poky/meta/recipes-support/boost/files/0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch b/poky/meta/recipes-support/boost/files/0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch
new file mode 100644
index 000000000..a75133d2b
--- /dev/null
+++ b/poky/meta/recipes-support/boost/files/0001-Fix-a-strange-assert-typo-how-was-this-released-with.patch
@@ -0,0 +1,37 @@
+From 5685527364198597f25fc1c6236cb64cbc3de44f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 4 Oct 2017 18:16:08 +0300
+Subject: [PATCH] Fix a strange assert typo; how was this released without
+ noticing?
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tools/build/src/engine/debugger.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/build/src/engine/debugger.c b/tools/build/src/engine/debugger.c
+index 802f262..152a7e6 100644
+--- a/tools/build/src/engine/debugger.c
++++ b/tools/build/src/engine/debugger.c
+@@ -1092,7 +1092,7 @@ static void debug_start_child( int argc, const char * * argv )
+ PROCESS_INFORMATION pi = { NULL, NULL, 0, 0 };
+ STARTUPINFO si = { sizeof( STARTUPINFO ), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0 };
+- assert( DEBUG_STATE == DEBUG_NO_CHILD );
++ assert( debug_state == DEBUG_NO_CHILD );
+ if ( ! CreatePipe( &pipe1[ 0 ], &pipe1[ 1 ], &sa, 0 ) )
+ {
+ printf("internal error\n");
+@@ -1176,7 +1176,7 @@ static void debug_start_child( int argc, const char * * argv )
+ int read_fd;
+ int pid;
+ int i;
+- assert( DEBUG_STATE == DEBUG_NO_CHILD );
++ assert( debug_state == DEBUG_NO_CHILD );
+ pipe(pipe1);
+ pipe(pipe2);
+ pid = fork();
+--
+2.14.1
+
diff --git a/poky/meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch b/poky/meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch
new file mode 100644
index 000000000..9f8b7eac0
--- /dev/null
+++ b/poky/meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch
@@ -0,0 +1,50 @@
+From 619ada314ab26c0c9cbfe5702cd9c0caa8f6415a Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Mon, 3 Aug 2015 17:12:33 +0800
+Subject: [PATCH] bjam-native: build bjam.debug
+
+bjam is stripped by default, this causes QA warning while stripping it
+from do_populate_sysroot():
+
+ WARNING: File '.../tmp/sysroots/x86_64-linux/usr/bin/bjam' \
+ from bjam-native was already stripped, \
+ this will prevent future debugging!
+
+The JAM scripts allow to build unstripped version with '--debug'. Just
+build and install the bjam.debug to stop bjam from being stripped in
+compile step.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ bootstrap.sh | 1 +
+ tools/build/src/engine/build.sh | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/bootstrap.sh b/bootstrap.sh
+index 98cf88b..54690aa 100755
+--- a/bootstrap.sh
++++ b/bootstrap.sh
+@@ -228,6 +228,7 @@ if test "x$BJAM" = x; then
+ echo "tools/build/src/engine/$arch/b2"
+ cp "$BJAM" .
+ cp "$my_dir/tools/build/src/engine/$arch/bjam" .
++ cp "$my_dir/tools/build/src/engine/${arch}.debug/bjam" bjam.debug
+
+ fi
+
+diff --git a/tools/build/src/engine/build.sh b/tools/build/src/engine/build.sh
+index 6dbc706..c69fdc7 100755
+--- a/tools/build/src/engine/build.sh
++++ b/tools/build/src/engine/build.sh
+@@ -312,5 +312,5 @@ if test -x "./bootstrap/jam0" ; then
+ if test "${BJAM_UPDATE}" != "update" ; then
+ echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" clean
+ fi
+- echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@"
++ echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" --debug
+ fi
+--
+1.9.1
+
diff --git a/poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch b/poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch
new file mode 100644
index 000000000..4a8ae5f4b
--- /dev/null
+++ b/poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch
@@ -0,0 +1,34 @@
+ca-certificates is a package from Debian, but some host distros such as Fedora
+have a leaner run-parts provided by cron which doesn't support --verbose or the
+ -- separator between arguments and paths.
+
+This solves errors such as
+
+| Running hooks in [...]/rootfs/etc/ca-certificates/update.d...
+| [...]/usr/sbin/update-ca-certificates: line 194: Not: command not found
+| [...]/usr/sbin/update-ca-certificates: line 230: Not a directory: --: command not found
+| E: Not a directory: -- exited with code 127.
+
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
+---
+ sbin/update-ca-certificates | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+Index: git/sbin/update-ca-certificates
+===================================================================
+--- git.orig/sbin/update-ca-certificates
++++ git/sbin/update-ca-certificates
+@@ -191,9 +191,7 @@ if [ -d "$HOOKSDIR" ]
+ then
+
+ echo "Running hooks in $HOOKSDIR..."
+- VERBOSE_ARG=
+- [ "$verbose" = 0 ] || VERBOSE_ARG="--verbose"
+- eval run-parts "$VERBOSE_ARG" --test -- "$HOOKSDIR" | while read hook
++ eval run-parts --test "$HOOKSDIR" | while read hook
+ do
+ ( cat "$ADDED"
+ cat "$REMOVED" ) | "$hook" || echo "E: $hook exited with code $?."
diff --git a/poky/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch b/poky/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch
new file mode 100644
index 000000000..792b4030b
--- /dev/null
+++ b/poky/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch
@@ -0,0 +1,46 @@
+Upstream-Status: Pending
+
+From 724cb153ca0f607fb38b3a8db3ebb2742601cd81 Mon Sep 17 00:00:00 2001
+From: Andreas Oberritter <obi@opendreambox.org>
+Date: Tue, 19 Mar 2013 17:14:33 +0100
+Subject: [PATCH 2/2] update-ca-certificates: use $SYSROOT
+
+Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
+---
+ sbin/update-ca-certificates | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+Index: git/sbin/update-ca-certificates
+===================================================================
+--- git.orig/sbin/update-ca-certificates
++++ git/sbin/update-ca-certificates
+@@ -24,12 +24,12 @@
+ verbose=0
+ fresh=0
+ default=0
+-CERTSCONF=/etc/ca-certificates.conf
+-CERTSDIR=/usr/share/ca-certificates
+-LOCALCERTSDIR=/usr/local/share/ca-certificates
++CERTSCONF=$SYSROOT/etc/ca-certificates.conf
++CERTSDIR=$SYSROOT/usr/share/ca-certificates
++LOCALCERTSDIR=$SYSROOT/usr/local/share/ca-certificates
+ CERTBUNDLE=ca-certificates.crt
+-ETCCERTSDIR=/etc/ssl/certs
+-HOOKSDIR=/etc/ca-certificates/update.d
++ETCCERTSDIR=$SYSROOT/etc/ssl/certs
++HOOKSDIR=$SYSROOT/etc/ca-certificates/update.d
+
+ while [ $# -gt 0 ];
+ do
+@@ -92,9 +92,9 @@ add() {
+ PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
+ -e 's/[()]/=/g' \
+ -e 's/,/_/g').pem"
+- if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ]
++ if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${CERT##$SYSROOT}" ]
+ then
+- ln -sf "$CERT" "$PEM"
++ ln -sf "${CERT##$SYSROOT}" "$PEM"
+ echo "+$PEM" >> "$ADDED"
+ fi
+ # Add trailing newline to certificate, if it is missing (#635570)
diff --git a/poky/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch b/poky/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch
new file mode 100644
index 000000000..4bd967f78
--- /dev/null
+++ b/poky/meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch
@@ -0,0 +1,71 @@
+From a9fc13b2aee55655d58fcb77a3180fa99f96438a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
+Date: Wed, 28 Mar 2018 16:45:05 +0100
+Subject: [PATCH] update-ca-certificates: use relative symlinks from
+ $ETCCERTSDIR
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+update-ca-certificates symlinks (trusted) certificates
+from $CERTSDIR or $LOCALCERTSDIR into $ETCCERTSDIR.
+update-ca-certificates can call hook scripts installed
+into /etc/ca-certificates/update.d. Those scripts are
+passed the pem file in /etc/ssl/certs/ that was added or
+removed in this run and those pem files are absolute
+symlinks into $CERTSDIR or $LOCALCERTSDIR at the moment.
+
+When running update-ca-certificates during image build
+time, they thusly all point into the host's file system,
+not into the $SYSROOT. This means:
+* the host's file system layout must match the one
+ produced by OE, and
+* it also means that the host must have installed the same
+ (or more) certificates as the target in $CERTSDIR and
+ $LOCALCERTSDIR
+
+This is a problem when wanting to execute hook scripts,
+because they all need to be taught about $SYSROOT, and
+behave differently depending on whether they're called
+at image build time, or on the target, as otherwise they
+will be trying to actually read the host's certificates
+from $CERTSDIR or $LOCALCERTSDIR.
+
+This also is a problem when running anything else during
+image build time that depends on the trusted CA
+certificates.
+
+Changing the symlink to be relative solves all of these
+problems. Do so.
+
+Upstream-Status: Inappropriate [OE-specific]
+Signed-off-by: André Draszik <andre.draszik@jci.com>
+---
+ sbin/update-ca-certificates | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
+index 00f80c7..7e911a9 100755
+--- a/sbin/update-ca-certificates
++++ b/sbin/update-ca-certificates
+@@ -29,6 +29,7 @@ CERTSDIR=$SYSROOT/usr/share/ca-certificates
+ LOCALCERTSDIR=$SYSROOT/usr/local/share/ca-certificates
+ CERTBUNDLE=ca-certificates.crt
+ ETCCERTSDIR=$SYSROOT/etc/ssl/certs
++FSROOT=../../../ # to get from $ETCCERTSDIR to the root of the file system
+ HOOKSDIR=$SYSROOT/etc/ca-certificates/update.d
+
+ while [ $# -gt 0 ];
+@@ -125,9 +126,10 @@ add() {
+ PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
+ -e 's/[()]/=/g' \
+ -e 's/,/_/g').pem"
+- if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${CERT##$SYSROOT}" ]
++ DST="$(echo ${CERT} | sed -e "s|^$SYSROOT||" -e "s|^/|$FSROOT|" )"
++ if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${DST}" ]
+ then
+- ln -sf "${CERT##$SYSROOT}" "$PEM"
++ ln -sf "${DST}" "$PEM"
+ echo "+$PEM" >> "$ADDED"
+ fi
+ # Add trailing newline to certificate, if it is missing (#635570)
diff --git a/poky/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch b/poky/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch
new file mode 100644
index 000000000..f8b0791be
--- /dev/null
+++ b/poky/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch
@@ -0,0 +1,50 @@
+Upstream-Status: Pending
+
+update-ca-certificates: find SYSROOT relative to its own location
+
+This makes the script relocatable.
+
+Index: git/sbin/update-ca-certificates
+===================================================================
+--- git.orig/sbin/update-ca-certificates
++++ git/sbin/update-ca-certificates
+@@ -66,6 +66,39 @@ do
+ shift
+ done
+
++if [ -z "$SYSROOT" ]; then
++ local_which () {
++ if [ $# -lt 1 ]; then
++ return 1
++ fi
++
++ (
++ IFS=:
++ for entry in $PATH; do
++ if [ -x "$entry/$1" ]; then
++ echo "$entry/$1"
++ exit 0
++ fi
++ done
++ exit 1
++ )
++ }
++
++ case "$0" in
++ */*)
++ sbindir=$(cd ${0%/*} && pwd)
++ ;;
++ *)
++ sbindir=$(cd $(dirname $(local_which $0)) && pwd)
++ ;;
++ esac
++ prefix=${sbindir%/*}
++ SYSROOT=${prefix%/*}
++ if [ ! -d "$SYSROOT/usr/share/ca-certificates" ]; then
++ SYSROOT=
++ fi
++fi
++
+ if [ ! -s "$CERTSCONF" ]
+ then
+ fresh=1
diff --git a/poky/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch b/poky/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch
new file mode 100644
index 000000000..a113fa8b1
--- /dev/null
+++ b/poky/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Pending
+
+Let us alter the install destination of the script via SBINDIR
+
+--- ca-certificates-20130119.orig/sbin/Makefile
++++ ca-certificates-20130119/sbin/Makefile
+@@ -3,9 +3,12 @@
+ #
+ #
+
++SBINDIR = /usr/sbin
++
+ all:
+
+ clean:
+
+ install:
+- install -m755 update-ca-certificates $(DESTDIR)/usr/sbin/
++ install -d $(DESTDIR)$(SBINDIR)
++ install -m755 update-ca-certificates $(DESTDIR)$(SBINDIR)/
diff --git a/poky/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch b/poky/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch
new file mode 100644
index 000000000..6e2171f75
--- /dev/null
+++ b/poky/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch
@@ -0,0 +1,34 @@
+From 30378026d136efa779732e3f6664e2ecf461e458 Mon Sep 17 00:00:00 2001
+From: Patrick Ohly <patrick.ohly@intel.com>
+Date: Thu, 17 Mar 2016 12:38:09 +0100
+Subject: [PATCH] update-ca-certificates: support Toybox
+
+"mktemp -t" is deprecated and does not work when using Toybox. Replace
+with something that works also with Toybox.
+
+Upstream-Status: Pending
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+---
+ sbin/update-ca-certificates | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
+index 79c41bb..ae9e3f1 100755
+--- a/sbin/update-ca-certificates
++++ b/sbin/update-ca-certificates
+@@ -113,9 +113,9 @@ trap cleanup 0
+
+ # Helper files. (Some of them are not simple arrays because we spawn
+ # subshells later on.)
+-TEMPBUNDLE="$(mktemp -t "${CERTBUNDLE}.tmp.XXXXXX")"
+-ADDED="$(mktemp -t "ca-certificates.tmp.XXXXXX")"
+-REMOVED="$(mktemp -t "ca-certificates.tmp.XXXXXX")"
++TEMPBUNDLE="$(mktemp -p${TMPDIR:-/tmp} "${CERTBUNDLE}.tmp.XXXXXX")"
++ADDED="$(mktemp -p${TMPDIR:-/tmp} "ca-certificates.tmp.XXXXXX")"
++REMOVED="$(mktemp -p${TMPDIR:-/tmp} "ca-certificates.tmp.XXXXXX")"
+
+ # Adds a certificate to the list of trusted ones. This includes a symlink
+ # in /etc/ssl/certs to the certificate file and its inclusion into the
+--
+2.1.4
diff --git a/poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb b/poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb
new file mode 100644
index 000000000..350294858
--- /dev/null
+++ b/poky/meta/recipes-support/ca-certificates/ca-certificates_20170717.bb
@@ -0,0 +1,88 @@
+SUMMARY = "Common CA certificates"
+DESCRIPTION = "This package includes PEM files of CA certificates to allow \
+SSL-based applications to check for the authenticity of SSL connections. \
+This derived from Debian's CA Certificates."
+HOMEPAGE = "http://packages.debian.org/sid/ca-certificates"
+SECTION = "misc"
+LICENSE = "GPL-2.0+ & MPL-2.0"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=e7358b9541ccf3029e9705ed8de57968"
+
+# This is needed to ensure we can run the postinst at image creation time
+DEPENDS = ""
+DEPENDS_class-native = "openssl-native"
+DEPENDS_class-nativesdk = "openssl-native"
+# Need c_rehash from openssl and run-parts from debianutils
+PACKAGE_WRITE_DEPS += "openssl-native debianutils-native"
+
+SRCREV = "34b8e19e541b8af4076616b2e170c7a70cdaded0"
+
+SRC_URI = "git://salsa.debian.org/debian/ca-certificates.git;protocol=https \
+ file://0002-update-ca-certificates-use-SYSROOT.patch \
+ file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
+ file://update-ca-certificates-support-Toybox.patch \
+ file://default-sysroot.patch \
+ file://sbindir.patch \
+ file://0003-update-ca-certificates-use-relative-symlinks-from-ET.patch \
+ "
+
+S = "${WORKDIR}/git"
+SYSROOT_DIRS_class-native += "${sysconfdir} ${datadir}/ca-certificates"
+
+inherit allarch
+
+EXTRA_OEMAKE = "\
+ 'CERTSDIR=${datadir}/ca-certificates' \
+ 'SBINDIR=${sbindir}' \
+"
+
+do_compile_prepend() {
+ oe_runmake clean
+}
+
+do_install () {
+ install -d ${D}${datadir}/ca-certificates \
+ ${D}${sysconfdir}/ssl/certs \
+ ${D}${sysconfdir}/ca-certificates/update.d
+ oe_runmake 'DESTDIR=${D}' install
+
+ install -d ${D}${mandir}/man8
+ install -m 0644 sbin/update-ca-certificates.8 ${D}${mandir}/man8/
+
+ install -d ${D}${sysconfdir}
+ {
+ echo "# Lines starting with # will be ignored"
+ echo "# Lines starting with ! will remove certificate on next update"
+ echo "#"
+ find ${D}${datadir}/ca-certificates -type f -name '*.crt' | \
+ sed 's,^${D}${datadir}/ca-certificates/,,'
+ } >${D}${sysconfdir}/ca-certificates.conf
+}
+
+do_install_append_class-target () {
+ sed -i -e 's,/etc/,${sysconfdir}/,' \
+ -e 's,/usr/share/,${datadir}/,' \
+ -e 's,/usr/local,${prefix}/local,' \
+ ${D}${sbindir}/update-ca-certificates \
+ ${D}${mandir}/man8/update-ca-certificates.8
+}
+
+pkg_postinst_${PN}_class-target () {
+ SYSROOT="$D" $D${sbindir}/update-ca-certificates
+}
+
+CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf"
+
+# Rather than make a postinst script that works for both target and nativesdk,
+# we just run update-ca-certificate from do_install() for nativesdk.
+CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt"
+do_install_append_class-nativesdk () {
+ SYSROOT="${D}${SDKPATHNATIVE}" ${D}${sbindir}/update-ca-certificates
+}
+
+do_install_append_class-native () {
+ SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
+}
+
+RDEPENDS_${PN} += "openssl"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch b/poky/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
new file mode 100644
index 000000000..ad879d466
--- /dev/null
+++ b/poky/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Pending
+
+--- ConsoleKit-0.4.6.orig/configure.ac
++++ ConsoleKit-0.4.6/configure.ac
+@@ -56,10 +56,24 @@ PKG_CHECK_MODULES(CONSOLE_KIT,
+ gthread-2.0 >= $GLIB_REQUIRED_VERSION
+ )
+
+-PKG_CHECK_MODULES(POLKIT,
+- polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
+- have_polkit=yes,
+- have_polkit=no)
++AC_ARG_WITH([polkit],
++ [AS_HELP_STRING([--with-polkit],
++ [support PolicyKit @<:@default=check@:>@])],
++ [],
++ [with_polkit=check])
++
++AS_IF([test "x$with_polkit" != xno],
++ [PKG_CHECK_MODULES(POLKIT,
++ polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION,
++ have_polkit=yes,
++ [if test "x$with_polkit" != xcheck; then
++ AC_MSG_FAILURE(
++ [--with-polkit was given, but test for polkit failed])
++ else
++ have_polkit=no
++ fi
++ ])])
++
+ if test "x$have_polkit" = "xyes" ; then
+ AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
+ fi
diff --git a/poky/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch b/poky/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch
new file mode 100644
index 000000000..f2f9b9c68
--- /dev/null
+++ b/poky/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch
@@ -0,0 +1,19 @@
+Fix builds in the case of seprate source from the build directory.
+
+RP 2013/4/17
+
+Upstream-Status: Pending
+
+Index: pam-ck-connector/Makefile.am
+===================================================================
+--- consolekit/pam-ck-connector.orig/Makefile.am 2010-09-03 13:54:31.000000000 +0000
++++ consolekit/pam-ck-connector/Makefile.am 2013-04-17 09:06:49.093524918 +0000
+@@ -4,7 +4,7 @@
+
+ INCLUDES = \
+ $(LIBDBUS_CFLAGS) \
+- -I$(top_builddir)/libck-connector \
++ -I$(top_srcdir)/libck-connector \
+ $(NULL)
+
+ pamlibdir = $(PAM_MODULE_DIR)
diff --git a/poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb
new file mode 100644
index 000000000..80d48bf84
--- /dev/null
+++ b/poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Framework for defining and tracking users, login sessions, and seats"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/ConsoleKit"
+BUGTRACKER = "https://bugs.freedesktop.org/buglist.cgi?query_format=specific&product=ConsoleKit"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://src/main.c;endline=21;md5=0a994e09769780220163255d8f9071c3"
+
+DEPENDS = "glib-2.0 glib-2.0-native dbus dbus-glib virtual/libx11"
+RDEPENDS_${PN} += "base-files"
+
+inherit autotools pkgconfig distro_features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI = "http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-${PV}.tar.xz \
+ file://sepbuildfix.patch \
+ file://add-polkit-configure-argument.patch \
+"
+
+SRC_URI[md5sum] = "611792b4d616253a5bdec9175f8b7678"
+SRC_URI[sha256sum] = "b41d17e06f80059589fbeefe96ad07bcc564c49e65516da1caf975146475565c"
+
+S = "${WORKDIR}/ConsoleKit-${PV}"
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)}"
+
+PACKAGECONFIG[pam] = "--enable-pam-module --with-pam-module-dir=${base_libdir}/security,--disable-pam-module,libpam"
+PACKAGECONFIG[policykit] = "--with-polkit,--without-polkit,polkit"
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--with-systemdsystemunitdir="
+
+FILES_${PN} += "${exec_prefix}/lib/ConsoleKit \
+ ${libdir}/ConsoleKit ${systemd_unitdir} ${base_libdir} \
+ ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
+
+PACKAGES =+ "pam-plugin-ck-connector"
+FILES_pam-plugin-ck-connector += "${base_libdir}/security/*.so"
+RDEPENDS_pam-plugin-ck-connector += "${PN}"
+
+do_install_append() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d
+ echo "d ${localstatedir}/log/ConsoleKit - - - -" \
+ > ${D}${sysconfdir}/tmpfiles.d/consolekit.conf
+ fi
+
+ # Remove /var/ directories as the daemon creates them as required
+ rm -rf ${D}${localstatedir}
+}
diff --git a/poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch b/poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
new file mode 100644
index 000000000..a7db1b3c9
--- /dev/null
+++ b/poky/meta/recipes-support/curl/curl/0001-replace-krb5-config-with-pkg-config.patch
@@ -0,0 +1,44 @@
+From ed70f0623708b8a6c1f58a5d243d87c5ff45b24d Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Tue, 26 Apr 2016 13:13:01 +0800
+Subject: [PATCH] replace krb5-config with pkg-config
+
+Upstream-Status: Pending
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5569a26..56b0380 100755
+--- a/configure.ac
++++ b/configure.ac
+@@ -1290,7 +1290,7 @@ AC_ARG_WITH(gssapi,
+ fi
+ ])
+
+-: ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
++KRB5CONFIG=`which pkg-config`
+
+ save_CPPFLAGS="$CPPFLAGS"
+ AC_MSG_CHECKING([if GSS-API support is requested])
+@@ -1301,7 +1301,7 @@ if test x"$want_gss" = xyes; then
+ if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
+ GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
+ elif test -f "$KRB5CONFIG"; then
+- GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
++ GSSAPI_INCS=`$KRB5CONFIG --cflags mit-krb5-gssapi`
+ elif test "$GSSAPI_ROOT" != "yes"; then
+ GSSAPI_INCS="-I$GSSAPI_ROOT/include"
+ fi
+@@ -1394,7 +1394,7 @@ if test x"$want_gss" = xyes; then
+ elif test -f "$KRB5CONFIG"; then
+ dnl krb5-config doesn't have --libs-only-L or similar, put everything
+ dnl into LIBS
+- gss_libs=`$KRB5CONFIG --libs gssapi`
++ gss_libs=`$KRB5CONFIG --libs mit-krb5-gssapi`
+ LIBS="$gss_libs $LIBS"
+ else
+ case $host in
diff --git a/poky/meta/recipes-support/curl/curl_7.60.0.bb b/poky/meta/recipes-support/curl/curl_7.60.0.bb
new file mode 100644
index 000000000..fe04fa63c
--- /dev/null
+++ b/poky/meta/recipes-support/curl/curl_7.60.0.bb
@@ -0,0 +1,70 @@
+SUMMARY = "Command line tool and library for client-side URL transfers"
+HOMEPAGE = "http://curl.haxx.se/"
+BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
+SECTION = "console/network"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e664ac"
+
+SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
+ file://0001-replace-krb5-config-with-pkg-config.patch \
+"
+
+SRC_URI[md5sum] = "bd2aabf78ded6a9aec8a54532fd6b5d7"
+SRC_URI[sha256sum] = "897dfb2204bd99be328279f88f55b7c61592216b0542fcbe995c60aa92871e9b"
+
+CVE_PRODUCT = "libcurl"
+inherit autotools pkgconfig binconfig multilib_header
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls proxy threaded-resolver zlib"
+PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver zlib"
+PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver zlib"
+
+# 'ares' and 'threaded-resolver' are mutually exclusive
+PACKAGECONFIG[ares] = "--enable-ares,--disable-ares,c-ares"
+PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
+PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
+PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
+PACKAGECONFIG[libidn] = "--with-libidn2,--without-libidn2,libidn2"
+PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
+PACKAGECONFIG[nghttp2] = "--with-nghttp2,--without-nghttp2,nghttp2"
+PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
+PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
+PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
+PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
+PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
+PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
+PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
+PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
+PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
+PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver"
+PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
+
+EXTRA_OECONF = " \
+ --enable-crypto-auth \
+ --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
+ --without-libmetalink \
+ --without-libpsl \
+"
+
+do_install_append_class-target() {
+ # cleanup buildpaths from curl-config
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's,--with-libtool-sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ ${D}${bindir}/curl-config
+}
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${libdir}/lib*.so.*"
+RRECOMMENDS_lib${BPN} += "ca-certificates"
+
+FILES_${PN} += "${datadir}/zsh"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch b/poky/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch
new file mode 100644
index 000000000..571708e03
--- /dev/null
+++ b/poky/meta/recipes-support/db/db/0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch
@@ -0,0 +1,45 @@
+From 29621d637e30982489693f2e207ce6a1790e3337 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 22 Mar 2017 15:32:26 +0000
+Subject: [PATCH] atomic: Rename local __atomic_compare_exchange to avoid clash
+ with builtins
+
+Helps building with clang
+
+Fixes
+
+../db-5.3.28/src/dbinc/atomic.h:179:19: error: definition of builtin function '__atomic_compare_exchange'
+static inline int __atomic_compare_exchange(
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/dbinc/atomic.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/dbinc/atomic.h b/src/dbinc/atomic.h
+index 6a858f7..1b49de5 100644
+--- a/src/dbinc/atomic.h
++++ b/src/dbinc/atomic.h
+@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+- __atomic_compare_exchange((p), (o), (n))
++ __db_atomic_compare_exchange((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+-static inline int __atomic_compare_exchange(
++static inline int __db_atomic_compare_exchange(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch b/poky/meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch
new file mode 100644
index 000000000..cb28db134
--- /dev/null
+++ b/poky/meta/recipes-support/db/db/0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch
@@ -0,0 +1,42 @@
+From 32e5943a3c4637d39e4d65b544dcb99e280210e3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 23 Jul 2017 10:54:26 -0700
+Subject: [PATCH] configure: Add explicit tag options to libtool invocation
+
+This helps cross compile when tag inference via heuristics
+fail because CC variable is having -fPIE -pie and libtool
+smartly removes it when building libraries
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ dist/configure.ac | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/dist/configure.ac b/dist/configure.ac
+index 689f3b8..9c14bdb 100644
+--- a/dist/configure.ac
++++ b/dist/configure.ac
+@@ -366,12 +366,12 @@ LIBTOOL="./libtool"
+
+ INSTALLER="\$(LIBTOOL) --mode=install cp -p"
+
+-MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${MAKEFILE_CC}"
+-MAKEFILE_SOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -avoid-version"
+-MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK}"
+-MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${MAKEFILE_CXX}"
+-MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version"
+-MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}"
++MAKEFILE_CC="\$(LIBTOOL) --tag=CC --mode=compile ${MAKEFILE_CC}"
++MAKEFILE_SOLINK="\$(LIBTOOL) --tag=CC --mode=link ${MAKEFILE_CCLINK} -avoid-version"
++MAKEFILE_CCLINK="\$(LIBTOOL) --tag=CC --mode=link ${MAKEFILE_CCLINK}"
++MAKEFILE_CXX="\$(LIBTOOL) --tag=CXX --mode=compile ${MAKEFILE_CXX}"
++MAKEFILE_XSOLINK="\$(LIBTOOL) --tag=CXX --mode=link ${MAKEFILE_CXXLINK} -avoid-version"
++MAKEFILE_CXXLINK="\$(LIBTOOL) --tag=CXX --mode=link ${MAKEFILE_CXXLINK}"
+
+
+ case "$host_os" in
+--
+2.13.3
+
diff --git a/poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
new file mode 100644
index 000000000..6a8eada60
--- /dev/null
+++ b/poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
@@ -0,0 +1,50 @@
+Original patch submitted by jbowler@nslu2-linux.org on 2005-11-17:
+
+db: fix thumb uclibc operation in 4.3.29
+ - uclibc thumb builds were using libpthread to implement mutexes, the
+ - uclibc version seems to be a stub (at least on thumb). This commit
+ - fixes the ARM/gcc-assembly mutex implementation so that it has thumb
+ - support and the resultant db4 works (tested on LE Thumb uclibc)
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Author: jbowler@nslu2-linux.org
+
+Index: db-6.0.30/src/dbinc/mutex_int.h
+===================================================================
+--- db-6.0.30.orig/src/dbinc/mutex_int.h
++++ db-6.0.30/src/dbinc/mutex_int.h
+@@ -474,6 +474,25 @@ typedef unsigned char tsl_t;
+
+ #ifdef LOAD_ACTUAL_MUTEX_CODE
+ /* gcc/arm: 0 is clear, 1 is set. */
++#if defined __thumb__
++#define MUTEX_SET(tsl) ({ \
++ int __r, __p; \
++ __asm__ volatile( \
++ ".align 2\n\t" \
++ "bx pc\n\t" \
++ "nop\n\t" \
++ ".arm\n\t" \
++ "swpb %0, %2, [%3]\n\t" \
++ "eor %0, %0, #1\n\t" \
++ "orr %1, pc, #1\n\t" \
++ "bx %1\n\t" \
++ ".force_thumb" \
++ : "=&r" (__r), "=r" (__p) \
++ : "r" (1), "r" (tsl) \
++ ); \
++ __r & 1; \
++})
++#else
+ #define MUTEX_SET(tsl) ({ \
+ int __r; \
+ __asm__ volatile( \
+@@ -484,6 +503,7 @@ typedef unsigned char tsl_t;
+ ); \
+ __r & 1; \
+ })
++#endif
+
+ #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
+ #define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)
diff --git a/poky/meta/recipes-support/db/db/fix-parallel-build.patch b/poky/meta/recipes-support/db/db/fix-parallel-build.patch
new file mode 100644
index 000000000..27632e1dd
--- /dev/null
+++ b/poky/meta/recipes-support/db/db/fix-parallel-build.patch
@@ -0,0 +1,21 @@
+With higher paralelism it sometimes fails with:
+libtool: link: `util_log.lo' is not a valid libtool object
+make: *** [db_replicate] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Index: db-6.0.30/dist/Makefile.in
+===================================================================
+--- db-6.0.30.orig/dist/Makefile.in
++++ db-6.0.30/dist/Makefile.in
+@@ -1041,7 +1041,7 @@ db_recover: db_recover@o@ util_sig@o@ $(
+ db_recover@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
+
+-db_replicate: db_replicate@o@ util_sig@o@ $(DEF_LIB)
++db_replicate: db_replicate@o@ util_log@o@ util_sig@o@ $(DEF_LIB)
+ $(CCLINK) -o $@ $(LDFLAGS) \
+ db_replicate@o@ util_log@o@ util_sig@o@ $(DEF_LIB) $(LIBS)
+ $(POSTLINK) $@
diff --git a/poky/meta/recipes-support/db/db/sequence-type.patch b/poky/meta/recipes-support/db/db/sequence-type.patch
new file mode 100644
index 000000000..a6fe3d62a
--- /dev/null
+++ b/poky/meta/recipes-support/db/db/sequence-type.patch
@@ -0,0 +1,59 @@
+configure wants to use host-specific types to get a 64-bit integer in db.h
+instead of using an alias such as int64_t. This means that the header differs
+in multilib environments for no good reason, so replace the type with the alias
+in stdint.h.
+
+This then breaks the overly complicated type check but as we know that int64_t
+exists and works, we can just delete that.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- a/dist/aclocal/sequence.m4~ 2013-09-09 16:35:02.000000000 +0100
++++ b/dist/aclocal/sequence.m4 2017-11-01 13:21:45.472295971 +0000
+@@ -24 +24 @@
+- db_cv_seq_type="long"
++ db_cv_seq_type="int64_t"
+@@ -31 +31 @@
+- db_cv_seq_type="long long"
++ db_cv_seq_type="int64_t"
+@@ -41,38 +41 @@
+- # Test to see if we can declare variables of the appropriate size
+- # and format them. If we're cross-compiling, all we get is a link
+- # test, which won't test for the appropriate printf format strings.
+- if test "$db_cv_build_sequence" = "yes"; then
+- AC_TRY_RUN([
+- main() {
+- $db_cv_seq_type l;
+- unsigned $db_cv_seq_type u;
+- char buf@<:@100@:>@;
+-
+- buf@<:@0@:>@ = 'a';
+- l = 9223372036854775807LL;
+- (void)snprintf(buf, sizeof(buf), $db_cv_seq_fmt, l);
+- if (strcmp(buf, "9223372036854775807"))
+- return (1);
+- u = 18446744073709551615ULL;
+- (void)snprintf(buf, sizeof(buf), $db_cv_seq_ufmt, u);
+- if (strcmp(buf, "18446744073709551615"))
+- return (1);
+- return (0);
+- }],, [db_cv_build_sequence="no"],
+- AC_TRY_LINK(,[
+- $db_cv_seq_type l;
+- unsigned $db_cv_seq_type u;
+- char buf@<:@100@:>@;
+-
+- buf@<:@0@:>@ = 'a';
+- l = 9223372036854775807LL;
+- (void)snprintf(buf, sizeof(buf), $db_cv_seq_fmt, l);
+- if (strcmp(buf, "9223372036854775807"))
+- return (1);
+- u = 18446744073709551615ULL;
+- (void)snprintf(buf, sizeof(buf), $db_cv_seq_ufmt, u);
+- if (strcmp(buf, "18446744073709551615"))
+- return (1);
+- return (0);
+- ],, [db_cv_build_sequence="no"]))
+- fi
++ db_cv_build_sequence="yes"
diff --git a/poky/meta/recipes-support/db/db_5.3.28.bb b/poky/meta/recipes-support/db/db_5.3.28.bb
new file mode 100644
index 000000000..093ee4490
--- /dev/null
+++ b/poky/meta/recipes-support/db/db_5.3.28.bb
@@ -0,0 +1,123 @@
+# Version 5 of the Berkeley DB from Sleepycat
+#
+# At present this package only installs the DB code
+# itself (shared libraries, .a in the dev package),
+# documentation and headers.
+#
+# The headers have the same names as those as v3
+# of the DB, only one version can be used *for dev*
+# at once - DB3 and DB5 can both be installed on the
+# same system at the same time if really necessary.
+SECTION = "libs"
+SUMMARY = "Berkeley Database v5"
+HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+LICENSE = "Sleepycat"
+RCONFLICTS_${PN} = "db3"
+
+CVE_PRODUCT = "oracle_berkeley_db"
+CVE_VERSION = "11.2.${PV}"
+
+PR = "r1"
+PE = "1"
+
+SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
+SRC_URI += "file://arm-thumb-mutex_db5.patch \
+ file://fix-parallel-build.patch \
+ file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \
+ file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \
+ file://sequence-type.patch \
+ "
+# We are not interested in official latest 6.x versions;
+# let's track what debian is using.
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/db5.3/"
+UPSTREAM_CHECK_REGEX = "db5\.3_(?P<pver>.+)\.orig"
+
+SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24"
+SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
+
+inherit autotools
+
+# The executables go in a separate package - typically there
+# is no need to install these unless doing real database
+# management on the system.
+inherit lib_package
+
+PACKAGES =+ "${PN}-cxx"
+FILES_${PN}-cxx = "${libdir}/*cxx*so"
+
+
+# The dev package has the .so link (as in db3) and the .a's -
+# it is therefore incompatible (cannot be installed at the
+# same time) as the db3 package
+# sort out the .so since they do version prior to the .so
+SOLIBS = "-5*.so"
+FILES_SOLIBSDEV = "${libdir}/libdb.so ${libdir}/libdb_cxx.so"
+
+#configuration - set in local.conf to override
+# All the --disable-* options replace --enable-smallbuild, which breaks a bunch of stuff (eg. postfix)
+DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
+
+EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot"
+
+# Override the MUTEX setting here, the POSIX library is
+# the default - "POSIX/pthreads/library".
+# Don't ignore the nice SWP instruction on the ARM:
+# These enable the ARM assembler mutex code, this won't
+# work with thumb compilation...
+ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
+MUTEX = ""
+MUTEX_arm = "${ARM_MUTEX}"
+MUTEX_armeb = "${ARM_MUTEX}"
+EXTRA_OECONF += "${MUTEX} STRIP=true"
+EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'"
+
+EXTRA_AUTORECONF += "--exclude=autoheader -I ${S}/dist/aclocal -I${S}/dist/aclocal_java"
+AUTOTOOLS_SCRIPT_PATH = "${S}/dist"
+
+# Cancel the site stuff - it's set for db3 and destroys the
+# configure.
+CONFIG_SITE = ""
+
+oe_runconf_prepend() {
+ . ${S}/dist/RELEASE
+ # Edit version information we couldn't pre-compute.
+ sed -i -e "s/__EDIT_DB_VERSION_FAMILY__/$DB_VERSION_FAMILY/g" \
+ -e "s/__EDIT_DB_VERSION_RELEASE__/$DB_VERSION_RELEASE/g" \
+ -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \
+ -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \
+ -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \
+ -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_FULL_STRING__/$DB_VERSION_FULL_STRING/g" \
+ -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \
+ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" ${S}/dist/configure
+}
+
+do_compile_prepend() {
+ # Stop libtool adding RPATHs
+ sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' ${B}/${HOST_SYS}-libtool
+}
+
+do_install_append() {
+ mkdir -p ${D}/${includedir}/db51
+ mv ${D}/${includedir}/db.h ${D}/${includedir}/db51/.
+ mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db51/.
+ ln -s db51/db.h ${D}/${includedir}/db.h
+ ln -s db51/db_cxx.h ${D}/${includedir}/db_cxx.h
+
+ # The docs end up in /usr/docs - not right.
+ if test -d "${D}/${prefix}/docs"
+ then
+ mkdir -p "${D}/${datadir}"
+ test ! -d "${D}/${docdir}" || rm -rf "${D}/${docdir}"
+ mv "${D}/${prefix}/docs" "${D}/${docdir}"
+ fi
+
+ chown -R root:root ${D}
+}
+
+INSANE_SKIP_${PN} = "dev-so"
+INSANE_SKIP_${PN}-cxx = "dev-so"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/debianutils/debianutils_4.8.4.bb b/poky/meta/recipes-support/debianutils/debianutils_4.8.4.bb
new file mode 100644
index 000000000..300e6f131
--- /dev/null
+++ b/poky/meta/recipes-support/debianutils/debianutils_4.8.4.bb
@@ -0,0 +1,57 @@
+SUMMARY = "Miscellaneous utilities specific to Debian"
+SECTION = "base"
+LICENSE = "GPLv2 & SMAIL_GPL"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20180129T164727Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz"
+# the package is taken from snapshots.debian.org; that source is static and goes stale
+# so we check the latest upstream from a directory that does get updated
+UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/"
+
+SRC_URI[md5sum] = "a6dcd496b4f79b3c452c3a74c2d3f89c"
+SRC_URI[sha256sum] = "c061ab99aea61f892043b7624b021ab5b193e9c6bbfd474da0fbcdd506be1eb2"
+
+S = "${WORKDIR}/${BPN}"
+
+inherit autotools update-alternatives
+
+do_configure_prepend() {
+ sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
+}
+
+do_install_append() {
+ if [ "${base_bindir}" != "${bindir}" ]; then
+ # Debian places some utils into ${base_bindir} as does busybox
+ install -d ${D}${base_bindir}
+ for app in run-parts tempfile; do
+ mv ${D}${bindir}/$app ${D}${base_bindir}/$app
+ done
+ fi
+}
+
+# Note that we package the update-alternatives name.
+#
+PACKAGES =+ "${PN}-run-parts"
+FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
+
+RDEPENDS_${PN} += "${PN}-run-parts"
+RDEPENDS_${PN}_class-native = ""
+
+ALTERNATIVE_PRIORITY="30"
+ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
+
+ALTERNATIVE_PRIORITY_${PN}-run-parts = "60"
+ALTERNATIVE_${PN}-run-parts = "run-parts"
+
+ALTERNATIVE_${PN}-doc = "which.1"
+ALTERNATIVE_LINK_NAME[which.1] = "${mandir}/man1/which.1"
+
+ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
+ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
+ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
+ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
+ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
+ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
+ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-support/enchant/enchant_1.6.0.bb b/poky/meta/recipes-support/enchant/enchant_1.6.0.bb
new file mode 100644
index 000000000..44eb2e3df
--- /dev/null
+++ b/poky/meta/recipes-support/enchant/enchant_1.6.0.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Enchant Spell checker API Library"
+SECTION = "libs"
+HOMEPAGE = "http://www.abisource.com/projects/enchant/"
+BUGTRACKER = "http://bugzilla.abisource.com/enter_bug.cgi?product=Enchant"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=dfcbabf9131dc9a95febef6753a2958b \
+ file://src/enchant.h;beginline=1;endline=29;md5=8d881caa1d37523567e1d8f726675a18"
+
+DEPENDS = "glib-2.0"
+
+inherit autotools pkgconfig
+
+PR = "r3"
+
+SRC_URI = "http://www.abisource.com/downloads/enchant/${PV}/enchant-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "de11011aff801dc61042828041fb59c7"
+SRC_URI[sha256sum] = "2fac9e7be7e9424b2c5570d8affe568db39f7572c10ed48d4e13cddf03f7097f"
+
+PACKAGECONFIG ??= "aspell"
+PACKAGECONFIG[aspell] = " --with-aspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-aspell, --disable-aspell, aspell, aspell"
+PACKAGECONFIG[ispell] = " --with-ispell-prefix=${STAGING_DIR_HOST}${prefix} --enable-ispell, --disable-ispell, ispell, ispell"
+PACKAGECONFIG[uspell] = " --with-uspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-uspell, --disable-uspell, uspell, uspell"
+PACKAGECONFIG[hspell] = " --with-hspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-hspell, --disable-hspell, hspell, hspell"
+PACKAGECONFIG[myspell] = "--with-myspell-prefix=${STAGING_DIR_HOST}${prefix} --enable-myspell, --disable-myspell, myspell, myspell"
+
+EXTRA_OECONF = "br_cv_binreloc=no"
+
+export CXXFLAGS += " -L${STAGING_LIBDIR} -lstdc++ "
+
+FILES_${PN} = "${bindir} ${libdir}/*${SOLIBS} ${datadir}/${BPN} ${libdir}/${BPN}/*.so"
+FILES_${PN}-dev += "${libdir}/${BPN}/*{SOLIBSDEV} ${libdir}/${BPN}/*.la"
+FILES_${PN}-staticdev += "${libdir}/${BPN}/*.a"
diff --git a/poky/meta/recipes-support/gdbm/files/ptest.patch b/poky/meta/recipes-support/gdbm/files/ptest.patch
new file mode 100644
index 000000000..b9461bec6
--- /dev/null
+++ b/poky/meta/recipes-support/gdbm/files/ptest.patch
@@ -0,0 +1,50 @@
+From 4e4b70a4a3dcf1fdbee9e68bed3b62f42b197a3a Mon Sep 17 00:00:00 2001
+From: Josep Puigdemont <josep.puigdemont@enea.com>
+Date: Sun, 4 May 2014 16:02:07 +0200
+Subject: [PATCH] Add install-ptest rules.
+
+Signed-off-by: Josep Puigdemont <josep.puigdemont@enea.com>
+Signed-off-by: Maxin B. John <maxin.john@enea.com>
+Upstream-Status: Pending
+
+---
+ Makefile.am | 5 +++++
+ tests/Makefile.am | 12 +++++++++++-
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 4cdc734..24b99f0 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -45,3 +45,8 @@ ChangeLog:
+ awk -f $(top_srcdir)/git2chg.awk \
+ -v append=$(top_srcdir)/$(prev_change_log) > ChangeLog; \
+ fi
++
++install-ptest:
++ @for subdir in $(SUBDIRS); do \
++ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
++ done
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 3dbb580..22ffc44 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -130,4 +130,14 @@ dtfetch_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
+ dtdel_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
+ d_creat_ce_LDADD = ../src/libgdbm.la ../compat/libgdbm_compat.la
+
+-
++buildtests: $(check_PROGRAMS) $(TESTSUITE)
++
++install-ptest: $(check_PROGRAMS) $(TESTSUITE)
++ @$(INSTALL) -d $(DESTDIR)
++ @for file in $^; do \
++ if [ -x .libs/$$file ]; then \
++ $(INSTALL_PROGRAM) .libs/$$file $(DESTDIR)/$$file; \
++ else \
++ $(INSTALL_PROGRAM) $$file $(DESTDIR) ; \
++ fi \
++ done
+--
+2.11.0
+
diff --git a/poky/meta/recipes-support/gdbm/files/run-ptest b/poky/meta/recipes-support/gdbm/files/run-ptest
new file mode 100755
index 000000000..615da8444
--- /dev/null
+++ b/poky/meta/recipes-support/gdbm/files/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# This script is used to run the gmdb test suite
+
+cd tests
+
+./testsuite AUTOTEST_PATH=$PWD abs_builddir=$PWD COMPAT=1 | sed 's/^[^0-9]*\([0-9]\+\): \(.*\)\(ok\|pass\|skipped\|fail\|FAILED\)\(.*\)$/\3: \2 \4/;s/ \+/ /g;s/^ok/PASS/;s/^skipped/SKIP/;s/^fail/FAIL/;s/^FAILED/FAIL/'
diff --git a/poky/meta/recipes-support/gdbm/gdbm_1.14.1.bb b/poky/meta/recipes-support/gdbm/gdbm_1.14.1.bb
new file mode 100644
index 000000000..54e5696e4
--- /dev/null
+++ b/poky/meta/recipes-support/gdbm/gdbm_1.14.1.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Key/value database library with extensible hashing"
+HOMEPAGE = "http://www.gnu.org/software/gdbm/"
+SECTION = "libs"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"
+
+
+SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
+ file://run-ptest \
+ file://ptest.patch \
+ "
+
+SRC_URI[md5sum] = "c2ddcb3897efa0f57484af2bd4f4f848"
+SRC_URI[sha256sum] = "cdceff00ffe014495bed3aed71c7910aa88bf29379f795abc0f46d4ee5f8bc5f"
+
+inherit autotools gettext texinfo lib_package ptest
+
+# Needed for dbm python module
+EXTRA_OECONF = "-enable-libgdbm-compat"
+
+# Stop presence of dbm/nbdm on the host contaminating builds
+CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_append () {
+ # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
+ # these headers
+ install -d ${D}${includedir}/gdbm
+ ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
+ ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
+}
+
+RDEPENDS_${PN}-ptest += "diffutils"
+
+do_compile_ptest() {
+ oe_runmake -C tests buildtests
+}
+
+PACKAGES =+ "${PN}-compat \
+ "
+FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS} \
+ "
diff --git a/poky/meta/recipes-support/gmp/gmp-6.1.2/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch b/poky/meta/recipes-support/gmp/gmp-6.1.2/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch
new file mode 100644
index 000000000..325ffe491
--- /dev/null
+++ b/poky/meta/recipes-support/gmp/gmp-6.1.2/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch
@@ -0,0 +1,61 @@
+From d3b9fc523fc11260ced890c35bc5c9e6391c8656 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 14 Dec 2015 14:19:49 +0200
+Subject: [PATCH] Append the user provided flags to the auto-detected ones.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9cedfeb..87caee5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1921,8 +1921,12 @@ cclist=$cclist
+ EOF
+
+
+-test_CFLAGS=${CFLAGS+set}
+-test_CPPFLAGS=${CPPFLAGS+set}
++test_CFLAGS=
++test_CPPFLAGS=
++
++user_CFLAGS=$CFLAGS
++user_CPPFLAGS=$CPPFLAGS
++user_CXXFLAGS=$CXXFLAGS
+
+ for abi in $abilist; do
+ abi_last="$abi"
+@@ -2353,7 +2357,7 @@ AC_SUBST(CCAS)
+ # The C++ compiler, if desired.
+ want_cxx=no
+ if test $enable_cxx != no; then
+- test_CXXFLAGS=${CXXFLAGS+set}
++ test_CXXFLAGS=
+ AC_PROG_CXX
+
+ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
+@@ -2381,7 +2385,7 @@ if test $enable_cxx != no; then
+ # Automake includes $CPPFLAGS in a C++ compile, so we do the same here.
+ #
+ for cxxflags_choice in $cxxflags_list; do
+- eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice\"
++ eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice $user_CXXFLAGS\"
+ GMP_PROG_CXX_WORKS($CXX $CPPFLAGS $CXXFLAGS,
+ [want_cxx=yes
+ break])
+@@ -2477,6 +2481,8 @@ if test "$enable_assembly" = "no"; then
+ # done
+ fi
+
++CFLAGS="$CFLAGS $user_CFLAGS"
++CPPFLAGS="$CPPFLAGS $user_CPPFLAGS"
+
+ cat >&AC_FD_CC <<EOF
+ Decided:
+--
+2.6.2
+
diff --git a/poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch b/poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch
new file mode 100644
index 000000000..1e47924cc
--- /dev/null
+++ b/poky/meta/recipes-support/gmp/gmp-6.1.2/0001-confiure.ac-Believe-the-cflags-from-environment.patch
@@ -0,0 +1,49 @@
+From ae1a4c37417a3bbbf8ea1cab198982b0cad47e29 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 12 Aug 2016 17:08:13 +0000
+Subject: [PATCH] confiure.ac: Believe the cflags from environment
+
+In some toolchains e.g. OpenEmbedded -march options
+are passed on compiler cmdline, it does not use
+the expected target triplets to make these decision
+during configure.
+
+Secondly, dont set armv4 for march when no selection
+is made, since it is passed from cmdline
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate[OE-Specific]
+
+ configure.ac | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+Index: gmp-6.1.2/configure.ac
+===================================================================
+--- gmp-6.1.2.orig/configure.ac
++++ gmp-6.1.2/configure.ac
+@@ -604,15 +604,6 @@ case $host in
+ any_32_testlist="sizeof-long-4"
+ any_64_testlist="sizeof-long-8"
+
+- # This is needed for clang, which is not content with flags like -mfpu=neon
+- # alone.
+- case $host in
+- *-*-*eabi)
+- gcc_cflags_fpmode="-mfloat-abi=softfp" ;;
+- *-*-*eabihf)
+- gcc_cflags_fpmode="-mfloat-abi=hard" ;;
+- esac
+-
+ # FIXME: We make mandatory compiler options optional here. We should
+ # either enforce them, or organise to strip paths as the corresponding
+ # options fail.
+@@ -746,8 +737,6 @@ case $host in
+ ;;
+ *)
+ path="arm"
+- gcc_cflags_arch="-march=armv4"
+- GMP_DEFINE_RAW(["define(<NOTHUMB>,1)"])
+ ;;
+ esac
+ ;;
diff --git a/poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch b/poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch
new file mode 100644
index 000000000..3935589f8
--- /dev/null
+++ b/poky/meta/recipes-support/gmp/gmp-6.1.2/amd64.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+Index: gmp-6.1.2/longlong.h
+===================================================================
+--- gmp-6.1.2.orig/longlong.h
++++ gmp-6.1.2/longlong.h
+@@ -1036,8 +1036,10 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype
+ count is only an int. */
+ #define count_trailing_zeros(count, x) \
+ do { \
++ UDItype __cbtmp; \
+ ASSERT ((x) != 0); \
+- __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x))); \
++ __asm__ ("bsfq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x))); \
++ (count) = __cbtmp; \
+ } while (0)
+ #endif /* __amd64__ */
+
diff --git a/poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch b/poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch
new file mode 100644
index 000000000..6b089cf39
--- /dev/null
+++ b/poky/meta/recipes-support/gmp/gmp-6.1.2/use-includedir.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Index: gmp-6.1.2/Makefile.am
+===================================================================
+--- gmp-6.1.2.orig/Makefile.am
++++ gmp-6.1.2/Makefile.am
+@@ -130,7 +130,7 @@ EXTRA_DIST += gmpxx.h
+ # but anyone knowledgeable enough to be playing with exec_prefix will be able
+ # to address that.
+ #
+-includeexecdir = $(exec_prefix)/include
++includeexecdir = $(includedir)
+ include_HEADERS = $(GMPXX_HEADERS_OPTION)
+ nodist_includeexec_HEADERS = gmp.h
+ lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION)
diff --git a/poky/meta/recipes-support/gmp/gmp.inc b/poky/meta/recipes-support/gmp/gmp.inc
new file mode 100644
index 000000000..abac8cf33
--- /dev/null
+++ b/poky/meta/recipes-support/gmp/gmp.inc
@@ -0,0 +1,12 @@
+SUMMARY = "GNU multiprecision arithmetic library"
+DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers"
+HOMEPAGE = "http://gmplib.org/"
+SECTION = "devel"
+
+inherit autotools texinfo
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/poky/meta/recipes-support/gmp/gmp_6.1.2.bb b/poky/meta/recipes-support/gmp/gmp_6.1.2.bb
new file mode 100644
index 000000000..b008710d0
--- /dev/null
+++ b/poky/meta/recipes-support/gmp/gmp_6.1.2.bb
@@ -0,0 +1,41 @@
+require gmp.inc
+
+LICENSE = "GPLv2+ | LGPLv3+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+"
+
+REVISION = ""
+SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
+ file://amd64.patch \
+ file://use-includedir.patch \
+ file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
+ file://0001-confiure.ac-Believe-the-cflags-from-environment.patch \
+ "
+SRC_URI[md5sum] = "8ddbb26dc3bd4e2302984debba1406a5"
+SRC_URI[sha256sum] = "5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2"
+
+acpaths = ""
+
+EXTRA_OECONF += " --enable-cxx=detect"
+EXTRA_OECONF_mipsarchr6_append = " --disable-assembly"
+
+PACKAGES =+ "libgmpxx"
+FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}"
+
+do_install_prepend_class-target() {
+ sed -i \
+ -e "s|--sysroot=${STAGING_DIR_HOST}||g" \
+ -e "s|${DEBUG_PREFIX_MAP}||g" \
+ ${B}/gmp.h
+}
+
+SSTATE_SCAN_FILES += "gmp.h"
+
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET = "mips"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch b/poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch
new file mode 100644
index 000000000..840666f30
--- /dev/null
+++ b/poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch
@@ -0,0 +1,35 @@
+From b1de2c6290bc0651fe87a8c4fb52e7a0a5fe6322 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 5 Oct 2014 16:01:49 -0700
+Subject: [PATCH] gsystem-subprocess.c: Enable GNU extensions in system C
+ library
+
+This should export O_CLOEXEC where it is only
+available when _GNU_SOURCE is defined .e.g. uclibc based systems
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+---
+ src/libgsystem/gsystem-subprocess.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/libgsystem/gsystem-subprocess.c b/src/libgsystem/gsystem-subprocess.c
+index a967896..a52a362 100644
+--- a/src/libgsystem/gsystem-subprocess.c
++++ b/src/libgsystem/gsystem-subprocess.c
+@@ -18,6 +18,10 @@
+
+ #include "config.h"
+
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++
+ #define _GSYSTEM_NO_LOCAL_ALLOC
+ #include "libgsystem.h"
+
+--
+2.1.1
+
diff --git a/poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch b/poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch
new file mode 100644
index 000000000..5a178e2ef
--- /dev/null
+++ b/poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch
@@ -0,0 +1,27 @@
+
+The terms `FAIL` instead of `FAILED` and `SKIP` instead of `SKIPPED`
+match what Automake does
+
+Upstream-Status: Accepted
+[ https://git.gnome.org/browse/gnome-desktop-testing/commit/?id=048850731a640532ef55a61df7357fcc6d2ad501 ]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur gnome-desktop-testing-2014.1-orig/src/gnome-desktop-testing-runner.c gnome-desktop-testing-2014.1/src/gnome-desktop-testing-runner.c
+--- gnome-desktop-testing-2014.1-orig/src/gnome-desktop-testing-runner.c 2014-01-16 12:58:26.000000000 +0200
++++ gnome-desktop-testing-2014.1/src/gnome-desktop-testing-runner.c 2015-11-02 11:27:34.010594126 +0200
+@@ -280,12 +280,12 @@
+ else if (test->state == TEST_STATE_COMPLETE_FAILED)
+ {
+ msgid_value = ONE_TEST_FAILED_MSGID;
+- msg = g_strconcat ("FAILED: ", test->name, " (", reason, ")", NULL);
++ msg = g_strconcat ("FAIL: ", test->name, " (", reason, ")", NULL);
+ }
+ else if (test->state == TEST_STATE_COMPLETE_SKIPPED)
+ {
+ msgid_value = ONE_TEST_SKIPPED_MSGID;
+- msg = g_strconcat ("SKIPPED: ", test->name, NULL);
++ msg = g_strconcat ("SKIP: ", test->name, NULL);
+ }
+ else
+ g_assert_not_reached ();
diff --git a/poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb b/poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
new file mode 100644
index 000000000..ccb3d3b7d
--- /dev/null
+++ b/poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Test runner for GNOME-style installed tests"
+HOMEPAGE = "https://wiki.gnome.org/GnomeGoals/InstalledTests"
+LICENSE = "LGPLv2+"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
+ file://0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch \
+ file://update-output-syntax.patch \
+ "
+SRC_URI[md5sum] = "a608ad72a77e23a1aecdfd8d07a94baf"
+SRC_URI[sha256sum] = "1a3eed73678dd22d09d6a7ec4f899557df3e8b4a802affa76d0f163b31286539"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+ file://src/gnome-desktop-testing-runner.c;endline=19;md5=67311a600b83fd0068dfc7e5b84ffb3f"
+
+DEPENDS = "glib-2.0"
+
+inherit autotools pkgconfig
+
+PR = "r1"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[journald] = "--with-systemd-journal,--without-systemd-journal,systemd,systemd"
diff --git a/poky/meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch b/poky/meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch
new file mode 100644
index 000000000..5c9c02222
--- /dev/null
+++ b/poky/meta/recipes-support/gnupg/gnupg/0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch
@@ -0,0 +1,105 @@
+From 59a3c76d4016ffc615f1c45184f4c6820061d69c Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Wed, 16 Aug 2017 11:14:12 +0800
+Subject: [PATCH 1/4] Use pkg-config to find pth instead of pth-config.
+
+Upstream-Status: Denied
+[not submitted but they've been clear they don't want a pkg-config
+dependency]
+
+RP 2014/5/22
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Rebase to 2.1.23
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ m4/gnupg-pth.m4 | 53 ++++++++---------------------------------------------
+ 1 file changed, 8 insertions(+), 45 deletions(-)
+
+diff --git a/m4/gnupg-pth.m4 b/m4/gnupg-pth.m4
+index 6dc9e0e..5892531 100644
+--- a/m4/gnupg-pth.m4
++++ b/m4/gnupg-pth.m4
+@@ -17,33 +17,9 @@ dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ # Taken and modified from the m4 macros which come with Pth.
+ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
+ [
+- _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]3}'`
+ _req_version="ifelse([$1],,1.2.0,$1)"
++ PKG_CHECK_MODULES(PTH, [pth >= $_req_version], [have_pth=yes], [have_pth=no])
+
+- AC_MSG_CHECKING(for PTH - version >= $_req_version)
+- for _var in _pth_version _req_version; do
+- eval "_val=\"\$${_var}\""
+- _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'`
+- _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\2/'`
+- _rtype=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\3/'`
+- _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\4/'`
+- case $_rtype in
+- "a" ) _rtype=0 ;;
+- "b" ) _rtype=1 ;;
+- "." ) _rtype=2 ;;
+- esac
+- _hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \
+- "major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"`
+- eval "${_var}_hex=\"\$_hex\""
+- done
+- have_pth=no
+- if test ".$_pth_version_hex" != .; then
+- if test ".$_req_version_hex" != .; then
+- if test $_pth_version_hex -ge $_req_version_hex; then
+- have_pth=yes
+- fi
+- fi
+- fi
+ if test $have_pth = yes; then
+ AC_MSG_RESULT(yes)
+ AC_MSG_CHECKING([whether PTH installation is sane])
+@@ -51,9 +27,9 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
+ _gnupg_pth_save_cflags=$CFLAGS
+ _gnupg_pth_save_ldflags=$LDFLAGS
+ _gnupg_pth_save_libs=$LIBS
+- CFLAGS="$CFLAGS `$PTH_CONFIG --cflags`"
+- LDFLAGS="$LDFLAGS `$PTH_CONFIG --ldflags`"
+- LIBS="$LIBS `$PTH_CONFIG --libs --all`"
++ CFLAGS="$CFLAGS $PTH_CFLAGS"
++ LDFLAGS="$LDFLAGS $PTH_LDFLAGS"
++ LIBS="$LIBS $PTH_LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h>
+ ],
+ [[ pth_init ();]])],
+@@ -80,26 +56,13 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
+ # PTH_CLFAGS and PTH_LIBS are AS_SUBST.
+ #
+ AC_DEFUN([GNUPG_PATH_PTH],
+-[ AC_ARG_WITH(pth-prefix,
+- AC_HELP_STRING([--with-pth-prefix=PFX],
+- [prefix where GNU Pth is installed (optional)]),
+- pth_config_prefix="$withval", pth_config_prefix="")
+- if test x$pth_config_prefix != x ; then
+- PTH_CONFIG="$pth_config_prefix/bin/pth-config"
+- fi
+- AC_PATH_PROG(PTH_CONFIG, pth-config, no)
++[
+ tmp=ifelse([$1], ,1.3.7,$1)
+- if test "$PTH_CONFIG" != "no"; then
+- GNUPG_PTH_VERSION_CHECK($tmp)
+- if test $have_pth = yes; then
+- PTH_CFLAGS=`$PTH_CONFIG --cflags`
+- PTH_LIBS=`$PTH_CONFIG --ldflags`
+- PTH_LIBS="$PTH_LIBS `$PTH_CONFIG --libs --all`"
+- AC_DEFINE(HAVE_PTH, 1,
++ GNUPG_PTH_VERSION_CHECK($tmp)
++ if test $have_pth = yes; then
++ AC_DEFINE(HAVE_PTH, 1,
+ [Defined if the GNU Pth is available])
+- fi
+ fi
+ AC_SUBST(PTH_CFLAGS)
+ AC_SUBST(PTH_LIBS)
+ ])
+-
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch b/poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
new file mode 100644
index 000000000..3e3a64df2
--- /dev/null
+++ b/poky/meta/recipes-support/gnupg/gnupg/0001-configure.ac-use-a-custom-value-for-the-location-of-.patch
@@ -0,0 +1,30 @@
+From 0b97148c3aad0993a9aeb088596fa63a2fec5328 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 22 Jan 2018 18:00:21 +0200
+Subject: [PATCH] configure.ac: use a custom value for the location of
+ gpg-agent socket in the filesystem
+
+This should avoid clashes with the host gpg-agent observed on autobuilders.
+
+Upstream-Status: Inappropriate [oe-core specific, and only for -native]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 382ef1d..0570d7c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1818,7 +1818,7 @@ AC_DEFINE_UNQUOTED(GPGCONF_DISP_NAME, "GPGConf",
+
+ AC_DEFINE_UNQUOTED(GPGTAR_NAME, "gpgtar", [The name of the gpgtar tool])
+
+-AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent",
++AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent.yocto-native",
+ [The name of the agent socket])
+ AC_DEFINE_UNQUOTED(GPG_AGENT_EXTRA_SOCK_NAME, "S.gpg-agent.extra",
+ [The name of the agent socket for remote access])
+--
+2.15.1
+
diff --git a/poky/meta/recipes-support/gnupg/gnupg/0002-use-pkgconfig-instead-of-npth-config.patch b/poky/meta/recipes-support/gnupg/gnupg/0002-use-pkgconfig-instead-of-npth-config.patch
new file mode 100644
index 000000000..6d86e5c99
--- /dev/null
+++ b/poky/meta/recipes-support/gnupg/gnupg/0002-use-pkgconfig-instead-of-npth-config.patch
@@ -0,0 +1,85 @@
+From 53c2aec2e13f4e2d09be7148869c862f07dfdd4d Mon Sep 17 00:00:00 2001
+From: Saul Wold <sgw@linux.intel.com>
+Date: Wed, 16 Aug 2017 11:16:30 +0800
+Subject: [PATCH 2/4] use pkgconfig instead of npth config
+
+Upstream-Status: Inappropriate [openembedded specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Rebase to 2.1.23
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ m4/npth.m4 | 34 ++++++++--------------------------
+ 1 file changed, 8 insertions(+), 26 deletions(-)
+
+diff --git a/m4/npth.m4 b/m4/npth.m4
+index 17c2644..15a931b 100644
+--- a/m4/npth.m4
++++ b/m4/npth.m4
+@@ -17,10 +17,10 @@ AC_DEFUN([_AM_PATH_NPTH_CONFIG],
+ if test "x$npth_config_prefix" != x ; then
+ NPTH_CONFIG="$npth_config_prefix/bin/npth-config"
+ fi
+- AC_PATH_PROG(NPTH_CONFIG, npth-config, no)
++ AC_PATH_PROG(PKGCONFIG, pkg-config, no)
+
+- if test "$NPTH_CONFIG" != "no" ; then
+- npth_version=`$NPTH_CONFIG --version`
++ if test "$PKGCONFIG" != "no" ; then
++ npth_version=`$PKGCONFIG --modversion npth`
+ fi
+ npth_version_major=`echo $npth_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+@@ -45,7 +45,7 @@ AC_DEFUN([AM_PATH_NPTH],
+
+ AC_MSG_CHECKING(for NPTH - version >= $min_npth_version)
+ ok=no
+- if test "$NPTH_CONFIG" != "no" ; then
++ if test "$PKGCONFIG" != "no" ; then
+ req_major=`echo $min_npth_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+ req_minor=`echo $min_npth_version | \
+@@ -66,28 +66,9 @@ AC_DEFUN([AM_PATH_NPTH],
+ fi
+ if test $ok = yes; then
+ AC_MSG_RESULT([yes ($npth_version)])
+- else
+- AC_MSG_RESULT(no)
+- fi
+- if test $ok = yes; then
+- # If we have a recent NPTH, we should also check that the
+- # API is compatible.
+- if test "$req_npth_api" -gt 0 ; then
+- tmp=`$NPTH_CONFIG --api-version 2>/dev/null || echo 0`
+- if test "$tmp" -gt 0 ; then
+- AC_MSG_CHECKING([NPTH API version])
+- if test "$req_npth_api" -eq "$tmp" ; then
+- AC_MSG_RESULT([okay])
+- else
+- ok=no
+- AC_MSG_RESULT([does not match. want=$req_npth_api got=$tmp])
+- fi
+- fi
+- fi
+- fi
+- if test $ok = yes; then
+- NPTH_CFLAGS=`$NPTH_CONFIG --cflags`
+- NPTH_LIBS=`$NPTH_CONFIG --libs`
++ NPTH_CFLAGS=`$PKGCONFIG --cflags npth`
++ NPTH_LIBS=`$PKGCONFIG --libs npth`
++ AC_MSG_WARN([[GOT HERE - $NPTH_LIBS ]])
+ ifelse([$2], , :, [$2])
+ npth_config_host=`$NPTH_CONFIG --host 2>/dev/null || echo none`
+ if test x"$npth_config_host" != xnone ; then
+@@ -103,6 +84,7 @@ AC_DEFUN([AM_PATH_NPTH],
+ fi
+ fi
+ else
++ AC_MSG_RESULT(no)
+ NPTH_CFLAGS=""
+ NPTH_LIBS=""
+ ifelse([$3], , :, [$3])
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gnupg/gnupg/0003-dirmngr-uses-libgpg-error.patch b/poky/meta/recipes-support/gnupg/gnupg/0003-dirmngr-uses-libgpg-error.patch
new file mode 100644
index 000000000..3e798efd0
--- /dev/null
+++ b/poky/meta/recipes-support/gnupg/gnupg/0003-dirmngr-uses-libgpg-error.patch
@@ -0,0 +1,32 @@
+From 9c3858ffda6246bf9e1e6aeeb920532a56b19408 Mon Sep 17 00:00:00 2001
+From: Saul Wold <sgw@linux.intel.com>
+Date: Wed, 16 Aug 2017 11:18:01 +0800
+Subject: [PATCH 3/4] dirmngr uses libgpg error
+
+Upstream-Status: Pending
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Rebase to 2.1.23
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ dirmngr/Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/dirmngr/Makefile.am b/dirmngr/Makefile.am
+index b404165..d3f916e 100644
+--- a/dirmngr/Makefile.am
++++ b/dirmngr/Makefile.am
+@@ -82,7 +82,8 @@ endif
+ dirmngr_LDADD = $(libcommonpth) \
+ $(DNSLIBS) $(LIBASSUAN_LIBS) \
+ $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(NPTH_LIBS) \
+- $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV)
++ $(NTBTLS_LIBS) $(LIBGNUTLS_LIBS) $(LIBINTL) $(LIBICONV) \
++ $(GPG_ERROR_LIBS)
+ if USE_LDAP
+ dirmngr_LDADD += $(ldaplibs)
+ endif
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch b/poky/meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch
new file mode 100644
index 000000000..dcd8582ca
--- /dev/null
+++ b/poky/meta/recipes-support/gnupg/gnupg/0004-autogen.sh-fix-find-version-for-beta-checking.patch
@@ -0,0 +1,34 @@
+From 914ae4a3f7529fb069467bf0ded57dd24ee2e763 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Wed, 16 Aug 2017 11:23:22 +0800
+Subject: [PATCH 4/4] autogen.sh: fix find-version for beta checking
+
+find-version always assumes that gnupg is beta if autogen.sh is run
+out of git-repo. This doesn't work for users whom just take release
+tarball and re-run autoconf in their local build dir.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
+Rebase to 2.1.23
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ autogen.sh | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index e5ba5bf..05e0e11 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -245,7 +245,6 @@ if [ "$myhost" = "find-version" ]; then
+ rvd=$((0x$(echo ${rev} | dd bs=1 count=4 2>/dev/null)))
+ else
+ ingit=no
+- beta=yes
+ tmp="-unknown"
+ rev="0000000"
+ rvd="0"
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gnupg/gnupg_2.2.4.bb b/poky/meta/recipes-support/gnupg/gnupg_2.2.4.bb
new file mode 100644
index 000000000..d3f1a8f4c
--- /dev/null
+++ b/poky/meta/recipes-support/gnupg/gnupg_2.2.4.bb
@@ -0,0 +1,50 @@
+SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
+HOMEPAGE = "http://www.gnupg.org/"
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=189af8afca6d6075ba6c9e0aa8077626 \
+ file://COPYING.LGPL3;md5=a2b6bf2cb38ee52619e60f30a1fc7257"
+
+DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
+
+inherit autotools gettext texinfo pkgconfig
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://0001-Use-pkg-config-to-find-pth-instead-of-pth-config.patch \
+ file://0002-use-pkgconfig-instead-of-npth-config.patch \
+ file://0003-dirmngr-uses-libgpg-error.patch \
+ file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \
+ "
+SRC_URI_append_class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch"
+
+
+SRC_URI[md5sum] = "709e5af5bba84d251c520222e720972f"
+SRC_URI[sha256sum] = "401a3e64780fdfa6d7670de0880aa5c9d589b3db7a7098979d7606cec546f2ec"
+
+EXTRA_OECONF = "--disable-ldap \
+ --disable-ccid-driver \
+ --with-zlib=${STAGING_LIBDIR}/.. \
+ --with-bzip2=${STAGING_LIBDIR}/.. \
+ --with-readline=${STAGING_LIBDIR}/.. \
+ --enable-gpg-is-gpg2 \
+ "
+RRECOMMENDS_${PN} = "pinentry"
+
+do_configure_prepend () {
+ # Else these could be used in prefernce to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+ rm -f ${S}/m4/libassuan.m4
+ rm -f ${S}/m4/ksba.m4
+ rm -f ${S}/m4/libgcrypt.m4
+}
+
+do_install_append() {
+ ln -sf gpg2 ${D}${bindir}/gpg
+ ln -sf gpgv2 ${D}${bindir}/gpgv
+}
+
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls"
+PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-support/gnutls/gnutls.inc b/poky/meta/recipes-support/gnutls/gnutls.inc
new file mode 100644
index 000000000..7bcb9133a
--- /dev/null
+++ b/poky/meta/recipes-support/gnutls/gnutls.inc
@@ -0,0 +1,59 @@
+SUMMARY = "GNU Transport Layer Security Library"
+HOMEPAGE = "http://www.gnu.org/software/gnutls/"
+BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-xx = "LGPLv2.1+"
+LICENSE_${PN}-bin = "GPLv3+"
+LICENSE_${PN}-openssl = "GPLv3+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=71391c8e0c1cfe68077e7fce3b586283 \
+ file://doc/COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://doc/COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+DEPENDS = "nettle gmp virtual/libiconv libunistring"
+DEPENDS_append_libc-musl = " argp-standalone"
+
+SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
+
+SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz"
+
+inherit autotools texinfo binconfig pkgconfig gettext lib_package gtk-doc
+
+PACKAGECONFIG ??= "libidn"
+
+# You must also have CONFIG_SECCOMP enabled in the kernel for
+# seccomp to work.
+#
+PACKAGECONFIG[seccomp] = "ac_cv_libseccomp=yes,ac_cv_libseccomp=no,libseccomp"
+
+PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn"
+PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
+PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
+PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
+
+EXTRA_OECONF = " \
+ --enable-doc \
+ --disable-libdane \
+ --disable-guile \
+ --disable-rpath \
+ --enable-local-libopts \
+ --enable-openssl-compatibility \
+ --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
+ --without-libunistring-prefix \
+"
+
+LDFLAGS_append_libc-musl = " -largp"
+
+do_configure_prepend() {
+ for dir in . lib; do
+ rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
+ done
+}
+
+PACKAGES =+ "${PN}-openssl ${PN}-xx"
+
+FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
+FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
+FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
diff --git a/poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch b/poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
new file mode 100644
index 000000000..b6e7bc965
--- /dev/null
+++ b/poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
@@ -0,0 +1,29 @@
+From eaab55bb6d48643163eebbc9ca575a9ca2a8e03f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 21 Feb 2017 17:10:07 +0200
+Subject: [PATCH] configure.ac: fix sed command
+
+The "sed 's/.bak//g'" matchs "bitbake", which would cause strange errors
+when the S contains "bitbake", fix to "sed 's/\.bak$//'`"
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: gnutls-3.5.16/configure.ac
+===================================================================
+--- gnutls-3.5.16.orig/configure.ac
++++ gnutls-3.5.16/configure.ac
+@@ -955,7 +955,7 @@ YEAR=`date +%Y`
+ AC_SUBST([YEAR], $YEAR)
+
+ for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
+- nam=$(basename $i|sed 's/.bak//g')
++ nam=$(basename $i|sed 's/\.bak$//')
+ if test "$create_libopts_links" = "yes";then
+ rm -f "src/$nam.stamp"
+ rm -f "src/$nam"
diff --git a/poky/meta/recipes-support/gnutls/gnutls/arm_eabi.patch b/poky/meta/recipes-support/gnutls/gnutls/arm_eabi.patch
new file mode 100644
index 000000000..34c8985c1
--- /dev/null
+++ b/poky/meta/recipes-support/gnutls/gnutls/arm_eabi.patch
@@ -0,0 +1,19 @@
+Certain syscall's are not availabe for arm-eabi, so we eliminate
+reference to them.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+--- a/tests/seccomp.c
++++ b/tests/seccomp.c
+@@ -49,7 +49,9 @@ int disable_system_calls(void)
+ }
+
+ ADD_SYSCALL(nanosleep, 0);
++#if ! defined(__ARM_EABI__)
+ ADD_SYSCALL(time, 0);
++#endif
+ ADD_SYSCALL(getpid, 0);
+ ADD_SYSCALL(gettimeofday, 0);
+ #if defined(HAVE_CLOCK_GETTIME)
diff --git a/poky/meta/recipes-support/gnutls/gnutls_3.6.1.bb b/poky/meta/recipes-support/gnutls/gnutls_3.6.1.bb
new file mode 100644
index 000000000..7624a203d
--- /dev/null
+++ b/poky/meta/recipes-support/gnutls/gnutls_3.6.1.bb
@@ -0,0 +1,9 @@
+require gnutls.inc
+
+SRC_URI += "file://0001-configure.ac-fix-sed-command.patch \
+ file://arm_eabi.patch \
+ "
+SRC_URI[md5sum] = "4b65ae3ffef59f3eeed51a6166ff12b3"
+SRC_URI[sha256sum] = "20b10d2c9994bc032824314714d0e84c0f19bdb3d715d8ed55beb7364a8ebaed"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch b/poky/meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch
new file mode 100644
index 000000000..1e52d6abf
--- /dev/null
+++ b/poky/meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch
@@ -0,0 +1,63 @@
+From b17dbb8d3c5605db3a1d82861fcaeef4636d1117 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Thu, 26 Jan 2017 18:54:48 +0200
+Subject: [PATCH] stdint.m4: reintroduce GNULIB_OVERRIDES_WINT_T check
+
+Partially revert the gnulib commit: 5a400b3f5a1f5483dbfd75d38bdb7080218a063b
+to fix the build error with musl library.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ gl/m4/stdint.m4 | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
+index 4ac854d..3dc3da1 100644
+--- a/gl/m4/stdint.m4
++++ b/gl/m4/stdint.m4
+@@ -355,6 +355,32 @@ int32_t i32 = INT32_C (0x7fffffff);
+ gl_STDINT_TYPE_PROPERTIES
+ fi
+
++ dnl Determine whether gnulib's <wchar.h> or <wctype.h> would, if present,
++ dnl override 'wint_t'.
++ AC_CACHE_CHECK([whether wint_t is too small],
++ [gl_cv_type_wint_t_too_small],
++ [AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM([[
++ /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
++ <wchar.h>.
++ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
++ included before <wchar.h>. */
++ #if !(defined __GLIBC__ && !defined __UCLIBC__)
++ # include <stddef.h>
++ # include <stdio.h>
++ # include <time.h>
++ #endif
++ #include <wchar.h>
++ int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
++ ]])],
++ [gl_cv_type_wint_t_too_small=no],
++ [gl_cv_type_wint_t_too_small=yes])])
++ if test $gl_cv_type_wint_t_too_small = yes; then
++ GNULIB_OVERRIDES_WINT_T=1
++ else
++ GNULIB_OVERRIDES_WINT_T=0
++ fi
++
+ dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
+ LIMITS_H=limits.h
+ AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+@@ -363,6 +389,7 @@ int32_t i32 = INT32_C (0x7fffffff);
+ AC_SUBST([HAVE_SYS_BITYPES_H])
+ AC_SUBST([HAVE_SYS_INTTYPES_H])
+ AC_SUBST([STDINT_H])
++ AC_SUBST([GNULIB_OVERRIDES_WINT_T])
+ AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
+ ])
+
+--
+2.4.0
+
diff --git a/poky/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch b/poky/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch
new file mode 100644
index 000000000..2ac89f3b3
--- /dev/null
+++ b/poky/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Inappropriate
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd libtasn1-2.14/doc/Makefile.am libtasn1-2.14/doc/Makefile.am
+--- libtasn1-2.14/doc/Makefile.am 2012-09-24 15:08:42.000000000 +0300
++++ libtasn1-2.14/doc/Makefile.am 2013-01-03 07:35:26.702763403 +0200
+@@ -31,7 +31,7 @@
+ AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) \
+ --no-split --number-sections --css-include=texinfo.css
+
+-dist_man_MANS = $(gdoc_MANS) asn1Parser.1 asn1Coding.1 asn1Decoding.1
++dist_man_MANS = $(gdoc_MANS)
+
+ HELP2MAN_OPTS = --info-page libtasn1
diff --git a/poky/meta/recipes-support/gnutls/libtasn1_4.13.bb b/poky/meta/recipes-support/gnutls/libtasn1_4.13.bb
new file mode 100644
index 000000000..2d223861c
--- /dev/null
+++ b/poky/meta/recipes-support/gnutls/libtasn1_4.13.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Library for ASN.1 and DER manipulation"
+HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN}-bin = "GPLv3+"
+LICENSE_${PN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+ file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
+
+SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
+ file://dont-depend-on-help2man.patch \
+ file://0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch \
+ "
+
+DEPENDS = "bison-native"
+
+SRC_URI[md5sum] = "ce2ba4d3088119b48e7531a703669c52"
+SRC_URI[sha256sum] = "7e528e8c317ddd156230c4e31d082cd13e7ddeb7a54824be82632209550c8cca"
+
+inherit autotools texinfo binconfig lib_package gtk-doc
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch b/poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
new file mode 100644
index 000000000..f1997e15a
--- /dev/null
+++ b/poky/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch
@@ -0,0 +1,303 @@
+From 265faf8fe0acaca2043a248a4df02b0868ffa6de Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Wed, 16 Aug 2017 02:00:08 -0400
+Subject: [PATCH 1/4] pkgconfig
+
+Update gpgme to use pkgconfig instead of -config files since its
+simpler and less error prone when cross compiling.
+
+Upstream-Status: Denied [Upstream not interested in pkg-config support]
+RP 2015/4/17
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+
+Rebase to 1.9.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 1 +
+ src/Makefile.am | 4 +-
+ src/gpgme-pthread.pc.in | 15 +++++++
+ src/gpgme.m4 | 114 ++++--------------------------------------------
+ src/gpgme.pc.in | 15 +++++++
+ 5 files changed, 42 insertions(+), 107 deletions(-)
+ create mode 100644 src/gpgme-pthread.pc.in
+ create mode 100644 src/gpgme.pc.in
+
+diff --git a/configure.ac b/configure.ac
+index 6ea4bcd..2a0d528 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -887,6 +887,7 @@ AC_CONFIG_FILES(Makefile src/Makefile
+ src/versioninfo.rc
+ src/gpgme.h)
+ AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
++AC_CONFIG_FILES(src/gpgme.pc src/gpgme-pthread.pc)
+ AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile)
+ AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in)
+ AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index ce6f1d4..5f38fee 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -19,12 +19,14 @@
+ ## Process this file with automake to produce Makefile.in
+
+ EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \
+- gpgme.h.in versioninfo.rc.in gpgme.def
++ gpgme.h.in versioninfo.rc.in gpgme.def gpgme.pc.in gpgme-pthread.pc.in
+
+ bin_SCRIPTS = gpgme-config
+ m4datadir = $(datadir)/aclocal
+ m4data_DATA = gpgme.m4
+ nodist_include_HEADERS = gpgme.h
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = gpgme.pc gpgme-pthread.pc
+
+ bin_PROGRAMS = gpgme-tool
+
+diff --git a/src/gpgme-pthread.pc.in b/src/gpgme-pthread.pc.in
+new file mode 100644
+index 0000000..074bbf6
+--- /dev/null
++++ b/src/gpgme-pthread.pc.in
+@@ -0,0 +1,15 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@GPGME_CONFIG_API_VERSION@
++host=@GPGME_CONFIG_HOST@
++
++Name: gpgme
++Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program (deprecated)
++Version: @VERSION@
++Libs: -L${libdir} -lgpgme -lpthread
++Cflags: -I${includedir}
++Requires: libassuan gpg-error
+diff --git a/src/gpgme.m4 b/src/gpgme.m4
+index 6c2be44..d8a75cb 100644
+--- a/src/gpgme.m4
++++ b/src/gpgme.m4
+@@ -79,7 +79,7 @@ dnl config script does not match the host specification the script
+ dnl is added to the gpg_config_script_warn variable.
+ dnl
+ AC_DEFUN([AM_PATH_GPGME],
+-[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
++[
+ tmp=ifelse([$1], ,1:0.4.2,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+ req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -89,36 +89,12 @@ AC_DEFUN([AM_PATH_GPGME],
+ min_gpgme_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
+- ok=no
+- if test "$GPGME_CONFIG" != "no" ; then
+- req_major=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+- if test "$gpgme_version_major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$gpgme_version_major" -eq "$req_major"; then
+- if test "$gpgme_version_minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$gpgme_version_minor" -eq "$req_minor"; then
+- if test "$gpgme_version_micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
++ PKG_CHECK_MODULES(GPGME, [gpgme >= $min_gpgme_version], [ok=yes], [ok=no])
+ if test $ok = yes; then
+ # If we have a recent GPGME, we should also check that the
+ # API is compatible.
+ if test "$req_gpgme_api" -gt 0 ; then
+- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ if test "$req_gpgme_api" -ne "$tmp" ; then
+ ok=no
+@@ -127,19 +103,11 @@ AC_DEFUN([AM_PATH_GPGME],
+ fi
+ fi
+ if test $ok = yes; then
+- GPGME_CFLAGS=`$GPGME_CONFIG --cflags`
+- GPGME_LIBS=`$GPGME_CONFIG --libs`
+- AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ _AM_PATH_GPGME_CONFIG_HOST_CHECK
+ else
+- GPGME_CFLAGS=""
+- GPGME_LIBS=""
+- AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
+- AC_SUBST(GPGME_CFLAGS)
+- AC_SUBST(GPGME_LIBS)
+ ])
+
+ dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION,
+@@ -148,7 +116,7 @@ dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS
+ dnl and GPGME_PTHREAD_LIBS.
+ dnl
+ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
+-[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl
++[
+ tmp=ifelse([$1], ,1:0.4.2,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+ req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -158,38 +126,12 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
+ min_gpgme_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version)
+- ok=no
+- if test "$GPGME_CONFIG" != "no" ; then
+- if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then
+- req_major=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+- if test "$gpgme_version_major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$gpgme_version_major" -eq "$req_major"; then
+- if test "$gpgme_version_minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$gpgme_version_minor" -eq "$req_minor"; then
+- if test "$gpgme_version_micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
++ PKG_CHECK_MODULES(GPGME_PTHREAD, [gpgme-pthread >= $min_gpgme_version], [ok=yes], [ok=no])
+ if test $ok = yes; then
+ # If we have a recent GPGME, we should also check that the
+ # API is compatible.
+ if test "$req_gpgme_api" -gt 0 ; then
+- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version gpgme-pthread 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ if test "$req_gpgme_api" -ne "$tmp" ; then
+ ok=no
+@@ -198,19 +140,11 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD],
+ fi
+ fi
+ if test $ok = yes; then
+- GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags`
+- GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs`
+- AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ _AM_PATH_GPGME_CONFIG_HOST_CHECK
+ else
+- GPGME_PTHREAD_CFLAGS=""
+- GPGME_PTHREAD_LIBS=""
+- AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
+- AC_SUBST(GPGME_PTHREAD_CFLAGS)
+- AC_SUBST(GPGME_PTHREAD_LIBS)
+ ])
+
+
+@@ -229,36 +163,12 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
+ min_gpgme_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version)
+- ok=no
+- if test "$GPGME_CONFIG" != "no" ; then
+- req_major=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_gpgme_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+- if test "$gpgme_version_major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$gpgme_version_major" -eq "$req_major"; then
+- if test "$gpgme_version_minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$gpgme_version_minor" -eq "$req_minor"; then
+- if test "$gpgme_version_micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
++ PKG_CHECK_MODULES(GPGME_GLIB, [gpgme >= $min_gpgme_version glib-2.0], [ok=yes], [ok=no])
+ if test $ok = yes; then
+ # If we have a recent GPGME, we should also check that the
+ # API is compatible.
+ if test "$req_gpgme_api" -gt 0 ; then
+- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ if test "$req_gpgme_api" -ne "$tmp" ; then
+ ok=no
+@@ -267,17 +177,9 @@ AC_DEFUN([AM_PATH_GPGME_GLIB],
+ fi
+ fi
+ if test $ok = yes; then
+- GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags`
+- GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs`
+- AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ _AM_PATH_GPGME_CONFIG_HOST_CHECK
+ else
+- GPGME_GLIB_CFLAGS=""
+- GPGME_GLIB_LIBS=""
+- AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
+- AC_SUBST(GPGME_GLIB_CFLAGS)
+- AC_SUBST(GPGME_GLIB_LIBS)
+ ])
+diff --git a/src/gpgme.pc.in b/src/gpgme.pc.in
+new file mode 100644
+index 0000000..b69539f
+--- /dev/null
++++ b/src/gpgme.pc.in
+@@ -0,0 +1,15 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@GPGME_CONFIG_API_VERSION@
++host=@GPGME_CONFIG_HOST@
++
++Name: gpgme
++Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program.
++Version: @VERSION@
++Libs: -L${libdir} -lgpgme
++Cflags: -I${includedir}
++Requires: libassuan gpg-error
+\ No newline at end of file
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch b/poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
new file mode 100644
index 000000000..d20271e31
--- /dev/null
+++ b/poky/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch
@@ -0,0 +1,51 @@
+From 30f7a694cc4568ecb24f77c83a6123ed3f4075fa Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 31 Jan 2018 10:44:19 +0800
+Subject: [PATCH] gpgme/lang/python: gpg-error-config should not be used
+
+gpg-error-config was modified by OE to always return an error.
+So we want to find an alternative way to retrieve whatever it
+is we need.
+
+Upstream-Status: Inappropriate [changes are specific to OE]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Rework to 1.10.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ lang/python/setup.py.in | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
+index f9dda20..9f5d61f 100755
+--- a/lang/python/setup.py.in
++++ b/lang/python/setup.py.in
+@@ -26,7 +26,6 @@ import shutil
+ import subprocess
+
+ # Out-of-tree build of the gpg bindings.
+-gpg_error_config = ["gpg-error-config"]
+ gpgme_config_flags = ["--thread=pthread"]
+ gpgme_config = ["gpgme-config"] + gpgme_config_flags
+ gpgme_h = ""
+@@ -174,14 +173,7 @@ class BuildExtFirstHack(build):
+
+ def _generate_errors_i(self):
+
+- try:
+- subprocess.check_call(gpg_error_config + ['--version'],
+- stdout=devnull)
+- except:
+- sys.exit("Could not find gpg-error-config. " +
+- "Please install the libgpg-error development package.")
+-
+- gpg_error_content = self._read_header("gpg-error.h", getconfig("cflags", config=gpg_error_config))
++ gpg_error_content = self._read_header("gpg-error.h", os.environ.get('CFLAGS').split())
+
+ filter_re = re.compile(r'GPG_ERR_[^ ]* =')
+ rewrite_re = re.compile(r' *(.*) = .*')
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch b/poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch
new file mode 100644
index 000000000..7c9cccc0e
--- /dev/null
+++ b/poky/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch
@@ -0,0 +1,33 @@
+From 93aae34ee70b8d50b31a19a65d6ac8290cb148ae Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Tue, 30 Jan 2018 15:28:49 +0800
+Subject: [PATCH 2/4] Correctly install python modules
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+Rebase to 1.9.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+
+Rebase to 1.10.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ lang/python/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index 8d74cbd..ce4f0a5 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -91,6 +91,7 @@ install-exec-local:
+ --build-base="$$(basename "$${PYTHON}")-gpg" \
+ install \
+ --prefix "$(DESTDIR)$(prefix)" \
++ --install-lib=$(DESTDIR)${pythondir} \
+ --verbose ; \
+ done
+
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch b/poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch
new file mode 100644
index 000000000..d2b039dac
--- /dev/null
+++ b/poky/meta/recipes-support/gpgme/gpgme/0004-python-import.patch
@@ -0,0 +1,34 @@
+From 32ecc3f058307060e40af86127cd226248a73c41 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 16 Aug 2017 02:06:45 -0400
+Subject: [PATCH 3/4] python import
+
+Don't check for output on stderr to know if an import worked, host inputrc and
+sysroot readline can cause warnings on stderr.
+
+Upstream-Status: Backport (from autoconf-archive 883a2abd)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+Rebase to 1.9.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ m4/ax_python_devel.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4
+index b990d5b..318b089 100644
+--- a/m4/ax_python_devel.m4
++++ b/m4/ax_python_devel.m4
+@@ -137,7 +137,7 @@ variable to configure. See ``configure --help'' for reference.
+ #
+ AC_MSG_CHECKING([for the distutils Python package])
+ ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
+- if test -z "$ac_distutils_result"; then
++ if test $? -eq 0; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch b/poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch
new file mode 100644
index 000000000..963ae874c
--- /dev/null
+++ b/poky/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch
@@ -0,0 +1,31 @@
+From 6dcedc4dd055af902719b1a1cb10daa935a27f58 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 13 Apr 2017 16:40:27 +0300
+Subject: [PATCH 4/4] gpgme-config: skip all /lib* or /usr/lib* directories in
+ output
+
+The logic was not working in multilib setups which use other
+directory names than plain /lib or /usr/lib.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/gpgme-config.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/gpgme-config.in b/src/gpgme-config.in
+index a4d152e..8342865 100644
+--- a/src/gpgme-config.in
++++ b/src/gpgme-config.in
+@@ -154,7 +154,7 @@ while test $# -gt 0; do
+ for i in $libs $tmp_l $assuan_libs $gpg_error_libs $tmp_x; do
+ skip=no
+ case $i in
+- -L/usr/lib|-L/lib)
++ -L/usr/lib*|-L/lib*)
+ skip=yes
+ ;;
+ -L*|-l*)
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch b/poky/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch
new file mode 100644
index 000000000..8cc8983e2
--- /dev/null
+++ b/poky/meta/recipes-support/gpgme/gpgme/0006-fix-build-path-issue.patch
@@ -0,0 +1,37 @@
+From 180a5669e4a13a550b1b0dcef1689b6c0470fe54 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 31 Jan 2018 11:01:09 +0800
+Subject: [PATCH] fix build path issue
+
+Get the "--root" directory supplied to the "install" command,
+and use it as a prefix to strip off the purported filename
+encoded in bytecode files.
+
+Since --root added, we need to tweak --prefix and --install-lib
+to use relative path.
+
+Upstream-Status: Submitted [gnupg-devel@gnupg.org]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ lang/python/Makefile.am | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index ce4f0a5..5a468f1 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -90,8 +90,9 @@ install-exec-local:
+ build \
+ --build-base="$$(basename "$${PYTHON}")-gpg" \
+ install \
+- --prefix "$(DESTDIR)$(prefix)" \
+- --install-lib=$(DESTDIR)${pythondir} \
++ --root=${DESTDIR} \
++ --prefix "$(prefix)" \
++ --install-lib=${pythondir} \
+ --verbose ; \
+ done
+
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gpgme/gpgme/0007-qt-python-Add-variables-to-tests.patch b/poky/meta/recipes-support/gpgme/gpgme/0007-qt-python-Add-variables-to-tests.patch
new file mode 100644
index 000000000..ce3745cca
--- /dev/null
+++ b/poky/meta/recipes-support/gpgme/gpgme/0007-qt-python-Add-variables-to-tests.patch
@@ -0,0 +1,78 @@
+From f47e8c6f9e461803468a64581d3640d873352eaa Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 1 Feb 2018 10:14:30 +0800
+Subject: [PATCH] qt/python: Add variables to tests
+
+* configure.ac, lang/python/Makefile.am:
+ New variable to `lang/python', set to `lang/python' if RUN_LANG_PYTHON_TESTS
+
+* configure.ac, lang/qt/Makefile.am:
+ New variable to `lang/qt', set to `lang/qt' if RUN_LANG_QT_TESTS
+
+Upstream-Status: Submitted [gnupg-devel@gnupg.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 11 +++++++++++
+ lang/python/Makefile.am | 3 +++
+ lang/qt/Makefile.am | 8 +++++++-
+ 3 files changed, 21 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 608c376..fad7467 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -536,6 +536,17 @@ AC_ARG_ENABLE(g13-test,
+ run_g13_test=$enableval)
+ AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes")
+
++run_lang_python_test="yes"
++AC_ARG_ENABLE(lang-python-test,
++ AC_HELP_STRING([--disable-lang-python-test], [disable Python regression test]),
++ run_lang_python_test=$enableval)
++AM_CONDITIONAL(RUN_LANG_PYTHON_TESTS, test "$run_lang_python_test" = "yes")
++
++run_lang_qt_test="yes"
++AC_ARG_ENABLE(lang-qt-test,
++ AC_HELP_STRING([--disable-lang-qt-test], [disable Qt regression test]),
++ run_lang_qt_test=$enableval)
++AM_CONDITIONAL(RUN_LANG_QT_TESTS, test "$run_lang_qt_test" = "yes")
+
+ # Checks for header files.
+ AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h
+diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
+index 8d74cbd..43b5d1e 100644
+--- a/lang/python/Makefile.am
++++ b/lang/python/Makefile.am
+@@ -24,7 +24,10 @@ EXTRA_DIST = \
+ examples \
+ src
+
++if RUN_LANG_PYTHON_TESTS
+ SUBDIRS = . tests
++endif
++
+
+ .PHONY: prepare
+ prepare: copystamp
+diff --git a/lang/qt/Makefile.am b/lang/qt/Makefile.am
+index ab85960..a244ede 100644
+--- a/lang/qt/Makefile.am
++++ b/lang/qt/Makefile.am
+@@ -19,6 +19,12 @@
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ # 02111-1307, USA
+
+-SUBDIRS = src tests doc
++if RUN_LANG_QT_TESTS
++qttests = tests
++else
++qttests =
++endif
++
++SUBDIRS = src ${qttests} doc
+
+ EXTRA_DIST = README
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/gpgme/gpgme_1.10.0.bb b/poky/meta/recipes-support/gpgme/gpgme_1.10.0.bb
new file mode 100644
index 000000000..f015f3ad7
--- /dev/null
+++ b/poky/meta/recipes-support/gpgme/gpgme_1.10.0.bb
@@ -0,0 +1,86 @@
+SUMMARY = "High-level GnuPG encryption/signing API"
+DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
+HOMEPAGE = "http://www.gnupg.org/gpgme.html"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
+ file://src/gpgme.h.in;endline=23;md5=9d157d08a69059344e6f82abd2d25781 \
+ file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
+ file://0001-pkgconfig.patch \
+ file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \
+ file://0003-Correctly-install-python-modules.patch \
+ file://0004-python-import.patch \
+ file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \
+ file://0006-fix-build-path-issue.patch \
+ file://0007-qt-python-Add-variables-to-tests.patch \
+ "
+
+SRC_URI[md5sum] = "78b1533c593478982ee2fc548260c563"
+SRC_URI[sha256sum] = "1a8fed1197c3b99c35f403066bb344a26224d292afc048cfdfc4ccd5690a0693"
+
+DEPENDS = "libgpg-error libassuan"
+RDEPENDS_${PN}-cpp += "libstdc++"
+
+RDEPENDS_python2-gpg += "python-unixadmin"
+RDEPENDS_python3-gpg += "python3-unixadmin"
+
+BINCONFIG = "${bindir}/gpgme-config"
+
+# Note select python2 or python3, but you can't select both at the same time
+PACKAGECONFIG ??= "python3"
+PACKAGECONFIG[python2] = ",,python swig-native,"
+PACKAGECONFIG[python3] = ",,python3 swig-native,"
+
+# Default in configure.ac: "cl cpp python qt"
+# Supported: "cl cpp python python2 python3 qt"
+# python says 'search and find python2 or python3'
+
+# Building the C++ bindings for native requires a C++ compiler with C++11
+# support. Since these bindings are currently not needed, we can disable them.
+DEFAULT_LANGUAGES = ""
+DEFAULT_LANGUAGES_class-target = "cpp"
+LANGUAGES ?= "${DEFAULT_LANGUAGES}"
+LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}"
+LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}"
+
+PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}"
+PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}"
+
+EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \
+ --disable-gpgconf-test \
+ --disable-gpg-test \
+ --disable-gpgsm-test \
+ --disable-g13-test \
+ --disable-lang-qt-test \
+ --disable-lang-python-test \
+'
+
+inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT}
+
+export PKG_CONFIG='pkg-config'
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "${PN}-cpp"
+PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}"
+PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}"
+
+FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*"
+FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \
+ ${libdir}/cmake/* \
+"
+
+CFLAGS_append_libc-musl = " -D__error_t_defined "
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+ rm -f ${S}/m4/libassuan.m4
+ rm -f ${S}/m4/python.m4
+}
diff --git a/poky/meta/recipes-support/icu/icu.inc b/poky/meta/recipes-support/icu/icu.inc
new file mode 100644
index 000000000..983118cd6
--- /dev/null
+++ b/poky/meta/recipes-support/icu/icu.inc
@@ -0,0 +1,87 @@
+SUMMARY = "International Component for Unicode libraries"
+DESCRIPTION = "The International Component for Unicode (ICU) is a mature, \
+portable set of C/C++ and Java libraries for Unicode support, software \
+internationalization (I18N) and globalization (G11N), giving applications the \
+same results on all platforms."
+HOMEPAGE = "http://site.icu-project.org/"
+
+LICENSE = "ICU"
+DEPENDS = "icu-native"
+DEPENDS_class-native = ""
+
+CVE_PRODUCT = "international_components_for_unicode"
+
+S = "${WORKDIR}/icu/source"
+SPDX_S = "${WORKDIR}/icu"
+STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}"
+
+BINCONFIG = "${bindir}/icu-config"
+
+ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}"
+
+inherit autotools pkgconfig binconfig
+
+# ICU needs the native build directory as an argument to its --with-cross-build option when
+# cross-compiling. Taken the situation that different builds may share a common sstate-cache
+# into consideration, the native build directory needs to be staged.
+EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
+EXTRA_OECONF_class-native = ""
+EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
+
+EXTRA_OECONF_append_class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}"
+TARGET_CXXFLAGS_append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}"
+
+# strtod_l() is not supported by musl; also xlocale.h is missing
+# It is not possible to disable its use via configure switches or env vars
+# so monkey patching is needed.
+do_configure_prepend_libc-musl () {
+ sed -i -e 's,DU_HAVE_STRTOD_L=1,DU_HAVE_STRTOD_L=0,' ${S}/configure.ac
+}
+
+do_compile_prepend_class-target () {
+ # Make sure certain build host references do not end up being compiled
+ # in the image. This only affects libicutu and icu-dbg
+ sed \
+ -e 's,DU_BUILD=,DU_BUILD_unused=,g' \
+ -e '/^CPPFLAGS.*/ s,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -i ${B}/tools/toolutil/Makefile
+}
+
+PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}"
+do_install_append_class-native() {
+ mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
+ cp -r ${B}/config/icucross.mk ${D}/${STAGING_ICU_DIR_NATIVE}/config
+ cp -r ${B}/config/icucross.inc ${D}/${STAGING_ICU_DIR_NATIVE}/config
+ cp -r ${B}/lib ${D}/${STAGING_ICU_DIR_NATIVE}
+ cp -r ${B}/bin ${D}/${STAGING_ICU_DIR_NATIVE}
+ cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE}
+}
+
+do_install_append_class-target() {
+ # The native pkgdata can not generate the correct data file.
+ # Use icupkg to re-generate it.
+ if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then
+ rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
+ icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat
+ fi
+
+ # Remove build host references...
+ sed -i \
+ -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+ -e 's|${DEBUG_PREFIX_MAP}||g' \
+ -e 's:${HOSTTOOLS_DIR}/::g' \
+ ${D}/${bindir}/icu-config ${D}/${libdir}/${BPN}/${PV}/Makefile.inc \
+ ${D}/${libdir}/${BPN}/${PV}/pkgdata.inc
+}
+
+PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"
+
+FILES_${PN}-dev += "${libdir}/${BPN}/"
+
+FILES_libicudata = "${libdir}/libicudata.so.*"
+FILES_libicuuc = "${libdir}/libicuuc.so.*"
+FILES_libicui18n = "${libdir}/libicui18n.so.*"
+FILES_libicutu = "${libdir}/libicutu.so.*"
+FILES_libicuio = "${libdir}/libicuio.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch b/poky/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch
new file mode 100644
index 000000000..2968d571b
--- /dev/null
+++ b/poky/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch
@@ -0,0 +1,28 @@
+From 0c82d6aa02c08e41b13c83b14782bd7024e25d59 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 15 Feb 2014 21:06:42 +0000
+Subject: [PATCH] Disable LDFLAGSICUDT for Linux
+
+Upstream-Status: Inappropriate [ OE Configuration ]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ source/config/mh-linux | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config/mh-linux b/config/mh-linux
+index 366f0cc..2689aab 100644
+--- a/config/mh-linux
++++ b/config/mh-linux
+@@ -21,7 +21,7 @@ LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN
+ LD_RPATH_PRE = -Wl,-rpath,
+
+ ## These are the library specific LDFLAGS
+-LDFLAGSICUDT=-nodefaultlibs -nostdlib
++# LDFLAGSICUDT=-nodefaultlibs -nostdlib
+
+ ## Compiler switch to embed a library name
+ # The initial tab in the next line is to prevent icu-config from reading it.
+--
+1.7.10.4
+
diff --git a/poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch b/poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch
new file mode 100644
index 000000000..f0c49e197
--- /dev/null
+++ b/poky/meta/recipes-support/icu/icu/0001-i18n-Drop-include-xlocale.h.patch
@@ -0,0 +1,34 @@
+From d6b57c1b4eb9a24d9d95342a961c93946539c93b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 24 Jun 2017 22:52:40 -0700
+Subject: [PATCH 3/4] i18n: Drop include <xlocale.h>
+
+glibc 2.26 drops this header
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ source/i18n/digitlst.cpp | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/source/i18n/digitlst.cpp b/source/i18n/digitlst.cpp
+index 8e86fa7..0bdbb2c 100644
+--- a/i18n/digitlst.cpp
++++ b/i18n/digitlst.cpp
+@@ -62,11 +62,7 @@
+ #endif
+
+ #if U_USE_STRTOD_L
+-# if U_HAVE_XLOCALE_H
+-# include <xlocale.h>
+-# else
+-# include <locale.h>
+-# endif
++# include <locale.h>
+ #endif
+
+ // ***************************************************************************
+--
+2.14.2
+
diff --git a/poky/meta/recipes-support/icu/icu/fix-install-manx.patch b/poky/meta/recipes-support/icu/icu/fix-install-manx.patch
new file mode 100644
index 000000000..8186fb412
--- /dev/null
+++ b/poky/meta/recipes-support/icu/icu/fix-install-manx.patch
@@ -0,0 +1,57 @@
+From 3063a9211669bee673840ee81f81d30699b9b702 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Fri, 9 Oct 2015 17:50:41 +0100
+Subject: [PATCH 2/4] icu: fix install race
+
+The generic recursive target calls target-local so also adding it to the
+dependency list results in races due to install-local being executed twice in
+parallel. For example, install-manx can fail if the two install processes race
+and one process tries to chown a file that the other process has just deleted.
+
+Also install-manx should be a phony target, and for clarity use $^ instead of $?
+in the install command.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ source/Makefile.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/source/Makefile.in b/source/Makefile.in
+index c1db15b..4948deb 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -73,7 +73,7 @@ EXTRA_DATA =
+
+ ## List of phony targets
+ .PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \
+-install-recursive clean clean-local clean-recursive distclean \
++install-recursive install-manx clean clean-local clean-recursive distclean \
+ distclean-local distclean-recursive doc dist dist-local dist-recursive \
+ check check-local check-recursive clean-recursive-with-twist install-icu \
+ doc install-doc tests icu4j-data icu4j-data-install update-windows-makefiles xcheck-local xcheck-recursive xperf xcheck xperf-recursive \
+@@ -84,9 +84,9 @@ check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist
+
+ ## List of standard targets
+ all: all-local all-recursive
+-install: install-recursive install-local
++install: install-recursive
+ clean: clean-recursive-with-twist clean-local
+-distclean : distclean-recursive distclean-local
++distclean : distclean-recursive
+ dist: dist-recursive
+ check: all check-recursive
+ check-recursive: all
+@@ -350,7 +350,7 @@ config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
+
+ install-manx: $(MANX_FILES)
+ $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
+- $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
++ $(INSTALL_DATA) $^ $(DESTDIR)$(mandir)/man$(SECTION)
+
+ config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
+ cd $(top_builddir) \
+--
+2.14.2
+
diff --git a/poky/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch b/poky/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
new file mode 100644
index 000000000..e758a623e
--- /dev/null
+++ b/poky/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
@@ -0,0 +1,49 @@
+pkgdata.cpp: use LARGE_BUFFER_MAX_SIZE for cmd
+
+Use LARGE_BUFFER_MAX_SIZE for cmd rather than SMALL_BUFFER_MAX_SIZE,
+otherwise there was a Segmentation fault error when the command line is
+long, this should be a misplay since other cmd uses
+LARGE_BUFFER_MAX_SIZE.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ tools/pkgdata/pkgdata.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/pkgdata/pkgdata.cpp b/tools/pkgdata/pkgdata.cpp
+index 60167dd..506dd32 100644
+--- a/tools/pkgdata/pkgdata.cpp
++++ b/tools/pkgdata/pkgdata.cpp
+@@ -1084,7 +1084,7 @@ normal_symlink_mode:
+
+ static int32_t pkg_installLibrary(const char *installDir, const char *targetDir, UBool noVersion) {
+ int32_t result = 0;
+- char cmd[SMALL_BUFFER_MAX_SIZE];
++ char cmd[LARGE_BUFFER_MAX_SIZE];
+
+ sprintf(cmd, "cd %s && %s %s %s%s%s",
+ targetDir,
+@@ -1152,7 +1152,7 @@ static int32_t pkg_installLibrary(const char *installDir, const char *targetDir,
+
+ static int32_t pkg_installCommonMode(const char *installDir, const char *fileName) {
+ int32_t result = 0;
+- char cmd[SMALL_BUFFER_MAX_SIZE] = "";
++ char cmd[LARGE_BUFFER_MAX_SIZE] = "";
+
+ if (!T_FileStream_file_exists(installDir)) {
+ UErrorCode status = U_ZERO_ERROR;
+@@ -1184,7 +1184,7 @@ static int32_t pkg_installCommonMode(const char *installDir, const char *fileNam
+ #endif
+ static int32_t pkg_installFileMode(const char *installDir, const char *srcDir, const char *fileListName) {
+ int32_t result = 0;
+- char cmd[SMALL_BUFFER_MAX_SIZE] = "";
++ char cmd[LARGE_BUFFER_MAX_SIZE] = "";
+
+ if (!T_FileStream_file_exists(installDir)) {
+ UErrorCode status = U_ZERO_ERROR;
+--
+1.9.1
+
diff --git a/poky/meta/recipes-support/icu/icu_60.2.bb b/poky/meta/recipes-support/icu/icu_60.2.bb
new file mode 100644
index 000000000..585a92bc4
--- /dev/null
+++ b/poky/meta/recipes-support/icu/icu_60.2.bb
@@ -0,0 +1,29 @@
+require icu.inc
+
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=675f2d069434d8a1e4e6b0dcf4379226"
+
+def icu_download_version(d):
+ pvsplit = d.getVar('PV').split('.')
+ return pvsplit[0] + "_" + pvsplit[1]
+
+ICU_PV = "${@icu_download_version(d)}"
+
+# http://errors.yoctoproject.org/Errors/Details/20486/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
+SRC_URI = "${BASE_SRC_URI} \
+ file://icu-pkgdata-large-cmd.patch \
+ file://fix-install-manx.patch \
+ file://0001-i18n-Drop-include-xlocale.h.patch \
+ "
+
+SRC_URI_append_class-target = "\
+ file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
+ "
+SRC_URI[md5sum] = "43861b127744b3c0b9d7f386f4b9fa40"
+SRC_URI[sha256sum] = "f073ea8f35b926d70bb33e6577508aa642a8b316a803f11be20af384811db418"
+
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
+UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/"
diff --git a/poky/meta/recipes-support/iso-codes/iso-codes_3.77.bb b/poky/meta/recipes-support/iso-codes/iso-codes_3.77.bb
new file mode 100644
index 000000000..bd613ac57
--- /dev/null
+++ b/poky/meta/recipes-support/iso-codes/iso-codes_3.77.bb
@@ -0,0 +1,15 @@
+SUMMARY = "ISO language, territory, currency, script codes and their translations"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
+SRC_URI[md5sum] = "9d0d06cfb4634428b300845edcd7140a"
+SRC_URI[sha256sum] = "21cd73a4c6f95d9474ebfcffd4e065223857720f24858e564f4409b19f7f0d90"
+
+# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
+# are inhibited by allarch
+DEPENDS = "gettext-native"
+
+inherit allarch autotools
+
+FILES_${PN} += "${datadir}/xml/"
diff --git a/poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch b/poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
new file mode 100644
index 000000000..525b07620
--- /dev/null
+++ b/poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
@@ -0,0 +1,159 @@
+Add pkgconfig support to libassuan.
+This patch is rejected by upstream for the reason below:
+They think pkgconfig adds no portability and maintaining them is not worthwhile.
+
+Upstream-Status: Denied
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+
+forward ported to 2.4.4
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: libassuan-2.4.4/libassuan.pc.in
+===================================================================
+--- /dev/null
++++ libassuan-2.4.4/libassuan.pc.in
+@@ -0,0 +1,13 @@
++prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++api_version=@LIBASSUAN_CONFIG_API_VERSION@
++host=@LIBASSUAN_CONFIG_HOST@
++
++Name: libassuan
++Description: IPC library used by GnuPG and GPGME
++Requires:
++Version: @VERSION@
++Libs: -L${libdir} -lassuan
++Libs.private: -lgpg-error
++Cflags: -I${includedir}
+Index: libassuan-2.4.4/Makefile.am
+===================================================================
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -25,10 +25,13 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-doc
+ # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
+ GITLOG_TO_CHANGELOG=gitlog-to-changelog
+
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = libassuan.pc
++
+ EXTRA_DIST = autogen.sh autogen.rc README.GIT VERSION \
+ ChangeLog-2011 doc/ChangeLog-2011 src/ChangeLog-2011 \
+ tests/ChangeLog-2011 contrib/ChangeLog-2011 \
+- build-aux/git-log-footer build-aux/git-log-fix
++ build-aux/git-log-footer build-aux/git-log-fix libassuan.pc.in
+
+ if BUILD_DOC
+ doc = doc
+Index: 2.4.4-r0/libassuan-2.4.4/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -485,6 +485,7 @@ AC_CONFIG_FILES([doc/Makefile])
+ AC_CONFIG_FILES([tests/Makefile])
+ AC_CONFIG_FILES([src/libassuan-config], [chmod +x src/libassuan-config])
+ AC_CONFIG_FILES([src/versioninfo.rc])
++AC_CONFIG_FILES([libassuan.pc])
+
+ AC_OUTPUT
+
+Index: libassuan-2.4.4/src/libassuan.m4
+===================================================================
+--- a/src/libassuan.m4
++++ b/src/libassuan.m4
+@@ -16,18 +16,6 @@ dnl Returns ok set to yes or no.
+ dnl
+ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+ [ AC_REQUIRE([AC_CANONICAL_HOST])
+- AC_ARG_WITH(libassuan-prefix,
+- AC_HELP_STRING([--with-libassuan-prefix=PFX],
+- [prefix where LIBASSUAN is installed (optional)]),
+- libassuan_config_prefix="$withval", libassuan_config_prefix="")
+- if test x$libassuan_config_prefix != x ; then
+- libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix"
+- if test x${LIBASSUAN_CONFIG+set} != xset ; then
+- LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config
+- fi
+- fi
+-
+- AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no)
+
+ tmp=ifelse([$1], ,1:0.9.2,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+@@ -38,51 +26,12 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+ min_libassuan_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version)
+- ok=no
+- if test "$LIBASSUAN_CONFIG" != "no" \
+- && test -f "$LIBASSUAN_CONFIG" ; then
+- req_major=`echo $min_libassuan_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_libassuan_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_libassuan_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+-
+- libassuan_config_version=`$LIBASSUAN_CONFIG --version`
+- major=`echo $libassuan_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+- minor=`echo $libassuan_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+- micro=`echo $libassuan_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+-
+- if test "$major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$major" -eq "$req_major"; then
+- if test "$minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$minor" -eq "$req_minor"; then
+- if test "$micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
+-
+- if test $ok = yes; then
+- AC_MSG_RESULT([yes ($libassuan_config_version)])
+- else
+- AC_MSG_RESULT(no)
+- fi
++ PKG_CHECK_MODULES(LIBASSUAN, [libassuan >= $min_libassuan_version], [ok=yes], [ok=no])
+
+ if test $ok = yes; then
+ if test "$req_libassuan_api" -gt 0 ; then
+ tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version libassuan`
+ if test "$tmp" -gt 0 ; then
+ AC_MSG_CHECKING([LIBASSUAN API version])
+ if test "$req_libassuan_api" -eq "$tmp" ; then
+@@ -97,7 +46,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+
+ if test $ok = yes; then
+ if test x"$host" != x ; then
+- libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none`
++ libassuan_config_host=`$PKG_CONFIG --variable=host libassuan`
+ if test x"$libassuan_config_host" != xnone ; then
+ if test x"$libassuan_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+@@ -138,12 +87,8 @@ dnl
+ AC_DEFUN([AM_PATH_LIBASSUAN],
+ [ _AM_PATH_LIBASSUAN_COMMON($1)
+ if test $ok = yes; then
+- LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags`
+- LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs`
+ ifelse([$2], , :, [$2])
+ else
+- LIBASSUAN_CFLAGS=""
+- LIBASSUAN_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(LIBASSUAN_CFLAGS)
diff --git a/poky/meta/recipes-support/libassuan/libassuan_2.5.1.bb b/poky/meta/recipes-support/libassuan/libassuan_2.5.1.bb
new file mode 100644
index 000000000..34d5f1642
--- /dev/null
+++ b/poky/meta/recipes-support/libassuan/libassuan_2.5.1.bb
@@ -0,0 +1,32 @@
+SUMMARY = "IPC library used by GnuPG and GPGME"
+HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-doc = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/assuan.c;endline=20;md5=ab92143a5a2adabd06d7994d1467ea5c\
+ file://src/assuan-defs.h;endline=20;md5=15d950c83e82978e35b35e790d7e4d39"
+
+DEPENDS = "libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libassuan/libassuan-${PV}.tar.bz2 \
+ file://libassuan-add-pkgconfig-support.patch \
+ "
+
+SRC_URI[md5sum] = "4354b7ae296894f232ada226a062d7d7"
+SRC_URI[sha256sum] = "47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449"
+
+BINCONFIG = "${bindir}/libassuan-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/*.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.2.bb b/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.2.bb
new file mode 100644
index 000000000..f7b416352
--- /dev/null
+++ b/poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.6.2.bb
@@ -0,0 +1,21 @@
+SUMMARY = "A library for atomic integer operations"
+HOMEPAGE = "https://github.com/ivmai/libatomic_ops/"
+SECTION = "optional"
+PROVIDES += "libatomics-ops"
+LICENSE = "GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
+ "
+PV .= "+git${SRCPV}"
+SRCBRANCH ?= "release-7_6"
+
+SRCREV = "5ae4b4aeea2baf13752d07e3038c47f70f06dcac"
+SRC_URI = "git://github.com/ivmai/libatomic_ops;branch=${SRCBRANCH}"
+
+S = "${WORKDIR}/git"
+
+ALLOW_EMPTY_${PN} = "1"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch b/poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
new file mode 100644
index 000000000..54617b506
--- /dev/null
+++ b/poky/meta/recipes-support/libbsd/libbsd/0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch
@@ -0,0 +1,376 @@
+From 88adbe1a855b7aa95bd925c80ed83c86f3fc42e3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Nov 2016 09:39:31 -0800
+Subject: [PATCH 1/3] Replace __BEGIN_DECLS and __END_DECLS
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+Upstream-Status: Pending
+
+ include/bsd/err.h | 10 ++++++++--
+ include/bsd/libutil.h | 10 ++++++++--
+ include/bsd/md5.h | 10 ++++++++--
+ include/bsd/nlist.h | 10 ++++++++--
+ include/bsd/readpassphrase.h | 10 ++++++++--
+ include/bsd/stdio.h | 10 ++++++++--
+ include/bsd/stdlib.h | 12 +++++++++---
+ include/bsd/string.h | 12 +++++++++---
+ include/bsd/stringlist.h | 10 ++++++++--
+ include/bsd/unistd.h | 10 ++++++++--
+ include/bsd/vis.h | 10 ++++++++--
+ include/bsd/wchar.h | 10 ++++++++--
+ src/hash/sha512.h | 10 ++++++++--
+ 13 files changed, 106 insertions(+), 28 deletions(-)
+
+diff --git a/include/bsd/err.h b/include/bsd/err.h
+index 12fd051..43dfc32 100644
+--- a/include/bsd/err.h
++++ b/include/bsd/err.h
+@@ -42,7 +42,10 @@
+
+ #include <stdarg.h>
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ void warnc(int code, const char *format, ...)
+ __printflike(2, 3);
+ void vwarnc(int code, const char *format, va_list ap)
+@@ -51,6 +54,9 @@ void errc(int status, int code, const char *format, ...)
+ __printflike(3, 4);
+ void verrc(int status, int code, const char *format, va_list ap)
+ __printflike(3, 0);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif
+diff --git a/include/bsd/libutil.h b/include/bsd/libutil.h
+index 45b3b15..9c936e5 100644
+--- a/include/bsd/libutil.h
++++ b/include/bsd/libutil.h
+@@ -53,7 +53,10 @@ struct pidfh {
+ ino_t pf_ino;
+ };
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ int humanize_number(char *buf, size_t len, int64_t bytes,
+ const char *suffix, int scale, int flags);
+ int expand_number(const char *_buf, uint64_t *_num);
+@@ -66,7 +69,10 @@ int pidfile_close(struct pidfh *pfh);
+ int pidfile_remove(struct pidfh *pfh);
+
+ char *fparseln(FILE *, size_t *, size_t *, const char[3], int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ /* humanize_number(3) */
+ #define HN_DECIMAL 0x01
+diff --git a/include/bsd/md5.h b/include/bsd/md5.h
+index 5f3ae46..5d80e5c 100644
+--- a/include/bsd/md5.h
++++ b/include/bsd/md5.h
+@@ -30,7 +30,10 @@ typedef struct MD5Context {
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ void MD5Init(MD5_CTX *);
+ void MD5Update(MD5_CTX *, const uint8_t *, size_t)
+ __attribute__((__bounded__(__string__,2,3)));
+@@ -49,6 +52,9 @@ char *MD5FileChunk(const char *, char *, off_t, off_t)
+ char *MD5Data(const uint8_t *, size_t, char *)
+ __attribute__((__bounded__(__string__,1,2)))
+ __attribute__((__bounded__(__minbytes__,3,MD5_DIGEST_STRING_LENGTH)));
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif /* LIBBSD_MD5_H */
+diff --git a/include/bsd/nlist.h b/include/bsd/nlist.h
+index cb297e8..e63bbbd 100644
+--- a/include/bsd/nlist.h
++++ b/include/bsd/nlist.h
+@@ -88,8 +88,14 @@ struct nlist {
+
+ #define N_FORMAT "%08x" /* namelist value format; XXX */
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int nlist(const char *filename, struct nlist *list);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif
+diff --git a/include/bsd/readpassphrase.h b/include/bsd/readpassphrase.h
+index 14744b8..fa73361 100644
+--- a/include/bsd/readpassphrase.h
++++ b/include/bsd/readpassphrase.h
+@@ -34,8 +34,14 @@
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ char * readpassphrase(const char *, char *, size_t, int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif /* !LIBBSD_READPASSPHRASE_H */
+diff --git a/include/bsd/stdio.h b/include/bsd/stdio.h
+index 4b69983..18645b7 100644
+--- a/include/bsd/stdio.h
++++ b/include/bsd/stdio.h
+@@ -45,7 +45,10 @@
+ #endif
+ #include <sys/types.h>
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ const char *fmtcheck(const char *, const char *);
+
+ /* XXX: The function requires cooperation from the system libc to store the
+@@ -73,7 +76,10 @@ FILE *funopen(const void *cookie,
+ #define fwopen(cookie, fn) funopen(cookie, NULL, fn, NULL, NULL)
+
+ int fpurge(FILE *fp);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif
+ #endif
+diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
+index ebc9638..c4b54b6 100644
+--- a/include/bsd/stdlib.h
++++ b/include/bsd/stdlib.h
+@@ -46,7 +46,10 @@
+ #include <sys/stat.h>
+ #include <stdint.h>
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ uint32_t arc4random(void);
+ void arc4random_stir(void);
+ void arc4random_addrandom(unsigned char *dat, int datlen);
+@@ -67,7 +70,7 @@ int sradixsort(const unsigned char **base, int nmemb,
+ const unsigned char *table, unsigned endbyte);
+
+ void *reallocf(void *ptr, size_t size);
+-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 26)
++#if defined(_GNU_SOURCE) && defined(__GLIBC__)
+ void *reallocarray(void *ptr, size_t nmemb, size_t size);
+ #endif
+
+@@ -75,6 +78,9 @@ long long strtonum(const char *nptr, long long minval, long long maxval,
+ const char **errstr);
+
+ char *getbsize(int *headerlenp, long *blocksizep);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif
+diff --git a/include/bsd/string.h b/include/bsd/string.h
+index 6798bf6..fa1193f 100644
+--- a/include/bsd/string.h
++++ b/include/bsd/string.h
+@@ -36,15 +36,21 @@
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ size_t strlcpy(char *dst, const char *src, size_t siz);
+ size_t strlcat(char *dst, const char *src, size_t siz);
+ char *strnstr(const char *str, const char *find, size_t str_len);
+ void strmode(mode_t mode, char *str);
+
+-#if defined(_GNU_SOURCE) && defined(__GLIBC__) && !__GLIBC_PREREQ(2, 25)
++#if defined(_GNU_SOURCE) && defined(__GLIBC__)
+ void explicit_bzero(void *buf, size_t len);
+ #endif
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif
+diff --git a/include/bsd/stringlist.h b/include/bsd/stringlist.h
+index ff30cac..4600f6b 100644
+--- a/include/bsd/stringlist.h
++++ b/include/bsd/stringlist.h
+@@ -43,12 +43,18 @@ typedef struct _stringlist {
+ size_t sl_cur;
+ } StringList;
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ StringList *sl_init(void);
+ int sl_add(StringList *, char *);
+ void sl_free(StringList *, int);
+ char *sl_find(StringList *, const char *);
+ int sl_delete(StringList *, const char *, int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif /* LIBBSD_STRINGLIST_H */
+diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h
+index 1f9c5f8..5b2f4c7 100644
+--- a/include/bsd/unistd.h
++++ b/include/bsd/unistd.h
+@@ -45,7 +45,10 @@
+ #define S_ISTXT S_ISVTX
+ #endif
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ extern int optreset;
+
+ #ifdef LIBBSD_OVERLAY
+@@ -68,6 +71,9 @@ void setproctitle(const char *fmt, ...)
+ __printflike(1, 2);
+
+ int getpeereid(int s, uid_t *euid, gid_t *egid);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif
+diff --git a/include/bsd/vis.h b/include/bsd/vis.h
+index 970dfdd..621d3c6 100644
+--- a/include/bsd/vis.h
++++ b/include/bsd/vis.h
+@@ -74,7 +74,10 @@
+
+ #include <sys/cdefs.h>
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ char *vis(char *, int, int, int);
+ int strvis(char *, const char *, int);
+ int strvisx(char *, const char *, size_t, int);
+@@ -83,6 +86,9 @@ int strunvis(char *, const char *);
+ int strunvisx(char *, const char *, int);
+ ssize_t strnunvis(char *, const char *, size_t);
+ int unvis(char *, int, int *, int);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif /* !LIBBSD_VIS_H */
+diff --git a/include/bsd/wchar.h b/include/bsd/wchar.h
+index 33a500e..aa70742 100644
+--- a/include/bsd/wchar.h
++++ b/include/bsd/wchar.h
+@@ -43,12 +43,18 @@
+ #include <sys/cdefs.h>
+ #include <sys/types.h>
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+ wchar_t *fgetwln(FILE *stream, size_t *len);
+
+ size_t wcslcat(wchar_t *dst, const wchar_t *src, size_t size);
+ size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t size);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif
+ #endif
+diff --git a/src/hash/sha512.h b/src/hash/sha512.h
+index 4f368a1..27ddc24 100644
+--- a/src/hash/sha512.h
++++ b/src/hash/sha512.h
+@@ -39,7 +39,10 @@ typedef struct SHA512Context {
+ unsigned char buf[128];
+ } SHA512_CTX;
+
+-__BEGIN_DECLS
++/* __BEGIN_DECLS */
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ void SHA512_Init(SHA512_CTX *);
+ void SHA512_Update(SHA512_CTX *, const void *, size_t);
+@@ -48,6 +51,9 @@ char *SHA512_End(SHA512_CTX *, char *);
+ char *SHA512_File(const char *, char *);
+ char *SHA512_FileChunk(const char *, char *, off_t, off_t);
+ char *SHA512_Data(const void *, unsigned int, char *);
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
++/* __END_DECLS */
+
+ #endif /* !_SHA512_H_ */
+--
+1.9.1
+
diff --git a/poky/meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch b/poky/meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch
new file mode 100644
index 000000000..7e3a5b3be
--- /dev/null
+++ b/poky/meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch
@@ -0,0 +1,33 @@
+From b6972f1c29ebf073cbe19a4a669ee093259792a0 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Mon, 30 Jan 2017 12:00:33 -0200
+Subject: [PATCH] src/libbsd-overlay.pc.in: Set Cflags to use -I instead of
+ -isystem
+Organization: O.S. Systems Software LTDA.
+
+pkg-config currently only handles -I and -L correctly, but misses
+-isystem, so we need to do this workaround to fix this issue.
+
+There's a open bug in:
+https://bugzilla.freedesktop.org/show_bug.cgi?id=99516
+
+Upstream-Status: Pending
+
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+---
+ src/libbsd-overlay.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libbsd-overlay.pc.in b/src/libbsd-overlay.pc.in
+index ac8bf89..65dc3ae 100644
+--- a/src/libbsd-overlay.pc.in
++++ b/src/libbsd-overlay.pc.in
+@@ -8,4 +8,4 @@ Description: Utility functions from BSD systems (overlay)
+ Version: @VERSION@
+ URL: https://libbsd.freedesktop.org/
+ Libs: -L${libdir} -lbsd
+-Cflags: -isystem ${includedir}/bsd -DLIBBSD_OVERLAY
++Cflags: -I${includedir}/bsd -DLIBBSD_OVERLAY
+--
+2.11.0
+
diff --git a/poky/meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch b/poky/meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch
new file mode 100644
index 000000000..60da15eb8
--- /dev/null
+++ b/poky/meta/recipes-support/libbsd/libbsd/0002-Remove-funopen.patch
@@ -0,0 +1,52 @@
+From 28fc66e8b848709a2e69dba7f07694248e0154e8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Nov 2016 09:40:43 -0800
+Subject: [PATCH 2/3] Remove funopen()
+
+Musl doesnt have prerequisites for it.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate [musl specific]
+
+ man/Makefile.am | 1 -
+ src/Makefile.am | 1 -
+ test/Makefile.am | 1 -
+ 3 files changed, 3 deletions(-)
+
+diff --git a/man/Makefile.am b/man/Makefile.am
+index 28192c0..a22787d 100644
+--- a/man/Makefile.am
++++ b/man/Makefile.am
+@@ -168,7 +168,6 @@ dist_man_MANS = \
+ fmtcheck.3bsd \
+ fparseln.3bsd \
+ fpurge.3bsd \
+- funopen.3bsd \
+ getbsize.3bsd \
+ getmode.3bsd \
+ getpeereid.3bsd \
+diff --git a/src/Makefile.am b/src/Makefile.am
+index ad83dbf..13225a3 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -76,7 +76,6 @@ libbsd_la_SOURCES = \
+ fmtcheck.c \
+ fparseln.c \
+ fpurge.c \
+- funopen.c \
+ getbsize.c \
+ getpeereid.c \
+ hash/md5.c \
+diff --git a/test/Makefile.am b/test/Makefile.am
+index d86539a..b32ed2e 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -36,7 +36,6 @@ check_PROGRAMS = \
+ endian \
+ humanize \
+ fgetln \
+- funopen \
+ fparseln \
+ fpurge \
+ md5 \
diff --git a/poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb b/poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb
new file mode 100644
index 000000000..552a85c4d
--- /dev/null
+++ b/poky/meta/recipes-support/libbsd/libbsd_0.8.7.bb
@@ -0,0 +1,50 @@
+# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Library of utility functions from BSD systems"
+DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
+ and lacking on others like GNU systems, thus making it easier to port \
+ projects with strong BSD origins, without needing to embed the same \
+ code over and over again on each project."
+
+HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
+# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list:
+# OE @ ~/projects/libbsd $ grep ^License: COPYING | sort
+# License: BSD-2-clause
+# License: BSD-2-clause
+# License: BSD-2-clause-NetBSD
+# License: BSD-2-clause-author
+# License: BSD-2-clause-verbatim
+# License: BSD-3-clause
+# License: BSD-3-clause
+# License: BSD-3-clause
+# License: BSD-3-clause-Peter-Wemm
+# License: BSD-3-clause-Regents
+# License: BSD-4-clause-Christopher-G-Demetriou
+# License: BSD-4-clause-Niels-Provos
+# License: BSD-5-clause-Peter-Wemm
+# License: Beerware
+# License: Expat
+# License: ISC
+# License: ISC-Original
+# License: public-domain
+# License: public-domain-Colin-Plumb
+LICENSE = "BSD-4-Clause & ISC & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=08fc4e66be4526715dab09c5fba5e9e8"
+SECTION = "libs"
+
+SRC_URI = " \
+ http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+ file://0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch \
+"
+SRC_URI_append_libc-musl = " \
+ file://0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch \
+ file://0002-Remove-funopen.patch \
+"
+
+SRC_URI[md5sum] = "d9e6980fbfe44f94fd92b89a33cce67d"
+SRC_URI[sha256sum] = "f548f10e5af5a08b1e22889ce84315b1ebe41505b015c9596bad03fd13a12b31"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libcap-ng/libcap-ng/python.patch b/poky/meta/recipes-support/libcap-ng/libcap-ng/python.patch
new file mode 100644
index 000000000..59591eb46
--- /dev/null
+++ b/poky/meta/recipes-support/libcap-ng/libcap-ng/python.patch
@@ -0,0 +1,58 @@
+From b01bb2694f66cd981e6d61523433dc3eb5ed32f2 Mon Sep 17 00:00:00 2001
+From: Li xin <lixin.fnst@cn.fujitsu.com>
+Date: Sat, 18 Jul 2015 23:03:30 +0900
+Subject: [PATCH] configure.ac - Avoid an incorrect check for python.
+ Makefile.am - avoid hard coded host include paths.
+
+Upstream-Status: pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
+---
+ bindings/python/Makefile.am | 3 ++-
+ configure.ac | 15 ++-------------
+ 2 files changed, 4 insertions(+), 14 deletions(-)
+
+diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
+index 82b9bb8..f9fe7a8 100644
+--- a/bindings/python/Makefile.am
++++ b/bindings/python/Makefile.am
+@@ -23,7 +23,8 @@ SUBDIRS = test
+ CONFIG_CLEAN_FILES = *.loT *.rej *.orig
+ AM_CFLAGS = -fPIC -DPIC
+ PYLIBVER ?= python$(PYTHON_VERSION)
+-AM_CPPFLAGS = -I. -I$(top_builddir) -I@PYINCLUDEDIR@
++PYINC ?= /usr/include/$(PYLIBVER)
++AM_CPPFLAGS = -I. -I$(top_builddir) -I$(PYINC)
+ LIBS = $(top_builddir)/src/libcap-ng.la
+ SWIG_FLAGS = -python
+ SWIG_INCLUDES = ${AM_CPPFLAGS}
+diff --git a/configure.ac b/configure.ac
+index 1d777d5..9d90f64 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -123,19 +123,8 @@ if test x$use_python = xno ; then
+ else
+ AC_MSG_RESULT(testing)
+ AM_PATH_PYTHON
+-PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"`
+-if test -f ${PYINCLUDEDIR}/Python.h ; then
+- python_found="yes"
+- AC_SUBST(PYINCLUDEDIR)
+- AC_MSG_NOTICE(Python bindings will be built)
+-else
+- python_found="no"
+- if test x$use_python = xyes ; then
+- AC_MSG_ERROR([Python explicitly required and python headers found])
+- else
+- AC_MSG_WARN("Python headers not found - python bindings will not be made")
+- fi
+-fi
++python_found="yes"
++AC_MSG_NOTICE(Python bindings will be built)
+ fi
+ AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
+
+--
+1.8.4.2
+
diff --git a/poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb b/poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb
new file mode 100644
index 000000000..358319419
--- /dev/null
+++ b/poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.8.bb
@@ -0,0 +1,37 @@
+SUMMARY = "An alternate posix capabilities library"
+DESCRIPTION = "The libcap-ng library is intended to make programming \
+with POSIX capabilities much easier than the traditional libcap library."
+HOMEPAGE = "http://freecode.com/projects/libcap-ng"
+SECTION = "base"
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=e3eda01d9815f8d24aae2dbd89b68b06"
+
+SRC_URI = "http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-${PV}.tar.gz \
+ file://python.patch"
+
+inherit lib_package autotools python3native
+
+SRC_URI[md5sum] = "0dece96644bd798020e170fbf7663802"
+SRC_URI[sha256sum] = "c21af997445cd4107a55d386f955c5ea6f6e96ead693e9151277c0ab5f97d05f"
+
+DEPENDS += "swig-native python3"
+
+EXTRA_OECONF += "--with-python --with-python3"
+EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'"
+
+PACKAGES += "${PN}-python"
+
+FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}"
+
+BBCLASSEXTEND = "native"
+
+do_install_append() {
+ # Moving libcap-ng to base_libdir
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ mkdir -p ${D}/${base_libdir}/
+ mv -f ${D}${libdir}/libcap-ng.so.* ${D}${base_libdir}/
+ relpath=${@os.path.relpath("${base_libdir}", "${libdir}")}
+ ln -sf ${relpath}/libcap-ng.so.0.0.0 ${D}${libdir}/libcap-ng.so
+ fi
+}
diff --git a/poky/meta/recipes-support/libcap/files/0001-Fix-build-with-gperf-3.1.patch b/poky/meta/recipes-support/libcap/files/0001-Fix-build-with-gperf-3.1.patch
new file mode 100644
index 000000000..110ef902d
--- /dev/null
+++ b/poky/meta/recipes-support/libcap/files/0001-Fix-build-with-gperf-3.1.patch
@@ -0,0 +1,41 @@
+From a05eba68c42222f02465d7ba376015926433c531 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 26 Jul 2017 13:37:49 +0300
+Subject: [PATCH] Fix build with gperf 3.1
+
+The generated gperf file refers to size_t which needs to be
+provided by stddef.h include. Also, adjust the makefile
+to match the declaration in the gperf file.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ libcap/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libcap/Makefile b/libcap/Makefile
+index d189777..1a57206 100644
+--- a/libcap/Makefile
++++ b/libcap/Makefile
+@@ -22,7 +22,7 @@ all: $(MINLIBNAME) $(STALIBNAME) libcap.pc
+
+ ifeq ($(BUILD_GPERF),yes)
+ USE_GPERF_OUTPUT = $(GPERF_OUTPUT)
+-INCLUDE_GPERF_OUTPUT = -include $(GPERF_OUTPUT)
++INCLUDE_GPERF_OUTPUT = -include stddef.h -include $(GPERF_OUTPUT)
+ endif
+
+ libcap.pc: libcap.pc.in
+@@ -41,7 +41,7 @@ cap_names.h: _makenames
+ ./_makenames > cap_names.h
+
+ $(GPERF_OUTPUT): cap_names.list.h
+- perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, unsigned int);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@
++ perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, register size_t);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@
+
+ cap_names.list.h: Makefile $(KERNEL_HEADERS)/linux/capability.h
+ @echo "=> making $@ from $(KERNEL_HEADERS)/linux/capability.h"
+--
+2.13.2
+
diff --git a/poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch b/poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch
new file mode 100644
index 000000000..05c771ac1
--- /dev/null
+++ b/poky/meta/recipes-support/libcap/files/0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch
@@ -0,0 +1,32 @@
+Ensure the XATTR_NAME_CAPS is defined when it is used
+
+Upstream-Status: Pending
+
+VFS_CAP_U32 can not ensure that XATTR_NAME_CAPS is defined, and failed to build
+libcap-native in old release, like CentOS release 6.7 (Final), with the blow
+error:
+ cap_file.c: In function ‘cap_get_fd’:
+ cap_file.c:199: error: ‘XATTR_NAME_CAPS’ undeclared (first use in this function)
+ cap_file.c:199: error: (Each undeclared identifier is reported only once
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ libcap/cap_file.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libcap/cap_file.c b/libcap/cap_file.c
+index 40756ea..e27ca80 100644
+--- a/libcap/cap_file.c
++++ b/libcap/cap_file.c
+@@ -25,7 +25,7 @@ extern int fremovexattr(int, const char *);
+
+ #include "libcap.h"
+
+-#ifdef VFS_CAP_U32
++#if defined (VFS_CAP_U32) && defined (XATTR_NAME_CAPS)
+
+ #if VFS_CAP_U32 != __CAP_BLKS
+ # error VFS representation of capabilities is not the same size as kernel
+--
+2.8.1
+
diff --git a/poky/meta/recipes-support/libcap/libcap_2.25.bb b/poky/meta/recipes-support/libcap/libcap_2.25.bb
new file mode 100644
index 000000000..d619a2eb4
--- /dev/null
+++ b/poky/meta/recipes-support/libcap/libcap_2.25.bb
@@ -0,0 +1,74 @@
+SUMMARY = "Library for getting/setting POSIX.1e capabilities"
+HOMEPAGE = "http://sites.google.com/site/fullycapable/"
+
+# no specific GPL version required
+LICENSE = "BSD | GPLv2"
+LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
+
+DEPENDS = "hostperl-runtime-native gperf-native"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz \
+ file://0001-ensure-the-XATTR_NAME_CAPS-is-defined-when-it-is-use.patch \
+ file://0001-Fix-build-with-gperf-3.1.patch \
+ "
+SRC_URI[md5sum] = "6666b839e5d46c2ad33fc8aa2ceb5f77"
+SRC_URI[sha256sum] = "693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162"
+
+inherit lib_package
+
+# do NOT pass target cflags to host compilations
+#
+do_configure() {
+ # libcap uses := for compilers, fortunately, it gives us a hint
+ # on what should be replaced with ?=
+ sed -e 's,:=,?=,g' -i Make.Rules
+ sed -e 's,^BUILD_CFLAGS ?= $(.*CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules
+}
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
+PACKAGECONFIG_class-native ??= ""
+
+PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
+
+EXTRA_OEMAKE = " \
+ INDENT= \
+ lib=${@os.path.basename('${libdir}')} \
+ RAISE_SETFCAP=no \
+ DYNAMIC=yes \
+ BUILD_GPERF=yes \
+"
+
+EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
+
+# these are present in the libcap defaults, so include in our CFLAGS too
+CFLAGS += "-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
+
+do_compile() {
+ oe_runmake ${PACKAGECONFIG_CONFARGS}
+}
+
+do_install() {
+ oe_runmake install \
+ ${PACKAGECONFIG_CONFARGS} \
+ DESTDIR="${D}" \
+ prefix="${prefix}" \
+ SBINDIR="${sbindir}"
+}
+
+do_install_append() {
+ # Move the library to base_libdir
+ install -d ${D}${base_libdir}
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ mv ${D}${libdir}/libcap* ${D}${base_libdir}
+ if [ -d ${D}${libdir}/security ]; then
+ mv ${D}${libdir}/security ${D}${base_libdir}
+ fi
+ fi
+}
+
+FILES_${PN}-dev += "${base_libdir}/*.so"
+
+# pam files
+FILES_${PN} += "${base_libdir}/security/*.so"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb b/poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb
new file mode 100644
index 000000000..e646d4396
--- /dev/null
+++ b/poky/meta/recipes-support/libcheck/libcheck_0.12.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Check - unit testing framework for C code"
+HOMEPAGE = "http://check.sourceforge.net/"
+SECTION = "devel"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=2d5025d4aa3495befef8f17206a5b0a1"
+
+SRC_URI = "https://github.com/${BPN}/check/releases/download/${PV}/check-${PV}.tar.gz"
+SRC_URI[md5sum] = "31b17c6075820a434119592941186f70"
+SRC_URI[sha256sum] = "464201098bee00e90f5c4bdfa94a5d3ead8d641f9025b560a27755a83b824234"
+UPSTREAM_CHECK_URI = "https://github.com/libcheck/check/releases/"
+
+S = "${WORKDIR}/check-${PV}"
+
+inherit autotools pkgconfig texinfo
+
+CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk"
+
+RREPLACES_${PN} = "check (<= 0.9.5)"
+RDEPENDS_${PN} += "gawk"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb b/poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb
new file mode 100644
index 000000000..d86ddd646
--- /dev/null
+++ b/poky/meta/recipes-support/libcroco/libcroco_0.6.12.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Cascading Style Sheet (CSS) parsing and manipulation toolkit"
+HOMEPAGE = "http://www.gnome.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605 \
+ file://src/cr-rgb.c;endline=22;md5=31d5f0944d556c8589d04ea6055fcc66 \
+ file://tests/cr-test-utils.c;endline=21;md5=2382c27934cae1d3792fcb17a6142c4e"
+
+SECTION = "x11/utils"
+DEPENDS = "glib-2.0 libxml2 zlib"
+BBCLASSEXTEND = "native nativesdk"
+EXTRA_OECONF += "--enable-Bsymbolic=auto"
+
+BINCONFIG = "${bindir}/croco-0.6-config"
+
+inherit gnomebase gtk-doc binconfig-disabled
+
+SRC_URI[archive.md5sum] = "bc0984fce078ba2ce29f9500c6b9ddce"
+SRC_URI[archive.sha256sum] = "ddc4b5546c9fb4280a5017e2707fbd4839034ed1aba5b7d4372212f34f84f860"
diff --git a/poky/meta/recipes-support/libdaemon/libdaemon/fix-includes.patch b/poky/meta/recipes-support/libdaemon/libdaemon/fix-includes.patch
new file mode 100644
index 000000000..1027ae8e6
--- /dev/null
+++ b/poky/meta/recipes-support/libdaemon/libdaemon/fix-includes.patch
@@ -0,0 +1,20 @@
+musl complains
+fatal error: sys/unistd.h: No such file or directory
+and rightly so
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+--- libdaemon-0.14.orig/examples/testd.c
++++ libdaemon-0.14/examples/testd.c
+@@ -21,9 +21,9 @@
+ #include <signal.h>
+ #include <errno.h>
+ #include <string.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/time.h>
+-#include <sys/unistd.h>
+ #include <sys/select.h>
+
+ #include <libdaemon/dfork.h>
diff --git a/poky/meta/recipes-support/libdaemon/libdaemon_0.14.bb b/poky/meta/recipes-support/libdaemon/libdaemon_0.14.bb
new file mode 100644
index 000000000..070ee1890
--- /dev/null
+++ b/poky/meta/recipes-support/libdaemon/libdaemon_0.14.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Lightweight C library which eases the writing of UNIX daemons"
+SECTION = "libs"
+AUTHOR = "Lennart Poettering <lennart@poettering.net>"
+HOMEPAGE = "http://0pointer.de/lennart/projects/libdaemon/"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://libdaemon/daemon.h;beginline=9;endline=21;md5=bd9fbe57cd96d1a5848a8ba12d9a6bf4"
+
+SRC_URI = "http://0pointer.de/lennart/projects/libdaemon/libdaemon-${PV}.tar.gz \
+ file://fix-includes.patch \
+ "
+
+SRC_URI[md5sum] = "509dc27107c21bcd9fbf2f95f5669563"
+SRC_URI[sha256sum] = "fd23eb5f6f986dcc7e708307355ba3289abe03cc381fc47a80bca4a50aa6b834"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-lynx"
diff --git a/poky/meta/recipes-support/libevdev/libevdev_1.5.8.bb b/poky/meta/recipes-support/libevdev/libevdev_1.5.8.bb
new file mode 100644
index 000000000..c1380144b
--- /dev/null
+++ b/poky/meta/recipes-support/libevdev/libevdev_1.5.8.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Wrapper library for evdev devices"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
+SECTION = "libs"
+
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
+ file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
+
+SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "c25a8c3939e4ad59a5e9e5e1e354832d"
+SRC_URI[sha256sum] = "6083d81e46609da8ba80cb826c02d9080764a6dec33c8267ccb7e158833d4c6d"
+
+inherit autotools pkgconfig
diff --git a/poky/meta/recipes-support/libevent/libevent/0001-test-fix-32bit-linux-regress.patch b/poky/meta/recipes-support/libevent/libevent/0001-test-fix-32bit-linux-regress.patch
new file mode 100644
index 000000000..36d08204f
--- /dev/null
+++ b/poky/meta/recipes-support/libevent/libevent/0001-test-fix-32bit-linux-regress.patch
@@ -0,0 +1,48 @@
+From 69a3813c513c84e02212250c3d5b8a02ecefa698 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <Mingli.Yu@windriver.com>
+Date: Mon, 15 Jan 2018 08:00:33 +0000
+Subject: [PATCH] test: fix 32bit linux regress
+
+This patch comes from https://github.com/libevent/libevent.git,
+the commit is 63c4bf78d6af3c6ff46d2e8e4b53dd9f577a9ca9
+
+Upstream-Status: Backport
+
+Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
+---
+ configure.ac | 1 +
+ test/regress_util.c | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 7528d37..e64cb1f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -663,6 +663,7 @@ AC_CHECK_SIZEOF(short)
+ AC_CHECK_SIZEOF(size_t)
+ AC_CHECK_SIZEOF(void *)
+ AC_CHECK_SIZEOF(off_t)
++AC_CHECK_SIZEOF(time_t)
+
+ AC_CHECK_TYPES([struct in6_addr, struct sockaddr_in6, sa_family_t, struct addrinfo, struct sockaddr_storage], , ,
+ [#define _GNU_SOURCE
+diff --git a/test/regress_util.c b/test/regress_util.c
+index ef6a148..0c7eafb 100644
+--- a/test/regress_util.c
++++ b/test/regress_util.c
+@@ -1412,10 +1412,12 @@ static struct date_rfc1123_case {
+ { 1289433600, "Thu, 11 Nov 2010 00:00:00 GMT"},
+ { 1323648000, "Mon, 12 Dec 2011 00:00:00 GMT"},
+ #ifndef _WIN32
++#if EVENT__SIZEOF_TIME_T > 4
+ /** In win32 case we have max "23:59:59 January 18, 2038, UTC" for time32 */
+ { 4294967296, "Sun, 07 Feb 2106 06:28:16 GMT"} /* 2^32 */,
+ /** In win32 case we have max "23:59:59, December 31, 3000, UTC" for time64 */
+ {253402300799, "Fri, 31 Dec 9999 23:59:59 GMT"} /* long long future no one can imagine */,
++#endif /* time_t != 32bit */
+ { 1456704000, "Mon, 29 Feb 2016 00:00:00 GMT"} /* leap year */,
+ #endif
+ { 1435708800, "Wed, 01 Jul 2015 00:00:00 GMT"} /* leap second */,
+--
+2.13.3
+
diff --git a/poky/meta/recipes-support/libevent/libevent/Makefile-missing-test-dir.patch b/poky/meta/recipes-support/libevent/libevent/Makefile-missing-test-dir.patch
new file mode 100644
index 000000000..8880bd040
--- /dev/null
+++ b/poky/meta/recipes-support/libevent/libevent/Makefile-missing-test-dir.patch
@@ -0,0 +1,27 @@
+Fix missing test directory creation.
+
+GCC used in OE-core has "dependency tracking" disabled and
+libevent has problem with this.
+Due to removed makefile.am/in files in test/sample/include
+directories, output directories are not created in
+configuration step. Compilation step will fails, when
+trying to write to non-existing directory.
+
+Upstream-Status: Inappropriate [Other]
+Workaround specific to our build system.
+
+Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
+Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
+
+diff --git a/libevent-2.1.8-stable/test/include.am b/libevent-2.1.8-stable/test/include.am
+index eea249f..d323dff 100644
+--- a/test/include.am
++++ b/test/include.am
+@@ -161,6 +161,7 @@ test_bench_httpclient_LDADD = $(LIBEVENT_GC_SECTIONS) libevent_core.la
+ test/regress.gen.c test/regress.gen.h: test/rpcgen-attempted
+
+ test/rpcgen-attempted: test/regress.rpc event_rpcgen.py test/rpcgen_wrapper.sh
++ @$(MKDIR_P) test
+ $(AM_V_GEN)date -u > $@
+ $(AM_V_at)if $(srcdir)/test/rpcgen_wrapper.sh $(srcdir)/test; then \
+ true; \
diff --git a/poky/meta/recipes-support/libevent/libevent/run-ptest b/poky/meta/recipes-support/libevent/libevent/run-ptest
new file mode 100644
index 000000000..0241851c7
--- /dev/null
+++ b/poky/meta/recipes-support/libevent/libevent/run-ptest
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+fail=0
+for test in ./test/*
+do
+ $test
+ if [ $? -ne 0 ]
+ then
+ fail=1
+ fi
+done
+
+if [ $fail -eq 0 ]
+then
+ echo "PASS: libevent"
+else
+ echo "FAIL: libevent"
+fi
diff --git a/poky/meta/recipes-support/libevent/libevent_2.1.8.bb b/poky/meta/recipes-support/libevent/libevent_2.1.8.bb
new file mode 100644
index 000000000..83ce4644c
--- /dev/null
+++ b/poky/meta/recipes-support/libevent/libevent_2.1.8.bb
@@ -0,0 +1,43 @@
+SUMMARY = "An asynchronous event notification library"
+HOMEPAGE = "http://libevent.org/"
+BUGTRACKER = "https://github.com/libevent/libevent/issues"
+SECTION = "libs"
+
+LICENSE = "BSD & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=17f20574c0b154d12236d5fbe964f549"
+
+SRC_URI = " \
+ https://github.com/libevent/libevent/releases/download/release-${PV}-stable/${BP}-stable.tar.gz \
+ file://Makefile-missing-test-dir.patch \
+ file://0001-test-fix-32bit-linux-regress.patch \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "f3eeaed018542963b7d2416ef1135ecc"
+SRC_URI[sha256sum] = "965cc5a8bb46ce4199a47e9b2c9e1cae3b137e8356ffdad6d94d3b9069b71dc2"
+
+UPSTREAM_CHECK_URI = "http://libevent.org/"
+
+S = "${WORKDIR}/${BPN}-${PV}-stable"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+
+inherit autotools
+
+# Needed for Debian packaging
+LEAD_SONAME = "libevent-2.1.so"
+
+inherit ptest
+
+DEPENDS = "zlib"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/test
+ for file in ${B}/test/.libs/regress ${B}/test/.libs/test*
+ do
+ install -m 0755 $file ${D}${PTEST_PATH}/test
+ done
+}
diff --git a/poky/meta/recipes-support/libexif/libexif_0.6.21.bb b/poky/meta/recipes-support/libexif/libexif_0.6.21.bb
new file mode 100644
index 000000000..cff4caede
--- /dev/null
+++ b/poky/meta/recipes-support/libexif/libexif_0.6.21.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Library for reading extended image information (EXIF) from JPEG files"
+HOMEPAGE = "http://sourceforge.net/projects/libexif"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=243b725d71bb5df4a1e5920b344b86ad"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libexif/libexif-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "27339b89850f28c8f1c237f233e05b27"
+SRC_URI[sha256sum] = "16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a"
+
+inherit autotools gettext
+
+do_configure_append() {
+ sed -i s:doc\ binary:binary:g Makefile
+}
+
diff --git a/poky/meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch b/poky/meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch
new file mode 100644
index 000000000..6b167c842
--- /dev/null
+++ b/poky/meta/recipes-support/libffi/libffi/0001-libffi-Support-musl-x32-build.patch
@@ -0,0 +1,30 @@
+From 69c3906c85c791716bf650aa36d9361d22acf3fb Mon Sep 17 00:00:00 2001
+From: sweeaun <swee.aun.khor@intel.com>
+Date: Thu, 6 Jul 2017 16:32:46 -0700
+Subject: [PATCH] libffi: Support musl x32 build
+
+Support libffi build with target musl-x32.
+
+Upstream-Status: Pending
+
+Signed-off-by: sweeaun <swee.aun.khor@intel.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index a7bf5ee..8ebe99c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -177,7 +177,7 @@ case "$host" in
+ TARGETDIR=x86
+ if test $ac_cv_sizeof_size_t = 4; then
+ case "$host" in
+- *-gnux32)
++ *-gnux32 | *-muslx32)
+ TARGET=X86_64
+ ;;
+ *)
+--
+2.7.4
+
diff --git a/poky/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch b/poky/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch
new file mode 100644
index 000000000..db96e6354
--- /dev/null
+++ b/poky/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch
@@ -0,0 +1,32 @@
+From a5efaa96fd934eb245c234a5275fcf62698ef986 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Apr 2015 21:38:03 -0700
+Subject: [PATCH] mips: Use compiler internal define for linux
+
+__linux__ is defined by compiler when building for
+linux platforms, lets use it
+
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/mips/ffitarget.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/mips/ffitarget.h b/src/mips/ffitarget.h
+index 717d659..6faa358 100644
+--- a/src/mips/ffitarget.h
++++ b/src/mips/ffitarget.h
+@@ -32,7 +32,7 @@
+ #error "Please do not include ffitarget.h directly into your source. Use ffi.h instead."
+ #endif
+
+-#ifdef linux
++#ifdef __linux__
+ # include <asm/sgidefs.h>
+ #elif defined(__rtems__)
+ /*
+--
+2.1.4
+
diff --git a/poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch b/poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch
new file mode 100644
index 000000000..61c9eb31d
--- /dev/null
+++ b/poky/meta/recipes-support/libffi/libffi/0001-mips-fix-MIPS-softfloat-build-issue.patch
@@ -0,0 +1,177 @@
+From 655e82c92d5c3875aee04322f1993d6b0774a7bf Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech@gmail.com>
+Date: Mon, 15 Aug 2016 15:00:13 +0800
+Subject: [PATCH] mips: fix MIPS softfloat build issue
+
+The patch for o32.S is taken from OpenWrt packages repo 3a7a4bf "libffi:
+fix MIPS softfloat build issue with current binutils"
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
+---
+Upstream-Status: Backport [https://github.com/libffi/libffi/commit/2ded2a4f494165c93293afc14ab0be1243cf8c49]
+ src/mips/n32.S | 17 +++++++++++++++++
+ src/mips/o32.S | 17 +++++++++++++++++
+ 2 files changed, 34 insertions(+)
+
+diff --git a/src/mips/n32.S b/src/mips/n32.S
+index c6985d3..8f25994 100644
+--- a/src/mips/n32.S
++++ b/src/mips/n32.S
+@@ -107,6 +107,16 @@ loadregs:
+
+ REG_L t6, 3*FFI_SIZEOF_ARG($fp) # load the flags word into t6.
+
++#ifdef __mips_soft_float
++ REG_L a0, 0*FFI_SIZEOF_ARG(t9)
++ REG_L a1, 1*FFI_SIZEOF_ARG(t9)
++ REG_L a2, 2*FFI_SIZEOF_ARG(t9)
++ REG_L a3, 3*FFI_SIZEOF_ARG(t9)
++ REG_L a4, 4*FFI_SIZEOF_ARG(t9)
++ REG_L a5, 5*FFI_SIZEOF_ARG(t9)
++ REG_L a6, 6*FFI_SIZEOF_ARG(t9)
++ REG_L a7, 7*FFI_SIZEOF_ARG(t9)
++#else
+ and t4, t6, ((1<<FFI_FLAG_BITS)-1)
+ REG_L a0, 0*FFI_SIZEOF_ARG(t9)
+ beqz t4, arg1_next
+@@ -193,6 +203,7 @@ arg7_next:
+ arg8_doublep:
+ l.d $f19, 7*FFI_SIZEOF_ARG(t9)
+ arg8_next:
++#endif
+
+ callit:
+ # Load the function pointer
+@@ -214,6 +225,7 @@ retint:
+ b epilogue
+
+ retfloat:
++#ifndef __mips_soft_float
+ bne t6, FFI_TYPE_FLOAT, retdouble
+ jal t9
+ REG_L t4, 4*FFI_SIZEOF_ARG($fp)
+@@ -272,6 +284,7 @@ retstruct_f_d:
+ s.s $f0, 0(t4)
+ s.d $f2, 8(t4)
+ b epilogue
++#endif
+
+ retstruct_d_soft:
+ bne t6, FFI_TYPE_STRUCT_D_SOFT, retstruct_f_soft
+@@ -429,6 +442,7 @@ ffi_closure_N32:
+ REG_S a6, A6_OFF2($sp)
+ REG_S a7, A7_OFF2($sp)
+
++#ifndef __mips_soft_float
+ # Store all possible float/double registers.
+ s.d $f12, F12_OFF2($sp)
+ s.d $f13, F13_OFF2($sp)
+@@ -438,6 +452,7 @@ ffi_closure_N32:
+ s.d $f17, F17_OFF2($sp)
+ s.d $f18, F18_OFF2($sp)
+ s.d $f19, F19_OFF2($sp)
++#endif
+
+ # Call ffi_closure_mips_inner_N32 to do the real work.
+ LA t9, ffi_closure_mips_inner_N32
+@@ -458,6 +473,7 @@ cls_retint:
+ b cls_epilogue
+
+ cls_retfloat:
++#ifndef __mips_soft_float
+ bne v0, FFI_TYPE_FLOAT, cls_retdouble
+ l.s $f0, V0_OFF2($sp)
+ b cls_epilogue
+@@ -500,6 +516,7 @@ cls_retstruct_f_d:
+ l.s $f0, V0_OFF2($sp)
+ l.d $f2, V1_OFF2($sp)
+ b cls_epilogue
++#endif
+
+ cls_retstruct_small2:
+ REG_L v0, V0_OFF2($sp)
+diff --git a/src/mips/o32.S b/src/mips/o32.S
+index eb27981..429dd0a 100644
+--- a/src/mips/o32.S
++++ b/src/mips/o32.S
+@@ -82,13 +82,16 @@ sixteen:
+
+ ADDU $sp, 4 * FFI_SIZEOF_ARG # adjust $sp to new args
+
++#ifndef __mips_soft_float
+ bnez t0, pass_d # make it quick for int
++#endif
+ REG_L a0, 0*FFI_SIZEOF_ARG($sp) # just go ahead and load the
+ REG_L a1, 1*FFI_SIZEOF_ARG($sp) # four regs.
+ REG_L a2, 2*FFI_SIZEOF_ARG($sp)
+ REG_L a3, 3*FFI_SIZEOF_ARG($sp)
+ b call_it
+
++#ifndef __mips_soft_float
+ pass_d:
+ bne t0, FFI_ARGS_D, pass_f
+ l.d $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args
+@@ -130,6 +133,7 @@ pass_f_d:
+ # bne t0, FFI_ARGS_F_D, call_it
+ l.s $f12, 0*FFI_SIZEOF_ARG($sp) # load $fp regs from args
+ l.d $f14, 2*FFI_SIZEOF_ARG($sp) # passing double and float
++#endif
+
+ call_it:
+ # Load the function pointer
+@@ -158,14 +162,23 @@ retfloat:
+ bne t2, FFI_TYPE_FLOAT, retdouble
+ jalr t9
+ REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+ s.s $f0, 0(t0)
++#else
++ REG_S v0, 0(t0)
++#endif
+ b epilogue
+
+ retdouble:
+ bne t2, FFI_TYPE_DOUBLE, noretval
+ jalr t9
+ REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+ s.d $f0, 0(t0)
++#else
++ REG_S v1, 4(t0)
++ REG_S v0, 0(t0)
++#endif
+ b epilogue
+
+ noretval:
+@@ -261,9 +274,11 @@ $LCFI7:
+ li $13, 1 # FFI_O32
+ bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT
+
++#ifndef __mips_soft_float
+ # Store all possible float/double registers.
+ s.d $f12, FA_0_0_OFF2($fp)
+ s.d $f14, FA_1_0_OFF2($fp)
++#endif
+ 1:
+ # Call ffi_closure_mips_inner_O32 to do the work.
+ la t9, ffi_closure_mips_inner_O32
+@@ -281,6 +296,7 @@ $LCFI7:
+ li $13, 1 # FFI_O32
+ bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT
+
++#ifndef __mips_soft_float
+ li $9, FFI_TYPE_FLOAT
+ l.s $f0, V0_OFF2($fp)
+ beq $8, $9, closure_done
+@@ -288,6 +304,7 @@ $LCFI7:
+ li $9, FFI_TYPE_DOUBLE
+ l.d $f0, V0_OFF2($fp)
+ beq $8, $9, closure_done
++#endif
+ 1:
+ REG_L $3, V1_OFF2($fp)
+ REG_L $2, V0_OFF2($fp)
+--
+2.9.3
+
diff --git a/poky/meta/recipes-support/libffi/libffi/not-win32.patch b/poky/meta/recipes-support/libffi/libffi/not-win32.patch
new file mode 100644
index 000000000..80c40a474
--- /dev/null
+++ b/poky/meta/recipes-support/libffi/libffi/not-win32.patch
@@ -0,0 +1,26 @@
+libffi's configure assumes that cross-compiled builds are complicated and
+introduces convoluted path manipulation involving gcc search paths to the
+install paths, resulting in paths like -L/usr/lib/../lib/ appearing in
+libffi.pc. When pkg-config is then used to obtain the linker flags for libffi
+it can't tell that this path is on the default search path and returns
+$SYSROOT/usr/lib/../lib which then gets written all over the target sysroot.
+This then means the sstate can't be shared and triggers QA errors.
+
+As this block is generally pointless, disable it.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+Index: libffi-3.2.1/configure.ac
+===================================================================
+--- libffi-3.2.1.orig/configure.ac
++++ libffi-3.2.1/configure.ac
+@@ -592,7 +592,7 @@ AC_ARG_ENABLE(purify-safety,
+
+ # These variables are only ever used when we cross-build to X86_WIN32.
+ # And we only support this with GCC, so...
+-if test "x$GCC" = "xyes"; then
++if false; then
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ toolexecdir="${exec_prefix}"/'$(target_alias)'
diff --git a/poky/meta/recipes-support/libffi/libffi_3.2.1.bb b/poky/meta/recipes-support/libffi/libffi_3.2.1.bb
new file mode 100644
index 000000000..a0b1fcd16
--- /dev/null
+++ b/poky/meta/recipes-support/libffi/libffi_3.2.1.bb
@@ -0,0 +1,34 @@
+SUMMARY = "A portable foreign function interface library"
+HOMEPAGE = "http://sourceware.org/libffi/"
+DESCRIPTION = "The `libffi' library provides a portable, high level programming interface to various calling \
+conventions. This allows a programmer to call any function specified by a call interface description at run \
+time. FFI stands for Foreign Function Interface. A foreign function interface is the popular name for the \
+interface that allows code written in one language to call code written in another language. The `libffi' \
+library really only provides the lowest, machine dependent layer of a fully featured foreign function interface. \
+A layer must exist above `libffi' that handles type conversions for values passed between the two languages."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
+
+SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
+ file://not-win32.patch \
+ file://0001-mips-Use-compiler-internal-define-for-linux.patch \
+ file://0001-mips-fix-MIPS-softfloat-build-issue.patch \
+ file://0001-libffi-Support-musl-x32-build.patch \
+ "
+
+SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43"
+SRC_URI[sha256sum] = "d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37"
+
+EXTRA_OECONF += "--disable-builddir"
+EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'"
+inherit autotools texinfo
+
+FILES_${PN}-dev += "${libdir}/libffi-${PV}"
+
+# Doesn't compile in MIPS16e mode due to use of hand-written
+# assembly
+MIPS_INSTRUCTION_SET = "mips"
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/poky/meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch b/poky/meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch
new file mode 100644
index 000000000..69a51d566
--- /dev/null
+++ b/poky/meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch
@@ -0,0 +1,54 @@
+From c320799c941d42a9b7e351805359694ea3b36d2d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 5 Apr 2015 09:08:38 -0700
+Subject: [PATCH] nls.m4: Take it from gettext-0.15
+
+It otherwise expects gettext to provide it. Lets go independent
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ m4/nls.m4 | 30 ++++++++++++++++++++++++++++++
+ 1 file changed, 30 insertions(+)
+ create mode 100644 m4/nls.m4
+
+diff --git a/m4/nls.m4 b/m4/nls.m4
+new file mode 100644
+index 0000000..2c8fe69
+--- /dev/null
++++ b/m4/nls.m4
+@@ -0,0 +1,30 @@
++dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
++dnl This file is free software; the Free Software Foundation
++dnl gives unlimited permission to copy and/or distribute it,
++dnl with or without modifications, as long as this notice is preserved.
++dnl
++dnl This file can can be used in projects which are not available under
++dnl the GNU General Public License or the GNU Library General Public
++dnl License but which still want to provide support for the GNU gettext
++dnl functionality.
++dnl Please note that the actual code of the GNU gettext library is covered
++dnl by the GNU Library General Public License, and the rest of the GNU
++dnl gettext package package is covered by the GNU General Public License.
++dnl They are not in the public domain.
++
++dnl Authors:
++dnl Ulrich Drepper drepper@cygnus.com, 1995-2000.
++dnl Bruno Haible haible@clisp.cons.org, 2000-2003.
++
++AC_PREREQ(2.50)
++
++AC_DEFUN([AM_NLS],
++[
++AC_MSG_CHECKING([whether NLS is requested])
++dnl Default is enabled NLS
++AC_ARG_ENABLE(nls,
++[ --disable-nls do not use Native Language Support],
++USE_NLS=$enableval, USE_NLS=yes)
++AC_MSG_RESULT($USE_NLS)
++AC_SUBST(USE_NLS)
++])
+--
+2.1.4
+
diff --git a/poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb b/poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb
new file mode 100644
index 000000000..c0fd83ef3
--- /dev/null
+++ b/poky/meta/recipes-support/libfm/libfm-extra_1.2.5.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Library for file management"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://src/fm-extra.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007"
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0-native glib-2.0 intltool-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
+ file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
+ "
+
+SRC_URI[md5sum] = "a1ba9ae5e920f38b647dd511edd6c807"
+SRC_URI[sha256sum] = "c706bb1020cf5f2d6f5a9226f692ce1985947134dcf2bde64278bd0420779b5a"
+
+S = "${WORKDIR}/libfm-${PV}"
+
+EXTRA_OECONF = "--with-extra-only --with-gtk=no"
+
+inherit autotools pkgconfig gtk-doc gettext
+
+do_configure[dirs] =+ "${S}/m4"
diff --git a/poky/meta/recipes-support/libfm/libfm/0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch b/poky/meta/recipes-support/libfm/libfm/0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch
new file mode 100644
index 000000000..fb91d90cf
--- /dev/null
+++ b/poky/meta/recipes-support/libfm/libfm/0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch
@@ -0,0 +1,28 @@
+From 23c6e9df611c86a5e97079e1b88c7a18474bf0bc Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 16 Dec 2016 16:52:04 +0200
+Subject: [PATCH] Correctly check the stamp file that indicates if we need to
+ re-build vala code
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index d043b3d..0e85590 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -42,7 +42,7 @@ AM_COND_IF(EXTRALIB_ONLY,
+ [enable_actions=no])
+ if test x"$enable_actions" = xyes; then
+ dnl no vala compiler required when sources are from dist tarball
+- if test -f src/actions/libfmactions_la_vala.stamp; then
++ if test -f $srcdir/src/actions/libfmactions_la_vala.stamp; then
+ AM_PROG_VALAC
+ else
+ AM_PROG_VALAC([0.13.0])
+--
+2.10.2
+
diff --git a/poky/meta/recipes-support/libfm/libfm/0001-Enclose-text-in-programlisting-into-CDATA.patch b/poky/meta/recipes-support/libfm/libfm/0001-Enclose-text-in-programlisting-into-CDATA.patch
new file mode 100644
index 000000000..40e53291e
--- /dev/null
+++ b/poky/meta/recipes-support/libfm/libfm/0001-Enclose-text-in-programlisting-into-CDATA.patch
@@ -0,0 +1,76 @@
+From ed4ca8c0b17ff5d3c768b92409c1787e3f3f1841 Mon Sep 17 00:00:00 2001
+From: Andriy Grytsenko <andrej@rep.kiev.ua>
+Date: Sun, 26 Nov 2017 22:30:15 +0200
+Subject: [PATCH 2/2] Enclose text in <programlisting> into <![CDATA[
+
+New gtk-doc fails on tag-like data in it.
+See https://bugs.freedesktop.org/show_bug.cgi?id=101585
+That is definitely bug of gtk-doc but let workaround it.
+
+Upstream-Status: Backport [https://git.lxde.org/gitweb/?p=lxde/libfm.git;a=commit;h=b072ee0400432d72fdf86ba9fed74a7e0ec11ec1]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ src/base/fm-module.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/base/fm-module.c b/src/base/fm-module.c
+index d364b2d..2e8c978 100644
+--- a/src/base/fm-module.c
++++ b/src/base/fm-module.c
+@@ -44,7 +44,7 @@
+ * of that type should include:
+ * <example id="example-fm-dummy-h">
+ * <title>Sample of fm-dummy.h</title>
+- * <programlisting>
++ * <programlisting><![CDATA[
+ * #include <libfm/fm.h>
+ *
+ * #define FM_MODULE_dummy_VERSION 1
+@@ -54,7 +54,7 @@
+ * } FmDummyInit;
+ *
+ * extern FmDummyInit fm_module_init_dummy;
+- * </programlisting>
++ * ]]></programlisting>
+ * </example>
+ * The FM_MODULE_dummy_VERSION is a number which should be increased each
+ * time something in FmDummyInit structure is changed. The FmDummyInit
+@@ -65,7 +65,7 @@
+ * module handling in your code:
+ * <example id="example-fm-dummy-widget-c">
+ * <title>Sample of fm-dummy-widget.c</title>
+- * <programlisting>
++ * <programlisting><![CDATA[
+ * #include "fm-dummy.h"
+ *
+ * FM_MODULE_DEFINE_TYPE(dummy, FmDummyInit, 1)
+@@ -87,7 +87,7 @@
+ * result = module->get_new("test sample");
+ * return result;
+ * }
+- * </programlisting>
++ * ]]></programlisting>
+ * </example>
+ *
+ * Third thing application should do is to register module type on the
+@@ -108,7 +108,7 @@
+ * interface (see the fm-dummy.h header example above):
+ * <example id="example-fm-dummy-test-c">
+ * <title>Sample of module dummy/test</title>
+- * <programlisting>
++ * <programlisting><![CDATA[
+ * #include "fm-dummy.h"
+ *
+ * FM_DEFINE_MODULE(dummy, test)
+@@ -121,7 +121,7 @@
+ * FmDummyInit fm_module_init_dummy = {
+ * fm_dummy_test_get_new;
+ * };
+- * </programlisting>
++ * ]]></programlisting>
+ * </example>
+ * The fm_module_init_dummy should be exactly the same structure that is
+ * defined in the header file above.
+--
+2.15.1
+
diff --git a/poky/meta/recipes-support/libfm/libfm_1.2.5.bb b/poky/meta/recipes-support/libfm/libfm_1.2.5.bb
new file mode 100644
index 000000000..596408353
--- /dev/null
+++ b/poky/meta/recipes-support/libfm/libfm_1.2.5.bb
@@ -0,0 +1,54 @@
+SUMMARY = "Library for file management"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4641e94ec96f98fabc56ff9cc48be14b \
+ file://src/fm.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007 \
+ file://src/base/fm-config.h;beginline=10;endline=23;md5=ef1f84da64b3c01cca447212f7ef6007 \
+ file://src/fm-gtk.h;beginline=6;endline=19;md5=646baa4955c04fe768f2ca27b92ac8dd"
+
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0 glib-2.0-native pango gtk+3 menu-cache intltool-native libexif libfm-extra"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
+ file://0001-Correctly-check-the-stamp-file-that-indicates-if-we-.patch \
+ file://0001-Enclose-text-in-programlisting-into-CDATA.patch \
+ "
+
+SRC_URI[md5sum] = "a1ba9ae5e920f38b647dd511edd6c807"
+SRC_URI[sha256sum] = "c706bb1020cf5f2d6f5a9226f692ce1985947134dcf2bde64278bd0420779b5a"
+
+inherit autotools pkgconfig gtk-doc gettext distro_features_check
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+EXTRA_OECONF = "--with-gtk=3"
+
+do_configure[dirs] =+ "${S}/m4"
+
+PACKAGES =+ "libfm-gtk"
+PACKAGES += "${PN}-mime"
+FILES_libfm-gtk = " \
+ ${libdir}/libfm-gtk*so.* \
+ ${libdir}/libfm/modules/gtk* \
+ ${bindir}/libfm-pref-apps \
+ ${bindir}/lxshortcut \
+ ${datadir}/applications/libfm-pref-apps.desktop \
+ ${datadir}/applications/lxshortcut.desktop \
+ ${datadir}/libfm/images/folder.png \
+ ${datadir}/libfm/images/unknown.png \
+ ${datadir}/libfm/ui/*.ui \
+"
+FILES_${PN}-mime = "${datadir}/mime/"
+
+do_install_append () {
+ # remove files which are part of libfm-extra
+ rm -f ${D}${includedir}/libfm-1.0/fm-xml-file.h
+ rm -f ${D}${includedir}/libfm-1.0/fm-version.h
+ rm -f ${D}${includedir}/libfm-1.0/fm-extra.h
+ rm -f ${D}${includedir}/libfm
+ rm -f ${D}${libdir}/pkgconfig/libfm-extra.pc
+ rm -f ${D}${libdir}/libfm-extra.so*
+ rm -f ${D}${libdir}/libfm-extra.a
+ rm -f ${D}${libdir}/libfm-extra.la
+}
diff --git a/poky/meta/recipes-support/libgcrypt/files/0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch b/poky/meta/recipes-support/libgcrypt/files/0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch
new file mode 100644
index 000000000..d41c3de3b
--- /dev/null
+++ b/poky/meta/recipes-support/libgcrypt/files/0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch
@@ -0,0 +1,183 @@
+From 72b9e9040d58c15f0302bd8abda28179f04e1c5f Mon Sep 17 00:00:00 2001
+From: Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Wed, 16 Aug 2017 10:43:18 +0800
+Subject: [PATCH 1/4] Add and use pkg-config for libgcrypt instead of -config
+ scripts.
+
+Upstream-Status: Denied [upstream have indicated they don't want a
+pkg-config dependency]
+
+RP 2014/5/22
+
+Rebase to 1.8.0
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 1 +
+ src/libgcrypt.m4 | 71 +++--------------------------------------------------
+ src/libgcrypt.pc.in | 33 +++++++++++++++++++++++++
+ 3 files changed, 38 insertions(+), 67 deletions(-)
+ create mode 100644 src/libgcrypt.pc.in
+
+diff --git a/configure.ac b/configure.ac
+index bbe8104..3d2de73 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2607,6 +2607,7 @@ random/Makefile
+ doc/Makefile
+ src/Makefile
+ src/gcrypt.h
++src/libgcrypt.pc
+ src/libgcrypt-config
+ src/versioninfo.rc
+ tests/Makefile
+diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4
+index c67cfec..4ea5f2c 100644
+--- a/src/libgcrypt.m4
++++ b/src/libgcrypt.m4
+@@ -29,30 +29,6 @@ dnl is added to the gpg_config_script_warn variable.
+ dnl
+ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ [ AC_REQUIRE([AC_CANONICAL_HOST])
+- AC_ARG_WITH(libgcrypt-prefix,
+- AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
+- [prefix where LIBGCRYPT is installed (optional)]),
+- libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
+- if test x"${LIBGCRYPT_CONFIG}" = x ; then
+- if test x"${libgcrypt_config_prefix}" != x ; then
+- LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config"
+- else
+- case "${SYSROOT}" in
+- /*)
+- if test -x "${SYSROOT}/bin/libgcrypt-config" ; then
+- LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config"
+- fi
+- ;;
+- '')
+- ;;
+- *)
+- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+- ;;
+- esac
+- fi
+- fi
+-
+- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
+ tmp=ifelse([$1], ,1:1.2.0,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+ req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -62,48 +38,13 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ min_libgcrypt_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
+- ok=no
+- if test "$LIBGCRYPT_CONFIG" != "no" ; then
+- req_major=`echo $min_libgcrypt_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_libgcrypt_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_libgcrypt_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+- libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
+- major=`echo $libgcrypt_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+- minor=`echo $libgcrypt_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+- micro=`echo $libgcrypt_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+- if test "$major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$major" -eq "$req_major"; then
+- if test "$minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$minor" -eq "$req_minor"; then
+- if test "$micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
+- if test $ok = yes; then
+- AC_MSG_RESULT([yes ($libgcrypt_config_version)])
+- else
+- AC_MSG_RESULT(no)
+- fi
++ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= $min_libgcrypt_version], [ok=yes], [ok=no])
++
+ if test $ok = yes; then
+ # If we have a recent libgcrypt, we should also check that the
+ # API is compatible
+ if test "$req_libgcrypt_api" -gt 0 ; then
+- tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version libgcrypt`
+ if test "$tmp" -gt 0 ; then
+ AC_MSG_CHECKING([LIBGCRYPT API version])
+ if test "$req_libgcrypt_api" -eq "$tmp" ; then
+@@ -116,10 +57,8 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ fi
+ fi
+ if test $ok = yes; then
+- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
+- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
+ ifelse([$2], , :, [$2])
+- libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
++ libgcrypt_config_host=`$PKG_CONFIG --variable=host libgcrypt`
+ if test x"$libgcrypt_config_host" != xnone ; then
+ if test x"$libgcrypt_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+@@ -134,8 +73,6 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
+ fi
+ fi
+ else
+- LIBGCRYPT_CFLAGS=""
+- LIBGCRYPT_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(LIBGCRYPT_CFLAGS)
+diff --git a/src/libgcrypt.pc.in b/src/libgcrypt.pc.in
+new file mode 100644
+index 0000000..2fc8f53
+--- /dev/null
++++ b/src/libgcrypt.pc.in
+@@ -0,0 +1,33 @@
++# Process this file with autoconf to produce a pkg-config metadata file.
++# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
++# Author: Simon Josefsson
++#
++# This file is free software; as a special exception the author gives
++# unlimited permission to copy and/or distribute it, with or without
++# modifications, as long as this notice is preserved.
++#
++# This file is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@LIBGCRYPT_CONFIG_API_VERSION@
++host=@LIBGCRYPT_CONFIG_HOST@
++
++# Misc information.
++symmetric_ciphers=@LIBGCRYPT_CIPHERS@
++asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
++digests=@LIBGCRYPT_DIGESTS@
++
++Name: libgcrypt
++Description: GNU crypto library
++URL: http://www.gnupg.org
++Version: @VERSION@
++Libs: -L${libdir} -lgcrypt
++Libs.private: -L${libdir} -lgpg-error
++Cflags: -I${includedir}
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/poky/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
new file mode 100644
index 000000000..d7554f38a
--- /dev/null
+++ b/poky/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
@@ -0,0 +1,41 @@
+From 97570ef271ea1fb7b5ca903eec88f68407b0ec76 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Wed, 16 Aug 2017 10:44:41 +0800
+Subject: [PATCH 2/4] libgcrypt: fix building error with '-O2' in sysroot path
+
+Upstream-Status: Pending
+
+Characters like '-O2' or '-Ofast' will be replaced by '-O1' when
+compiling cipher.
+If we are cross compiling libgcrypt and sysroot contains such
+characters, we would
+get compile errors because the sysroot path has been modified.
+
+Fix this by adding blank spaces before and after the original matching
+pattern in the
+sed command.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+
+Rebase to 1.8.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ cipher/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cipher/Makefile.am b/cipher/Makefile.am
+index 95c4510..bd52ec7 100644
+--- a/cipher/Makefile.am
++++ b/cipher/Makefile.am
+@@ -116,7 +116,7 @@ gost-s-box: gost-s-box.c
+
+
+ if ENABLE_O_FLAG_MUNGING
+-o_flag_munging = sed -e 's/-O\([2-9s][2-9s]*\)/-O1/' -e 's/-Ofast/-O1/g'
++o_flag_munging = sed -e 's/ -O\([2-9s][2-9s]*\) / -O1 /' -e 's/ -Ofast / -O1 /g'
+ else
+ o_flag_munging = cat
+ endif
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/libgcrypt/files/0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch b/poky/meta/recipes-support/libgcrypt/files/0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch
new file mode 100644
index 000000000..105df2957
--- /dev/null
+++ b/poky/meta/recipes-support/libgcrypt/files/0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch
@@ -0,0 +1,79 @@
+From 7cc702c7b5a1ccc2b0091f3effa1391b6c3030fd Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 16 Aug 2017 10:46:28 +0800
+Subject: [PATCH 3/4] tests/bench-slope.c: workaround ICE failure on mips with
+ '-O -g'
+
+Hit a ICE and could reduce it to the following minimal example:
+
+1. Only the size of array assigned with 2 caused the issue:
+$ cat > mipgcc-test.c << END
+
+int main (int argc, char **argv)
+{
+ char *pStrArry[ARRAY_SIZE_MAX] = {"hello"};
+ int i = 0;
+
+ while(pStrArry[i] && i<ARRAY_SIZE_MAX)
+ {
+ printf("%s\n", pStrArry[i]);
+ i++;
+ }
+
+ return 0;
+}
+
+END
+
+2. Only -O1 and -g on mips caused the issue:
+$ mips-poky-linux-gcc -O1 -g -o mipgcc-test mipgcc-test.c
+mipgcc-test.c: In function 'main':
+mipgcc-test.c:18:1: internal compiler error: in dwarf2out_var_location,
+at dwarf2out.c:20810
+ }
+ ^
+Please submit a full bug report,
+with preprocessed source if appropriate.
+See <http://gcc.gnu.org/bugs.html> for instructions
+
+3. The quick workround is trying to enlarge the size of array with
+larger
+than 2.
+
+4. File a bug to GNU, but it could not be reproduced on there
+environment.
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60643
+
+Upstream-Status: Inappropriate [oe specific]
+
+Rebase to 1.8.0
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tests/bench-slope.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/bench-slope.c b/tests/bench-slope.c
+index 75e6e43..4e70842 100644
+--- a/tests/bench-slope.c
++++ b/tests/bench-slope.c
+@@ -1463,7 +1463,7 @@ static struct bench_ops hash_ops = {
+ };
+
+
+-static struct bench_hash_mode hash_modes[] = {
++static struct bench_hash_mode hash_modes[3] = {
+ {"", &hash_ops},
+ {0},
+ };
+@@ -1629,7 +1629,7 @@ static struct bench_ops mac_ops = {
+ };
+
+
+-static struct bench_mac_mode mac_modes[] = {
++static struct bench_mac_mode mac_modes[3] = {
+ {"", &mac_ops},
+ {0},
+ };
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch b/poky/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch
new file mode 100644
index 000000000..8622df3ea
--- /dev/null
+++ b/poky/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch
@@ -0,0 +1,28 @@
+From e20dbdb0b8f0af840ef90b299c4e2277c52ddf87 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sun, 12 Jun 2016 04:44:29 -0400
+Subject: [PATCH 4/4] tests/Makefile.am: fix undefined reference to
+ `pthread_create'
+
+Add missing '-lpthread' to CFLAGS
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tests/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 1744ea7..04cf425 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -64,4 +64,4 @@ EXTRA_DIST = README rsa-16k.key cavs_tests.sh cavs_driver.pl \
+
+ LDADD = $(standard_ldadd) $(GPG_ERROR_LIBS)
+ t_lock_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS)
+-t_lock_CFLAGS = $(GPG_ERROR_MT_CFLAGS)
++t_lock_CFLAGS = $(GPG_ERROR_MT_CFLAGS) -lpthread
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.2.bb b/poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.2.bb
new file mode 100644
index 000000000..b36e653a8
--- /dev/null
+++ b/poky/meta/recipes-support/libgcrypt/libgcrypt_1.8.2.bb
@@ -0,0 +1,53 @@
+SUMMARY = "General purpose cryptographic library based on the code from GnuPG"
+HOMEPAGE = "http://directory.fsf.org/project/libgcrypt/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+SECTION = "libs"
+
+# helper program gcryptrnd and getrandom are under GPL, rest LGPL
+LICENSE = "GPLv2+ & LGPLv2.1+ & GPLv3+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-dev = "GPLv2+ & LGPLv2.1+"
+LICENSE_dumpsexp-dev = "GPLv3+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+ file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
+
+DEPENDS = "libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
+ file://0001-Add-and-use-pkg-config-for-libgcrypt-instead-of-conf.patch \
+ file://0003-tests-bench-slope.c-workaround-ICE-failure-on-mips-w.patch \
+ file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
+ file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
+"
+SRC_URI[md5sum] = "cfb0b5c79eab07686b6898160a407139"
+SRC_URI[sha256sum] = "c8064cae7558144b13ef0eb87093412380efa16c4ee30ad12ecb54886a524c07"
+
+BINCONFIG = "${bindir}/libgcrypt-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+EXTRA_OECONF = "--disable-asm"
+EXTRA_OEMAKE_class-target = "LIBTOOLFLAGS='--tag=CC'"
+
+PACKAGECONFIG ??= "capabilities"
+PACKAGECONFIG[capabilities] = "--with-capabilities,--without-capabilities,libcap"
+
+do_configure_prepend () {
+ # Else this could be used in preference to the one in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+}
+
+# libgcrypt.pc is added locally and thus installed here
+do_install_append() {
+ install -d ${D}/${libdir}/pkgconfig
+ install -m 0644 ${B}/src/libgcrypt.pc ${D}/${libdir}/pkgconfig/
+}
+
+PACKAGES =+ "dumpsexp-dev"
+
+FILES_${PN}-dev += "${bindir}/hmac256"
+FILES_dumpsexp-dev += "${bindir}/dumpsexp"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch b/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
new file mode 100644
index 000000000..9ffeedbe5
--- /dev/null
+++ b/poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
@@ -0,0 +1,150 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+Upstream-Status: Pending
+
+Index: libgpg-error-1.17/configure.ac
+===================================================================
+--- libgpg-error-1.17.orig/configure.ac
++++ libgpg-error-1.17/configure.ac
+@@ -529,6 +529,7 @@ AC_CONFIG_FILES([src/Makefile tests/Make
+ AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd])
+ AC_CONFIG_FILES([src/versioninfo.rc src/gpg-error.w32-manifest])
+ AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config])
++AC_CONFIG_FILES([src/gpg-error.pc])
+
+ AC_OUTPUT
+
+Index: libgpg-error-1.17/src/Makefile.am
+===================================================================
+--- libgpg-error-1.17.orig/src/Makefile.am
++++ libgpg-error-1.17/src/Makefile.am
+@@ -75,6 +75,8 @@ nodist_include_HEADERS = gpg-error.h
+ bin_SCRIPTS = gpg-error-config
+ m4datadir = $(datadir)/aclocal
+ m4data_DATA = gpg-error.m4
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = gpg-error.pc
+
+ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
+ mkerrnos.awk errnos.in README \
+@@ -82,7 +84,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.
+ mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
+ err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \
+ gpg-error.vers gpg-error.def.in \
+- versioninfo.rc.in gpg-error.w32-manifest.in \
++ versioninfo.rc.in gpg-error.w32-manifest.in gpg-error.pc \
+ $(lock_obj_pub)
+
+ BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
+Index: libgpg-error-1.17/src/gpg-error.m4
+===================================================================
+--- libgpg-error-1.17.orig/src/gpg-error.m4
++++ libgpg-error-1.17/src/gpg-error.m4
+@@ -26,73 +26,13 @@ dnl is added to the gpg_config_script_wa
+ dnl
+ AC_DEFUN([AM_PATH_GPG_ERROR],
+ [ AC_REQUIRE([AC_CANONICAL_HOST])
+- gpg_error_config_prefix=""
+- dnl --with-libgpg-error-prefix=PFX is the preferred name for this option,
+- dnl since that is consistent with how our three siblings use the directory/
+- dnl package name in --with-$dir_name-prefix=PFX.
+- AC_ARG_WITH(libgpg-error-prefix,
+- AC_HELP_STRING([--with-libgpg-error-prefix=PFX],
+- [prefix where GPG Error is installed (optional)]),
+- [gpg_error_config_prefix="$withval"])
+-
+- dnl Accept --with-gpg-error-prefix and make it work the same as
+- dnl --with-libgpg-error-prefix above, for backwards compatibility,
+- dnl but do not document this old, inconsistently-named option.
+- AC_ARG_WITH(gpg-error-prefix,,
+- [gpg_error_config_prefix="$withval"])
++ min_gpg_error_version=ifelse([$1], ,0.0,$1)
+
+- if test x"${GPG_ERROR_CONFIG}" = x ; then
+- if test x"${gpg_error_config_prefix}" != x ; then
+- GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config"
+- else
+- case "${SYSROOT}" in
+- /*)
+- if test -x "${SYSROOT}/bin/gpg-error-config" ; then
+- GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config"
+- fi
+- ;;
+- '')
+- ;;
+- *)
+- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+- ;;
+- esac
+- fi
+- fi
++ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no])
+
+- AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
+- min_gpg_error_version=ifelse([$1], ,0.0,$1)
+- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
+- ok=no
+- if test "$GPG_ERROR_CONFIG" != "no" \
+- && test -f "$GPG_ERROR_CONFIG" ; then
+- req_major=`echo $min_gpg_error_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_gpg_error_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version`
+- major=`echo $gpg_error_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+- minor=`echo $gpg_error_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+- if test "$major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$major" -eq "$req_major"; then
+- if test "$minor" -ge "$req_minor"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+ if test $ok = yes; then
+- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
+- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
+- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null`
+- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null`
+- AC_MSG_RESULT([yes ($gpg_error_config_version)])
+ ifelse([$2], , :, [$2])
+- gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none`
++ gpg_error_config_host=`$PKG_CONFIG --variable=host gpg-error`
+ if test x"$gpg_error_config_host" != xnone ; then
+ if test x"$gpg_error_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+@@ -107,11 +47,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
+ fi
+ fi
+ else
+- GPG_ERROR_CFLAGS=""
+- GPG_ERROR_LIBS=""
+- GPG_ERROR_MT_CFLAGS=""
+- GPG_ERROR_MT_LIBS=""
+- AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(GPG_ERROR_CFLAGS)
+Index: libgpg-error-1.17/src/gpg-error.pc.in
+===================================================================
+--- /dev/null
++++ libgpg-error-1.17/src/gpg-error.pc.in
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++host=@GPG_ERROR_CONFIG_HOST@
++
++Name: gpg-error
++Description: a library that defines common error values for all GnuPG components
++Version: @VERSION@
++Libs: -L${libdir} -lgpg-error
++Cflags: -I${includedir}
diff --git a/poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb b/poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb
new file mode 100644
index 000000000..b74f079f5
--- /dev/null
+++ b/poky/meta/recipes-support/libgpg-error/libgpg-error_1.27.bb
@@ -0,0 +1,62 @@
+SUMMARY = "Small library that defines common error values for all GnuPG components"
+HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/gpg-error.h.in;endline=23;md5=beae1e44d8d5c265d194760276033a7c \
+ file://src/init.c;endline=20;md5=872b2389fe9bae7ffb80d2b91225afbc"
+
+
+SECTION = "libs"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
+ file://pkgconfig.patch \
+ "
+
+SRC_URI[md5sum] = "5217ef3e76a7275a2a3b569a12ddc989"
+SRC_URI[sha256sum] = "4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2"
+
+BINCONFIG = "${bindir}/gpg-error-config"
+
+inherit autotools binconfig-disabled pkgconfig gettext multilib_header
+CPPFLAGS += "-P"
+do_compile_prepend() {
+ TARGET_FILE=linux-gnu
+ if [ ${TARGET_OS} = "mingw32" ]; then
+ # There are no arch specific syscfg files for mingw32
+ TARGET_FILE=
+ elif [ ${TARGET_OS} != "linux" ]; then
+ TARGET_FILE=${TARGET_OS}
+ fi
+
+ case ${TARGET_ARCH} in
+ aarch64_be) TUPLE=aarch64-unknown-linux-gnu ;;
+ arm) TUPLE=arm-unknown-linux-gnueabi ;;
+ armeb) TUPLE=arm-unknown-linux-gnueabi ;;
+ i586|i686) TUPLE=i686-pc-linux-gnu ;;
+ mips64*) TUPLE=mips64el-unknown-linux-gnuabi64 ;;
+ mips*el) TUPLE=mipsel-unknown-linux-gnu ;;
+ mips*) TUPLE=mips-unknown-linux-gnu ;;
+ x86_64) TUPLE=x86_64-pc-linux-gnu ;;
+ *) TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;;
+ esac
+
+ if [ -n "$TARGET_FILE" ]; then
+ cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
+ ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
+ fi
+}
+
+do_install_append() {
+ # we don't have common lisp in OE
+ rm -rf "${D}${datadir}/common-lisp/"
+ oe_multilib_header gpg-error.h gpgrt.h
+}
+
+FILES_${PN}-dev += "${bindir}/gpg-error"
+FILES_${PN}-doc += "${datadir}/libgpg-error/errorref.txt"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch b/poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch
new file mode 100644
index 000000000..6db75f508
--- /dev/null
+++ b/poky/meta/recipes-support/libical/libical/0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch
@@ -0,0 +1,44 @@
+From 1a41069c0dc054e59cd76fc3d8cf7cc2a78b5e8d Mon Sep 17 00:00:00 2001
+From: Allen Winter <allen.winter@kdab.com>
+Date: Sat, 3 Sep 2016 16:56:29 -0400
+Subject: [PATCH] CMakeLists.txt, libical.pc.in - fix iculibs (remove full path) ISSUE: 227
+
+Upstream-Status: Backport
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+----
+diff -Naur libical-2.0.0-orig/CMakeLists.txt libical-2.0.0/CMakeLists.txt
+--- libical-2.0.0-orig/CMakeLists.txt 2016-09-08 18:05:06.166049345 +0300
++++ libical-2.0.0/CMakeLists.txt 2016-09-08 18:05:45.201561334 +0300
+@@ -128,6 +128,7 @@
+ # RSCALE info at http://tools.ietf.org/html/rfc7529
+ find_package(ICU)
+ if(ICU_FOUND)
++ set(ICUUC_LIBS "-licuuc") #for libical.pc
+ set(HAVE_LIBICU 1)
+ if(ICU_MAJOR_VERSION VERSION_GREATER 50)
+ set(HAVE_ICU_DANGI TRUE)
+@@ -137,6 +138,7 @@
+ endif()
+ if(ICU_I18N_FOUND)
+ set(HAVE_LIBICU_I18N 1)
++ set(ICUI18N_LIBS "-licui18n") #for libical.pc
+ endif()
+
+ # MSVC specific definitions
+diff -Naur libical-2.0.0-orig/libical.pc.in libical-2.0.0/libical.pc.in
+--- libical-2.0.0-orig/libical.pc.in 2015-12-28 23:44:53.000000000 +0200
++++ libical-2.0.0/libical.pc.in 2016-09-08 18:09:12.991963597 +0300
+@@ -3,10 +3,10 @@
+ libdir=@libdir@
+ includedir=@includedir@
+ threadslib=@PTHREAD_LIBS@
+-iculib=@ICU_LIBRARIES@ @ICU_I18N_LIBRARIES@
++iculibs=@ICUUC_LIBS@ @ICUI18N_LIBS@
+
+ Name: libical
+ Description: An implementation of basic iCAL protocols
+ Version: @VERSION@
+-Libs: -L${libdir} -lical -licalss -licalvcal ${threadslib} ${iculib}
++Libs: -L${libdir} -lical -licalss -licalvcal ${threadslib} ${iculibs}
+ Cflags: -I${includedir}
diff --git a/poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch b/poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
new file mode 100644
index 000000000..b50f50e70
--- /dev/null
+++ b/poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
@@ -0,0 +1,30 @@
+From 918cd8764a845a9d25918a444fbaa5070d2be609 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 21 Aug 2015 16:38:05 +0300
+Subject: [PATCH] Remove cmake check for Perl
+
+We set "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY" in cmake bbclass to
+make sure cmake does not find host programs. In this case we actually
+are fine with host perl: remove the check.
+
+Upstream-Status: Inappropriate [workaround]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ CMakeLists.txt | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+Index: libical-2.0.0/CMakeLists.txt
+===================================================================
+--- libical-2.0.0.orig/CMakeLists.txt
++++ libical-2.0.0/CMakeLists.txt
+@@ -116,8 +116,7 @@ if(SHARED_ONLY)
+ set(LIBRARY_TYPE SHARED)
+ endif()
+
+-# must have Perl to create the derived stuff
+-find_package(Perl REQUIRED)
++set(PERL_EXECUTABLE perl)
+
+ # Ensure finding 64bit libs when using 64-bit compilers
+ if(CMAKE_CL_64)
diff --git a/poky/meta/recipes-support/libical/libical_2.0.0.bb b/poky/meta/recipes-support/libical/libical_2.0.0.bb
new file mode 100644
index 000000000..dcc21cc16
--- /dev/null
+++ b/poky/meta/recipes-support/libical/libical_2.0.0.bb
@@ -0,0 +1,19 @@
+SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
+HOMEPAGE = "https://github.com/libical/libical"
+BUGTRACKER = "https://github.com/libical/libical/issues"
+LICENSE = "LGPLv2.1 | MPL-1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d4fc58309d8ed46587ac63bb449d82f8 \
+ file://LICENSE;md5=d1a0891cd3e582b3e2ec8fe63badbbb6"
+SECTION = "libs"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
+ file://Remove-cmake-check-for-Perl.patch \
+ file://0001-CMakeLists.txt-libical.pc.in-fix-iculibs-remove-full.patch \
+ "
+DEPENDS = "icu"
+
+SRC_URI[md5sum] = "6bf8e5f5a3ba88baf390d0134e05d76e"
+SRC_URI[sha256sum] = "654c11f759c19237be39f6ad401d917e5a05f36f1736385ed958e60cf21456da"
+UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases"
+
+inherit cmake pkgconfig
diff --git a/poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch b/poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
new file mode 100644
index 000000000..5afe6de92
--- /dev/null
+++ b/poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
@@ -0,0 +1,152 @@
+Upstream-Status: Denied
+
+Add pkgconfig support to libksba.
+This patch is rejected by upstream for the reason below:
+They think pkgconfig adds no portability and maintaining them is not worthwhile.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+
+Index: libksba-1.3.5/Makefile.am
+===================================================================
+--- libksba-1.3.5.orig/Makefile.am
++++ libksba-1.3.5/Makefile.am
+@@ -20,6 +20,9 @@
+
+ ACLOCAL_AMFLAGS = -I m4 -I gl/m4
+
++pkgconfigdir = ${libdir}/pkgconfig
++pkgconfig_DATA = ksba.pc
++
+ # (A suitable gitlog-to-changelog script can be found in GnuPG master.)
+ GITLOG_TO_CHANGELOG=gitlog-to-changelog
+
+Index: libksba-1.3.5/configure.ac
+===================================================================
+--- libksba-1.3.5.orig/configure.ac
++++ libksba-1.3.5/configure.ac
+@@ -414,6 +414,7 @@ gl/Makefile
+ src/Makefile
+ src/ksba-config
+ src/versioninfo.rc
++ksba.pc
+ tests/Makefile
+ doc/Makefile
+ ])
+Index: libksba-1.3.5/ksba.pc.in
+===================================================================
+--- /dev/null
++++ libksba-1.3.5/ksba.pc.in
+@@ -0,0 +1,17 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@KSBA_CONFIG_API_VERSION@
++host=@KSBA_CONFIG_HOST@
++
++Name: ksba
++Description: Libksba provides an easy API to create and parse X.509 and CMS related objects
++Requires:
++Version: @VERSION@
++Libs: -L${libdir} -lksba
++Libs.private: -L${libdir} -lgpg-error
++Cflags: -I${includedir}
++
+Index: libksba-1.3.5/src/ksba.m4
+===================================================================
+--- libksba-1.3.5.orig/src/ksba.m4
++++ libksba-1.3.5/src/ksba.m4
+@@ -22,18 +22,7 @@ dnl with a changed API.
+ dnl
+ AC_DEFUN([AM_PATH_KSBA],
+ [AC_REQUIRE([AC_CANONICAL_HOST])
+- AC_ARG_WITH(ksba-prefix,
+- AC_HELP_STRING([--with-ksba-prefix=PFX],
+- [prefix where KSBA is installed (optional)]),
+- ksba_config_prefix="$withval", ksba_config_prefix="")
+- if test x$ksba_config_prefix != x ; then
+- ksba_config_args="$ksba_config_args --prefix=$ksba_config_prefix"
+- if test x${KSBA_CONFIG+set} != xset ; then
+- KSBA_CONFIG=$ksba_config_prefix/bin/ksba-config
+- fi
+- fi
+
+- AC_PATH_PROG(KSBA_CONFIG, ksba-config, no)
+ tmp=ifelse([$1], ,1:1.0.0,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+ req_ksba_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -43,48 +32,13 @@ AC_DEFUN([AM_PATH_KSBA],
+ min_ksba_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for KSBA - version >= $min_ksba_version)
+- ok=no
+- if test "$KSBA_CONFIG" != "no" ; then
+- req_major=`echo $min_ksba_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_ksba_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_ksba_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+- ksba_config_version=`$KSBA_CONFIG $ksba_config_args --version`
+- major=`echo $ksba_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+- minor=`echo $ksba_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+- micro=`echo $ksba_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+- if test "$major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$major" -eq "$req_major"; then
+- if test "$minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$minor" -eq "$req_minor"; then
+- if test "$micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
+- if test $ok = yes; then
+- AC_MSG_RESULT([yes ($ksba_config_version)])
+- else
+- AC_MSG_RESULT(no)
+- fi
++ PKG_CHECK_MODULES(KSBA, [ksba >= $min_ksba_version], [ok=yes], [ok=no])
++
+ if test $ok = yes; then
+ # Even if we have a recent libksba, we should check that the
+ # API is compatible.
+ if test "$req_ksba_api" -gt 0 ; then
+- tmp=`$KSBA_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version ksba`
+ if test "$tmp" -gt 0 ; then
+ AC_MSG_CHECKING([KSBA API version])
+ if test "$req_ksba_api" -eq "$tmp" ; then
+@@ -97,10 +51,8 @@ AC_DEFUN([AM_PATH_KSBA],
+ fi
+ fi
+ if test $ok = yes; then
+- KSBA_CFLAGS=`$KSBA_CONFIG $ksba_config_args --cflags`
+- KSBA_LIBS=`$KSBA_CONFIG $ksba_config_args --libs`
+ ifelse([$2], , :, [$2])
+- libksba_config_host=`$LIBKSBA_CONFIG $ksba_config_args --host 2>/dev/null || echo none`
++ libksba_config_host=`$PKG_CONFIG --variable=host ksba`
+ if test x"$libksba_config_host" != xnone ; then
+ if test x"$libksba_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+@@ -114,8 +66,6 @@ AC_DEFUN([AM_PATH_KSBA],
+ fi
+ fi
+ else
+- KSBA_CFLAGS=""
+- KSBA_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(KSBA_CFLAGS)
diff --git a/poky/meta/recipes-support/libksba/libksba_1.3.5.bb b/poky/meta/recipes-support/libksba/libksba_1.3.5.bb
new file mode 100644
index 000000000..a7ea53fed
--- /dev/null
+++ b/poky/meta/recipes-support/libksba/libksba_1.3.5.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Easy API to create and parse X.509 and CMS related objects"
+HOMEPAGE = "http://www.gnupg.org/related_software/libksba/"
+LICENSE = "GPLv2+ | LGPLv3+ | GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fd541d83f75d038c4e0617b672ed8bda \
+ file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://COPYING.GPLv3;md5=2f31b266d3440dd7ee50f92cf67d8e6c \
+ file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+ "
+
+DEPENDS = "libgpg-error"
+
+BINCONFIG = "${bindir}/ksba-config"
+
+inherit autotools binconfig-disabled pkgconfig texinfo
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://ksba-add-pkgconfig-support.patch"
+
+SRC_URI[md5sum] = "8302a3e263a7c630aa7dea7d341f07a2"
+SRC_URI[sha256sum] = "41444fd7a6ff73a79ad9728f985e71c9ba8cd3e5e53358e70d5f066d35c1a340"
+
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+}
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-support/libmpc/libmpc.inc b/poky/meta/recipes-support/libmpc/libmpc.inc
new file mode 100644
index 000000000..b3742543d
--- /dev/null
+++ b/poky/meta/recipes-support/libmpc/libmpc.inc
@@ -0,0 +1,7 @@
+SUMMARY = "C library for complex number arithmetic with arbitrary precision and correct rounding"
+DESCRIPTION = "Mpc is a C library for the arithmetic of complex numbers with arbitrarily high precision and correct rounding of the result. It is built upon and follows the same principles as Mpfr"
+HOMEPAGE = "http://www.multiprecision.org/"
+LICENSE = "LGPLv3"
+SECTION = "libs"
+
+inherit autotools texinfo
diff --git a/poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb b/poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb
new file mode 100644
index 000000000..2d25d388f
--- /dev/null
+++ b/poky/meta/recipes-support/libmpc/libmpc_1.1.0.bb
@@ -0,0 +1,15 @@
+require libmpc.inc
+
+DEPENDS = "gmp mpfr"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
+SRC_URI = "https://ftp.gnu.org/gnu/mpc/mpc-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "4125404e41e482ec68282a2e687f6c73"
+SRC_URI[sha256sum] = "6985c538143c1208dcb1ac42cedad6ff52e267b47e5f970183a3e75125b43c2e"
+
+UPSTREAM_CHECK_URI = "http://www.multiprecision.org/mpc/download.html"
+
+S = "${WORKDIR}/mpc-${PV}"
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/poky/meta/recipes-support/libnl/libnl/0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch b/poky/meta/recipes-support/libnl/libnl/0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch
new file mode 100644
index 000000000..b20a29962
--- /dev/null
+++ b/poky/meta/recipes-support/libnl/libnl/0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch
@@ -0,0 +1,38 @@
+Subject: [PATCH] fix libnl-3.4.0 musl compile problem
+Avoid in6_addr redefinition
+
+Upstream-Status: Pending
+
+Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
+---
+ include/linux-private/linux/if_bridge.h | 1 -
+ include/linux-private/linux/ipv6.h | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/include/linux-private/linux/if_bridge.h b/include/linux-private/linux/if_bridge.h
+index f24050b..8f7490c 100644
+--- a/include/linux-private/linux/if_bridge.h
++++ b/include/linux-private/linux/if_bridge.h
+@@ -15,7 +15,6 @@
+
+ #include <linux/types.h>
+ #include <linux/if_ether.h>
+-#include <linux/in6.h>
+
+ #define SYSFS_BRIDGE_ATTR "bridge"
+ #define SYSFS_BRIDGE_FDB "brforward"
+diff --git a/include/linux-private/linux/ipv6.h b/include/linux-private/linux/ipv6.h
+index e05e684..f16349d 100644
+--- a/include/linux-private/linux/ipv6.h
++++ b/include/linux-private/linux/ipv6.h
+@@ -2,7 +2,6 @@
+ #define _IPV6_H
+
+ #include <asm/byteorder.h>
+-#include <linux/in6.h>
+
+ /* The latest drafts declared increase in minimal mtu up to 1280. */
+
+--
+2.7.4
+
diff --git a/poky/meta/recipes-support/libnl/libnl/fix-pc-file.patch b/poky/meta/recipes-support/libnl/libnl/fix-pc-file.patch
new file mode 100644
index 000000000..fe8b833a1
--- /dev/null
+++ b/poky/meta/recipes-support/libnl/libnl/fix-pc-file.patch
@@ -0,0 +1,17 @@
+Upstream-Status: Pending
+
+Some packages are asking only for libnl-2.0, but expects to get also
+libnl-genl, libnl-nf libnl-route, easiest way to fix them is here.
+
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+Index: libnl-3.2.14/libnl-3.0.pc.in
+===================================================================
+--- libnl-3.2.14.orig/libnl-3.0.pc.in
++++ libnl-3.2.14/libnl-3.0.pc.in
+@@ -6,5 +6,5 @@ includedir=@includedir@
+ Name: libnl
+ Description: Convenience library for netlink sockets
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} -lnl-@MAJ_VERSION@
++Libs: -L${libdir} -lnl-@MAJ_VERSION@ -lnl-genl-@MAJ_VERSION@ -lnl-nf-@MAJ_VERSION@ -lnl-route-@MAJ_VERSION@
+ Cflags: -I${includedir}/libnl@MAJ_VERSION@
diff --git a/poky/meta/recipes-support/libnl/libnl_3.4.0.bb b/poky/meta/recipes-support/libnl/libnl_3.4.0.bb
new file mode 100644
index 000000000..90dc644be
--- /dev/null
+++ b/poky/meta/recipes-support/libnl/libnl_3.4.0.bb
@@ -0,0 +1,46 @@
+SUMMARY = "A library for applications dealing with netlink sockets"
+HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
+SECTION = "libs/network"
+
+PE = "1"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "flex-native bison-native"
+
+SRC_URI = "https://github.com/thom311/${BPN}/releases/download/${BPN}${@d.getVar('PV').replace('.','_')}/${BP}.tar.gz \
+ file://fix-pc-file.patch \
+ file://0001-PATCH-fix-libnl-3.4.0-musl-compile-problem.patch \
+"
+
+UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases"
+
+SRC_URI[md5sum] = "8f71910c03db363b41e2ea62057a4311"
+SRC_URI[sha256sum] = "b7287637ae71c6db6f89e1422c995f0407ff2fe50cecd61a312b6a9b0921f5bf"
+
+inherit autotools pkgconfig
+
+FILES_${PN} = "${libdir}/libnl-3.so.* \
+ ${libdir}/libnl.so.* \
+ ${sysconfdir}"
+RREPLACES_${PN} = "libnl2"
+RCONFLICTS_${PN} = "libnl2"
+FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.la"
+FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
+
+PACKAGES += "${PN}-cli ${PN}-genl ${PN}-idiag ${PN}-nf ${PN}-route ${PN}-xfrm"
+FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \
+ ${libdir}/libnl/cli/*/*.so \
+ ${bindir}/genl-ctrl-list \
+ ${bindir}/idiag-socket-details \
+ ${bindir}/nf-* \
+ ${bindir}/nl-*"
+FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \
+ ${libdir}/libnl-genl.so.*"
+FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
+FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*"
+FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
+FILES_${PN}-xfrm = "${libdir}/libnl-xfrm-3.so.*"
+RREPLACES_${PN}-genl = "libnl-genl2"
+RCONFLICTS_${PN}-genl = "libnl-genl2"
diff --git a/poky/meta/recipes-support/libpcre/libpcre/Makefile b/poky/meta/recipes-support/libpcre/libpcre/Makefile
new file mode 100644
index 000000000..708d807d0
--- /dev/null
+++ b/poky/meta/recipes-support/libpcre/libpcre/Makefile
@@ -0,0 +1,183 @@
+TESTS = pcre_stringpiece_unittest RunTest RunGrepTest
+subdir = .
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
+}
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
+srcdir=$(srcdir); export srcdir; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi;
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+TEST_EXTENSIONS = .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+MKDIR_P = /bin/mkdir -p
+PACKAGE_STRING = PCRE 8.36
+SHELL = /bin/sh
+srcdir = .
+top_srcdir = .
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1;
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ create_testsuite_report --no-color; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for b in $$bases; do echo $$b; done; \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if $$success; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ echo "$$col$$br$$std"; \
+ fi; \
+ $$success || exit 1
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+pcre_stringpiece_unittest.log: pcre_stringpiece_unittest$(EXEEXT)
+ @p='pcre_stringpiece_unittest$(EXEEXT)'; \
+ b='pcre_stringpiece_unittest'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) -- "$$tst"
+RunTest.log: RunTest
+ @p='RunTest'; \
+ b='RunTest'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) -- "$$tst"
+RunGrepTest.log: RunGrepTest
+ @p='RunGrepTest'; \
+ b='RunGrepTest'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) -- "$$tst"
diff --git a/poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch b/poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch
new file mode 100644
index 000000000..89b44f6aa
--- /dev/null
+++ b/poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch
@@ -0,0 +1,41 @@
+Upstream-Status: Inappropriate [debian patch]
+
+This patch address a namespace collision with libc.
+
+Although there is no "#include <regex.h>" in the source file, at
+runtime, it's unintentionally linked to the libc version, the regcomp of
+libc is called instead the pcre one using pcre's data structure...
+that looks like a disaster.
+
+Can patch is from Debian (and Ubuntu 11.04alpha has it also).
+
+[sgw: added patch comment]
+Signed-off-by: Qing He <qing.he@intel.com>
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+--- a/pcreposix.h 2010-05-17 00:17:23.000000000 +0800
++++ b/pcreposix.h 2009-01-15 04:32:17.000000000 +0800
+@@ -133,14 +130,19 @@
+
+ /* The functions */
+
+-PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
+-PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
++PCREPOSIX_EXP_DECL int pcreposix_regcomp(regex_t *, const char *, int);
++PCREPOSIX_EXP_DECL int pcreposix_regexec(const regex_t *, const char *, size_t,
+ regmatch_t *, int);
+-PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
+-PCREPOSIX_EXP_DECL void regfree(regex_t *);
++PCREPOSIX_EXP_DECL size_t pcreposix_regerror(int, const regex_t *, char *, size_t);
++PCREPOSIX_EXP_DECL void pcreposix_regfree(regex_t *);
+
+ #ifdef __cplusplus
+ } /* extern "C" */
+ #endif
+
++#define regcomp pcreposix_regcomp
++#define regexec pcreposix_regexec
++#define regerror pcreposix_regerror
++#define regfree pcreposix_regfree
++
+ #endif /* End of pcreposix.h */
diff --git a/poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch b/poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch
new file mode 100644
index 000000000..83880f709
--- /dev/null
+++ b/poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch
@@ -0,0 +1,48 @@
+Upstream-Status: Pending
+
+--- pcre-8.32.orig/Makefile.am
++++ pcre-8.32/Makefile.am
+@@ -197,8 +197,18 @@ bin_SCRIPTS = pcre-config
+
++CC_FOR_BUILD = @CC_FOR_BUILD@
++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
++CCLD_FOR_BUILD = @CCLD_FOR_BUILD@
++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
++
+ if WITH_REBUILD_CHARTABLES
+
+ noinst_PROGRAMS += dftables
+ dftables_SOURCES = dftables.c
++dftables_LINK = $(CCLD_FOR_BUILD) -o $@
++dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD)
++
++dftables.o: $(srcdir)/dftables.c
++ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/dftables.c
+
+ pcre_chartables.c: dftables$(EXEEXT)
+ ./dftables$(EXEEXT) $@
+--- pcre-8.32.orig/configure.ac
++++ pcre-8.32/configure.ac
+@@ -72,6 +72,22 @@ then
+ fi
+ fi
+
++if test x"$cross_compiling" = xyes; then
++ CC_FOR_BUILD="${CC_FOR_BUILD-gcc}"
++ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}"
++ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}"
++ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}"
++else
++ CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}"
++ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}"
++ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}"
++ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}"
++fi
++AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler])
++AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend])
++AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments])
++AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments])
++
+ # AC_PROG_CXX will return "g++" even if no c++ compiler is installed.
+ # Check for that case, and just disable c++ code if g++ doesn't run.
+ AC_LANG_PUSH(C++)
diff --git a/poky/meta/recipes-support/libpcre/libpcre/run-ptest b/poky/meta/recipes-support/libpcre/libpcre/run-ptest
new file mode 100644
index 000000000..990d4a12a
--- /dev/null
+++ b/poky/meta/recipes-support/libpcre/libpcre/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make check-TESTS
diff --git a/poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch b/poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
new file mode 100644
index 000000000..871cdfcb7
--- /dev/null
+++ b/poky/meta/recipes-support/libpcre/libpcre2/pcre-cross.patch
@@ -0,0 +1,65 @@
+Fix for cross compiling
+
+Fixed:
+| ./dftables src/pcre2_chartables.c
+| make: ./dftables: Command not found
+| make: *** [src/pcre2_chartables.c] Error 127
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Index: pcre2-10.30/Makefile.am
+===================================================================
+--- pcre2-10.30.orig/Makefile.am
++++ pcre2-10.30/Makefile.am
+@@ -325,9 +325,21 @@ bin_SCRIPTS = pcre2-config
+ ## to copy a distributed set of tables that are defined for ASCII code. In this
+ ## case, dftables is not needed.
+
++CC_FOR_BUILD = @CC_FOR_BUILD@
++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
++CCLD_FOR_BUILD = @CCLD_FOR_BUILD@
++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
++
+ if WITH_REBUILD_CHARTABLES
+ noinst_PROGRAMS += dftables
+ dftables_SOURCES = src/dftables.c
++
++dftables_LINK = $(CCLD_FOR_BUILD) -o $@
++dftables_LDFLAGS = $(LDFLAGS_FOR_BUILD)
++
++src/dftables.o: $(srcdir)/src/dftables.c
++ $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -o $@ $(srcdir)/src/dftables.c
++
+ src/pcre2_chartables.c: dftables$(EXEEXT)
+ rm -f $@
+ ./dftables$(EXEEXT) $@
+Index: pcre2-10.30/configure.ac
+===================================================================
+--- pcre2-10.30.orig/configure.ac
++++ pcre2-10.30/configure.ac
+@@ -60,6 +60,23 @@ fi
+ # This is a new thing required to stop a warning from automake 1.12
+ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+
++if test x"$cross_compiling" = xyes; then
++ CC_FOR_BUILD="${CC_FOR_BUILD-gcc}"
++ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-gcc}"
++ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD}"
++ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD}"
++else
++ CC_FOR_BUILD="${CC_FOR_BUILD-\$(CC)}"
++ CCLD_FOR_BUILD="${CCLD_FOR_BUILD-\$(CCLD)}"
++ CFLAGS_FOR_BUILD="${CFLAGS_FOR_BUILD-\$(CFLAGS)}"
++ LDFLAGS_FOR_BUILD="${LDFLAGS_FOR_BUILD-\$(LDFLAGS)}"
++fi
++AC_ARG_VAR(CC_FOR_BUILD, [build system C compiler])
++AC_ARG_VAR(CCLD_FOR_BUILD, [build system C linker frontend])
++AC_ARG_VAR(CFLAGS_FOR_BUILD, [build system C compiler arguments])
++AC_ARG_VAR(LDFLAGS_FOR_BUILD, [build system C linker frontend arguments])
++
++
+ # Check for a 64-bit integer type
+ AC_TYPE_INT64_T
+
diff --git a/poky/meta/recipes-support/libpcre/libpcre2_10.30.bb b/poky/meta/recipes-support/libpcre/libpcre2_10.30.bb
new file mode 100644
index 000000000..46c2d630e
--- /dev/null
+++ b/poky/meta/recipes-support/libpcre/libpcre2_10.30.bb
@@ -0,0 +1,61 @@
+DESCRIPTION = "There are two major versions of the PCRE library. The \
+newest version is PCRE2, which is a re-working of the original PCRE \
+library to provide an entirely new API. The original, very widely \
+deployed PCRE library's API and feature are stable, future releases \
+ will be for bugfixes only. All new future features will be to PCRE2, \
+not the original PCRE 8.x series."
+SUMMARY = "Perl Compatible Regular Expressions version 2"
+HOMEPAGE = "http://www.pcre.org"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=12d55e15a0c6da5c645ba40382bd3293"
+
+SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre2-${PV}.tar.bz2 \
+ file://pcre-cross.patch \
+"
+
+SRC_URI[md5sum] = "d3adf4b130eed854a530390f00020a65"
+SRC_URI[sha256sum] = "90bd41c605d30e3745771eb81928d779f158081a51b2f314bbcc1f73de5773db"
+
+CVE_PRODUCT = "pcre2"
+
+S = "${WORKDIR}/pcre2-${PV}"
+
+PROVIDES += "pcre2"
+DEPENDS += "bzip2 zlib"
+
+BINCONFIG = "${bindir}/pcre2-config"
+
+inherit autotools binconfig-disabled
+
+EXTRA_OECONF = "\
+ --enable-newline-is-lf \
+ --enable-rebuild-chartables \
+ --with-link-size=2 \
+ --with-match-limit=10000000 \
+ --enable-pcre2-16 \
+ --enable-pcre2-32 \
+"
+# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
+# set CFLAGS_FOR_BUILD, required for the libpcre build.
+BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}/src"
+CFLAGS += "-D_REENTRANT"
+CXXFLAGS_append_powerpc = " -lstdc++"
+
+export CCLD_FOR_BUILD ="${BUILD_CCLD}"
+
+PACKAGES =+ "libpcre2-16 libpcre2-32 pcre2grep pcre2grep-doc pcre2test pcre2test-doc"
+
+SUMMARY_pcre2grep = "grep utility that uses perl 5 compatible regexes"
+SUMMARY_pcre2grep-doc = "grep utility that uses perl 5 compatible regexes - docs"
+SUMMARY_pcre2test = "program for testing Perl-comatible regular expressions"
+SUMMARY_pcre2test-doc = "program for testing Perl-comatible regular expressions - docs"
+
+FILES_libpcre2-16 = "${libdir}/libpcre2-16.so.*"
+FILES_libpcre2-32 = "${libdir}/libpcre2-32.so.*"
+FILES_pcre2grep = "${bindir}/pcre2grep"
+FILES_pcre2grep-doc = "${mandir}/man1/pcre2grep.1"
+FILES_pcre2test = "${bindir}/pcre2test"
+FILES_pcre2test-doc = "${mandir}/man1/pcre2test.1"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libpcre/libpcre_8.41.bb b/poky/meta/recipes-support/libpcre/libpcre_8.41.bb
new file mode 100644
index 000000000..0187c08f5
--- /dev/null
+++ b/poky/meta/recipes-support/libpcre/libpcre_8.41.bb
@@ -0,0 +1,87 @@
+DESCRIPTION = "The PCRE library is a set of functions that implement regular \
+expression pattern matching using the same syntax and semantics as Perl 5. PCRE \
+has its own native API, as well as a set of wrapper functions that correspond \
+to the POSIX regular expression API."
+SUMMARY = "Perl Compatible Regular Expressions"
+HOMEPAGE = "http://www.pcre.org"
+SECTION = "devel"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=60da32d84d067f53e22071c4ecb4384d"
+SRC_URI = "https://ftp.pcre.org/pub/pcre/pcre-${PV}.tar.bz2 \
+ file://pcre-cross.patch \
+ file://fix-pcre-name-collision.patch \
+ file://run-ptest \
+ file://Makefile \
+"
+
+SRC_URI[md5sum] = "c160d22723b1670447341b08c58981c1"
+SRC_URI[sha256sum] = "e62c7eac5ae7c0e7286db61ff82912e1c0b7a0c13706616e94a7dd729321b530"
+
+CVE_PRODUCT = "pcre"
+
+S = "${WORKDIR}/pcre-${PV}"
+
+PROVIDES += "pcre"
+DEPENDS += "bzip2 zlib"
+
+PACKAGECONFIG ??= "pcre8 unicode-properties"
+
+PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
+PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
+PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
+PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
+PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
+
+BINCONFIG = "${bindir}/pcre-config"
+
+inherit autotools binconfig-disabled ptest
+
+EXTRA_OECONF = "\
+ --enable-newline-is-lf \
+ --enable-rebuild-chartables \
+ --enable-utf \
+ --with-link-size=2 \
+ --with-match-limit=10000000 \
+"
+
+# Set LINK_SIZE in BUILD_CFLAGS given that the autotools bbclass use it to
+# set CFLAGS_FOR_BUILD, required for the libpcre build.
+BUILD_CFLAGS =+ "-DLINK_SIZE=2 -I${B}"
+CFLAGS += "-D_REENTRANT"
+CXXFLAGS_append_powerpc = " -lstdc++"
+
+export CCLD_FOR_BUILD ="${BUILD_CCLD}"
+
+PACKAGES =+ "libpcrecpp libpcreposix pcregrep pcregrep-doc pcretest pcretest-doc"
+
+SUMMARY_libpcrecpp = "${SUMMARY} - C++ wrapper functions"
+SUMMARY_libpcreposix = "${SUMMARY} - C wrapper functions based on the POSIX regex API"
+SUMMARY_pcregrep = "grep utility that uses perl 5 compatible regexes"
+SUMMARY_pcregrep-doc = "grep utility that uses perl 5 compatible regexes - docs"
+SUMMARY_pcretest = "program for testing Perl-comatible regular expressions"
+SUMMARY_pcretest-doc = "program for testing Perl-comatible regular expressions - docs"
+
+FILES_libpcrecpp = "${libdir}/libpcrecpp.so.*"
+FILES_libpcreposix = "${libdir}/libpcreposix.so.*"
+FILES_pcregrep = "${bindir}/pcregrep"
+FILES_pcregrep-doc = "${mandir}/man1/pcregrep.1"
+FILES_pcretest = "${bindir}/pcretest"
+FILES_pcretest-doc = "${mandir}/man1/pcretest.1"
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}
+ cp ${WORKDIR}/Makefile $t
+ cp -r ${S}/testdata $t
+ for i in pcre_stringpiece_unittest pcregrep pcretest; \
+ do cp ${B}/.libs/$i $t; \
+ done
+ for i in RunTest RunGrepTest test-driver; \
+ do cp ${S}/$i $t; \
+ done
+ # Skip the fr_FR locale test. If the locale fr_FR is found, it is tested.
+ # If not found, the test is skipped. The test program assumes fr_FR is non-UTF-8
+ # locale so the test fails if fr_FR is UTF-8 locale.
+ sed -i -e 's:do3=yes:do3=no:g' ${D}${PTEST_PATH}/RunTest
+}
diff --git a/poky/meta/recipes-support/libproxy/libproxy_0.4.15.bb b/poky/meta/recipes-support/libproxy/libproxy_0.4.15.bb
new file mode 100644
index 000000000..991c9d832
--- /dev/null
+++ b/poky/meta/recipes-support/libproxy/libproxy_0.4.15.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Library providing automatic proxy configuration management"
+HOMEPAGE = "https://github.com/libproxy/libproxy"
+BUGTRACKER = "https://github.com/libproxy/libproxy/issues"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
+
+DEPENDS = "glib-2.0"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz"
+SRC_URI[md5sum] = "f6b1d2a1e17a99cd3debaae6d04ab152"
+SRC_URI[sha256sum] = "654db464120c9534654590b6683c7fa3887b3dad0ca1c4cd412af24fbfca6d4f"
+
+UPSTREAM_CHECK_URI = "https://github.com/libproxy/libproxy/releases"
+UPSTREAM_CHECK_REGEX = "libproxy-(?P<pver>.*)\.tar"
+
+inherit cmake pkgconfig
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gnome', '', d)} gnome3"
+PACKAGECONFIG[gnome] = "-DWITH_GNOME=yes,-DWITH_GNOME=no,gconf"
+PACKAGECONFIG[gnome3] = "-DWITH_GNOME3=yes,-DWITH_GNOME3=no"
+
+EXTRA_OECMAKE += " \
+ -DWITH_KDE4=no \
+ -DWITH_MOZJS=no \
+ -DWITH_NM=no \
+ -DWITH_PERL=no \
+ -DWITH_PYTHON=no \
+ -DWITH_WEBKIT=no \
+ -DLIB_INSTALL_DIR=${libdir} \
+ -DLIBEXEC_INSTALL_DIR=${libexecdir} \
+"
+SECURITY_PIE_CFLAGS_remove = "-fPIE -pie"
+
+FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
diff --git a/poky/meta/recipes-support/libsoup/libsoup-2.4_2.60.3.bb b/poky/meta/recipes-support/libsoup/libsoup-2.4_2.60.3.bb
new file mode 100644
index 000000000..e2e7ff4aa
--- /dev/null
+++ b/poky/meta/recipes-support/libsoup/libsoup-2.4_2.60.3.bb
@@ -0,0 +1,35 @@
+SUMMARY = "An HTTP library implementation in C"
+HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome/libs"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native"
+
+SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
+
+SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "4cf8937d161d3dd71a65f1684e317824"
+SRC_URI[sha256sum] = "1b0dc762f23abe4e0d29b77370e539fd35f31d8e8e0318d6ddccff395be68a22"
+
+S = "${WORKDIR}/libsoup-${PV}"
+
+inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc
+
+# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
+PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
+
+EXTRA_OECONF = "--disable-vala"
+
+# When built without gnome support, libsoup-2.4 will contain only one shared lib
+# and will therefore become subject to renaming by debian.bbclass. Prevent
+# renaming in order to keep the package name consistent regardless of whether
+# gnome support is enabled or disabled.
+DEBIAN_NOAUTONAME_${PN} = "1"
+
+# glib-networking is needed for SSL, proxies, etc.
+RRECOMMENDS_${PN} = "glib-networking"
diff --git a/poky/meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch
new file mode 100644
index 000000000..2aeacb868
--- /dev/null
+++ b/poky/meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch
@@ -0,0 +1,30 @@
+From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Apr 2015 17:02:13 -0700
+Subject: [PATCH] Unset need_charset_alias when building for musl
+
+localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
+which actually shoudl be fixed in gnulib and then all downstream
+projects will get it eventually. For now we apply the fix to
+coreutils
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/gnulib.mk | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: libunistring-0.9.4/lib/Makefile.gnulib
+===================================================================
+--- libunistring-0.9.4.orig/lib/Makefile.gnulib
++++ libunistring-0.9.4/lib/Makefile.gnulib
+@@ -380,7 +380,7 @@ install-exec-localcharset: all-local
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
diff --git a/poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
new file mode 100644
index 000000000..9e8ce2270
--- /dev/null
+++ b/poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
@@ -0,0 +1,56 @@
+From 30562065ba9e4c238e76100b5f9f0c5add0e635b Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Tue, 5 Dec 2017 09:30:36 +0200
+Subject: [PATCH] remove the test to convert euc-jp
+
+Remove the test "Test against HP-UX 11.11 bug:
+No converter from EUC-JP to UTF-8 is provided"
+since we don't support HP-UX and if the euc-jp is not
+installed on the host, libunistring will be built without
+iconv support and will cause guild-native configure fail.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+---
+ gnulib-m4/iconv.m4 | 23 -----------------------
+ 1 file changed, 23 deletions(-)
+
+diff --git a/gnulib-m4/iconv.m4 b/gnulib-m4/iconv.m4
+index b33ecd0..73b6aa1 100644
+--- a/gnulib-m4/iconv.m4
++++ b/gnulib-m4/iconv.m4
+@@ -165,29 +165,6 @@ AC_DEFUN([AM_ICONV_LINK],
+ }
+ }
+ #endif
+- /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+- provided. */
+- {
+- /* Try standardized names. */
+- iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
+- /* Try IRIX, OSF/1 names. */
+- iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
+- /* Try AIX names. */
+- iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
+- /* Try HP-UX names. */
+- iconv_t cd4 = iconv_open ("utf8", "eucJP");
+- if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
+- && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
+- result |= 16;
+- if (cd1 != (iconv_t)(-1))
+- iconv_close (cd1);
+- if (cd2 != (iconv_t)(-1))
+- iconv_close (cd2);
+- if (cd3 != (iconv_t)(-1))
+- iconv_close (cd3);
+- if (cd4 != (iconv_t)(-1))
+- iconv_close (cd4);
+- }
+ return result;
+ ]])],
+ [am_cv_func_iconv_works=yes], ,
+--
+2.4.0
+
diff --git a/poky/meta/recipes-support/libunistring/libunistring_0.9.9.bb b/poky/meta/recipes-support/libunistring/libunistring_0.9.9.bb
new file mode 100644
index 000000000..ab7cba522
--- /dev/null
+++ b/poky/meta/recipes-support/libunistring/libunistring_0.9.9.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Library for manipulating C and Unicode strings"
+
+DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
+ consist of very different scripts from Latin letters to Chinese Hanzi\
+ with many kinds of special characters accents, right-to-left writing\
+ marks, hyphens, Roman numbers, and much more. But the POSIX platform\
+ APIs for text do not contain adequate functions for dealing with\
+ particular properties of many Unicode characters. In fact, the POSIX\
+ APIs for text have several assumptions at their base which don't hold\
+ for Unicode text. This library provides functions for manipulating\
+ Unicode strings and for manipulating C strings according to the Unicode\
+ standard. This package contains documentation."
+
+HOMEPAGE = "http://www.gnu.org/software/libunistring/"
+SECTION = "devel"
+LICENSE = "LGPLv3+ | GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://README;beginline=45;endline=65;md5=08287d16ba8d839faed8d2dc14d7d6a5 \
+ file://doc/libunistring.texi;md5=efb80a3799a60f95feaf80661d4f204c \
+ "
+
+SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
+ file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
+ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+"
+SRC_URI[md5sum] = "4f689e37e4c3bd67de5786aa51d98b13"
+SRC_URI[sha256sum] = "f5e90c08f9e5427ca3a2c0c53f19aa38b25c500913510ad25afef86448bea84a"
+
+inherit autotools texinfo
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libunwind/libunwind.inc b/poky/meta/recipes-support/libunwind/libunwind.inc
new file mode 100644
index 000000000..b9c532d3a
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind.inc
@@ -0,0 +1,23 @@
+SUMMARY = "Library for obtaining the call-chain of a program"
+DESCRIPTION = "a portable and efficient C programming interface (API) to determine the call-chain of a program"
+HOMEPAGE = "http://www.nongnu.org/libunwind"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=3;md5=3fced11d6df719b47505837a51c16ae5"
+DEPENDS += "libatomic-ops"
+
+inherit autotools multilib_header
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
+PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native"
+
+EXTRA_OECONF_arm = "--enable-debug-frame"
+EXTRA_OECONF_aarch64 = "--enable-debug-frame"
+
+SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared -lssp"
+
+do_install_append () {
+ oe_multilib_header libunwind.h
+}
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch b/poky/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch
new file mode 100644
index 000000000..8bcc252ba
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind/0001-Fix-build-on-mips-musl.patch
@@ -0,0 +1,81 @@
+From e623c7703945a5eb6c9a30586ec5e23b2f7396f6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 23 Mar 2016 06:08:59 +0000
+Subject: [PATCH] Fix build on mips/musl
+
+Do not include endian.h on musl it includes
+further headers which can not be compiled in __ASSEMBLER__
+ mode
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/coredump/_UCD_internal.h | 34 ++++++++++++++++++++++++++++++++++
+ src/mips/getcontext.S | 3 +--
+ 2 files changed, 35 insertions(+), 2 deletions(-)
+
+Index: git/src/coredump/_UCD_internal.h
+===================================================================
+--- git.orig/src/coredump/_UCD_internal.h
++++ git/src/coredump/_UCD_internal.h
+@@ -44,6 +44,41 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
+
+ #include "libunwind_i.h"
+
++#ifndef __GLIBC__
++#include <sys/reg.h>
++
++#define EF_REG0 6
++#define EF_REG1 7
++#define EF_REG2 8
++#define EF_REG3 9
++#define EF_REG4 10
++#define EF_REG5 11
++#define EF_REG6 12
++#define EF_REG7 13
++#define EF_REG8 14
++#define EF_REG9 15
++#define EF_REG10 16
++#define EF_REG11 17
++#define EF_REG12 18
++#define EF_REG13 19
++#define EF_REG14 20
++#define EF_REG15 21
++#define EF_REG16 22
++#define EF_REG17 23
++#define EF_REG18 24
++#define EF_REG19 25
++#define EF_REG20 26
++#define EF_REG21 27
++#define EF_REG22 28
++#define EF_REG23 29
++#define EF_REG24 30
++#define EF_REG25 31
++#define EF_REG28 34
++#define EF_REG29 35
++#define EF_REG30 36
++#define EF_REG31 37
++#endif
++
+
+ #if SIZEOF_OFF_T == 4
+ typedef uint32_t uoff_t;
+Index: git/src/mips/getcontext.S
+===================================================================
+--- git.orig/src/mips/getcontext.S
++++ git/src/mips/getcontext.S
+@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
+ #include "offsets.h"
+-#include <endian.h>
+
+ .text
+
+ #if _MIPS_SIM == _ABIO32
+-# if __BYTE_ORDER == __BIG_ENDIAN
++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ # define OFFSET 4
+ # else
+ # define OFFSET 0
diff --git a/poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch b/poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch
new file mode 100644
index 000000000..673a5bb99
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind/0001-add-knobs-to-disable-enable-tests.patch
@@ -0,0 +1,69 @@
+From 459e471fcc33d300f7bbcdaf3e0dc338d9dc15b9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Apr 2016 16:56:34 +0000
+Subject: [PATCH] add knobs to disable/enable tests
+
+Some tests do not compile on musl libc
+in general its good to have such a knob
+since not all builds may want to enable
+tests
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am | 6 +++++-
+ configure.ac | 12 ++++++++++--
+ 2 files changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 6a3ed9e..0c29b3e 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -42,7 +42,11 @@ endif
+
+ nodist_include_HEADERS = include/libunwind-common.h
+
+-SUBDIRS = src tests
++SUBDIRS = src
++
++if CONFIG_TESTS
++SUBDIRS += tests
++endif
+
+ if CONFIG_DOCS
+ SUBDIRS += doc
+diff --git a/configure.ac b/configure.ac
+index 85d78f8..d362387 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -129,6 +129,10 @@ AC_ARG_ENABLE(documentation,
+ AS_HELP_STRING([--disable-documentation],[Disable generating the man pages]),,
+ [enable_documentation=yes])
+
++AC_ARG_ENABLE(tests,
++ AS_HELP_STRING([--disable-tests],[Disable building tests]),,
++ [enable_tests=yes])
++
+ AC_MSG_CHECKING([if we should build libunwind-setjmp])
+ AC_MSG_RESULT([$enable_setjmp])
+
+@@ -395,9 +399,13 @@ AM_CONDITIONAL([CONFIG_DOCS], [test x$enable_documentation = xyes])
+ if test "x$enable_documentation" = "xyes"; then
+ AC_CONFIG_FILES(doc/Makefile doc/common.tex)
+ fi
++AM_CONDITIONAL([CONFIG_TESTS], [test x$enable_tests = xyes])
++if test "x$enable_tests" = "xyes"; then
++ AC_CONFIG_FILES(tests/Makefile tests/check-namespace.sh)
++fi
++
+
+-AC_CONFIG_FILES(Makefile src/Makefile tests/Makefile tests/check-namespace.sh
+- include/libunwind-common.h
++AC_CONFIG_FILES(Makefile src/Makefile include/libunwind-common.h
+ include/libunwind.h include/tdep/libunwind_i.h)
+ AC_CONFIG_FILES(src/unwind/libunwind.pc src/coredump/libunwind-coredump.pc
+ src/ptrace/libunwind-ptrace.pc src/setjmp/libunwind-setjmp.pc
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch b/poky/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
new file mode 100644
index 000000000..9aed419a1
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
@@ -0,0 +1,45 @@
+From 04437142399662b576bd55a85485c6dcc14d0812 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 06:44:07 +0000
+Subject: [PATCH] backtrace: Use only with glibc and uclibc
+
+backtrace API is glibc specific not linux specific
+so make it behave so.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ tests/test-coredump-unwind.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
+index 5254708..8767b42 100644
+--- a/tests/test-coredump-unwind.c
++++ b/tests/test-coredump-unwind.c
+@@ -57,7 +57,9 @@
+ #include <grp.h>
+
+ /* For SIGSEGV handler code */
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #include <sys/ucontext.h>
+
+ #include <libunwind-coredump.h>
+@@ -238,11 +240,11 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
+ ip);
+
+ {
++#ifdef __GLIBC__
+ /* glibc extension */
+ void *array[50];
+ int size;
+ size = backtrace(array, 50);
+-#ifdef __linux__
+ backtrace_symbols_fd(array, size, 2);
+ #endif
+ }
+--
+2.6.4
+
diff --git a/poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch b/poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
new file mode 100644
index 000000000..ca0641f5a
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind/0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch
@@ -0,0 +1,248 @@
+From e0eea53c77fce8537c58a072b684043507987bcc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Jul 2016 01:07:53 +0000
+Subject: [PATCH] ppc32: Consider ucontext mismatches between glibc and musl
+
+This helps in porting libunwind onto musl based systems
+ptrace.h change is required again an error that surfaces
+with musl
+
+/mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/asm/ptrace.h:31:8: error: redefinition of 'struct pt_regs'
+ struct pt_regs {
+ ^~~~~~~
+In file included from /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/sys/user.h:11:0,
+ from /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/sys/procfs.h:9,
+ from ../../git/src/ptrace/_UPT_internal.h:40,
+ from ../../git/src/ptrace/_UPT_reg_offset.c:27:
+/mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemuppc/usr/include/bits/user.h:1:8: note: originally defined here
+ struct pt_regs {
+ ^~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/ppc32/Ginit.c | 6 +-
+ src/ppc32/ucontext_i.h | 158 ++++++++++++++++++++++---------------------
+ src/ptrace/_UPT_reg_offset.c | 7 ++
+ 3 files changed, 92 insertions(+), 79 deletions(-)
+
+diff --git a/src/ppc32/Ginit.c b/src/ppc32/Ginit.c
+index f2e6e82..617aaa1 100644
+--- a/src/ppc32/Ginit.c
++++ b/src/ppc32/Ginit.c
+@@ -48,12 +48,12 @@ uc_addr (ucontext_t *uc, int reg)
+ void *addr;
+
+ if ((unsigned) (reg - UNW_PPC32_R0) < 32)
+- addr = &uc->uc_mcontext.uc_regs->gregs[reg - UNW_PPC32_R0];
++ addr = &uc->GET_UC_REGS->gregs[reg - UNW_PPC32_R0];
+
+ else
+ if ( ((unsigned) (reg - UNW_PPC32_F0) < 32) &&
+ ((unsigned) (reg - UNW_PPC32_F0) >= 0) )
+- addr = &uc->uc_mcontext.uc_regs->fpregs.fpregs[reg - UNW_PPC32_F0];
++ addr = &uc->GET_UC_REGS->fpregs.fpregs[reg - UNW_PPC32_F0];
+
+ else
+ {
+@@ -76,7 +76,7 @@ uc_addr (ucontext_t *uc, int reg)
+ default:
+ return NULL;
+ }
+- addr = &uc->uc_mcontext.uc_regs->gregs[gregs_idx];
++ addr = &uc->GET_UC_REGS->gregs[gregs_idx];
+ }
+ return addr;
+ }
+diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h
+index c6ba806..b79f15c 100644
+--- a/src/ppc32/ucontext_i.h
++++ b/src/ppc32/ucontext_i.h
+@@ -46,83 +46,89 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+ various structure members. */
+ static ucontext_t dmy_ctxt UNUSED;
+
+-#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[0] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[1] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[2] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[3] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[4] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[5] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[6] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[7] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[8] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[9] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[10] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[11] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[12] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[13] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[14] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[15] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[16] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[17] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[18] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[19] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[20] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[21] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[22] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[23] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[24] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[25] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[26] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[27] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[28] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[29] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[30] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[31] - (void *)&dmy_ctxt)
++#ifdef __GLIBC__
++#define GET_UC_REGS uc_mcontext.uc_regs
++#else
++#define GET_UC_REGS uc_regs
++#endif
++
++#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[0] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[1] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[2] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[3] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[4] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[5] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[6] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[7] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[8] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[9] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[10] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[11] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[12] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[13] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[14] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[15] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[16] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[17] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[18] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[19] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[20] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[21] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[22] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[23] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[24] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[25] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[26] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[27] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[28] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[29] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[30] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[31] - (void *)&dmy_ctxt)
+
+-#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[MSR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CTR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[LINK_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[XER_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CCR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[SOFTE_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[TRAP_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DAR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DSISR_IDX] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[RESULT_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[MSR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.GET_UC_REGS->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[CTR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.GET_UC_REGS->gregs[LINK_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.GET_UC_REGS->gregs[XER_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[CCR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.GET_UC_REGS->gregs[SOFTE_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.GET_UC_REGS->gregs[TRAP_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[DAR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.GET_UC_REGS->gregs[DSISR_IDX] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.GET_UC_REGS->gregs[RESULT_IDX] - (void *)&dmy_ctxt)
+
+-#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[0] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[1] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[2] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[3] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[4] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[5] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[6] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[7] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[8] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[9] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[10] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[11] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[12] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[13] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[14] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[15] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[16] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[17] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[18] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[19] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[20] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[21] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[22] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[23] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[24] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[25] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[26] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[27] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[28] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[29] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[30] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[31] - (void *)&dmy_ctxt)
+-#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[32] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[0] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[1] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[2] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[3] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[4] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[5] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[6] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[7] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[8] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[9] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[10] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[11] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[12] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[13] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[14] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[15] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[16] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[17] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[18] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[19] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[20] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[21] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[22] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[23] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[24] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[25] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[26] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[27] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[28] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[29] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[30] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[31] - (void *)&dmy_ctxt)
++#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.GET_UC_REGS->fpregs.fpregs[32] - (void *)&dmy_ctxt)
+
+ #endif
+diff --git a/src/ptrace/_UPT_reg_offset.c b/src/ptrace/_UPT_reg_offset.c
+index 68461a2..fcc43f7 100644
+--- a/src/ptrace/_UPT_reg_offset.c
++++ b/src/ptrace/_UPT_reg_offset.c
+@@ -27,6 +27,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+ #include "_UPT_internal.h"
+
+ #include <stddef.h>
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++#endif
++#include <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++#endif
+
+ #ifdef HAVE_ASM_PTRACE_OFFSETS_H
+ # include <asm/ptrace_offsets.h>
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch b/poky/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch
new file mode 100644
index 000000000..371013aaa
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind/0001-x86-Stub-out-x86_local_resume.patch
@@ -0,0 +1,54 @@
+From f5df01655a4b76d4fe415747de581d94ac593e6a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Mar 2016 16:19:29 +0000
+Subject: [PATCH] x86: Stub out x86_local_resume()
+
+its purpose seems
+to be unwinding across signal handler boundaries, which cannot happen
+in correct programs anyway. Replacing the whole function with
+something like *(volatile char *)0=0; (i.e. crash), gets a working
+libunwind
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/x86/Gos-linux.c | 22 +---------------------
+ 1 file changed, 1 insertion(+), 21 deletions(-)
+
+diff --git a/src/x86/Gos-linux.c b/src/x86/Gos-linux.c
+index 31f83ba..3aaa34e 100644
+--- a/src/x86/Gos-linux.c
++++ b/src/x86/Gos-linux.c
+@@ -281,27 +281,7 @@ x86_r_uc_addr (ucontext_t *uc, int reg)
+ HIDDEN int
+ x86_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
+ {
+- struct cursor *c = (struct cursor *) cursor;
+- ucontext_t *uc = c->uc;
+-
+- /* Ensure c->pi is up-to-date. On x86, it's relatively common to be
+- missing DWARF unwind info. We don't want to fail in that case,
+- because the frame-chain still would let us do a backtrace at
+- least. */
+- dwarf_make_proc_info (&c->dwarf);
+-
+- if (unlikely (c->sigcontext_format != X86_SCF_NONE))
+- {
+- struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
+-
+- Debug (8, "resuming at ip=%x via sigreturn(%p)\n", c->dwarf.ip, sc);
+- sigreturn (sc);
+- }
+- else
+- {
+- Debug (8, "resuming at ip=%x via setcontext()\n", c->dwarf.ip);
+- setcontext (uc);
+- }
++ *(volatile char *)0=0;
+ return -UNW_EINVAL;
+ }
+ #endif
+--
+1.8.3.1
+
diff --git a/poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch b/poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
new file mode 100644
index 000000000..c8faca472
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
@@ -0,0 +1,59 @@
+From 24484e80b3e329c9edee1995e102f8612eedb79c Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Tue, 13 May 2014 23:32:27 +0200
+Subject: [PATCH] Add AO_REQUIRE_CAS to fix build on ARM < v6
+
+ARM earlier than ARMv6, such as ARMv4 and ARMv5 do not provide
+optimize atomic operations in libatomic_ops. Since libunwind is using
+such operations, it should define AO_REQUIRE_CAS before including
+<atomic_ops.h> so that libatomic_ops knows it should use emulated
+atomic operations instead (even though they are obviously a lot more
+expensive).
+
+Also, while real atomic operations are all inline functions and
+therefore linking against libatomic_ops was not required, the emulated
+atomic operations actually require linking against libatomic_ops, so
+the commented AC_CHECK_LIB test in acinclude.m4 is uncommented to make
+sure we link against libatomic_ops.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Upstream-Status: Pending
+Taken from:
+https://raw.githubusercontent.com/rdnetto/teapot-buildroot/master/package/libunwind/libunwind-02-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
+
+---
+ acinclude.m4 | 8 +-------
+ include/libunwind_i.h | 1 +
+ 2 files changed, 2 insertions(+), 7 deletions(-)
+
+Index: libunwind-1.2.1/acinclude.m4
+===================================================================
+--- libunwind-1.2.1.orig/acinclude.m4
++++ libunwind-1.2.1/acinclude.m4
+@@ -22,11 +22,5 @@ fi])
+ AC_DEFUN([CHECK_ATOMIC_OPS],
+ [dnl Check whether the system has the atomic_ops package installed.
+ AC_CHECK_HEADERS(atomic_ops.h)
+-#
+-# Don't link against libatomic_ops for now. We don't want libunwind
+-# to depend on libatomic_ops.so. Fortunately, none of the platforms
+-# we care about so far need libatomic_ops.a (everything is done via
+-# inline macros).
+-#
+-# AC_CHECK_LIB(atomic_ops, main)
++ AC_CHECK_LIB(atomic_ops, main)
+ ])
+Index: libunwind-1.2.1/include/libunwind_i.h
+===================================================================
+--- libunwind-1.2.1.orig/include/libunwind_i.h
++++ libunwind-1.2.1/include/libunwind_i.h
+@@ -116,6 +116,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
+ (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0)
+
+ #ifdef HAVE_ATOMIC_OPS_H
++# define AO_REQUIRE_CAS
+ # include <atomic_ops.h>
+ static inline int
+ cmpxchg_ptr (void *addr, void *old, void *new)
diff --git a/poky/meta/recipes-support/libunwind/libunwind/libunwind-1.1-x32.patch b/poky/meta/recipes-support/libunwind/libunwind/libunwind-1.1-x32.patch
new file mode 100644
index 000000000..32516464c
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind/libunwind-1.1-x32.patch
@@ -0,0 +1,31 @@
+From 506bd37bd580d7382d7c58257dac4b1e502a887c Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 09:50:34 -0700
+Subject: [PATCH] Fix for X32
+
+Apply patch to fix the X32 build from https://github.com/sjnewbury/x32.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ src/x86_64/Gos-linux.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/x86_64/Gos-linux.c b/src/x86_64/Gos-linux.c
+index 9e1acfc..8169d5a 100644
+--- a/src/x86_64/Gos-linux.c
++++ b/src/x86_64/Gos-linux.c
+@@ -143,8 +143,8 @@ x86_64_sigreturn (unw_cursor_t *cursor)
+
+ Debug (8, "resuming at ip=%llx via sigreturn(%p)\n",
+ (unsigned long long) c->dwarf.ip, sc);
+- __asm__ __volatile__ ("mov %0, %%rsp;"
+- "mov %1, %%rax;"
++ __asm__ __volatile__ ("mov %q0, %%rsp;"
++ "mov %q1, %%rax;"
+ "syscall"
+ :: "r"(sc), "i"(SYS_rt_sigreturn)
+ : "memory");
+--
+2.8.0
+
diff --git a/poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch b/poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch
new file mode 100644
index 000000000..79f63fd84
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind/musl-header-conflict.patch
@@ -0,0 +1,37 @@
+If you:
+
+TCLIBC=musl bitbake unwind
+TCLIBC=musl bitbake gcc-runtime -c cleansstate
+TCLIBC=musl bitbake gcc-runtime
+
+you will see libstdc++ fail to build due to finding libunwind's header file.
+
+Khem: "When we build any of gcc components they expect to use internal version
+and that works with glibc based gcc since the search headers first look into gcc
+headers, however with musl the gcc headers are searched after the standard
+headers ( which is by design the right thing )."
+
+This patch hacks around the issue by looking for a define used during gcc-runtime's
+build and skipping to the internal header in that case.
+
+[YOCTO #10129]
+
+RP 2016/8/18
+
+Upstream-Status: Inappropriate [really need to fix gcc]
+
+Index: git/include/unwind.h
+===================================================================
+--- git.orig/include/unwind.h
++++ git/include/unwind.h
+@@ -23,6 +23,10 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER L
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+
++#ifdef _GLIBCXX_SHARED
++#include_next <unwind.h>
++#endif
++
+ #ifndef _UNWIND_H
+ #define _UNWIND_H
+
diff --git a/poky/meta/recipes-support/libunwind/libunwind_1.2.1.bb b/poky/meta/recipes-support/libunwind/libunwind_1.2.1.bb
new file mode 100644
index 000000000..37a762486
--- /dev/null
+++ b/poky/meta/recipes-support/libunwind/libunwind_1.2.1.bb
@@ -0,0 +1,23 @@
+require libunwind.inc
+
+SRC_URI[md5sum] = "06ba9e60d92fd6f55cd9dadb084df19e"
+SRC_URI[sha256sum] = "3f3ecb90e28cbe53fba7a4a27ccce7aad188d3210bb1964a923a731a27a75acb"
+
+SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
+ file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
+ file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
+ file://0001-x86-Stub-out-x86_local_resume.patch \
+ file://0001-Fix-build-on-mips-musl.patch \
+ file://0001-add-knobs-to-disable-enable-tests.patch \
+ file://0001-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch \
+ file://libunwind-1.1-x32.patch \
+ "
+
+SRC_URI_append_libc-musl = " file://musl-header-conflict.patch"
+EXTRA_OECONF_append_libc-musl = " --disable-documentation --disable-tests "
+
+# http://errors.yoctoproject.org/Errors/Details/20487/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
diff --git a/poky/meta/recipes-support/liburcu/liburcu_0.10.1.bb b/poky/meta/recipes-support/liburcu/liburcu_0.10.1.bb
new file mode 100644
index 000000000..459c04a7a
--- /dev/null
+++ b/poky/meta/recipes-support/liburcu/liburcu_0.10.1.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Userspace RCU (read-copy-update) library"
+HOMEPAGE = "http://lttng.org/urcu"
+BUGTRACKER = "http://lttng.org/project/issues"
+
+LICENSE = "LGPLv2.1+ & MIT-style"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
+ file://src/urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
+ file://include/urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
+
+SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
+ "
+
+SRC_URI[md5sum] = "281a2f92fdc39c40ad6b76f6631fdbd7"
+SRC_URI[sha256sum] = "9c09220be4435dc27fcd22d291707b94b97f159e0c442fbcd60c168f8f79eb06"
+
+S = "${WORKDIR}/userspace-rcu-${PV}"
+inherit autotools
+
+CPPFLAGS_append_riscv64 = " -pthread -D_REENTRANT"
diff --git a/poky/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch b/poky/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch
new file mode 100644
index 000000000..b88440dec
--- /dev/null
+++ b/poky/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch
@@ -0,0 +1,30 @@
+From 340f911f9e3f4ff6b01682c5341c959060782af2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Apr 2015 19:18:45 -0700
+Subject: [PATCH] usb.h: Include sys/types.h
+
+We need the definitions for things like u_intX_t
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libusb/usb.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libusb/usb.h b/libusb/usb.h
+index 84e730f..caffae2 100644
+--- a/libusb/usb.h
++++ b/libusb/usb.h
+@@ -31,6 +31,8 @@
+
+ #include <dirent.h>
+
++#include <sys/types.h>
++
+ /*
+ * USB spec information
+ *
+--
+2.1.4
+
diff --git a/poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb b/poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
new file mode 100644
index 000000000..1ddbe238f
--- /dev/null
+++ b/poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
@@ -0,0 +1,42 @@
+SUMMARY = "libusb-0.1 compatibility layer for libusb1"
+DESCRIPTION = "libusb-0.1 compatible layer for libusb1, a drop-in replacement \
+that aims to look, feel and behave exactly like libusb-0.1"
+HOMEPAGE = "http://www.libusb.org/"
+BUGTRACKER = "http://www.libusb.org/report"
+SECTION = "libs"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f2ac5f3ac4835e8f91324a26a590a423"
+DEPENDS = "libusb1"
+
+# Few packages are known not to work with libusb-compat (e.g. libmtp-1.0.0),
+# so here libusb-0.1 is removed completely instead of adding virtual/libusb0.
+# Besides, libusb-0.1 uses a per 1ms polling that hurts a lot to power
+# consumption.
+PROVIDES = "libusb virtual/libusb0"
+BBCLASSEXTEND = "native nativesdk"
+
+PE = "1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-compat-${PV}.tar.bz2 \
+ file://0001-usb.h-Include-sys-types.h.patch \
+ "
+
+SRC_URI[md5sum] = "2780b6a758a1e2c2943bdbf7faf740e4"
+SRC_URI[sha256sum] = "404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/"
+UPSTREAM_CHECK_REGEX = "/libusb-compat-(?P<pver>(\d+[\.\-_]*)+)/$"
+
+BINCONFIG = "${bindir}/libusb-config"
+
+inherit autotools pkgconfig binconfig-disabled lib_package
+
+EXTRA_OECONF = "--libdir=${base_libdir}"
+
+do_install_append() {
+ install -d ${D}${libdir}
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
+ fi
+}
diff --git a/poky/meta/recipes-support/libusb/libusb1/no-dll.patch b/poky/meta/recipes-support/libusb/libusb1/no-dll.patch
new file mode 100644
index 000000000..6e6bb83d1
--- /dev/null
+++ b/poky/meta/recipes-support/libusb/libusb1/no-dll.patch
@@ -0,0 +1,19 @@
+As all invokes all-recursive which uses sub-makes to invoke all-am, the
+resulting makefile wants to build libusb-1.0.la twice. In non-parallel builds
+the second attempt is skipped as the target already exists, but in highly
+parallel builds it's likely that two makes will be building libusb-1.0.la at the
+same time.
+
+Solve this by removing the explicit all target, which as libusb-1.0.dll isn't
+built under Linux is redundant anyway.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/libusb/Makefile.am b/libusb/Makefile.am
+index 0cab0a0..c880213 100644
+--- a/libusb/Makefile.am
++++ b/libusb/Makefile.am
+@@ -1,2 +0,0 @@
+-all: libusb-1.0.la libusb-1.0.dll
+-
diff --git a/poky/meta/recipes-support/libusb/libusb1_1.0.21.bb b/poky/meta/recipes-support/libusb/libusb1_1.0.21.bb
new file mode 100644
index 000000000..1fefd1475
--- /dev/null
+++ b/poky/meta/recipes-support/libusb/libusb1_1.0.21.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Userspace library to access USB (version 1.0)"
+HOMEPAGE = "http://libusb.sf.net"
+BUGTRACKER = "http://www.libusb.org/report"
+SECTION = "libs"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \
+ file://no-dll.patch \
+ "
+
+SRC_URI[md5sum] = "1da9ea3c27b3858fa85c5f4466003e44"
+SRC_URI[sha256sum] = "7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b"
+
+S = "${WORKDIR}/libusb-${PV}"
+
+inherit autotools pkgconfig
+
+# Don't configure udev by default since it will cause a circular
+# dependecy with udev package, which depends on libusb
+EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev"
+
+do_install_append() {
+ install -d ${D}${libdir}
+ if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+ mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
+ fi
+}
+
+FILES_${PN} += "${base_libdir}/*.so.*"
+
+FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la"
diff --git a/poky/meta/recipes-support/libxslt/libxslt_1.1.32.bb b/poky/meta/recipes-support/libxslt/libxslt_1.1.32.bb
new file mode 100644
index 000000000..6a03f7769
--- /dev/null
+++ b/poky/meta/recipes-support/libxslt/libxslt_1.1.32.bb
@@ -0,0 +1,46 @@
+SUMMARY = "GNOME XSLT library"
+HOMEPAGE = "http://xmlsoft.org/XSLT/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://Copyright;md5=0cd9a07afbeb24026c9b03aecfeba458"
+
+SECTION = "libs"
+DEPENDS = "libxml2"
+
+SRC_URI = "http://xmlsoft.org/sources/libxslt-${PV}.tar.gz"
+SRC_URI[md5sum] = "1fc72f98e98bf4443f1651165f3aa146"
+SRC_URI[sha256sum] = "526ecd0abaf4a7789041622c3950c0e7f2c4c8835471515fd77eec684a355460"
+
+UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
+
+S = "${WORKDIR}/libxslt-${PV}"
+
+BINCONFIG = "${bindir}/xslt-config"
+
+inherit autotools pkgconfig binconfig-disabled lib_package
+
+# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
+do_configure_prepend () {
+ sed -i -e 's/ansidecl.h//' ${S}/configure.ac
+
+ # The timestamps in the 1.1.28 tarball are messed up causing this file to
+ # appear out of date. Touch it so that we don't try to regenerate it.
+ touch ${S}/doc/xsltproc.1
+}
+
+EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
+# older versions of this recipe had ${PN}-utils
+RPROVIDES_${PN}-bin += "${PN}-utils"
+RCONFLICTS_${PN}-bin += "${PN}-utils"
+RREPLACES_${PN}-bin += "${PN}-utils"
+
+
+do_install_append_class-native () {
+ create_wrapper ${D}/${bindir}/xsltproc XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
+}
+
+FILES_${PN} += "${libdir}/libxslt-plugins"
+FILES_${PN}-dev += "${libdir}/xsltConf.sh"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/libyaml/libyaml_0.1.7.bb b/poky/meta/recipes-support/libyaml/libyaml_0.1.7.bb
new file mode 100644
index 000000000..b167f031a
--- /dev/null
+++ b/poky/meta/recipes-support/libyaml/libyaml_0.1.7.bb
@@ -0,0 +1,20 @@
+SUMMARY = "LibYAML is a YAML 1.1 parser and emitter written in C."
+DESCRIPTION = "LibYAML is a C library for parsing and emitting data in YAML 1.1, \
+a human-readable data serialization format. "
+HOMEPAGE = "http://pyyaml.org/wiki/LibYAML"
+SECTION = "libs/devel"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=6015f088759b10e0bc2bf64898d4ae17"
+
+SRC_URI = "http://pyyaml.org/download/libyaml/yaml-${PV}.tar.gz \
+ "
+
+SRC_URI[md5sum] = "1abf45bd3a96374fa55ca63b32f9f2f9"
+SRC_URI[sha256sum] = "8088e457264a98ba451a90b8661fcb4f9d6f478f7265d48322a196cec2480729"
+
+S = "${WORKDIR}/yaml-${PV}"
+
+inherit autotools
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/lz4/files/0001-tests-Makefile-don-t-use-LIBDIR-as-variable.patch b/poky/meta/recipes-support/lz4/files/0001-tests-Makefile-don-t-use-LIBDIR-as-variable.patch
new file mode 100644
index 000000000..00494e801
--- /dev/null
+++ b/poky/meta/recipes-support/lz4/files/0001-tests-Makefile-don-t-use-LIBDIR-as-variable.patch
@@ -0,0 +1,82 @@
+From d4768d9e29b805096a86aa13c0d30ee8215af4df Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Mon, 26 Jun 2017 12:07:09 +0300
+Subject: [PATCH] tests/Makefile: don't use LIBDIR as variable
+
+LIBDIR may be overriden with a environment variable: In this case make
+clean breaks. Use another variable name.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Backport
+---
+ tests/Makefile | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/tests/Makefile b/tests/Makefile
+index 97fa782..51dd038 100644
+--- a/tests/Makefile
++++ b/tests/Makefile
+@@ -32,7 +32,7 @@ DESTDIR ?=
+ PREFIX ?= /usr/local
+ BINDIR := $(PREFIX)/bin
+ MANDIR := $(PREFIX)/share/man/man1
+-LIBDIR := ../lib
++LZ4DIR := ../lib
+ PRGDIR := ../programs
+ VOID := /dev/null
+ TESTDIR := versionsTest
+@@ -43,7 +43,7 @@ CFLAGS += -g -Wall -Wextra -Wundef -Wcast-qual -Wcast-align -Wshadow -Wswitch-e
+ -Wdeclaration-after-statement -Wstrict-prototypes \
+ -Wpointer-arith -Wstrict-aliasing=1
+ CFLAGS += $(MOREFLAGS)
+-CPPFLAGS:= -I$(LIBDIR) -I$(PRGDIR) -DXXH_NAMESPACE=LZ4_
++CPPFLAGS:= -I$(LZ4DIR) -I$(PRGDIR) -DXXH_NAMESPACE=LZ4_
+ FLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+
+
+@@ -79,31 +79,31 @@ lz4c32: # create a 32-bits version for 32/64 interop tests
+ $(MAKE) -C $(PRGDIR) clean $@ CFLAGS="-m32 $(CFLAGS)"
+ cp $(LZ4) $(LZ4)c32
+
+-fullbench : $(LIBDIR)/lz4.o $(LIBDIR)/lz4hc.o $(LIBDIR)/lz4frame.o $(LIBDIR)/xxhash.o fullbench.c
++fullbench : $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/lz4frame.o $(LZ4DIR)/xxhash.o fullbench.c
+ $(CC) $(FLAGS) $^ -o $@$(EXT)
+
+-fullbench-lib: fullbench.c $(LIBDIR)/xxhash.c
+- $(MAKE) -C $(LIBDIR) liblz4.a
+- $(CC) $(FLAGS) $^ -o $@$(EXT) $(LIBDIR)/liblz4.a
++fullbench-lib: fullbench.c $(LZ4DIR)/xxhash.c
++ $(MAKE) -C $(LZ4DIR) liblz4.a
++ $(CC) $(FLAGS) $^ -o $@$(EXT) $(LZ4DIR)/liblz4.a
+
+-fullbench-dll: fullbench.c $(LIBDIR)/xxhash.c
+- $(MAKE) -C $(LIBDIR) liblz4
+- $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(LIBDIR)/dll/liblz4.dll
++fullbench-dll: fullbench.c $(LZ4DIR)/xxhash.c
++ $(MAKE) -C $(LZ4DIR) liblz4
++ $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(LZ4DIR)/dll/liblz4.dll
+
+-fuzzer : $(LIBDIR)/lz4.o $(LIBDIR)/lz4hc.o $(LIBDIR)/xxhash.o fuzzer.c
++fuzzer : $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/xxhash.o fuzzer.c
+ $(CC) $(FLAGS) $^ -o $@$(EXT)
+
+-frametest: $(LIBDIR)/lz4frame.o $(LIBDIR)/lz4.o $(LIBDIR)/lz4hc.o $(LIBDIR)/xxhash.o frametest.c
++frametest: $(LZ4DIR)/lz4frame.o $(LZ4DIR)/lz4.o $(LZ4DIR)/lz4hc.o $(LZ4DIR)/xxhash.o frametest.c
+ $(CC) $(FLAGS) $^ -o $@$(EXT)
+
+-fasttest: $(LIBDIR)/lz4.o fasttest.c
++fasttest: $(LZ4DIR)/lz4.o fasttest.c
+ $(CC) $(FLAGS) $^ -o $@$(EXT)
+
+ datagen : $(PRGDIR)/datagen.c datagencli.c
+ $(CC) $(FLAGS) -I$(PRGDIR) $^ -o $@$(EXT)
+
+ clean:
+- @$(MAKE) -C $(LIBDIR) $@ > $(VOID)
++ @$(MAKE) -C $(LZ4DIR) $@ > $(VOID)
+ @$(MAKE) -C $(PRGDIR) $@ > $(VOID)
+ @$(RM) core *.o *.test tmp* \
+ fullbench-dll$(EXT) fullbench-lib$(EXT) \
+--
+2.1.4
+
diff --git a/poky/meta/recipes-support/lz4/files/run-ptest b/poky/meta/recipes-support/lz4/files/run-ptest
new file mode 100644
index 000000000..d3bfc49f1
--- /dev/null
+++ b/poky/meta/recipes-support/lz4/files/run-ptest
@@ -0,0 +1,43 @@
+#!/bin/sh
+cd testsuite
+
+echo -n "---- test-lz4 ----"
+make -C tests test-lz4 > /dev/null 2>&1
+
+if [ $? -eq 0 ]; then
+ echo "PASS"
+else
+ echo "FAIL"
+fi
+
+echo -n "---- test-fasttest ----"
+make -C tests test-fasttest > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+ echo "PASS"
+else
+ echo "FAIL"
+fi
+
+echo -n "---- test-frametest ----"
+make -C tests test-frametest > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+ echo "PASS"
+else
+ echo "FAIL"
+fi
+
+echo -n "---- test-fullbench ----"
+make -C tests test-fullbench > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+ echo "PASS"
+else
+ echo "FAIL"
+fi
+
+echo -n "---- test-fuzzer ----"
+make -C tests test-fuzzer > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+ echo "PASS"
+else
+ echo "FAIL"
+fi
diff --git a/poky/meta/recipes-support/lz4/lz4_1.7.4.bb b/poky/meta/recipes-support/lz4/lz4_1.7.4.bb
new file mode 100644
index 000000000..86a1ab9ab
--- /dev/null
+++ b/poky/meta/recipes-support/lz4/lz4_1.7.4.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Extremely Fast Compression algorithm"
+DESCRIPTION = "LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems."
+
+LICENSE = "BSD | BSD-2-Clause | GPL-2.0"
+LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=ebc2ea4814a64de7708f1571904b32cc\
+ file://programs/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://LICENSE;md5=7f2857d58beff6d04137bf9b09e5ffb6"
+
+PE = "1"
+
+SRCREV = "7bb64ff2b69a9f8367de9ab483cdadf42b4c1b65"
+
+SRC_URI = "git://github.com/lz4/lz4.git \
+ file://0001-tests-Makefile-don-t-use-LIBDIR-as-variable.patch \
+ file://run-ptest \
+"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}"
+
+do_install() {
+ oe_runmake install
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch b/poky/meta/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
new file mode 100644
index 000000000..5235a15dc
--- /dev/null
+++ b/poky/meta/recipes-support/lzo/lzo/0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch
@@ -0,0 +1,27 @@
+From e730bfd7c2d3a4b5f3605878599cb9b20d31b1fd Mon Sep 17 00:00:00 2001
+From: Fan Xin <fan.xin@jp.fujitsu.com>
+Date: Fri, 2 Jun 2017 11:52:25 +0900
+Subject: [PATCH] Add pkgconfigdir to solve the undefine error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index e4d383b..c75023d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -14,6 +14,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)
+ LDADD = src/liblzo2.la
+ lib_LTLIBRARIES =
+ noinst_PROGRAMS =
++pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = lzo2.pc
+
+
+--
+1.9.1
+
diff --git a/poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch b/poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
new file mode 100644
index 000000000..db3a70e80
--- /dev/null
+++ b/poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
@@ -0,0 +1,70 @@
+From: Simon McVittie <smcv@debian.org>
+Date: Sun, 23 Nov 2014 22:50:33 +0000
+Subject: Use memcpy() instead of reinventing it
+
+gcc inlines memcpy() with results as fast as handwritten code (at
+least in my brief testing with lzop), and knows the alignment
+constraints for our architectures.
+
+Change suggested by Julian Taylor.
+
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757037
+
+Upstream-Status: Pending
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ minilzo/minilzo.c | 14 ++++++++++++++
+ src/lzo_func.h | 14 ++++++++++++++
+ 2 files changed, 28 insertions(+)
+
+
+diff --git a/minilzo/minilzo.c b/minilzo/minilzo.c
+index ab2be5f..6913c2f 100644
+--- a/minilzo/minilzo.c
++++ b/minilzo/minilzo.c
+@@ -3523,6 +3523,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
+ if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
+ LZO_BLOCK_END
+
++/* Debian-specific change: we know that our compiler inlines memcpy() with
++ * constant n to be as fast as handwritten code, and knows which architectures
++ * need things correctly aligned. */
++#undef LZO_MEMOPS_COPY1
++#undef LZO_MEMOPS_COPY2
++#undef LZO_MEMOPS_COPY4
++#undef LZO_MEMOPS_COPY8
++#undef LZO_MEMOPS_COPYN
++#define LZO_MEMOPS_COPY1(dd,ss) memcpy(dd, ss, 1)
++#define LZO_MEMOPS_COPY2(dd,ss) memcpy(dd, ss, 2)
++#define LZO_MEMOPS_COPY4(dd,ss) memcpy(dd, ss, 4)
++#define LZO_MEMOPS_COPY8(dd,ss) memcpy(dd, ss, 8)
++#define LZO_MEMOPS_COPYN(dd,ss,nn) memcpy(dd, ss, nn)
++
+ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
+ {
+ lzo_uint16_t v;
+diff --git a/src/lzo_func.h b/src/lzo_func.h
+index dfaa676..1cc1b53 100644
+--- a/src/lzo_func.h
++++ b/src/lzo_func.h
+@@ -333,6 +333,20 @@ LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(*(lzo_memops_TU8p)0)==8)
+ if ((void)0, n__n > 0) do { *d__n++ = *s__n++; } while (--n__n > 0); \
+ LZO_BLOCK_END
+
++/* Debian-specific change: we know that our compiler inlines memcpy() with
++ * constant n to be as fast as handwritten code, and knows which architectures
++ * need things correctly aligned. */
++#undef LZO_MEMOPS_COPY1
++#undef LZO_MEMOPS_COPY2
++#undef LZO_MEMOPS_COPY4
++#undef LZO_MEMOPS_COPY8
++#undef LZO_MEMOPS_COPYN
++#define LZO_MEMOPS_COPY1(dd,ss) memcpy(dd, ss, 1)
++#define LZO_MEMOPS_COPY2(dd,ss) memcpy(dd, ss, 2)
++#define LZO_MEMOPS_COPY4(dd,ss) memcpy(dd, ss, 4)
++#define LZO_MEMOPS_COPY8(dd,ss) memcpy(dd, ss, 8)
++#define LZO_MEMOPS_COPYN(dd,ss,nn) memcpy(dd, ss, nn)
++
+ __lzo_static_forceinline lzo_uint16_t lzo_memops_get_le16(const lzo_voidp ss)
+ {
+ lzo_uint16_t v;
diff --git a/poky/meta/recipes-support/lzo/lzo/run-ptest b/poky/meta/recipes-support/lzo/lzo/run-ptest
new file mode 100644
index 000000000..6acb89fc1
--- /dev/null
+++ b/poky/meta/recipes-support/lzo/lzo/run-ptest
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+./lzotest -mavail -n10 -q /etc/services
+if [ $? -eq 0 ]; then
+ echo 'PASS: lzotest'
+else
+ echo 'FAIL: lzotest'
+fi
+LZOTEST=./lzotest /bin/sh -e "./check.sh" "/etc"
+./align
+if [ $? -eq 0 ]; then
+ echo 'PASS: align'
+else
+ echo 'FAIL: align'
+fi
+./chksum
+if [ $? -eq 0 ]; then
+ echo 'PASS: chksum'
+else
+ echo 'FAIL: chksum'
+fi
+./simple
+if [ $? -eq 0 ]; then
+ echo 'PASS: simple'
+else
+ echo 'FAIL: simple'
+fi
+./testmini
+if [ $? -eq 0 ]; then
+ echo 'PASS: testmini'
+else
+ echo 'FAIL: testmini'
+fi
diff --git a/poky/meta/recipes-support/lzo/lzo_2.10.bb b/poky/meta/recipes-support/lzo/lzo_2.10.bb
new file mode 100644
index 000000000..8eefec3cc
--- /dev/null
+++ b/poky/meta/recipes-support/lzo/lzo_2.10.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Lossless data compression library"
+HOMEPAGE = "http://www.oberhumer.com/opensource/lzo/"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://src/lzo_init.c;beginline=5;endline=25;md5=9ae697ca01829b0a383c5d2d163e0108"
+
+SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
+ file://0001-Use-memcpy-instead-of-reinventing-it.patch \
+ file://0001-Add-pkgconfigdir-to-solve-the-undefine-error.patch \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "39d3f3f9c55c87b1e5d6888e1420f4b5"
+SRC_URI[sha256sum] = "c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072"
+
+inherit autotools ptest
+
+EXTRA_OECONF = "--enable-shared"
+
+do_install_ptest() {
+ t=${D}${PTEST_PATH}
+ cp ${S}/util/check.sh $t
+ cp ${B}/minilzo/testmini $t
+ for i in tests/align tests/chksum lzotest/lzotest examples/simple
+ do cp ${B}/`dirname $i`/.libs/`basename $i` $t; \
+ done
+}
+
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch b/poky/meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch
new file mode 100644
index 000000000..867b88b30
--- /dev/null
+++ b/poky/meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch
@@ -0,0 +1,100 @@
+From ecccbcf66da53779d88e38e2af7f82eff8dde7f8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 16 Aug 2015 10:35:47 -0700
+Subject: [PATCH] use static inlines as the external inline definition has
+ changed with gcc5
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/miniacc.h | 24 ++++++++----------------
+ 1 file changed, 8 insertions(+), 16 deletions(-)
+
+diff --git a/src/miniacc.h b/src/miniacc.h
+index 09e6f0c..cae98d1 100644
+--- a/src/miniacc.h
++++ b/src/miniacc.h
+@@ -2880,8 +2880,7 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
+ #if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
+ #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
+ #if !defined(ACC_UA_GET_LE16)
+-extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp);
+-extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
++static __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
+ __acc_ua_volatile const acc_uint16e_t* p = (__acc_ua_volatile const acc_uint16e_t*) pp;
+ unsigned long v;
+ __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
+@@ -2890,8 +2889,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const
+ #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
+ #endif
+ #if !defined(ACC_UA_SET_LE16)
+-extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v);
+-extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
++static __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
+ __acc_ua_volatile acc_uint16e_t* p = (__acc_ua_volatile acc_uint16e_t*) pp;
+ __asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
+ }
+@@ -2916,8 +2914,7 @@ extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsi
+ #if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
+ #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
+ #if !defined(ACC_UA_GET_LE32)
+-extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp);
+-extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
++static __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
+ __acc_ua_volatile const acc_uint32e_t* p = (__acc_ua_volatile const acc_uint32e_t*) pp;
+ unsigned long v;
+ __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
+@@ -2926,8 +2923,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const
+ #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
+ #endif
+ #if !defined(ACC_UA_SET_LE32)
+-extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v);
+-extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
++static __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
+ __acc_ua_volatile acc_uint32e_t* p = (__acc_ua_volatile acc_uint32e_t*) pp;
+ __asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
+ }
+@@ -3307,8 +3303,7 @@ typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
+ #if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
+ #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
+ #if !defined(ACC_UA_GET_LE16)
+-extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp);
+-extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
++static __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
+ __acc_ua_volatile const acc_uint16e_t* p = (__acc_ua_volatile const acc_uint16e_t*) pp;
+ unsigned long v;
+ __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
+@@ -3317,8 +3312,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const
+ #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
+ #endif
+ #if !defined(ACC_UA_SET_LE16)
+-extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v);
+-extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
++static __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
+ __acc_ua_volatile acc_uint16e_t* p = (__acc_ua_volatile acc_uint16e_t*) pp;
+ __asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
+ }
+@@ -3343,8 +3337,7 @@ extern __acc_forceinline void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsi
+ #if !(ACC_CFG_NO_INLINE_ASM) && (__acc_HAVE_forceinline)
+ #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
+ #if !defined(ACC_UA_GET_LE32)
+-extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp);
+-extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
++static __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
+ __acc_ua_volatile const acc_uint32e_t* p = (__acc_ua_volatile const acc_uint32e_t*) pp;
+ unsigned long v;
+ __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
+@@ -3353,8 +3346,7 @@ extern __acc_forceinline unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const
+ #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
+ #endif
+ #if !defined(ACC_UA_SET_LE32)
+-extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v);
+-extern __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
++static __acc_forceinline void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
+ __acc_ua_volatile acc_uint32e_t* p = (__acc_ua_volatile acc_uint32e_t*) pp;
+ __asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
+ }
+--
+2.5.0
+
diff --git a/poky/meta/recipes-support/lzop/lzop/acinclude.m4 b/poky/meta/recipes-support/lzop/lzop/acinclude.m4
new file mode 100644
index 000000000..0029c19c7
--- /dev/null
+++ b/poky/meta/recipes-support/lzop/lzop/acinclude.m4
@@ -0,0 +1,390 @@
+
+AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
+AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
+])#
+
+AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
+AC_HEADER_TIME
+AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/stat.h sys/time.h sys/types.h sys/wait.h])
+])#
+
+AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
+AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown ctime difftime fstat gettimeofday gmtime localtime longjmp lstat memcmp memcpy memmove memset mktime qsort raise setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
+])#
+
+
+AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+
+AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(__int16)
+AC_CHECK_SIZEOF(__int32)
+AC_CHECK_SIZEOF(__int64)
+
+AC_CHECK_SIZEOF(void *)
+AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(ptrdiff_t)
+])#
+
+
+# /***********************************************************************
+# // Check for ACC_conformance
+# ************************************************************************/
+
+AC_DEFUN([mfx_ACC_ACCCHK], [
+mfx_tmp=$1
+mfx_save_CPPFLAGS=$CPPFLAGS
+dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
+test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
+
+AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
+
+AC_LANG_CONFTEST([AC_LANG_PROGRAM(
+[[#define ACC_CONFIG_NO_HEADER 1
+#include "acc/acc.h"
+#include "acc/acc_incd.h"
+#undef ACCCHK_ASSERT
+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
+#include "acc/acc_chk.ch"
+#undef ACCCHK_ASSERT
+static void test_acc_compile_time_assert(void) {
+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
+#include "acc/acc_chk.ch"
+#undef ACCCHK_ASSERT
+}
+#undef NDEBUG
+#include <assert.h>
+static int test_acc_run_time_assert(int r) {
+#define ACCCHK_ASSERT(expr) assert(expr);
+#include "acc/acc_chk.ch"
+#undef ACCCHK_ASSERT
+return r;
+}
+]], [[
+test_acc_compile_time_assert();
+if (test_acc_run_time_assert(1) != 1) return 1;
+]]
+)])
+
+mfx_tmp=FAILED
+_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
+rm -f conftest.$ac_ext conftest.$ac_objext
+
+CPPFLAGS=$mfx_save_CPPFLAGS
+
+AC_MSG_RESULT([$mfx_tmp])
+case x$mfx_tmp in
+ xpassed | xyes) ;;
+ *)
+ AC_MSG_NOTICE([])
+ AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
+ AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
+ AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
+ AC_MSG_NOTICE([Thanks for your support.])
+ AC_MSG_NOTICE([])
+ AC_MSG_ERROR([ACC conformance test failed. Stop.])
+dnl AS_EXIT
+ ;;
+esac
+])# mfx_ACC_ACCCHK
+
+
+# /***********************************************************************
+# // Check for ACC_conformance
+# ************************************************************************/
+
+AC_DEFUN([mfx_MINIACC_ACCCHK], [
+mfx_tmp=$1
+mfx_save_CPPFLAGS=$CPPFLAGS
+dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
+test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
+
+AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
+
+AC_LANG_CONFTEST([AC_LANG_PROGRAM(
+[[#define ACC_CONFIG_NO_HEADER 1
+#define ACC_WANT_ACC_INCD_H 1
+#include $2
+
+#define ACC_WANT_ACC_CHK_CH 1
+#undef ACCCHK_ASSERT
+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
+#include $2
+
+#define ACC_WANT_ACC_CHK_CH 1
+#undef ACCCHK_ASSERT
+#define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT(expr)
+static void test_acc_compile_time_assert(void) {
+#include $2
+}
+
+#undef NDEBUG
+#include <assert.h>
+#define ACC_WANT_ACC_CHK_CH 1
+#undef ACCCHK_ASSERT
+#define ACCCHK_ASSERT(expr) assert(expr);
+static int test_acc_run_time_assert(int r) {
+#include $2
+return r;
+}
+]], [[
+test_acc_compile_time_assert();
+if (test_acc_run_time_assert(1) != 1) return 1;
+]]
+)])
+
+mfx_tmp=FAILED
+_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
+rm -f conftest.$ac_ext conftest.$ac_objext
+
+CPPFLAGS=$mfx_save_CPPFLAGS
+
+AC_MSG_RESULT([$mfx_tmp])
+case x$mfx_tmp in
+ xpassed | xyes) ;;
+ *)
+ AC_MSG_NOTICE([])
+ AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
+ AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
+ AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
+ AC_MSG_NOTICE([Thanks for your support.])
+ AC_MSG_NOTICE([])
+ AC_MSG_ERROR([ACC conformance test failed. Stop.])
+dnl AS_EXIT
+ ;;
+esac
+])# mfx_MINIACC_ACCCHK
+
+
+
+# serial 1
+
+AC_DEFUN([mfx_PROG_CPPFLAGS], [
+AC_MSG_CHECKING([whether the C preprocessor needs special flags])
+
+AC_LANG_CONFTEST([AC_LANG_PROGRAM(
+[[#include <limits.h>
+#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
+# include "your C preprocessor is broken 1"
+#elif (0xffffu == 0xfffffffful)
+# include "your C preprocessor is broken 2"
+#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
+# include "your C preprocessor is broken 3"
+#endif
+]], [[ ]]
+)])
+
+mfx_save_CPPFLAGS=$CPPFLAGS
+mfx_tmp=ERROR
+for mfx_arg in "" -no-cpp-precomp
+do
+ CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
+ _AC_COMPILE_IFELSE([],
+[mfx_tmp=$mfx_arg
+break])
+done
+CPPFLAGS=$mfx_save_CPPFLAGS
+rm -f conftest.$ac_ext conftest.$ac_objext
+case x$mfx_tmp in
+ x)
+ AC_MSG_RESULT([none needed]) ;;
+ xERROR)
+ AC_MSG_RESULT([ERROR])
+ AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
+ ;;
+ *)
+ AC_MSG_RESULT([$mfx_tmp])
+ CPPFLAGS="$mfx_tmp $CPPFLAGS"
+ ;;
+esac
+])# mfx_PROG_CPPFLAGS
+
+
+
+# serial 3
+
+AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
+AC_CACHE_CHECK([whether limits.h is sane],
+mfx_cv_header_sane_limits_h,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
+#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
+# if defined(__APPLE__) && defined(__GNUC__)
+# error "your preprocessor is broken - use compiler option -no-cpp-precomp"
+# else
+# include "your preprocessor is broken"
+# endif
+#endif
+#define MFX_0xffff 0xffff
+#define MFX_0xffffffffL 4294967295ul
+#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
+# include "error CHAR_BIT"
+#endif
+#if !defined(UCHAR_MAX)
+# include "error UCHAR_MAX 1"
+#endif
+#if !defined(USHRT_MAX)
+# include "error USHRT_MAX 1"
+#endif
+#if !defined(UINT_MAX)
+# include "error UINT_MAX 1"
+#endif
+#if !defined(ULONG_MAX)
+# include "error ULONG_MAX 1"
+#endif
+#if !defined(SHRT_MAX)
+# include "error SHRT_MAX 1"
+#endif
+#if !defined(INT_MAX)
+# include "error INT_MAX 1"
+#endif
+#if !defined(LONG_MAX)
+# include "error LONG_MAX 1"
+#endif
+#if (UCHAR_MAX < 1)
+# include "error UCHAR_MAX 2"
+#endif
+#if (USHRT_MAX < 1)
+# include "error USHRT_MAX 2"
+#endif
+#if (UINT_MAX < 1)
+# include "error UINT_MAX 2"
+#endif
+#if (ULONG_MAX < 1)
+# include "error ULONG_MAX 2"
+#endif
+#if (UCHAR_MAX < 0xff)
+# include "error UCHAR_MAX 3"
+#endif
+#if (USHRT_MAX < MFX_0xffff)
+# include "error USHRT_MAX 3"
+#endif
+#if (UINT_MAX < MFX_0xffff)
+# include "error UINT_MAX 3"
+#endif
+#if (ULONG_MAX < MFX_0xffffffffL)
+# include "error ULONG_MAX 3"
+#endif
+#if (USHRT_MAX > UINT_MAX)
+# include "error USHRT_MAX vs UINT_MAX"
+#endif
+#if (UINT_MAX > ULONG_MAX)
+# include "error UINT_MAX vs ULONG_MAX"
+#endif
+]], [[
+#if (USHRT_MAX == MFX_0xffff)
+{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
+#elif (USHRT_MAX >= MFX_0xffff)
+{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
+#endif
+#if (UINT_MAX == MFX_0xffff)
+{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
+#elif (UINT_MAX >= MFX_0xffff)
+{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
+#endif
+#if (ULONG_MAX == MFX_0xffff)
+{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
+#elif (ULONG_MAX >= MFX_0xffff)
+{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
+#endif
+#if (USHRT_MAX == MFX_0xffffffffL)
+{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
+#elif (USHRT_MAX >= MFX_0xffffffffL)
+{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
+#endif
+#if (UINT_MAX == MFX_0xffffffffL)
+{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
+#elif (UINT_MAX >= MFX_0xffffffffL)
+{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
+#endif
+#if (ULONG_MAX == MFX_0xffffffffL)
+{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
+#elif (ULONG_MAX >= MFX_0xffffffffL)
+{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
+#endif
+]])],
+[mfx_cv_header_sane_limits_h=yes],
+[mfx_cv_header_sane_limits_h=no])])
+])
+
+# /***********************************************************************
+# // standard
+# ************************************************************************/
+
+AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
+AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
+])#
+
+
+# /***********************************************************************
+# //
+# ************************************************************************/
+
+dnl more types which are not yet covered by ACC
+
+AC_DEFUN([mfx_CHECK_SIZEOF], [
+AC_CHECK_SIZEOF(__int32)
+AC_CHECK_SIZEOF(intmax_t)
+AC_CHECK_SIZEOF(uintmax_t)
+AC_CHECK_SIZEOF(intptr_t)
+AC_CHECK_SIZEOF(uintptr_t)
+
+AC_CHECK_SIZEOF(float)
+AC_CHECK_SIZEOF(double)
+AC_CHECK_SIZEOF(long double)
+
+AC_CHECK_SIZEOF(dev_t)
+AC_CHECK_SIZEOF(fpos_t)
+AC_CHECK_SIZEOF(mode_t)
+AC_CHECK_SIZEOF(off_t)
+AC_CHECK_SIZEOF(ssize_t)
+AC_CHECK_SIZEOF(time_t)
+])#
+
+
+
+AC_DEFUN([mfx_CHECK_LIB_WINMM], [
+if test "X$GCC" = Xyes; then
+case $host_os in
+cygwin* | mingw* | pw32*)
+ test "X$LIBS" != "X" && LIBS="$LIBS "
+ LIBS="${LIBS}-lwinmm" ;;
+*)
+ ;;
+esac
+fi
+])#
+
+#serial 6
+
+dnl From Paul Eggert.
+
+# Define ST_MTIM_NSEC to be the nanoseconds member of struct stat's st_mtim,
+# if it exists.
+
+AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC],
+ [AC_CACHE_CHECK([for nanoseconds member of struct stat.st_mtim],
+ ac_cv_struct_st_mtim_nsec,
+ [ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_cv_struct_st_mtim_nsec=no
+ # tv_nsec -- the usual case
+ # _tv_nsec -- Solaris 2.6, if
+ # (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
+ # && !defined __EXTENSIONS__)
+ # st__tim.tv_nsec -- UnixWare 2.1.2
+ for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
+ CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/stat.h>], [struct stat s; s.st_mtim.ST_MTIM_NSEC;],
+ [ac_cv_struct_st_mtim_nsec=$ac_val; break])
+ done
+ CPPFLAGS="$ac_save_CPPFLAGS"])
+
+ if test $ac_cv_struct_st_mtim_nsec != no; then
+ AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec,
+ [Define to be the nanoseconds member of struct stat's st_mtim,
+ if it exists.])
+ fi
+ ]
+)
diff --git a/poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch b/poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch
new file mode 100644
index 000000000..72b33970e
--- /dev/null
+++ b/poky/meta/recipes-support/lzop/lzop/lzop-1.03-gcc6.patch
@@ -0,0 +1,37 @@
+gcc-6 has additional errors e.g.
+
+./test.c:1:12: error: variably modified '__acc_cta' at file scope
+ extern int __acc_cta[1-2*!((1l << (8*8 -1)) < 0)];
+ ^~~~~~~~~
+
+This is rightly pointed out since that index is undefined
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+--- a/src/miniacc.h.orig 2016-02-10 16:09:23.247315866 +0100
++++ a/src/miniacc.h 2016-02-10 16:12:14.973297054 +0100
+@@ -4469,12 +4469,12 @@
+ #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
+ #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
+ #else
+- ACCCHK_ASSERT((1 << (8*SIZEOF_INT-1)) < 0)
++ ACCCHK_ASSERT((int)(1u << (8*SIZEOF_INT-1)) < 0)
+ #endif
+ ACCCHK_ASSERT((1u << (8*SIZEOF_INT-1)) > 0)
+ #if 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
+ #else
+- ACCCHK_ASSERT((1l << (8*SIZEOF_LONG-1)) < 0)
++ ACCCHK_ASSERT((long)(1ul << (8*SIZEOF_LONG-1)) < 0)
+ #endif
+ ACCCHK_ASSERT((1ul << (8*SIZEOF_LONG-1)) > 0)
+ #if defined(acc_int16e_t)
+@@ -4703,7 +4703,7 @@
+ #elif 1 && (ACC_CC_LCC || ACC_CC_LCCWIN32) && !defined(ACCCHK_CFG_PEDANTIC)
+ #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
+ #elif !(ACC_BROKEN_INTEGRAL_PROMOTION) && (SIZEOF_INT > 1)
+- ACCCHK_ASSERT( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
++ ACCCHK_ASSERT( (int)((unsigned int)((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
+ #endif
+ #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560))
+ # pragma option pop
diff --git a/poky/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch b/poky/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch
new file mode 100644
index 000000000..739be8231
--- /dev/null
+++ b/poky/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch
@@ -0,0 +1,36 @@
+Fix get of FLAGS register in x32 ABI,
+
+x32 ABI requires to have 64-bit variable to store FLAGS register
+instead of size_t that is 32-bit variable, this fix operand
+type mismatch when try to pop previous pushf value.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+
+Index: lzop-1.03/src/miniacc.h
+===================================================================
+--- lzop-1.03.orig/src/miniacc.h
++++ lzop-1.03/src/miniacc.h
+@@ -754,6 +754,9 @@
+ #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
+ # define ACC_ARCH_AMD64 1
+ # define ACC_INFO_ARCH "amd64"
++# if defined(__ILP32__)
++# define ACC_ARCH_AMD64_X32 1
++# endif
+ #elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB))
+ # define ACC_ARCH_ARM 1
+ # define ACC_ARCH_ARM_THUMB 1
+@@ -6787,7 +6790,11 @@ ACCLIB_PUBLIC_NOINLINE(void, acc_debug_n
+ ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_query) (void)
+ {
+ #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
++# if defined(ACC_ARCH_AMD64_X32)
++ unsigned long long r;
++# else
+ size_t r;
++# endif
+ __asm__ __volatile__("pushf\n pop %0\n" : "=a" (r) : : __ACC_ASM_CLOBBER);
+ return (int)(r >> 18) & 1;
+ #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
diff --git a/poky/meta/recipes-support/lzop/lzop_1.03.bb b/poky/meta/recipes-support/lzop/lzop_1.03.bb
new file mode 100644
index 000000000..6f09002f5
--- /dev/null
+++ b/poky/meta/recipes-support/lzop/lzop_1.03.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Real-time file compressor"
+DESCRIPTION = "lzop is a compression utility which is designed to be a companion to gzip. \n\
+It is based on the LZO data compression library and its main advantages over \n\
+gzip are much higher compression and decompression speed at the cost of some \n\
+compression ratio. The lzop compression utility was designed with the goals \n\
+of reliability, speed, portability and with reasonable drop-in compatibility \n\
+to gzip."
+DEPENDS += "lzo"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=dfeaf3dc4beef4f5a7bdbc35b197f39e \
+ file://src/lzop.c;beginline=5;endline=21;md5=6797bd3ed0a1a49327b7ebf9366ebd86"
+
+SRC_URI = "http://www.lzop.org/download/${BP}.tar.gz \
+ file://acinclude.m4 \
+ file://x32_abi_miniacc_h.patch \
+ file://0001-use-static-inlines-as-the-external-inline-definition.patch \
+ file://lzop-1.03-gcc6.patch \
+ "
+SRC_URI[md5sum] = "006c5e27fb78cdd14a628fdfa5aa1905"
+SRC_URI[sha256sum] = "c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9"
+
+inherit autotools
+
+do_configure_prepend () {
+ install -Dm 0644 ${WORKDIR}/acinclude.m4 ${S}/acinclude.m4
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch b/poky/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch
new file mode 100644
index 000000000..ca7100eb2
--- /dev/null
+++ b/poky/meta/recipes-support/mpfr/mpfr/long-long-thumb.patch
@@ -0,0 +1,39 @@
+From 84021b1e236508169be65e802a9c0a25fc9a8827 Mon Sep 17 00:00:00 2001
+From: Phil Blundell <philb@gnu.org>
+Date: Mon, 27 Oct 2008 22:26:35 +0000
+Subject: [PATCH] mpfr: crusade against inline assembler
+
+Without this, build fails for thumb:
+| {standard input}: Assembler messages:
+| {standard input}:199: Error: selected processor does not support Thumb mode `umull sl,r0,r2,r1'
+| {standard input}:214: Error: selected processor does not support Thumb mode `umull sl,r2,r1,fp'
+| {standard input}:219: Error: instruction not supported in Thumb16 mode -- `adds fp,r0,sl'
+| {standard input}:220: Error: unshifted register required -- `adc r2,r2,#0'
+| {standard input}:235: Error: selected processor does not support Thumb mode `umull r0,sl,r1,r3'
+| {standard input}:244: Error: selected processor does not support Thumb mode `umull fp,ip,r1,r3'
+| {standard input}:253: Error: instruction not supported in Thumb16 mode -- `adds r3,sl,fp'
+| {standard input}:254: Error: unshifted register required -- `adc ip,ip,#0'
+| {standard input}:259: Error: instruction not supported in Thumb16 mode -- `adds sl,r1,r0'
+| {standard input}:642: Error: selected processor does not support Thumb mode `umull r0,r2,r3,r1'
+| ../arm-oe-linux-gnueabi-libtool --tag=CC --mode=compile arm-oe-linux-gnueabi-gcc -march=armv5te -mthumb -mthumb-interwork -mtune=xscale --sysroot=/OE/shr-core/tmp-eglibc/sysroots/spitz -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_LOCALE_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_STDINT_H=1 -DHAVE_VA_COPY=1 -DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_LONG_LONG=1 -DHAVE_INTMAX_T=1 -DMPFR_HAVE_INTMAX_MAX=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DLT_OBJDIR=\".libs/\" -DHAVE_ATTRIBUTE_MODE=1 -DHAVE___GMPN_ROOTREM=1 -DHAVE___GMPN_SBPI1_DIVAPPR_Q=1 -I. -O2 -pipe -g -feliminate-unused-debug-types -ffloat-store -c -o pow.lo pow.c
+| {standard input}:1154: Error: selected processor does not support Thumb mode `umull r0,r1,sl,ip'
+| {standard input}:1166: Error: selected processor does not support Thumb mode `umull r3,r2,ip,r0'
+| {standard input}:1171: Error: instruction not supported in Thumb16 mode -- `adds r0,r1,r3'
+| {standard input}:1172: Error: unshifted register required -- `adc r2,r2,#0'
+| make[2]: *** [mul.lo] Error 1
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Upstream-Status: Pending
+
+--- mpfr.old/src/mpfr-longlong.h 2008-01-01 03:29:09.000000000 +0000
++++ mpfr/src/mpfr-longlong.h 2008-10-27 21:46:44.000000000 +0000
+@@ -406,7 +406,7 @@
+ "rIJ" ((USItype) (bl)))
+ #endif
+
+-#if defined (__arm__) && W_TYPE_SIZE == 32
++#if defined (__arm__) && W_TYPE_SIZE == 32 && !defined(__thumb__)
+ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+ __asm__ ("adds\t%1, %4, %5\n\tadc\t%0, %2, %3" \
+ : "=r" (sh), "=&r" (sl) \
diff --git a/poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb b/poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb
new file mode 100644
index 000000000..a78c0bd48
--- /dev/null
+++ b/poky/meta/recipes-support/mpfr/mpfr_3.1.5.bb
@@ -0,0 +1,20 @@
+SUMMARY = "C library for multiple-precision floating-point computations with exact rounding"
+HOMEPAGE = "http://www.mpfr.org/"
+LICENSE = "LGPLv3+"
+SECTION = "devel"
+
+inherit autotools texinfo
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6"
+DEPENDS = "gmp"
+
+SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.xz \
+ file://long-long-thumb.patch \
+ "
+SRC_URI[md5sum] = "c4ac246cf9795a4491e7766002cd528f"
+SRC_URI[sha256sum] = "015fde82b3979fbe5f83501986d328331ba8ddf008c1ff3da3c238f49ca062bc"
+
+UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch b/poky/meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch
new file mode 100644
index 000000000..c007060ee
--- /dev/null
+++ b/poky/meta/recipes-support/nettle/nettle-3.4/Add-target-to-only-build-tests-not-run-them.patch
@@ -0,0 +1,38 @@
+Add target to only build tests (not run them)
+
+Not sending upstream as this is only a start of a solution to
+installable tests: It's useful for us already as is.
+
+Upstream-Status: Inappropriate [not a complete solution]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Refactored for 3.4
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-3.4/Makefile.in
+===================================================================
+--- nettle-3.4.orig/Makefile.in
++++ nettle-3.4/Makefile.in
+@@ -55,6 +55,9 @@ clean distclean mostlyclean maintainer-c
+ echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done
+ $(MAKE) $@-here
+
++buildtest:
++ echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@)
++
+ check-here:
+ true
+
+Index: nettle-3.4/testsuite/Makefile.in
+===================================================================
+--- nettle-3.4.orig/testsuite/Makefile.in
++++ nettle-3.4/testsuite/Makefile.in
+@@ -131,6 +131,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$
+ # data.
+ VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
+
++buildtest: $(TS_ALL)
++
+ # The PATH update is for windows dlls, DYLD_LIBRARY_PATH is for OSX.
+ check: $(TS_ALL)
+ LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" DYLD_LIBRARY_PATH=../.lib \
diff --git a/poky/meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch b/poky/meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch
new file mode 100644
index 000000000..d5f266681
--- /dev/null
+++ b/poky/meta/recipes-support/nettle/nettle-3.4/check-header-files-of-openssl-only-if-enable_.patch
@@ -0,0 +1,36 @@
+From ffee6b5f6204a0210f717968ec6ce514d70acca1 Mon Sep 17 00:00:00 2001
+From: Haiqing Bai <Haiqing.Bai@windriver.com>
+Date: Fri, 9 Dec 2016 15:23:17 +0800
+Subject: [PATCH] nettle: check header files of openssl only if
+ 'enable_openssl=yes'.
+
+The original configure script checks openssl header files to generate
+config.h even if 'enable_openssl' is not set to yes, this made inconsistent
+building for nettle.
+
+Upstream-Status: Pending
+Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
+
+refactored for 3.4. pending not in as of 3.4
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-3.4/configure.ac
+===================================================================
+--- nettle-3.4.orig/configure.ac
++++ nettle-3.4/configure.ac
+@@ -185,9 +185,11 @@ AC_HEADER_TIME
+ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(size_t)
+
+-AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],,
+-[enable_openssl=no
+- break])
++if test "x$enable_openssl" = "xyes"; then
++ AC_CHECK_HEADERS([openssl/evp.h openssl/ecdsa.h],,
++ [enable_openssl=no
++ break])
++fi
+
+ # For use by the testsuite
+ AC_CHECK_HEADERS([valgrind/memcheck.h])
diff --git a/poky/meta/recipes-support/nettle/nettle-3.4/dlopen-test.patch b/poky/meta/recipes-support/nettle/nettle-3.4/dlopen-test.patch
new file mode 100644
index 000000000..c4f0b7ea1
--- /dev/null
+++ b/poky/meta/recipes-support/nettle/nettle-3.4/dlopen-test.patch
@@ -0,0 +1,20 @@
+Replace relative path of libnettle.so with absolute path so the test
+program can find it.
+Relative paths are not suitable, as the folder strucure for ptest
+is different from the one expected by the nettle testsuite.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+--- a/testsuite/dlopen-test.c 2016-10-01 00:28:38.000000000 -0700
++++ b/testsuite/dlopen-test.c 2017-10-13 11:08:57.227572860 -0700
+@@ -9,7 +9,7 @@
+ main (int argc UNUSED, char **argv UNUSED)
+ {
+ #if HAVE_LIBDL
+- void *handle = dlopen ("../libnettle.so", RTLD_NOW);
++ void *handle = dlopen ("/usr/lib/libnettle.so", RTLD_NOW);
+ int (*get_version)(void);
+ if (!handle)
+ {
diff --git a/poky/meta/recipes-support/nettle/nettle-3.4/run-ptest b/poky/meta/recipes-support/nettle/nettle-3.4/run-ptest
new file mode 100644
index 000000000..b90bed66d
--- /dev/null
+++ b/poky/meta/recipes-support/nettle/nettle-3.4/run-ptest
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+cd testsuite
+
+failed=0
+all=0
+
+for f in *-test; do
+ if [ "$f" = "sha1-huge-test" ] ; then
+ echo "SKIP: $f (skipped for ludicrous run time)"
+ continue
+ fi
+
+ "./$f"
+ case "$?" in
+ 0)
+ echo "PASS: $f"
+ all=$((all + 1))
+ ;;
+ 77)
+ echo "SKIP: $f"
+ ;;
+ *)
+ echo "FAIL: $f"
+ failed=$((failed + 1))
+ all=$((all + 1))
+ ;;
+ esac
+done
+
+if [ "$failed" -eq 0 ] ; then
+ echo "All $all tests passed"
+else
+ echo "$failed of $all tests failed"
+fi
+
diff --git a/poky/meta/recipes-support/nettle/nettle_3.4.bb b/poky/meta/recipes-support/nettle/nettle_3.4.bb
new file mode 100644
index 000000000..7a3cc654c
--- /dev/null
+++ b/poky/meta/recipes-support/nettle/nettle_3.4.bb
@@ -0,0 +1,47 @@
+SUMMARY = "A low level cryptographic library"
+HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
+SECTION = "libs"
+LICENSE = "LGPLv3+ | GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+ file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
+ file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
+
+DEPENDS += "gmp"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
+ file://Add-target-to-only-build-tests-not-run-them.patch \
+ file://run-ptest \
+ file://check-header-files-of-openssl-only-if-enable_.patch \
+ "
+
+SRC_URI_append_class-target = "\
+ file://dlopen-test.patch \
+ "
+
+SRC_URI[md5sum] = "dc0f13028264992f58e67b4e8915f53d"
+SRC_URI[sha256sum] = "ae7a42df026550b85daca8389b6a60ba6313b0567f374392e54918588a411e94"
+
+UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools ptest
+
+EXTRA_AUTORECONF += "--exclude=aclocal"
+
+EXTRA_OECONF = "--disable-openssl"
+
+do_compile_ptest() {
+ oe_runmake buildtest
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/testsuite/
+ install ${S}/testsuite/gold-bug.txt ${D}${PTEST_PATH}/testsuite/
+ install ${S}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
+ # tools can be found in PATH, not in ../tools/
+ sed -i -e 's|../tools/||' ${D}${PTEST_PATH}/testsuite/*-test
+ install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/npth/npth/pkgconfig.patch b/poky/meta/recipes-support/npth/npth/pkgconfig.patch
new file mode 100644
index 000000000..b6a12e730
--- /dev/null
+++ b/poky/meta/recipes-support/npth/npth/pkgconfig.patch
@@ -0,0 +1,49 @@
+Added npth pkgconfig file
+
+Upstream-Status: Pending
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: npth-1.1/src/npth.pc.in
+===================================================================
+--- /dev/null
++++ npth-1.1/src/npth.pc.in
+@@ -0,0 +1,10 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: npth
++Description: a new portable posix threading library
++Version: @VERSION@
++Libs: -L${libdir} -lnpth -lpthread
++Cflags: -I${includedir}
+Index: npth-1.1/src/Makefile.am
+===================================================================
+--- npth-1.1.orig/src/Makefile.am
++++ npth-1.1/src/Makefile.am
+@@ -27,8 +27,10 @@
+ # License along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+ ## Process this file with automake to produce Makefile.in
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = npth.pc
+
+-EXTRA_DIST = libnpth.vers
++EXTRA_DIST = libnpth.vers npth.pc
+ # versioninfo.rc.in
+ nodist_include_HEADERS = npth.h
+
+Index: npth-1.1/configure.ac
+===================================================================
+--- npth-1.1.orig/configure.ac
++++ npth-1.1/configure.ac
+@@ -337,6 +337,7 @@ src/Makefile
+ w32/Makefile
+ tests/Makefile])
+ AC_CONFIG_FILES(npth-config, chmod +x npth-config)
++AC_CONFIG_FILES([src/npth.pc])
+ AC_OUTPUT
+
+ echo "
diff --git a/poky/meta/recipes-support/npth/npth_1.5.bb b/poky/meta/recipes-support/npth/npth_1.5.bb
new file mode 100644
index 000000000..e7db6ae1b
--- /dev/null
+++ b/poky/meta/recipes-support/npth/npth_1.5.bb
@@ -0,0 +1,23 @@
+SUMMARY = "New GNU Portable Threads library"
+HOMEPAGE = "http://www.gnupg.org/software/pth/"
+SECTION = "libs"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "\
+ file://COPYING.LIB;md5=2caced0b25dfefd4c601d92bd15116de\
+ "
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/npth/npth-${PV}.tar.bz2 \
+ file://pkgconfig.patch \
+ "
+
+SRC_URI[md5sum] = "9ba2dc4302d2f32c66737c43ed191b1b"
+SRC_URI[sha256sum] = "294a690c1f537b92ed829d867bee537e46be93fbd60b16c04630fbbfcd9db3c2"
+
+BINCONFIG = "${bindir}/npth-config"
+
+inherit autotools binconfig-disabled
+
+FILES_${PN} = "${libdir}/libnpth.so.*"
+FILES_${PN}-dev += "${bindir}/npth-config"
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch b/poky/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch
new file mode 100644
index 000000000..f3cd67002
--- /dev/null
+++ b/poky/meta/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch
@@ -0,0 +1,31 @@
+From 147f3c2acbd96d44025cec11800ded0282327764 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 18 Sep 2017 17:22:43 -0700
+Subject: [PATCH] md: Fix build with musl
+
+The MIPS specific header <sgidefs.h> is not provided by musl
+linux kernel headers provide <asm/sgidefs.h> which has same definitions
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ pr/include/md/_linux.cfg | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
+index 640b19c..31296a8 100644
+--- a/pr/include/md/_linux.cfg
++++ b/pr/include/md/_linux.cfg
+@@ -499,7 +499,7 @@
+ #elif defined(__mips__)
+
+ /* For _ABI64 */
+-#include <sgidefs.h>
++#include <asm/sgidefs.h>
+
+ #ifdef __MIPSEB__
+ #define IS_BIG_ENDIAN 1
+--
+2.14.1
+
diff --git a/poky/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch b/poky/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
new file mode 100644
index 000000000..23228067e
--- /dev/null
+++ b/poky/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
@@ -0,0 +1,105 @@
+From 95bda64fb4cf1825fea745e918cfe8202843f0ba Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Sat, 30 Jan 2016 07:18:02 +0100
+Subject: [PATCH] Add nios2 support
+
+Add support for the nios2 CPU.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1244421 ]
+---
+ nspr/pr/include/md/_linux.cfg | 45 +++++++++++++++++++++++++++++++++++++++++++
+ nspr/pr/include/md/_linux.h | 14 ++++++++++++++
+ 2 files changed, 59 insertions(+)
+
+diff --git a/pr/include/md/_linux.cfg b/nspr/pr/include/md/_linux.cfg
+index 8cbf0cb..150676b 100644
+--- a/pr/include/md/_linux.cfg
++++ b/pr/include/md/_linux.cfg
+@@ -972,6 +972,51 @@
+ #define PR_BYTES_PER_WORD_LOG2 2
+ #define PR_BYTES_PER_DWORD_LOG2 3
+
++#elif defined(__nios2__)
++
++#define IS_LITTLE_ENDIAN 1
++#undef IS_BIG_ENDIAN
++
++#define PR_BYTES_PER_BYTE 1
++#define PR_BYTES_PER_SHORT 2
++#define PR_BYTES_PER_INT 4
++#define PR_BYTES_PER_INT64 8
++#define PR_BYTES_PER_LONG 4
++#define PR_BYTES_PER_FLOAT 4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD 4
++#define PR_BYTES_PER_DWORD 8
++
++#define PR_BITS_PER_BYTE 8
++#define PR_BITS_PER_SHORT 16
++#define PR_BITS_PER_INT 32
++#define PR_BITS_PER_INT64 64
++#define PR_BITS_PER_LONG 32
++#define PR_BITS_PER_FLOAT 32
++#define PR_BITS_PER_DOUBLE 64
++#define PR_BITS_PER_WORD 32
++
++#define PR_BITS_PER_BYTE_LOG2 3
++#define PR_BITS_PER_SHORT_LOG2 4
++#define PR_BITS_PER_INT_LOG2 5
++#define PR_BITS_PER_INT64_LOG2 6
++#define PR_BITS_PER_LONG_LOG2 5
++#define PR_BITS_PER_FLOAT_LOG2 5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2 5
++
++#define PR_ALIGN_OF_SHORT 2
++#define PR_ALIGN_OF_INT 4
++#define PR_ALIGN_OF_LONG 4
++#define PR_ALIGN_OF_INT64 4
++#define PR_ALIGN_OF_FLOAT 4
++#define PR_ALIGN_OF_DOUBLE 4
++#define PR_ALIGN_OF_POINTER 4
++#define PR_ALIGN_OF_WORD 4
++
++#define PR_BYTES_PER_WORD_LOG2 2
++#define PR_BYTES_PER_DWORD_LOG2 3
++
+ #elif defined(__or1k__)
+
+ #undef IS_LITTLE_ENDIAN
+diff --git a/pr/include/md/_linux.h b/nspr/pr/include/md/_linux.h
+index d378db5..18260be 100644
+--- a/pr/include/md/_linux.h
++++ b/pr/include/md/_linux.h
+@@ -55,6 +55,8 @@
+ #define _PR_SI_ARCHITECTURE "avr32"
+ #elif defined(__m32r__)
+ #define _PR_SI_ARCHITECTURE "m32r"
++#elif defined(__nios2__)
++#define _PR_SI_ARCHITECTURE "nios2"
+ #elif defined(__or1k__)
+ #define _PR_SI_ARCHITECTURE "or1k"
+ #else
+@@ -125,6 +127,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
+ #define _MD_ATOMIC_SET _PR_x86_64_AtomicSet
+ #endif
+
++#if defined(__nios2__)
++#if defined(__GNUC__)
++/* Use GCC built-in functions */
++#define _PR_HAVE_ATOMIC_OPS
++#define _MD_INIT_ATOMIC()
++#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
++#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
++#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
++#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
++#endif
++#endif
++
+ #if defined(__or1k__)
+ #if defined(__GNUC__)
+ /* Use GCC built-in functions */
+--
+2.7.0.rc3
+
diff --git a/poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
new file mode 100644
index 000000000..f12acc854
--- /dev/null
+++ b/poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
@@ -0,0 +1,52 @@
+Fix build failure on x86_64
+
+When the target_cpu is x86_64, we should assume that the pkg uses 64bit,
+only if USE_N32 is set, we can assume that the pkg uses 32bit. It used a
+opposite logic before.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Upstream-Status: Pending
+---
+ configure.in | 12 ++++++------
+ 1 files changed, 6 insertions(+), 6 deletions(-)
+
+Index: nspr/configure.in
+===================================================================
+--- nspr.orig/configure.in
++++ nspr/configure.in
+@@ -1875,28 +1875,24 @@ tools are selected during the Xcode/Deve
+ PR_MD_ASFILES=os_Linux_ia64.s
+ ;;
+ x86_64)
+- if test -n "$USE_64"; then
+- PR_MD_ASFILES=os_Linux_x86_64.s
+- elif test -n "$USE_X32"; then
++ if test -n "$USE_X32"; then
++ AC_DEFINE(i386)
+ PR_MD_ASFILES=os_Linux_x86_64.s
+ CC="$CC -mx32"
+ CXX="$CXX -mx32"
+ else
+- AC_DEFINE(i386)
+- PR_MD_ASFILES=os_Linux_x86.s
+- CC="$CC -m32"
+- CXX="$CXX -m32"
++ PR_MD_ASFILES=os_Linux_x86_64.s
+ fi
+ ;;
+ ppc|powerpc)
+ PR_MD_ASFILES=os_Linux_ppc.s
+ ;;
+ powerpc64)
+- if test -n "$USE_64"; then
++ if test -n "$USE_N32"; then
++ PR_MD_ASFILES=os_Linux_ppc.s
++ else
+ CC="$CC -m64"
+ CXX="$CXX -m64"
+- else
+- PR_MD_ASFILES=os_Linux_ppc.s
+ fi
+ ;;
+ esac
diff --git a/poky/meta/recipes-support/nspr/nspr/nspr.pc.in b/poky/meta/recipes-support/nspr/nspr/nspr.pc.in
new file mode 100644
index 000000000..d74caabe4
--- /dev/null
+++ b/poky/meta/recipes-support/nspr/nspr/nspr.pc.in
@@ -0,0 +1,11 @@
+os_libs=-lpthread -ldl
+prefix=OEPREFIX
+exec_prefix=OEEXECPREFIX
+libdir=OELIBDIR
+includedir=OEINCDIR
+
+Name: NSPR
+Description: The Netscape Portable Runtime
+Version: NSPRVERSION
+Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
+Cflags:
diff --git a/poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
new file mode 100644
index 000000000..ecc6d3187
--- /dev/null
+++ b/poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
@@ -0,0 +1,26 @@
+Author: Andrei Gherzan <andrei@gherzan.ro>
+Date: Thu Feb 9 00:03:38 2012 +0200
+
+Avoid QA warnings by removing hardcoded rpath from binaries.
+
+[...]
+WARNING: QA Issue: package nspr contains bad RPATH {builddir}/tmp/work/armv5te-poky-linux-gnueabi/nspr-4.8.9-r1/nspr-4.8.9/mozilla/nsprpub/pr/tests/../../dist/lib
+in file {builddir}/tmp/work/armv5te-poky-linux-gnueabi/nspr-4.8.9-r1/packages-split/nspr/usr/lib/nspr/tests/multiwait
+[...]
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Upstream-Status: Pending
+
+Index: nspr/pr/tests/Makefile.in
+===================================================================
+--- nspr.orig/pr/tests/Makefile.in
++++ nspr/pr/tests/Makefile.in
+@@ -315,7 +315,7 @@ ifeq ($(OS_ARCH), SunOS)
+ endif # SunOS
+
+ ifeq (,$(filter-out Linux GNU GNU_%,$(OS_ARCH)))
+- LDOPTS += -Xlinker -rpath $(ABSOLUTE_LIB_DIR)
++ LDOPTS += -Xlinker
+ ifeq ($(USE_PTHREADS),1)
+ EXTRA_LIBS = -lpthread
+ endif
diff --git a/poky/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch b/poky/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
new file mode 100644
index 000000000..bde715c5d
--- /dev/null
+++ b/poky/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
@@ -0,0 +1,19 @@
+the $srcdir is not defined at the time of gnu-configurize.
+
+Upstream-Status: Inappropriate [OE-Core specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: nspr/configure.in
+===================================================================
+--- nspr.orig/configure.in
++++ nspr/configure.in
+@@ -8,7 +8,7 @@ AC_PREREQ(2.61)
+ AC_INIT
+ AC_CONFIG_SRCDIR([pr/include/nspr.h])
+
+-AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
++AC_CONFIG_AUX_DIR(build/autoconf)
+ AC_CANONICAL_TARGET
+
+ dnl ========================================================
diff --git a/poky/meta/recipes-support/nspr/nspr_4.19.bb b/poky/meta/recipes-support/nspr/nspr_4.19.bb
new file mode 100644
index 000000000..de2c87131
--- /dev/null
+++ b/poky/meta/recipes-support/nspr/nspr_4.19.bb
@@ -0,0 +1,190 @@
+SUMMARY = "Netscape Portable Runtime Library"
+HOMEPAGE = "http://www.mozilla.org/projects/nspr/"
+LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
+LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
+ file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
+SECTION = "libs/network"
+
+SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
+ file://remove-rpath-from-tests.patch \
+ file://fix-build-on-x86_64.patch \
+ file://remove-srcdir-from-configure-in.patch \
+ file://0002-Add-nios2-support.patch \
+ file://0001-md-Fix-build-with-musl.patch \
+ file://nspr.pc.in \
+"
+
+CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
+ -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
+ -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
+ -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'"
+
+UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
+UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
+
+SRC_URI[md5sum] = "e1d27282ad6286b69d6b9fd07201d3dd"
+SRC_URI[sha256sum] = "2ed95917fa2277910d1d1cf36030607dccc0ba522bba08e2af13c113dcd8f729"
+
+CVE_PRODUCT = "netscape_portable_runtime"
+
+S = "${WORKDIR}/nspr-${PV}/nspr"
+
+RDEPENDS_${PN}-dev += "perl"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+TESTS = " \
+ accept \
+ acceptread \
+ acceptreademu \
+ affinity \
+ alarm \
+ anonfm \
+ atomic \
+ attach \
+ bigfile \
+ cleanup \
+ cltsrv \
+ concur \
+ cvar \
+ cvar2 \
+ dlltest \
+ dtoa \
+ errcodes \
+ exit \
+ fdcach \
+ fileio \
+ foreign \
+ formattm \
+ fsync \
+ gethost \
+ getproto \
+ i2l \
+ initclk \
+ inrval \
+ instrumt \
+ intrio \
+ intrupt \
+ io_timeout \
+ ioconthr \
+ join \
+ joinkk \
+ joinku \
+ joinuk \
+ joinuu \
+ layer \
+ lazyinit \
+ libfilename \
+ lltest \
+ lock \
+ lockfile \
+ logfile \
+ logger \
+ many_cv \
+ multiwait \
+ nameshm1 \
+ nblayer \
+ nonblock \
+ ntioto \
+ ntoh \
+ op_2long \
+ op_excl \
+ op_filnf \
+ op_filok \
+ op_nofil \
+ parent \
+ parsetm \
+ peek \
+ perf \
+ pipeping \
+ pipeping2 \
+ pipeself \
+ poll_nm \
+ poll_to \
+ pollable \
+ prftest \
+ primblok \
+ provider \
+ prpollml \
+ ranfile \
+ randseed \
+ reinit \
+ rwlocktest \
+ sel_spd \
+ selct_er \
+ selct_nm \
+ selct_to \
+ selintr \
+ sema \
+ semaerr \
+ semaping \
+ sendzlf \
+ server_test \
+ servr_kk \
+ servr_uk \
+ servr_ku \
+ servr_uu \
+ short_thread \
+ sigpipe \
+ socket \
+ sockopt \
+ sockping \
+ sprintf \
+ stack \
+ stdio \
+ str2addr \
+ strod \
+ switch \
+ system \
+ testbit \
+ testfile \
+ threads \
+ timemac \
+ timetest \
+ tpd \
+ udpsrv \
+ vercheck \
+ version \
+ writev \
+ xnotify \
+ zerolen"
+
+inherit autotools
+
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+do_compile_prepend() {
+ oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX ${BUILD_CFLAGS}" LDFLAGS="" CC="${BUILD_CC}" -C config export
+}
+
+do_compile_append() {
+ oe_runmake -C pr/tests
+}
+
+do_install_append() {
+ install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
+ sed -i \
+ -e 's:NSPRVERSION:${PV}:g' \
+ -e 's:OEPREFIX:${prefix}:g' \
+ -e 's:OELIBDIR:${libdir}:g' \
+ -e 's:OEINCDIR:${includedir}:g' \
+ -e 's:OEEXECPREFIX:${exec_prefix}:g' \
+ ${D}${libdir}/pkgconfig/nspr.pc
+
+ mkdir -p ${D}${libdir}/nspr/tests
+ install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
+ install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
+ cd ${B}/pr/tests
+ install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
+
+ # delete compile-et.pl and perr.properties from ${bindir} because these are
+ # only used to generate prerr.c and prerr.h files from prerr.et at compile
+ # time
+ rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
+}
+
+FILES_${PN} = "${libdir}/lib*.so"
+FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
+ ${includedir}/* ${datadir}/aclocal/* "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch b/poky/meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch
new file mode 100644
index 000000000..82f25743a
--- /dev/null
+++ b/poky/meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch
@@ -0,0 +1,53 @@
+From d1345871b992f9a055c968963967e728da1a7ffb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Jan 2016 20:29:06 +0000
+Subject: [PATCH] nss-myhostname: Check for nss.h presense before use
+
+We do not have nss.h on musl e.g. and configury is already checking for
+nss.h presence, use this to define needed data structures if nss.h is
+missing on a given libc implementation on a platform
+
+include stdint.h for uint32_h definition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ nss-myhostname.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/nss-myhostname.c b/nss-myhostname.c
+index 293166c..6f287f5 100644
+--- a/nss-myhostname.c
++++ b/nss-myhostname.c
+@@ -21,7 +21,27 @@
+ ***/
+
+ #include <limits.h>
++#include <stdint.h>
++#ifdef HAVE_NSS_H
+ #include <nss.h>
++#else
++enum nss_status {
++ NSS_STATUS_TRYAGAIN = -2,
++ NSS_STATUS_UNAVAIL,
++ NSS_STATUS_NOTFOUND,
++ NSS_STATUS_SUCCESS,
++ NSS_STATUS_RETURN
++};
++/* Data structure used for the 'gethostbyname4_r' function. */
++struct gaih_addrtuple
++ {
++ struct gaih_addrtuple *next;
++ char *name;
++ int family;
++ uint32_t addr[4];
++ uint32_t scopeid;
++ };
++#endif
+ #include <sys/types.h>
+ #include <netdb.h>
+ #include <errno.h>
+--
+2.7.0
+
diff --git a/poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb b/poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
new file mode 100644
index 000000000..de5b7cf59
--- /dev/null
+++ b/poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Name Service Switch module for resolving the local hostname"
+DESCRIPTION = "plugin for the GNU Name Service Switch (NSS) functionality of \
+the GNU C Library (glibc) providing host name resolution for the locally \
+configured system hostname as returned by gethostname(2)."
+HOMEPAGE = "http://0pointer.de/lennart/projects/nss-myhostname/"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
+
+SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${PV}.tar.gz \
+ file://0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch \
+ "
+
+SRC_URI[md5sum] = "d4ab9ac36c053ab8fb836db1cbd4a48f"
+SRC_URI[sha256sum] = "2ba744ea8d578d1c57c85884e94a3042ee17843a5294434d3a7f6c4d67e7caf2"
+
+inherit autotools distro_features_check
+
+# The systemd has its own copy of nss-myhostname
+CONFLICT_DISTRO_FEATURES = "systemd"
+
+pkg_postinst_${PN} () {
+ sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+ -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_prerm_${PN} () {
+ sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+ -e '/^hosts:/s/\s*myhostname//' \
+ -i $D${sysconfdir}/nsswitch.conf
+}
diff --git a/poky/meta/recipes-support/nss/nss/0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch b/poky/meta/recipes-support/nss/nss/0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch
new file mode 100644
index 000000000..bc10f3385
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch
@@ -0,0 +1,119 @@
+From 6f7d7be9997ba6727a5ad7c3800df9051160dc12 Mon Sep 17 00:00:00 2001
+From: Martin Thomson <martin.thomson@gmail.com>
+Date: Tue, 13 Feb 2018 12:30:58 +1100
+Subject: [PATCH] Bug 1437734 - Use snprintf in sign.c, r=ttaubert
+
+--HG--
+extra : rebase_source : 97921ece71ff86b18d32b891591608290eed4d83
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport [https://github.com/nss-dev/nss/commit/0a9078b3cde97add7c825c9d13467a8401ad0c88#diff-b42512151dc137537091f823f7701804.patch]
+
+ nss/cmd/signtool/sign.c | 58 ++++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 48 insertions(+), 10 deletions(-)
+
+diff --git a/nss/cmd/signtool/sign.c b/nss/cmd/signtool/sign.c
+index 6e776069a..6f8e43946 100644
+--- a/nss/cmd/signtool/sign.c
++++ b/nss/cmd/signtool/sign.c
+@@ -43,6 +43,7 @@ SignArchive(char *tree, char *keyName, char *zip_file, int javascript,
+ int status;
+ char tempfn[FNSIZE], fullfn[FNSIZE];
+ int keyType = rsaKey;
++ int count;
+
+ metafile = meta_file;
+ optimize = _optimize;
+@@ -81,9 +82,18 @@ SignArchive(char *tree, char *keyName, char *zip_file, int javascript,
+ }
+
+ /* rsa/dsa to zip */
+- sprintf(tempfn, "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa"
+- : "rsa"));
+- sprintf(fullfn, "%s/%s", tree, tempfn);
++ count = snprintf(tempfn, sizeof(tempfn), "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa" : "rsa"));
++ if (count >= sizeof(tempfn)) {
++ PR_fprintf(errorFD, "unable to write key metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
++ count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++ if (count >= sizeof(fullfn)) {
++ PR_fprintf(errorFD, "unable to write key metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
+ JzipAdd(fullfn, tempfn, zipfile, compression_level);
+
+ /* Loop through all files & subdirectories, add to archive */
+@@ -93,20 +103,44 @@ SignArchive(char *tree, char *keyName, char *zip_file, int javascript,
+ }
+ /* mf to zip */
+ strcpy(tempfn, "META-INF/manifest.mf");
+- sprintf(fullfn, "%s/%s", tree, tempfn);
++ count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++ if (count >= sizeof(fullfn)) {
++ PR_fprintf(errorFD, "unable to write manifest\n");
++ errorCount++;
++ exit(ERRX);
++ }
+ JzipAdd(fullfn, tempfn, zipfile, compression_level);
+
+ /* sf to zip */
+- sprintf(tempfn, "META-INF/%s.sf", base);
+- sprintf(fullfn, "%s/%s", tree, tempfn);
++ count = snprintf(tempfn, sizeof(tempfn), "META-INF/%s.sf", base);
++ if (count >= sizeof(tempfn)) {
++ PR_fprintf(errorFD, "unable to write sf metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
++ count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++ if (count >= sizeof(fullfn)) {
++ PR_fprintf(errorFD, "unable to write sf metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
+ JzipAdd(fullfn, tempfn, zipfile, compression_level);
+
+ /* Add the rsa/dsa file to the zip archive normally */
+ if (!xpi_arc) {
+ /* rsa/dsa to zip */
+- sprintf(tempfn, "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa"
+- : "rsa"));
+- sprintf(fullfn, "%s/%s", tree, tempfn);
++ count = snprintf(tempfn, sizeof(tempfn), "META-INF/%s.%s", base, (keyType == dsaKey ? "dsa" : "rsa"));
++ if (count >= sizeof(tempfn)) {
++ PR_fprintf(errorFD, "unable to write key metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
++ count = snprintf(fullfn, sizeof(fullfn), "%s/%s", tree, tempfn);
++ if (count >= sizeof(fullfn)) {
++ PR_fprintf(errorFD, "unable to write key metadata\n");
++ errorCount++;
++ exit(ERRX);
++ }
+ JzipAdd(fullfn, tempfn, zipfile, compression_level);
+ }
+
+@@ -408,6 +442,7 @@ static int
+ manifesto_xpi_fn(char *relpath, char *basedir, char *reldir, char *filename, void *arg)
+ {
+ char fullname[FNSIZE];
++ int count;
+
+ if (verbosity >= 0) {
+ PR_fprintf(outputFD, "--> %s\n", relpath);
+@@ -421,7 +456,10 @@ manifesto_xpi_fn(char *relpath, char *basedir, char *reldir, char *filename, voi
+ if (!PL_HashTableLookup(extensions, ext))
+ return 0;
+ }
+- sprintf(fullname, "%s/%s", basedir, relpath);
++ count = snprintf(fullname, sizeof(fullname), "%s/%s", basedir, relpath);
++ if (count >= sizeof(fullname)) {
++ return 1;
++ }
+ JzipAdd(fullname, relpath, zipfile, compression_level);
+
+ return 0;
diff --git a/poky/meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch b/poky/meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch
new file mode 100644
index 000000000..d5403397e
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/0001-nss-fix-support-cross-compiling.patch
@@ -0,0 +1,48 @@
+From 0cf47ee432cc26a706864fcc09b2c3adc342a679 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 22 Feb 2017 11:36:11 +0200
+Subject: [PATCH] nss: fix support cross compiling
+
+Let some make variables be assigned from outside makefile.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ nss/coreconf/arch.mk | 2 +-
+ nss/lib/freebl/Makefile | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk
+index 06c276f..9c1eb51 100644
+--- a/nss/coreconf/arch.mk
++++ b/nss/coreconf/arch.mk
+@@ -30,7 +30,7 @@ OS_TEST := $(shell uname -m)
+ ifeq ($(OS_TEST),i86pc)
+ OS_RELEASE := $(shell uname -r)_$(OS_TEST)
+ else
+- OS_RELEASE := $(shell uname -r)
++ OS_RELEASE ?= $(shell uname -r)
+ endif
+
+ #
+diff --git a/nss/lib/freebl/Makefile b/nss/lib/freebl/Makefile
+index 0ce1425..ebeb411 100644
+--- a/nss/lib/freebl/Makefile
++++ b/nss/lib/freebl/Makefile
+@@ -36,6 +36,12 @@ ifdef USE_64
+ DEFINES += -DNSS_USE_64
+ endif
+
++ifeq ($(OS_TEST),mips)
++ifndef USE_64
++ DEFINES += -DNS_PTR_LE_32
++endif
++endif
++
+ ifdef USE_ABI32_FPU
+ DEFINES += -DNSS_USE_ABI32_FPU
+ endif
+--
+2.11.0
+
diff --git a/poky/meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch b/poky/meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch
new file mode 100644
index 000000000..80b86908e
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/Fix-compilation-for-X32.patch
@@ -0,0 +1,33 @@
+From c8eadfcdfbc1d5a4799e9a264b0f859cb5954c05 Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Tue, 13 Dec 2016 11:40:47 -0700
+Subject: [PATCH 7/7] Fix compilation for X32
+
+X32 uses 32-bit pointers, not 64-bit.
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+
+Upstream-Status: Pending
+---
+ nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c b/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c
+index 2a3301e..d4ade41 100644
+--- a/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c
++++ b/nss/lib/freebl/poly1305-donna-x64-sse2-incremental-source.c
+@@ -87,7 +87,11 @@ static poly1305_state_internal INLINE
+ *
+ poly1305_aligned_state(poly1305_state *state)
+ {
++#ifdef __ILP32__
++ return (poly1305_state_internal *)(((uint32_t)state + 63) & ~63);
++#else
+ return (poly1305_state_internal *)(((uint64_t)state + 63) & ~63);
++#endif
+ }
+
+ /* copy 0-63 bytes */
+--
+2.8.0
+
diff --git a/poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch b/poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
new file mode 100644
index 000000000..86b1b6055
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/disable-Wvarargs-with-clang.patch
@@ -0,0 +1,33 @@
+clang 3.9 add this warning to rightly flag undefined
+behavior, we relegate this to be just a warning instead
+of error and keep the behavior as it was. Right fix would
+be to not pass enum to the function with variadic arguments
+as last named argument
+
+Fixes errors like
+ocsp.c:2220:22: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]
+ va_start(ap, responseType0);
+ ^
+ocsp.c:2200:43: note: parameter of type 'SECOidTag' is declared here
+ SECOidTag responseType0, ...)
+
+see
+https://www.securecoding.cert.org/confluence/display/cplusplus/EXP58-CPP.+Pass+an+object+of+the+correct+type+to+va_start
+for more details
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: nss-3.24/nss/coreconf/Werror.mk
+===================================================================
+--- nss-3.24.orig/nss/coreconf/Werror.mk
++++ nss-3.24/nss/coreconf/Werror.mk
+@@ -54,7 +54,7 @@ ifndef WARNING_CFLAGS
+ ifdef CC_IS_CLANG
+ # -Qunused-arguments : clang objects to arguments that it doesn't understand
+ # and fixing this would require rearchitecture
+- WARNING_CFLAGS += -Qunused-arguments
++ WARNING_CFLAGS += -Qunused-arguments -Wno-error=varargs
+ # -Wno-parentheses-equality : because clang warns about macro expansions
+ WARNING_CFLAGS += $(call disable_warning,parentheses-equality)
+ ifdef BUILD_OPT
diff --git a/poky/meta/recipes-support/nss/nss/nss-build-hacl-poly1305-aarch64.patch b/poky/meta/recipes-support/nss/nss/nss-build-hacl-poly1305-aarch64.patch
new file mode 100644
index 000000000..8276f89e8
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/nss-build-hacl-poly1305-aarch64.patch
@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Daiki Ueno <dueno@redhat.com>
+# Date 1516710574 -3600
+# Tue Jan 23 13:29:34 2018 +0100
+# Node ID 27f27ce21c2c6ff5a47fa9e17c438b000366c9c9
+# Parent be1dca5ac80541d3b81a8da9d42854d8b1cceefb
+Build Hacl_Poly1305_64.o on aarch64 even with make
+
+Upstream-Status: Backport
+https://bug1432455.bmoattachments.org/attachment.cgi?id=8944691
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nss-3.35/nss/lib/freebl/Makefile
+===================================================================
+--- nss-3.35.orig/nss/lib/freebl/Makefile
++++ nss-3.35/nss/lib/freebl/Makefile
+@@ -533,7 +533,12 @@ ifndef NSS_DISABLE_CHACHAPOLY
+ EXTRA_SRCS += chacha20_vec.c
+ endif
+ else
+- EXTRA_SRCS += poly1305.c
++ ifeq ($(CPU_ARCH),aarch64)
++ EXTRA_SRCS += Hacl_Poly1305_64.c
++ else
++ EXTRA_SRCS += poly1305.c
++ endif
++
+ EXTRA_SRCS += chacha20.c
+ VERIFIED_SRCS += Hacl_Chacha20.c
+ endif # x86_64
diff --git a/poky/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch b/poky/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch
new file mode 100644
index 000000000..547594d5b
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch
@@ -0,0 +1,110 @@
+nss: fix incorrect shebang of perl
+
+Replace incorrect shebang of perl with `#!/usr/bin/env perl'.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Upstream-Status: Pending
+---
+ nss/cmd/smimetools/smime | 2 +-
+ nss/coreconf/cpdist.pl | 2 +-
+ nss/coreconf/import.pl | 2 +-
+ nss/coreconf/jniregen.pl | 2 +-
+ nss/coreconf/outofdate.pl | 2 +-
+ nss/coreconf/release.pl | 2 +-
+ nss/coreconf/version.pl | 2 +-
+ nss/tests/clean_tbx | 2 +-
+ nss/tests/path_uniq | 2 +-
+ 9 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/nss/cmd/smimetools/smime b/nss/cmd/smimetools/smime
+--- a/nss/cmd/smimetools/smime
++++ b/nss/cmd/smimetools/smime
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/env perl
+
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+diff --git a/nss/coreconf/cpdist.pl b/nss/coreconf/cpdist.pl
+index 800edfb..652187f 100755
+--- a/nss/coreconf/cpdist.pl
++++ b/nss/coreconf/cpdist.pl
+@@ -1,4 +1,4 @@
+-#! /usr/local/bin/perl
++#!/usr/bin/env perl
+ #
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+diff --git a/nss/coreconf/import.pl b/nss/coreconf/import.pl
+index dd2d177..428eaa5 100755
+--- a/nss/coreconf/import.pl
++++ b/nss/coreconf/import.pl
+@@ -1,4 +1,4 @@
+-#! /usr/local/bin/perl
++#!/usr/bin/env perl
+ #
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+diff --git a/nss/coreconf/jniregen.pl b/nss/coreconf/jniregen.pl
+index 2039180..5f4f69c 100755
+--- a/nss/coreconf/jniregen.pl
++++ b/nss/coreconf/jniregen.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/env perl
+ #
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+diff --git a/nss/coreconf/outofdate.pl b/nss/coreconf/outofdate.pl
+index 33d80bb..01fc097 100755
+--- a/nss/coreconf/outofdate.pl
++++ b/nss/coreconf/outofdate.pl
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/env perl
+ #
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+diff --git a/nss/coreconf/release.pl b/nss/coreconf/release.pl
+index 7cde19d..b5df2f6 100755
+--- a/nss/coreconf/release.pl
++++ b/nss/coreconf/release.pl
+@@ -1,4 +1,4 @@
+-#! /usr/local/bin/perl
++#!/usr/bin/env perl
+ #
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+diff --git a/nss/coreconf/version.pl b/nss/coreconf/version.pl
+index d2a4942..79359fe 100644
+--- a/nss/coreconf/version.pl
++++ b/nss/coreconf/version.pl
+@@ -1,4 +1,4 @@
+-#!/usr/sbin/perl
++#!/usr/bin/env perl
+ #
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+diff --git a/nss/tests/clean_tbx b/nss/tests/clean_tbx
+index 4de9555..a7def9f 100755
+--- a/nss/tests/clean_tbx
++++ b/nss/tests/clean_tbx
+@@ -1,4 +1,4 @@
+-#! /bin/perl
++#!/usr/bin/env perl
+
+ #######################################################################
+ #
+diff --git a/nss/tests/path_uniq b/nss/tests/path_uniq
+index f29f60a..08fbffa 100755
+--- a/nss/tests/path_uniq
++++ b/nss/tests/path_uniq
+@@ -1,4 +1,4 @@
+-#! /bin/perl
++#!/usr/bin/env perl
+
+ ########################################################################
+ #
+--
+1.8.1.2
+
diff --git a/poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch b/poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
new file mode 100644
index 000000000..181c69adb
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
@@ -0,0 +1,36 @@
+Fix nss multilib build on openSUSE 11.x 32bit
+
+While building lib64-nss on openSUSE 11.x 32bit, the nsinstall will
+fail with error:
+
+* nsinstall.c:1:0: sorry, unimplemented: 64-bit mode not compiled
+
+It caused by the '-m64' option which passed to host gcc.
+
+The nsinstall was built first while nss starting to build, it only runs
+on host to install built files, it doesn't need any cross-compling or
+multilib build options. Just clean the ARCHFLAG and LDFLAGS to fix this
+error.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+===================================================
+Index: nss-3.24/nss/coreconf/nsinstall/Makefile
+===================================================================
+--- nss-3.24.orig/nss/coreconf/nsinstall/Makefile
++++ nss-3.24/nss/coreconf/nsinstall/Makefile
+@@ -18,6 +18,13 @@ INTERNAL_TOOLS = 1
+
+ include $(DEPTH)/coreconf/config.mk
+
++# nsinstall is unfit for cross-compiling/multilib-build since it was
++# always run on local host to install built files. This change intends
++# to clean the '-m64' from ARCHFLAG and LDFLAGS.
++ARCHFLAG =
++LDFLAGS =
++CFLAGS =
++
+ ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
+ PROGRAM =
+ else
diff --git a/poky/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch b/poky/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch
new file mode 100644
index 000000000..7661dc93a
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch
@@ -0,0 +1,26 @@
+nss:no rpath for cross compiling
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Upstream-Status: Inappropriate [configuration]
+---
+ nss/cmd/platlibs.mk | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
+--- a/nss/cmd/platlibs.mk
++++ b/nss/cmd/platlibs.mk
+@@ -18,9 +18,9 @@ endif
+
+ ifeq ($(OS_ARCH), Linux)
+ ifeq ($(USE_64), 1)
+-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
++#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib64:/opt/sun/private/lib64:$$ORIGIN/../lib'
+ else
+-EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
++#EXTRA_SHARED_LIBS += -Wl,-rpath,'$$ORIGIN/../lib:/opt/sun/private/lib'
+ endif
+ endif
+
+--
+1.8.1.2
+
diff --git a/poky/meta/recipes-support/nss/nss/nss.pc.in b/poky/meta/recipes-support/nss/nss/nss.pc.in
new file mode 100644
index 000000000..200f635c6
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/nss.pc.in
@@ -0,0 +1,11 @@
+prefix=OEPREFIX
+exec_prefix=OEEXECPREFIX
+libdir=OELIBDIR
+includedir=OEINCDIR
+
+Name: NSS
+Description: Network Security Services
+Version: %NSS_VERSION%
+Requires: nspr >= %NSPR_VERSION%
+Libs: -lssl3 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3
+Cflags: -IOEINCDIR
diff --git a/poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch b/poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
new file mode 100644
index 000000000..9942bf192
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
@@ -0,0 +1,23 @@
+nss does not build on mips with clang because wrong types are used?
+
+pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
+ if (addend < MP_DIGIT_MAX) {
+ ~~~~~~ ^ ~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: nss-3.24/nss/lib/freebl/pqg.c
+===================================================================
+--- nss-3.24.orig/nss/lib/freebl/pqg.c
++++ nss-3.24/nss/lib/freebl/pqg.c
+@@ -322,8 +322,8 @@ generate_h_candidate(SECItem *hit, mp_in
+
+ static SECStatus
+ addToSeed(const SECItem *seed,
+- unsigned long addend,
+- int seedlen, /* g in 186-1 */
++ unsigned long long addend,
++ int seedlen, /* g in 186-1 */
+ SECItem *seedout)
+ {
+ mp_int s, sum, modulus, tmp;
diff --git a/poky/meta/recipes-support/nss/nss/signlibs.sh b/poky/meta/recipes-support/nss/nss/signlibs.sh
new file mode 100644
index 000000000..a74e499f8
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss/signlibs.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# signlibs.sh
+#
+# (c)2010 Wind River Systems, Inc.
+#
+# regenerates the .chk files for the NSS libraries that require it
+# since the ones that are built have incorrect checksums that were
+# calculated on the host where they really need to be done on the
+# target
+
+CHK_FILES=`ls /lib*/*.chk /usr/lib*/*.chk 2>/dev/null`
+SIGN_BINARY=`which shlibsign`
+for I in $CHK_FILES
+do
+ DN=`dirname $I`
+ BN=`basename $I .chk`
+ FN=$DN/$BN.so
+ $SIGN_BINARY -i $FN
+done
diff --git a/poky/meta/recipes-support/nss/nss_3.35.bb b/poky/meta/recipes-support/nss/nss_3.35.bb
new file mode 100644
index 000000000..84f1916f3
--- /dev/null
+++ b/poky/meta/recipes-support/nss/nss_3.35.bb
@@ -0,0 +1,255 @@
+SUMMARY = "Mozilla's SSL and TLS implementation"
+DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
+designed to support cross-platform development of \
+security-enabled client and server applications. \
+Applications built with NSS can support SSL v2 and v3, \
+TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
+v3 certificates, and other security standards."
+HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
+SECTION = "libs"
+
+LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
+
+LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
+ file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
+ file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
+
+VERSION_DIR = "${@d.getVar('BP').upper().replace('-', '_').replace('.', '_') + '_RTM'}"
+
+SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSION_DIR}/src/${BP}.tar.gz \
+ file://nss.pc.in \
+ file://signlibs.sh \
+ file://0001-nss-fix-support-cross-compiling.patch \
+ file://nss-no-rpath-for-cross-compiling.patch \
+ file://nss-fix-incorrect-shebang-of-perl.patch \
+ file://nss-fix-nsinstall-build.patch \
+ file://disable-Wvarargs-with-clang.patch \
+ file://pqg.c-ULL_addend.patch \
+ file://Fix-compilation-for-X32.patch \
+ file://nss-build-hacl-poly1305-aarch64.patch \
+ file://0001-Bug-1437734-Use-snprintf-in-sign.c-r-ttaubert.patch \
+ "
+
+SRC_URI[md5sum] = "9467ec9e65c5aeb3254a50250490f5f7"
+SRC_URI[sha256sum] = "f4127de09bede39f5fd0f789d33c3504c5d261e69ea03022d46b319b3e32f6fa"
+
+UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
+UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
+
+inherit siteinfo
+
+DEPENDS = "sqlite3 nspr zlib nss-native"
+DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
+RDEPENDS_${PN}-smime = "perl"
+
+TD = "${S}/tentative-dist"
+TDS = "${S}/tentative-dist-staging"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_configure_prepend_libc-musl () {
+ sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
+}
+
+do_compile_prepend_class-native() {
+ export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
+ export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
+ export NSS_ENABLE_WERROR=0
+}
+
+do_compile_prepend_class-nativesdk() {
+ export LDFLAGS=""
+}
+
+do_compile_prepend_class-native() {
+ # Need to set RPATH so that chrpath will do its job correctly
+ RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
+}
+
+do_compile() {
+ export CROSS_COMPILE=1
+ export NATIVE_CC="${BUILD_CC}"
+ export NATIVE_FLAGS="${BUILD_CFLAGS}"
+ export BUILD_OPT=1
+
+ export FREEBL_NO_DEPEND=1
+ export FREEBL_LOWHASH=1
+
+ export LIBDIR=${libdir}
+ export MOZILLA_CLIENT=1
+ export NS_USE_GCC=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSS_ENABLE_ECC=1
+
+ export OS_RELEASE=3.4
+ export OS_TARGET=Linux
+ export OS_ARCH=Linux
+
+ if [ "${TARGET_ARCH}" = "powerpc" ]; then
+ OS_TEST=ppc
+ elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+ OS_TEST=ppc64
+ elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+ OS_TEST=mips
+ else
+ OS_TEST="${TARGET_ARCH}"
+ fi
+
+ if [ "${SITEINFO_BITS}" = "64" ]; then
+ export USE_64=1
+ elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+ export USE_X32=1
+ fi
+
+ export NSS_DISABLE_GTESTS=1
+
+ # We can modify CC in the environment, but if we set it via an
+ # argument to make, nsinstall, a host program, will also build with it!
+ #
+ # nss pretty much does its own thing with CFLAGS, so we put them into CC.
+ # Optimization will get clobbered, but most of the stuff will survive.
+ # The motivation for this is to point to the correct place for debug
+ # source files and CFLAGS does that. Nothing uses CCC.
+ #
+ export CC="${CC} ${CFLAGS}"
+ make -C ./nss CCC="${CXX} -g" \
+ OS_TEST=${OS_TEST} \
+ RPATH="${RPATH}"
+}
+do_compile[vardepsexclude] += "SITEINFO_BITS"
+
+
+do_install_prepend_class-nativesdk() {
+ export LDFLAGS=""
+}
+
+do_install() {
+ export CROSS_COMPILE=1
+ export NATIVE_CC="${BUILD_CC}"
+ export BUILD_OPT=1
+
+ export FREEBL_NO_DEPEND=1
+
+ export LIBDIR=${libdir}
+ export MOZILLA_CLIENT=1
+ export NS_USE_GCC=1
+ export NSS_USE_SYSTEM_SQLITE=1
+ export NSS_ENABLE_ECC=1
+
+ export OS_RELEASE=3.4
+ export OS_TARGET=Linux
+ export OS_ARCH=Linux
+
+ if [ "${TARGET_ARCH}" = "powerpc" ]; then
+ OS_TEST=ppc
+ elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+ OS_TEST=ppc64
+ elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+ OS_TEST=mips
+ else
+ OS_TEST="${TARGET_ARCH}"
+ fi
+ if [ "${SITEINFO_BITS}" = "64" ]; then
+ export USE_64=1
+ elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+ export USE_X32=1
+ fi
+
+ export NSS_DISABLE_GTESTS=1
+
+ make -C ./nss \
+ CCC="${CXX}" \
+ OS_TEST=${OS_TEST} \
+ SOURCE_LIB_DIR="${TD}/${libdir}" \
+ SOURCE_BIN_DIR="${TD}/${bindir}" \
+ install
+
+ install -d ${D}/${libdir}/
+ for file in ${S}/dist/*.OBJ/lib/*.so; do
+ echo "Installing `basename $file`..."
+ cp $file ${D}/${libdir}/
+ done
+
+ for shared_lib in ${TD}/${libdir}/*.so.*; do
+ if [ -f $shared_lib ]; then
+ cp $shared_lib ${D}/${libdir}
+ ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
+ fi
+ done
+ for shared_lib in ${TD}/${libdir}/*.so; do
+ if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
+ cp $shared_lib ${D}/${libdir}
+ fi
+ done
+
+ install -d ${D}/${includedir}/nss3
+ install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
+
+ install -d ${D}/${bindir}
+ for binary in ${TD}/${bindir}/*; do
+ install -m 755 -t ${D}/${bindir} $binary
+ done
+}
+do_install[vardepsexclude] += "SITEINFO_BITS"
+
+do_install_append() {
+ # Create empty .chk files for the NSS libraries at build time. They could
+ # be regenerated at target's boot time.
+ for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
+ touch ${D}/${libdir}/$file
+ chmod 755 ${D}/${libdir}/$file
+ done
+ install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
+
+ install -d ${D}${libdir}/pkgconfig/
+ sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
+ sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
+}
+
+do_install_append_class-target() {
+ # Create a blank certificate
+ mkdir -p ${D}${sysconfdir}/pki/nssdb/
+ touch ./empty_password
+ certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
+ chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
+ rm ./empty_password
+}
+
+PACKAGE_WRITE_DEPS += "nss-native"
+pkg_postinst_${PN} () {
+ if [ -n "$D" ]; then
+ for I in $D${libdir}/lib*.chk; do
+ DN=`dirname $I`
+ BN=`basename $I .chk`
+ FN=$DN/$BN.so
+ shlibsign -i $FN
+ if [ $? -ne 0 ]; then
+ exit 1
+ fi
+ done
+ else
+ signlibs.sh
+ fi
+}
+
+PACKAGES =+ "${PN}-smime"
+FILES_${PN}-smime = "\
+ ${bindir}/smime \
+"
+FILES_${PN} = "\
+ ${sysconfdir} \
+ ${bindir} \
+ ${libdir}/lib*.chk \
+ ${libdir}/lib*.so \
+ "
+FILES_${PN}-dev = "\
+ ${libdir}/nss \
+ ${libdir}/pkgconfig/* \
+ ${includedir}/* \
+ "
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/poky/meta/recipes-support/p11-kit/p11-kit/0001-LINGUAS-drop-the-languages-for-which-upstream-does-n.patch b/poky/meta/recipes-support/p11-kit/p11-kit/0001-LINGUAS-drop-the-languages-for-which-upstream-does-n.patch
new file mode 100644
index 000000000..2fda9dfbb
--- /dev/null
+++ b/poky/meta/recipes-support/p11-kit/p11-kit/0001-LINGUAS-drop-the-languages-for-which-upstream-does-n.patch
@@ -0,0 +1,32 @@
+From c3aa4aae5e9f4adafd9e10d9466f1bc481e0aae6 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 31 Jan 2018 16:47:44 +0200
+Subject: [PATCH] LINGUAS: drop the languages for which upstream does not
+ supply .po files
+
+Regenerating them proved to be too painful.
+Upstream has been notified: https://github.com/p11-glue/p11-kit/issues/127
+
+Upstream-Status: Inappropriate [missing upstream distribution files]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ po/LINGUAS | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/po/LINGUAS b/po/LINGUAS
+index 1fc4d53..e9cc5a7 100644
+--- a/po/LINGUAS
++++ b/po/LINGUAS
+@@ -11,9 +11,7 @@ cy
+ da
+ de
+ el
+-en@boldquot
+ en_GB
+-en@quot
+ eo
+ es
+ es_CL
+--
+2.15.1
+
diff --git a/poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb b/poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
new file mode 100644
index 000000000..57798f402
--- /dev/null
+++ b/poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Provides a way to load and enumerate PKCS#11 modules"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50"
+
+inherit autotools gettext pkgconfig gtk-doc
+
+DEPENDS = "libtasn1 libffi"
+
+SRC_URI = "git://github.com/p11-glue/p11-kit \
+ file://0001-LINGUAS-drop-the-languages-for-which-upstream-does-n.patch \
+ "
+SRCREV = "bfb3bd47aa48983f5349479bca598403097ff81c"
+S = "${WORKDIR}/git"
+# exclude odd minor versions, which are development releases
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
+
+AUTOTOOLS_AUXDIR = "${S}/build/litter"
+EXTRA_OECONF = "--without-trust-paths"
+
+# This recipe does not use the standard gtk-doc m4 macros, and so the ./configure flags
+# that control gtk-doc build are non-standard
+EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-doc --enable-doc-html --disable-doc-pdf', \
+ '--disable-doc', d)} "
+
+# When building native recipes, disable gtkdoc, as it is not necessary,
+# pulls in additional dependencies, and makes build times longer
+EXTRA_OECONF_prepend_class-native = "--disable-doc "
+EXTRA_OECONF_prepend_class-nativesdk = "--disable-doc "
+
+UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-gtk-doc-html --disable-gtk-doc-pdf --enable-gtk-doc --disable-gtk-doc"
+
+# p11-kit relies on these two being copied from source tree
+# instead of being regenerated by gtkdoc-scan, but doesn't setup
+# dependencies correctly when there is a parallel build. Let's pre-copy
+# them instead.
+do_compile_prepend () {
+ cp ${S}/doc/manual/p11-kit-overrides.txt ${S}/doc/manual/p11-kit-sections.txt ${B}/doc/manual/
+}
+
+FILES_${PN} += " \
+ ${libdir}/p11-kit-proxy.so \
+ ${libdir}/pkcs11/*.so \
+ ${libdir}/pkcs11/*.la"
+
+# PN contains p11-kit-proxy.so, a symlink to a loadable module
+INSANE_SKIP_${PN} = "dev-so"
diff --git a/poky/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch b/poky/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch
new file mode 100644
index 000000000..431edb035
--- /dev/null
+++ b/poky/meta/recipes-support/pinentry/pinentry-1.1.0/gpg-error_pkconf.patch
@@ -0,0 +1,100 @@
+Convert to pkg-config support to match changes done to
+the gpg-error recipe for gpg-error.pc generation.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: pinentry-1.0.0/m4/gpg-error.m4
+===================================================================
+--- pinentry-1.0.0.orig/m4/gpg-error.m4
++++ pinentry-1.0.0/m4/gpg-error.m4
+@@ -25,74 +25,12 @@ dnl config script does not match the hos
+ dnl is added to the gpg_config_script_warn variable.
+ dnl
+ AC_DEFUN([AM_PATH_GPG_ERROR],
+-[ AC_REQUIRE([AC_CANONICAL_HOST])
+- gpg_error_config_prefix=""
+- dnl --with-libgpg-error-prefix=PFX is the preferred name for this option,
+- dnl since that is consistent with how our three siblings use the directory/
+- dnl package name in --with-$dir_name-prefix=PFX.
+- AC_ARG_WITH(libgpg-error-prefix,
+- AC_HELP_STRING([--with-libgpg-error-prefix=PFX],
+- [prefix where GPG Error is installed (optional)]),
+- [gpg_error_config_prefix="$withval"])
+-
+- dnl Accept --with-gpg-error-prefix and make it work the same as
+- dnl --with-libgpg-error-prefix above, for backwards compatibility,
+- dnl but do not document this old, inconsistently-named option.
+- AC_ARG_WITH(gpg-error-prefix,,
+- [gpg_error_config_prefix="$withval"])
+-
+- if test x"${GPG_ERROR_CONFIG}" = x ; then
+- if test x"${gpg_error_config_prefix}" != x ; then
+- GPG_ERROR_CONFIG="${gpg_error_config_prefix}/bin/gpg-error-config"
+- else
+- case "${SYSROOT}" in
+- /*)
+- if test -x "${SYSROOT}/bin/gpg-error-config" ; then
+- GPG_ERROR_CONFIG="${SYSROOT}/bin/gpg-error-config"
+- fi
+- ;;
+- '')
+- ;;
+- *)
+- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+- ;;
+- esac
+- fi
+- fi
+-
+- AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no)
++[
+ min_gpg_error_version=ifelse([$1], ,0.0,$1)
+- AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version)
+- ok=no
+- if test "$GPG_ERROR_CONFIG" != "no" \
+- && test -f "$GPG_ERROR_CONFIG" ; then
+- req_major=`echo $min_gpg_error_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_gpg_error_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version`
+- major=`echo $gpg_error_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+- minor=`echo $gpg_error_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+- if test "$major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$major" -eq "$req_major"; then
+- if test "$minor" -ge "$req_minor"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
++ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version gpg-error], [ok=yes], [ok=no])
+ if test $ok = yes; then
+- GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags`
+- GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs`
+- GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --cflags 2>/dev/null`
+- GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --mt --libs 2>/dev/null`
+- AC_MSG_RESULT([yes ($gpg_error_config_version)])
+ ifelse([$2], , :, [$2])
+- gpg_error_config_host=`$GPG_ERROR_CONFIG $gpg_error_config_args --host 2>/dev/null || echo none`
++ gpg_error_config_host=`$PKG_CONFIG --host gpg-error 2>/dev/null || echo none`
+ if test x"$gpg_error_config_host" != xnone ; then
+ if test x"$gpg_error_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+@@ -107,10 +45,6 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
+ fi
+ fi
+ else
+- GPG_ERROR_CFLAGS=""
+- GPG_ERROR_LIBS=""
+- GPG_ERROR_MT_CFLAGS=""
+- GPG_ERROR_MT_LIBS=""
+ AC_MSG_RESULT(no)
+ ifelse([$3], , :, [$3])
+ fi
diff --git a/poky/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch b/poky/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch
new file mode 100644
index 000000000..11d564f35
--- /dev/null
+++ b/poky/meta/recipes-support/pinentry/pinentry-1.1.0/libassuan_pkgconf.patch
@@ -0,0 +1,153 @@
+Convert to pkg-config support to match changes done to
+the libassuan recipe for libassuan.pc generation.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: pinentry-1.0.0/m4/libassuan.m4
+===================================================================
+--- pinentry-1.0.0.orig/m4/libassuan.m4
++++ pinentry-1.0.0/m4/libassuan.m4
+@@ -13,34 +13,8 @@ dnl
+ dnl Common code used for libassuan detection [internal]
+ dnl Returns ok set to yes or no.
+ dnl
+-AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+-[ AC_REQUIRE([AC_CANONICAL_HOST])
+- AC_ARG_WITH(libassuan-prefix,
+- AC_HELP_STRING([--with-libassuan-prefix=PFX],
+- [prefix where LIBASSUAN is installed (optional)]),
+- libassuan_config_prefix="$withval", libassuan_config_prefix="")
+- if test x$libassuan_config_prefix != x ; then
+- libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix"
+- if test x${LIBASSUAN_CONFIG+set} != xset ; then
+- LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config
+- fi
+- else
+- case "${SYSROOT}" in
+- /*)
+- if test -x "${SYSROOT}/bin/libassuan-config" ; then
+- LIBASSUAN_CONFIG="${SYSROOT}/bin/libassuan-config"
+- fi
+- ;;
+- '')
+- ;;
+- *)
+- AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+- ;;
+- esac
+- fi
+-
+- AC_PATH_TOOL(LIBASSUAN_CONFIG, libassuan-config, no)
+-
++AC_DEFUN([AM_PATH_LIBASSUAN_COMMON],
++[
+ tmp=ifelse([$1], ,1:0.9.2,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+ req_libassuan_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
+@@ -50,51 +24,11 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+ min_libassuan_version="$tmp"
+ fi
+
+- AC_MSG_CHECKING(for LIBASSUAN - version >= $min_libassuan_version)
+- ok=no
+- if test "$LIBASSUAN_CONFIG" != "no" \
+- && test -f "$LIBASSUAN_CONFIG" ; then
+- req_major=`echo $min_libassuan_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+- req_minor=`echo $min_libassuan_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+- req_micro=`echo $min_libassuan_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+-
+- libassuan_config_version=`$LIBASSUAN_CONFIG --version`
+- major=`echo $libassuan_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+- minor=`echo $libassuan_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+- micro=`echo $libassuan_config_version | \
+- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+-
+- if test "$major" -gt "$req_major"; then
+- ok=yes
+- else
+- if test "$major" -eq "$req_major"; then
+- if test "$minor" -gt "$req_minor"; then
+- ok=yes
+- else
+- if test "$minor" -eq "$req_minor"; then
+- if test "$micro" -ge "$req_micro"; then
+- ok=yes
+- fi
+- fi
+- fi
+- fi
+- fi
+- fi
+-
+- if test $ok = yes; then
+- AC_MSG_RESULT([yes ($libassuan_config_version)])
+- else
+- AC_MSG_RESULT(no)
+- fi
++ PKG_CHECK_MODULES(LIBASSUAN_COMMON, [libassuan >= $min_libassuan_version libassuan], [ok=yes], [ok=no])
+
+ if test $ok = yes; then
+ if test "$req_libassuan_api" -gt 0 ; then
+- tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0`
++ tmp=`$PKG_CONFIG --variable=api_version libassuan 2>/dev/null || echo 0`
+ if test "$tmp" -gt 0 ; then
+ AC_MSG_CHECKING([LIBASSUAN API version])
+ if test "$req_libassuan_api" -eq "$tmp" ; then
+@@ -109,7 +43,7 @@ AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+
+ if test $ok = yes; then
+ if test x"$host" != x ; then
+- libassuan_config_host=`$LIBASSUAN_CONFIG --host 2>/dev/null || echo none`
++ libassuan_config_host=`$PKG_CONFIG --host libassuan 2>/dev/null || echo 0`
+ if test x"$libassuan_config_host" != xnone ; then
+ if test x"$libassuan_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+@@ -132,7 +66,7 @@ dnl Test whether libassuan has at least
+ dnl used to test for features only available in newer versions.
+ dnl
+ AC_DEFUN([AM_CHECK_LIBASSUAN],
+-[ _AM_PATH_LIBASSUAN_COMMON($1)
++[ AM_PATH_LIBASSUAN_COMMON($1)
+ if test $ok = yes; then
+ ifelse([$2], , :, [$2])
+ else
+@@ -148,16 +82,10 @@ dnl [ACTION-IF-FOUND [
+ dnl Test for libassuan and define LIBASSUAN_CFLAGS and LIBASSUAN_LIBS
+ dnl
+ AC_DEFUN([AM_PATH_LIBASSUAN],
+-[ _AM_PATH_LIBASSUAN_COMMON($1)
++[ AM_PATH_LIBASSUAN_COMMON($1)
+ if test $ok = yes; then
+- LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags`
+- LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs`
+ ifelse([$2], , :, [$2])
+ else
+- LIBASSUAN_CFLAGS=""
+- LIBASSUAN_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+- AC_SUBST(LIBASSUAN_CFLAGS)
+- AC_SUBST(LIBASSUAN_LIBS)
+ ])
+Index: pinentry-1.0.0/configure.ac
+===================================================================
+--- pinentry-1.0.0.orig/configure.ac
++++ pinentry-1.0.0/configure.ac
+@@ -266,8 +266,8 @@ if test "$have_libassuan" = "yes"; then
+ [version of the libassuan library])
+ fi
+
+-COMMON_CFLAGS="$LIBASSUAN_CFLAGS $COMMON_CFLAGS"
+-COMMON_LIBS="$LIBASSUAN_LIBS $COMMON_LIBS"
++COMMON_CFLAGS="$LIBASSUAN_COMMON_CFLAGS $COMMON_CFLAGS"
++COMMON_LIBS="$LIBASSUAN_COMMON_LIBS $COMMON_LIBS"
+
+
+ dnl Checks for libsecmem.
diff --git a/poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb b/poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb
new file mode 100644
index 000000000..1eaa261f7
--- /dev/null
+++ b/poky/meta/recipes-support/pinentry/pinentry_1.1.0.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Collection of simple PIN or passphrase entry dialogs"
+DESCRIPTION = "\
+ Pinentry is a collection of simple PIN or passphrase entry dialogs which \
+ utilize the Assuan protocol as described by the aegypten project; see \
+ http://www.gnupg.org/aegypten/ for details."
+
+HOMEPAGE = "http://www.gnupg.org/related_software/pinentry/index.en.html"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cbbd794e2a0a289b9dfcc9f513d1996e"
+
+inherit autotools pkgconfig
+
+DEPENDS = "gettext-native libassuan libgpg-error"
+
+UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
+SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://libassuan_pkgconf.patch \
+ file://gpg-error_pkconf.patch \
+"
+
+SRC_URI[md5sum] = "3829315cb0a1e9cedc05ffe6def7a2c6"
+SRC_URI[sha256sum] = "68076686fa724a290ea49cdf0d1c0c1500907d1b759a3bcbfbec0293e8f56570"
+
+EXTRA_OECONF = "--disable-rpath --disable-dependency-tracking \
+ --disable-pinentry-qt5 \
+"
+
+PACKAGECONFIG ??= "ncurses libcap"
+
+PACKAGECONFIG[ncurses] = "--enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
+PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
+PACKAGECONFIG[qt] = "--enable-pinentry-qt, --disable-pinentry-qt, qt4-x11"
+PACKAGECONFIG[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0"
+
+#To use libsecret, add meta-gnome
+PACKAGECONFIG[secret] = "--enable-libsecret, --disable-libsecret, libsecret"
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-support/popt/popt/disable_tests.patch b/poky/meta/recipes-support/popt/popt/disable_tests.patch
new file mode 100644
index 000000000..016cf66a2
--- /dev/null
+++ b/poky/meta/recipes-support/popt/popt/disable_tests.patch
@@ -0,0 +1,21 @@
+Use of $(top_srcdir) in TESTS is an error which causes
+automake-1.13 to abort. Just remove tests.
+
+Upstream-Status: Inappropriate [disable feature]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd popt-1.16/Makefile.am popt-1.16/Makefile.am
+--- popt-1.16/Makefile.am 2010-05-04 23:55:54.000000000 +0300
++++ popt-1.16/Makefile.am 2013-01-02 13:34:29.540361391 +0200
+@@ -34,11 +34,6 @@
+
+ noinst_SCRIPTS = testit.sh
+
+-TESTS_ENVIRONMENT = \
+-test1="$(top_builddir)/test1"
+-
+-TESTS = $(top_srcdir)/testit.sh
+-
+ include_HEADERS = popt.h
+
+ usrlibdir = $(libdir)
diff --git a/poky/meta/recipes-support/popt/popt/pkgconfig_fix.patch b/poky/meta/recipes-support/popt/popt/pkgconfig_fix.patch
new file mode 100644
index 000000000..0bddbf8c9
--- /dev/null
+++ b/poky/meta/recipes-support/popt/popt/pkgconfig_fix.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Install the pkgconfig file into libdir.
+
+--- popt-1.16.orig/Makefile.am 2012-04-26 13:42:54.021139813 +0800
++++ popt-1.16/Makefile.am 2012-04-26 13:36:03.552096912 +0800
+@@ -47,7 +47,7 @@
+ libpopt_la_SOURCES = popt.c poptparse.c poptconfig.c popthelp.c poptint.c
+ libpopt_la_LDFLAGS = -no-undefined @LTLIBINTL@ @LTLIBICONV@
+
+-pkgconfigdir = $(prefix)/lib/pkgconfig
++pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = popt.pc
+
+ if HAVE_LD_VERSION_SCRIPT
diff --git a/poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch b/poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch
new file mode 100644
index 000000000..7d74aadff
--- /dev/null
+++ b/poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch
@@ -0,0 +1,21 @@
+Upstream-Status: pending
+
+This patch avoids this error with automake 1.12:
+
+| configure.ac:49: error: automatic de-ANSI-fication support has been removed
+
+Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/05/02
+
+Index: popt-1.16/configure.ac
+===================================================================
+--- popt-1.16.orig/configure.ac
++++ popt-1.16/configure.ac
+@@ -46,7 +46,6 @@ AC_GCC_TRADITIONAL
+ AC_SYS_LARGEFILE
+
+ AC_ISC_POSIX
+-AM_C_PROTOTYPES
+
+ AC_CHECK_HEADERS(float.h fnmatch.h glob.h langinfo.h libintl.h mcheck.h unistd.h)
+
diff --git a/poky/meta/recipes-support/popt/popt_1.16.bb b/poky/meta/recipes-support/popt/popt_1.16.bb
new file mode 100644
index 000000000..478288f9b
--- /dev/null
+++ b/poky/meta/recipes-support/popt/popt_1.16.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Library for parsing command line options"
+HOMEPAGE = "http://rpm5.org/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d"
+PR = "r3"
+
+DEPENDS = "virtual/libiconv"
+
+SRC_URI = "http://rpm5.org/files/popt/popt-${PV}.tar.gz \
+ file://pkgconfig_fix.patch \
+ file://popt_fix_for_automake-1.12.patch \
+ file://disable_tests.patch \
+ "
+
+SRC_URI[md5sum] = "3743beefa3dd6247a73f8f7a32c14c33"
+SRC_URI[sha256sum] = "e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8"
+
+inherit autotools gettext
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.1.bb b/poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.1.bb
new file mode 100644
index 000000000..e5b71c0f0
--- /dev/null
+++ b/poky/meta/recipes-support/ptest-runner/ptest-runner_2.1.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "A C program to run all installed ptests"
+DESCRIPTION = "The ptest-runner2 package installs a ptest-runner \
+program which loops through all installed ptest test suites and \
+runs them in sequence."
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+SRCREV = "16413d71cc06b02a6d859c35a017cc49b88283f7"
+PV = "2.1.1+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/ptest-runner2"
+S = "${WORKDIR}/git"
+
+FILES_${PN} = "${bindir}/ptest-runner"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_compile () {
+ oe_runmake
+}
+
+do_install () {
+ install -D -m 0755 ${S}/ptest-runner ${D}${bindir}/ptest-runner
+}
diff --git a/poky/meta/recipes-support/re2c/re2c/mkdir.patch b/poky/meta/recipes-support/re2c/re2c/mkdir.patch
new file mode 100644
index 000000000..d59f01b36
--- /dev/null
+++ b/poky/meta/recipes-support/re2c/re2c/mkdir.patch
@@ -0,0 +1,36 @@
+Upstream-Status: Submitted (https://github.com/skvadrik/re2c/pull/191)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From bccc10c60523f88c8f81413151cdcd612eb16198 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Mon, 31 Jul 2017 15:43:41 +0100
+Subject: [PATCH] Makefile.am: create target directory before writing into it
+
+In some situations src/parse/ may not exist before a file is copied into the
+directory. Ensure that this doesn't happen by creating the directory first.
+---
+ re2c/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/re2c/Makefile.am b/re2c/Makefile.am
+index 3b3b2c5e..0707fc5a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -187,6 +187,7 @@ CLEANFILES = \
+ $(DOC)
+
+ $(AUTOGEN_PARSER): $(CUSTOM_PARSER)
++ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_GEN) if test $(BISON) = "no"; \
+ then \
+ cp $(top_srcdir)/$(BOOTSTRAP_PARSER) $@ && \
+@@ -211,6 +212,7 @@ $(BOOTSTRAP_PARSER): $(CUSTOM_PARSER)
+ $(top_srcdir)/$(CUSTOM_PARSER);
+
+ .re.cc:
++ $(AM_V_at)$(MKDIR_P) $(dir $@)
+ $(AM_V_GEN) if test -x $(RE2C); \
+ then \
+ $(top_builddir)/$(RE2C) $(RE2CFLAGS) -o $@ $< && \
+--
+2.11.0
diff --git a/poky/meta/recipes-support/re2c/re2c_0.16.bb b/poky/meta/recipes-support/re2c/re2c_0.16.bb
new file mode 100644
index 000000000..50dd7b7d2
--- /dev/null
+++ b/poky/meta/recipes-support/re2c/re2c_0.16.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Tool for writing very fast and very flexible scanners"
+HOMEPAGE = "http://re2c.sourceforge.net/"
+AUTHOR = "Marcus Börger <helly@users.sourceforge.net>"
+SECTION = "devel"
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://README;beginline=146;md5=881056c9add17f8019ccd8c382ba963a"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
+ file://mkdir.patch"
+SRC_URI[md5sum] = "3bf508fabd52ed7334647d0ccb956e8d"
+SRC_URI[sha256sum] = "48c12564297641cceb5ff05aead57f28118db6277f31e2262437feba89069e84"
+
+BBCLASSEXTEND = "native"
+
+inherit autotools
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch b/poky/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch
new file mode 100644
index 000000000..4bd9d31c0
--- /dev/null
+++ b/poky/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch
@@ -0,0 +1,60 @@
+From 99679fda405e535a282f04a4decc2381154a749f Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Mon, 15 Feb 2016 15:59:58 -0700
+Subject: [PATCH 1/2] If the libc is lacking argp, use libargp
+
+Patch pulled from Gentoo:
+
+ On glibc systems, argp is provided by libc. However, on
+ uclibc and other systems which lack argp in their C library,
+ argp might be provided by a stand alone library, libargp.
+ This patch adds tests to the build system to find who provides
+ argp.
+
+ X-Gentoo-Bug: 292191
+ X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=292191
+ Reported-by: Ed Wildgoose <gentoo@wildgooses.com>
+ Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ configure.ac | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 27a2dba..04fcd25 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,6 +82,28 @@ AS_IF(
+ ]
+ )
+
++dnl First check if we have argp available from libc
++AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM(
++ [#include <argp.h>],
++ [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
++ )],
++ [libc_has_argp="true"],
++ [libc_has_argp="false"]
++)
++
++dnl If libc doesn't provide argp, then test for libargp
++if test "$libc_has_argp" = "false" ; then
++ AC_MSG_WARN("libc does not have argp")
++ AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
++
++ if test "$have_argp" = "false"; then
++ AC_MSG_ERROR("no libargp found")
++ else
++ LIBS+=" -largp"
++ fi
++fi
++
+ dnl -----------------
+ dnl Configure options
+ dnl -----------------
+--
+2.2.1
+
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch b/poky/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch
new file mode 100644
index 000000000..1c8a79ce0
--- /dev/null
+++ b/poky/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch
@@ -0,0 +1,92 @@
+From afc8712a9e6c72fbd03c36f84ecf8703e5d22a8c Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Mon, 15 Feb 2016 16:11:32 -0700
+Subject: [PATCH 2/2] Add argument to control the libargp dependency
+
+This ensures that the builds are always deterministic. If the argument isn't
+passed, the default behavior is to use libargp if the libc doesn't have argp.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ configure.ac | 55 ++++++++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 36 insertions(+), 19 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 04fcd25..11a5321 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,6 +32,13 @@ AC_ARG_WITH([libgcrypt],
+ [with_libgcrypt=check]
+ )
+
++AC_ARG_WITH([libargp],
++ AS_HELP_STRING([--without-libargp],
++ [Disable libargp support. Systems whose libc lacks argp can use libargp instead. (Default: check if libc lacks argp)]),
++ [with_libargp=$withval],
++ [with_libargp=check]
++)
++
+ dnl Make sure anyone changing configure.ac/Makefile.am has a clue
+ AM_MAINTAINER_MODE
+
+@@ -82,27 +89,37 @@ AS_IF(
+ ]
+ )
+
+-dnl First check if we have argp available from libc
+-AC_LINK_IFELSE(
+- [AC_LANG_PROGRAM(
+- [#include <argp.h>],
+- [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
+- )],
+- [libc_has_argp="true"],
+- [libc_has_argp="false"]
++dnl Determine if we need libargp: either user requested, or libc has no argp
++AS_IF(
++ [test "x$with_libargp" != "xyes"],
++ [
++ AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM(
++ [#include <argp.h>],
++ [int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
++ )],
++ [need_libargp=no],
++ [need_libargp=yes
++ if test "x$with_libargp" = "xno"; then
++ AC_MSG_FAILURE([libargp disabled and libc does not have argp])
++ fi]
++ )
++ ],
++ [need_libargp=yes],
+ )
+
+-dnl If libc doesn't provide argp, then test for libargp
+-if test "$libc_has_argp" = "false" ; then
+- AC_MSG_WARN("libc does not have argp")
+- AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
+-
+- if test "$have_argp" = "false"; then
+- AC_MSG_ERROR("no libargp found")
+- else
+- LIBS+=" -largp"
+- fi
+-fi
++dnl Check for libargp
++AS_IF(
++ [test "x$need_libargp" = "xyes"],
++ [
++ AC_CHECK_LIB(
++ [argp],
++ [argp_parse],
++ [LIBS="$LIBS -largp"],
++ [AC_MSG_FAILURE([libargp not found])]
++ )
++ ]
++)
+
+ dnl -----------------
+ dnl Configure options
+--
+2.2.1
+
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools/default b/poky/meta/recipes-support/rng-tools/rng-tools/default
new file mode 100644
index 000000000..ab7cd9327
--- /dev/null
+++ b/poky/meta/recipes-support/rng-tools/rng-tools/default
@@ -0,0 +1,2 @@
+# Specify rng device
+RNG_DEVICE=/dev/hwrng
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools/init b/poky/meta/recipes-support/rng-tools/rng-tools/init
new file mode 100644
index 000000000..7cf78393a
--- /dev/null
+++ b/poky/meta/recipes-support/rng-tools/rng-tools/init
@@ -0,0 +1,49 @@
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/rng-tools and type
+# > update-rc.d rng-tools defaults 60
+#
+
+rngd=/usr/sbin/rngd
+test -x "$rngd" || exit 1
+
+if [ -e /etc/default/rng-tools ]; then
+ . /etc/default/rng-tools
+fi
+
+if [ -n "$RNG_DEVICE" ]; then
+ EXTRA_ARGS="-- -r $RNG_DEVICE"
+fi
+
+
+case "$1" in
+ start)
+ echo -n "Starting random number generator daemon"
+ start-stop-daemon -S -q -x $rngd $EXTRA_ARGS
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping random number generator daemon"
+ start-stop-daemon -K -q -n rngd
+ echo "."
+ ;;
+ reload|force-reload)
+ echo -n "Signalling rng daemon restart"
+ start-stop-daemon -K -q -s 1 -x $rngd
+ start-stop-daemon -K -q -s 1 -x $rngd
+ ;;
+ restart)
+ echo -n "Stopping random number generator daemon"
+ start-stop-daemon -K -q -n rngd
+ echo "."
+ echo -n "Starting random number generator daemon"
+ start-stop-daemon -S -q -x $rngd $EXTRA_ARGS
+ echo "."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/rng-tools {start|stop|reload|restart|force-reload}"
+ exit 1
+esac
+
+exit 0
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools/read_error_msg.patch b/poky/meta/recipes-support/rng-tools/rng-tools/read_error_msg.patch
new file mode 100644
index 000000000..8aa13bf8b
--- /dev/null
+++ b/poky/meta/recipes-support/rng-tools/rng-tools/read_error_msg.patch
@@ -0,0 +1,98 @@
+rng-tools: modify 'read error' message
+
+Make the 'read error' message more descriptive.
+
+Copied from https://bugzilla.redhat.com/attachment.cgi?id=1295857
+and modified in one place to apply successfully. Error message during
+bootstrap modified to show device name.
+
+Upstream-Status: pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/rngd.c
++++ b/rngd.c
+@@ -247,8 +247,11 @@ static void do_loop(int random_step)
+ continue; /* failed, no work */
+
+ retval = iter->xread(buf, sizeof buf, iter);
+- if (retval)
++ if (retval) {
++ message(LOG_DAEMON|LOG_ERR,
++ "Error reading from entropy source\n");
+ continue; /* failed, no work */
++ }
+
+ work_done = true;
+
+--- a/rngd_entsource.c
++++ b/rngd_entsource.c
+@@ -63,10 +63,8 @@ int xread(void *buf, size_t size, struct
+ size -= r;
+ }
+
+- if (size) {
+- message(LOG_DAEMON|LOG_ERR, "read error\n");
++ if (size)
+ return -1;
+- }
+ return 0;
+ }
+
+@@ -152,7 +150,7 @@ error_out:
+ }
+
+ /* Initialize entropy source */
+-static int discard_initial_data(struct rng *ent_src)
++static int discard_initial_data(struct rng *ent_src, int *buf)
+ {
+ /* Trash 32 bits of what is probably stale (non-random)
+ * initial state from the RNG. For Intel's, 8 bits would
+@@ -164,10 +162,12 @@ static int discard_initial_data(struct r
+ xread(tempbuf, sizeof(tempbuf), ent_src);
+
+ /* Return 32 bits of bootstrap data */
+- xread(tempbuf, sizeof(tempbuf), ent_src);
++ if (xread(tempbuf, sizeof(tempbuf), ent_src) != 0)
++ return -1;
+
+- return tempbuf[0] | (tempbuf[1] << 8) |
++ *buf = tempbuf[0] | (tempbuf[1] << 8) |
+ (tempbuf[2] << 16) | (tempbuf[3] << 24);
++ return 0;
+ }
+
+ /*
+@@ -175,6 +175,8 @@ static int discard_initial_data(struct r
+ */
+ int init_entropy_source(struct rng *ent_src)
+ {
++ int bootstrap;
++
+ ent_src->rng_fd = open(ent_src->rng_name, O_RDONLY);
+ if (ent_src->rng_fd == -1) {
+ return 1;
+@@ -182,7 +184,11 @@ int init_entropy_source(struct rng *ent_
+ src_list_add(ent_src);
+ /* Bootstrap FIPS tests */
+ ent_src->fipsctx = malloc(sizeof(fips_ctx_t));
+- fips_init(ent_src->fipsctx, discard_initial_data(ent_src));
++ if (discard_initial_data(ent_src, &bootstrap) != 0) {
++ message(LOG_ERR|LOG_INFO, "Read failure in %s during bootstrap\n",ent_src->rng_name);
++ return 1;
++ }
++ fips_init(ent_src->fipsctx, bootstrap);
+ return 0;
+ }
+
+--- a/rngtest.c
++++ b/rngtest.c
+@@ -335,6 +335,7 @@ static int discard_initial_data(void)
+
+ return tempbuf[0] | (tempbuf[1] << 8) |
+ (tempbuf[2] << 16) | (tempbuf[3] << 24);
++
+ }
+
+ static void do_rng_fips_test_loop( void )
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools/rng-tools-5-fix-textrels-on-PIC-x86.patch b/poky/meta/recipes-support/rng-tools/rng-tools/rng-tools-5-fix-textrels-on-PIC-x86.patch
new file mode 100644
index 000000000..93a5864a4
--- /dev/null
+++ b/poky/meta/recipes-support/rng-tools/rng-tools/rng-tools-5-fix-textrels-on-PIC-x86.patch
@@ -0,0 +1,103 @@
+From: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
+Subject: [PATCH] Fix assemby textrels on rdrand_asm.S on PIC x86
+
+This patch updates the fixes in the assembly in rdrand_asm.S in
+sys-apps/rng-tools-5 so it won't generate textrels on PIC systems.
+The main fixes are in the use of leal in SETPTR for such systems, the rest is
+the usual PIC support stuff.
+
+This should fix Gentoo bug #469962 and help fix #518210
+
+This patch is released under the GPLv2 or a higher version license as is the
+original file as long as the author and the tester are credited.
+
+Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=469962
+Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=518210
+Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
+Reported-by: cilly <cilly@cilly.mine.nu>
+Reported-by: Manuel Rüger <mrueg@gentoo.org>
+Tested-by: Anthony Basile <blueness@gentoo.org>
+
+Upstream-Status: Pending
+
+Index: rng-tools-5/rdrand_asm.S
+===================================================================
+--- rng-tools-5.orig/rdrand_asm.S
++++ rng-tools-5/rdrand_asm.S
+@@ -2,6 +2,7 @@
+ * Copyright (c) 2011-2014, Intel Corporation
+ * Authors: Fenghua Yu <fenghua.yu@intel.com>,
+ * H. Peter Anvin <hpa@linux.intel.com>
++ * PIC code by: Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+@@ -174,7 +175,19 @@ ENTRY(x86_rdseed_or_rdrand_bytes)
+ jmp 4b
+ ENDPROC(x86_rdseed_or_rdrand_bytes)
+
++#if defined(__PIC__)
++#define INIT_PIC() \
++ pushl %ebx ; \
++ call __x86.get_pc_thunk.bx ; \
++ addl $_GLOBAL_OFFSET_TABLE_, %ebx
++#define END_PIC() \
++ popl %ebx
++#define SETPTR(var,ptr) leal (var)@GOTOFF(%ebx),ptr
++#else
++#define INIT_PIC()
++#define END_PIC()
+ #define SETPTR(var,ptr) movl $(var),ptr
++#endif
+ #define PTR0 %eax
+ #define PTR1 %edx
+ #define PTR2 %ecx
+@@ -190,6 +203,7 @@ ENTRY(x86_aes_mangle)
+ movl 8(%ebp), %eax
+ movl 12(%ebp), %edx
+ push %esi
++ INIT_PIC()
+ #endif
+ movl $512, CTR3 /* Number of rounds */
+
+@@ -280,6 +294,7 @@ offset = offset + 16
+ movdqa %xmm7, (7*16)(PTR1)
+
+ #ifdef __i386__
++ END_PIC()
+ pop %esi
+ pop %ebp
+ #endif
+@@ -294,6 +309,7 @@ ENTRY(x86_aes_expand_key)
+ push %ebp
+ mov %esp, %ebp
+ movl 8(%ebp), %eax
++ INIT_PIC()
+ #endif
+
+ SETPTR(aes_round_keys, PTR1)
+@@ -323,6 +339,7 @@ ENTRY(x86_aes_expand_key)
+ call 1f
+
+ #ifdef __i386__
++ END_PIC()
+ pop %ebp
+ #endif
+ ret
+@@ -343,6 +360,16 @@ ENTRY(x86_aes_expand_key)
+
+ ENDPROC(x86_aes_expand_key)
+
++#if defined(__i386__) && defined(__PIC__)
++ .section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
++ .globl __x86.get_pc_thunk.bx
++ .hidden __x86.get_pc_thunk.bx
++ .type __x86.get_pc_thunk.bx, @function
++__x86.get_pc_thunk.bx:
++ movl (%esp), %ebx
++ ret
++#endif
++
+ .bss
+ .balign 64
+ aes_round_keys:
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools/rngd.service b/poky/meta/recipes-support/rng-tools/rng-tools/rngd.service
new file mode 100644
index 000000000..b94ad5020
--- /dev/null
+++ b/poky/meta/recipes-support/rng-tools/rng-tools/rngd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Hardware RNG Entropy Gatherer Daemon
+
+[Service]
+ExecStart=@SBINDIR@/rngd -f -r /dev/urandom
+SuccessExitStatus=66
+
+[Install]
+WantedBy=multi-user.target
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools/underquote.patch b/poky/meta/recipes-support/rng-tools/rng-tools/underquote.patch
new file mode 100644
index 000000000..afd08d577
--- /dev/null
+++ b/poky/meta/recipes-support/rng-tools/rng-tools/underquote.patch
@@ -0,0 +1,33 @@
+Fix underquoted m4 entry. This causes a failure if gcrypt isn't present:
+
+| configure: libgcrypt support disabled
+| ../rng-tools-5/configure: line 4345: ac_fn_c_try_link: command not found
+| configure: error: in `/media/build1/poky/build/tmp/work/i586-poky-linux/rng-tools/5-r0/build':
+
+RP
+2016/2/16
+
+Upstream-Status: Pending
+
+Index: rng-tools-5/configure.ac
+===================================================================
+--- rng-tools-5.orig/configure.ac
++++ rng-tools-5/configure.ac
+@@ -71,7 +71,7 @@ AS_IF(
+ [test "x$with_libgcrypt" != "xno"],
+ [
+ AC_CHECK_HEADER([gcrypt.h],
+- AC_CHECK_LIB(
++ [AC_CHECK_LIB(
+ [gcrypt],
+ [gcry_check_version], ,
+ [
+@@ -80,7 +80,7 @@ AS_IF(
+ AC_MSG_NOTICE([libgcrypt support disabled])
+ fi
+ ]
+- ),
++ )],
+ [if test "x$with_libgcrypt" != "xcheck"; then
+ AC_MSG_FAILURE([libgcrypt headers not found]); else
+ AC_MSG_NOTICE([libgcrypt support disabled])
diff --git a/poky/meta/recipes-support/rng-tools/rng-tools_5.bb b/poky/meta/recipes-support/rng-tools/rng-tools_5.bb
new file mode 100644
index 000000000..b3c9fd974
--- /dev/null
+++ b/poky/meta/recipes-support/rng-tools/rng-tools_5.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Random number generator daemon"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0b6f033afe6db235e559456585dc8cdc"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/gkernel/${BP}.tar.gz \
+ file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \
+ file://0002-Add-argument-to-control-the-libargp-dependency.patch \
+ file://underquote.patch \
+ file://rng-tools-5-fix-textrels-on-PIC-x86.patch \
+ file://read_error_msg.patch \
+ file://init \
+ file://default \
+ file://rngd.service \
+"
+
+SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68"
+SRC_URI[sha256sum] = "60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e"
+
+# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
+# manually to avoid unnecessary postinst/preinst generated.
+python () {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+inherit autotools update-rc.d systemd
+
+PACKAGECONFIG = "libgcrypt"
+PACKAGECONFIG_libc-musl = "libargp"
+PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
+PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
+
+do_install_append() {
+ # Only install the init script when 'sysvinit' is in DISTRO_FEATURES.
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d "${D}${sysconfdir}/init.d"
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools
+ sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir}/,' \
+ ${D}${sysconfdir}/init.d/rng-tools
+
+ install -d "${D}${sysconfdir}/default"
+ install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 644 ${WORKDIR}/rngd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/rngd.service
+ fi
+}
+
+INITSCRIPT_NAME = "rng-tools"
+INITSCRIPT_PARAMS = "start 30 2 3 4 5 . stop 30 0 6 1 ."
+
+SYSTEMD_SERVICE_${PN} = "rngd.service"
diff --git a/poky/meta/recipes-support/serf/serf/env.patch b/poky/meta/recipes-support/serf/serf/env.patch
new file mode 100644
index 000000000..9d073e9ab
--- /dev/null
+++ b/poky/meta/recipes-support/serf/serf/env.patch
@@ -0,0 +1,28 @@
+'scons' cleans the environment which breaks ccache builds because
+CCACHEDIR can point to an unexpected location:
+
+| ccache arm-linux-gnueabi-gcc ... context.c
+| ccache: failed to create .../serf/1.3.6-r0/.home/.ccache (No such file or directory)
+
+Issue is described in
+
+ http://www.scons.org/wiki/ImportingEnvironmentSettings
+
+and because 'bitbake' cleans environment we can pass it completely
+instead of trying to enumerate needed env.
+
+Upstream-Status: Inappropriate
+
+
+Index: serf-1.3.6/SConstruct
+===================================================================
+--- serf-1.3.6.orig/SConstruct
++++ serf-1.3.6/SConstruct
+@@ -149,6 +149,7 @@ if sys.platform == 'win32':
+ env = Environment(variables=opts,
+ tools=('default', 'textfile',),
+ CPPPATH=['.', ],
++ ENV = os.environ,
+ )
+
+ env.Append(BUILDERS = {
diff --git a/poky/meta/recipes-support/serf/serf/norpath.patch b/poky/meta/recipes-support/serf/serf/norpath.patch
new file mode 100644
index 000000000..c392444f7
--- /dev/null
+++ b/poky/meta/recipes-support/serf/serf/norpath.patch
@@ -0,0 +1,42 @@
+The RPATH handling in serf is all wrong for us and we don't need it
+anyway so hack around it by removing this for now.
+
+Upstream-Status: Inappropriate
+
+RP 2014/7/17
+
+Index: serf-1.3.9/SConstruct
+===================================================================
+--- serf-1.3.9.orig/SConstruct
++++ serf-1.3.9/SConstruct
+@@ -224,8 +224,7 @@ if sys.platform != 'win32':
+ else:
+ LIBNAMESTATIC = 'serf-${MAJOR}'
+
+-env.Append(RPATH=libdir,
+- PDB='${TARGET.filebase}.pdb')
++env.Append(PDB='${TARGET.filebase}.pdb')
+
+ if sys.platform == 'darwin':
+ # linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,))
+@@ -385,12 +384,6 @@ if gssapi and CALLOUT_OKAY:
+ if sys.platform == 'win32':
+ env.Append(CPPDEFINES=['SERF_HAVE_SSPI'])
+
+-# On some systems, the -R values that APR describes never make it into actual
+-# RPATH flags. We'll manually map all directories in LIBPATH into new
+-# flags to set RPATH values.
+-for d in env['LIBPATH']:
+- env.Append(RPATH=':'+d)
+-
+ # Set up the construction of serf-*.pc
+ pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,),
+ env.File('build/serf.pc.in'),
+@@ -461,7 +454,6 @@ else:
+ TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ]
+
+ # Find the (dynamic) library in this directory
+-tenv.Replace(RPATH=thisdir)
+ tenv.Prepend(LIBS=[LIBNAMESTATIC, ],
+ LIBPATH=[thisdir, ])
+
diff --git a/poky/meta/recipes-support/serf/serf_1.3.9.bb b/poky/meta/recipes-support/serf/serf_1.3.9.bb
new file mode 100644
index 000000000..2be5a069c
--- /dev/null
+++ b/poky/meta/recipes-support/serf/serf_1.3.9.bb
@@ -0,0 +1,26 @@
+SUMMARY = "High-Performance Asynchronous HTTP Client Library"
+SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://norpath.patch \
+ file://env.patch"
+
+SRC_URI[md5sum] = "370a6340ff20366ab088012cd13f2b57"
+SRC_URI[sha256sum] = "549c2d21c577a8a9c0450facb5cca809f26591f048e466552240947bdf7a87cc"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+DEPENDS = "python-scons-native openssl apr apr-util util-linux expat"
+
+do_compile() {
+ ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} \
+ CC="${CC}" \
+ APR=`which apr-1-config` APU=`which apu-1-config` \
+ CFLAGS="${CFLAGS}" LINKFLAGS="${LDFLAGS}" \
+ OPENSSL="${STAGING_EXECPREFIXDIR}"
+}
+
+do_install() {
+ ${STAGING_BINDIR_NATIVE}/scons PREFIX=${D}${prefix} LIBDIR=${D}${libdir} install
+}
+
+BBCLASSEXTEND = "native"
diff --git a/poky/meta/recipes-support/shared-mime-info/shared-mime-info.inc b/poky/meta/recipes-support/shared-mime-info/shared-mime-info.inc
new file mode 100644
index 000000000..1f51225b0
--- /dev/null
+++ b/poky/meta/recipes-support/shared-mime-info/shared-mime-info.inc
@@ -0,0 +1,35 @@
+SUMMARY = "Shared MIME type database and specification"
+HOMEPAGE = "http://freedesktop.org/wiki/Software/shared-mime-info"
+SECTION = "base"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "libxml2 intltool-native glib-2.0 shared-mime-info-native"
+
+SRC_URI = "http://freedesktop.org/~hadess/shared-mime-info-${PV}.tar.xz"
+
+inherit autotools pkgconfig gettext
+
+EXTRA_OECONF = "--disable-update-mimedb"
+
+FILES_${PN} += "${datadir}/mime"
+FILES_${PN}-dev += "${datadir}/pkgconfig/shared-mime-info.pc"
+
+# freedesktop.org.xml is only required when updating the mime database,
+# package it separately
+PACKAGES =+ "shared-mime-info-data"
+FILES_shared-mime-info-data = "${datadir}/mime/packages/freedesktop.org.xml"
+RDEPENDS_shared-mime-info-data = "shared-mime-info"
+
+do_install () {
+ autotools_do_install
+
+ update-mime-database ${D}${datadir}/mime
+}
+
+do_install_class-native () {
+ autotools_do_install
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch b/poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
new file mode 100644
index 000000000..262ff7562
--- /dev/null
+++ b/poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
@@ -0,0 +1,25 @@
+fix shared-mime-info build race condition
+
+The definition of install-data-hook in Makefile.am leads
+to multiple, overlapping, executions of install-binPROGRAMS
+target. We modify the definition to avoid that.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <jslater@windriver.com>
+
+Index: shared-mime-info-1.9/Makefile.am
+===================================================================
+--- shared-mime-info-1.9.orig/Makefile.am
++++ shared-mime-info-1.9/Makefile.am
+@@ -50,7 +50,9 @@ else
+ update_mime_database="$(top_builddir)/update-mime-database$(EXEEXT)"
+ endif
+
+-install-data-hook: install-binPROGRAMS
++# do NOT make this dependent on anything!
++#
++install-data-hook:
+ if ENABLE_UPDATE_MIMEDB
+ $(update_mime_database) -V "$(DESTDIR)$(datadir)/mime"
+ endif
diff --git a/poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch b/poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
new file mode 100644
index 000000000..fea34a55a
--- /dev/null
+++ b/poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
@@ -0,0 +1,33 @@
+The Makefile used by shared-mime-info is one big race with the SUBDIRS
+option and the dependency specifically calling make all combining to
+create multiple make instances all of which may try and build targets
+like update-mime-database.
+
+This patch removes those options meaning make can correctly identify
+dependencies and stop itself racing itself.
+
+RP 10/10/2011
+
+Upstream-Status: Pending
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+
+Index: shared-mime-info-1.9/Makefile.am
+===================================================================
+--- shared-mime-info-1.9.orig/Makefile.am
++++ shared-mime-info-1.9/Makefile.am
+@@ -1,5 +1,3 @@
+-SUBDIRS=. po
+-
+ AM_CPPFLAGS = $(ALL_CFLAGS)
+
+ packagesdir = $(datadir)/mime/packages
+@@ -81,8 +79,7 @@ endif
+
+ all: $(defaultmakedeps)
+
+-create-pot:
+- $(AM_V_GEN) $(MAKE) -C po shared-mime-info.pot
++create-pot: po
+
+ local-test: create-pot freedesktop.org.xml update-mime-database$(EXEEXT)
+ if CROSS_COMPILING
diff --git a/poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.9.bb b/poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.9.bb
new file mode 100644
index 000000000..f9b273edc
--- /dev/null
+++ b/poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.9.bb
@@ -0,0 +1,7 @@
+require shared-mime-info.inc
+
+SRC_URI += "file://parallelmake.patch \
+ file://install-data-hook.patch"
+
+SRC_URI[md5sum] = "45103889b91242850aa47f09325e798b"
+SRC_URI[sha256sum] = "5c0133ec4e228e41bdf52f726d271a2d821499c2ab97afd3aa3d6cf43efcdc83"
diff --git a/poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch b/poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch
new file mode 100644
index 000000000..b0aa5d173
--- /dev/null
+++ b/poky/meta/recipes-support/source-highlight/files/0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch
@@ -0,0 +1,30 @@
+From 9aa01fd5f9d8b2b98c34684dc8f68115750ef41c Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 12 Jul 2016 17:15:13 +0300
+Subject: [PATCH] source-highlight.pc.in: do not add Boost's libraries and
+ includes
+
+This breaks when compiling in sysroots; a proper way is to use Depends
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ source-highlight.pc.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/source-highlight.pc.in b/source-highlight.pc.in
+index 79ab63e..64114a7 100644
+--- a/source-highlight.pc.in
++++ b/source-highlight.pc.in
+@@ -7,6 +7,6 @@ Name: libsource-highlight
+ Description: GNU Source-highlight library.
+ URL: http://www.gnu.org/software/src-highlite/
+ Version: @VERSION@
+-Libs: -L${libdir} -lsource-highlight @BOOST_LDFLAGS@ @BOOST_REGEX_LIB@
+-Cflags: -I${includedir} @BOOST_CPPFLAGS@
++Libs: -L${libdir} -lsource-highlight
++Cflags: -I${includedir}
+
+--
+2.8.1
+
diff --git a/poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb b/poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb
new file mode 100644
index 000000000..85923e475
--- /dev/null
+++ b/poky/meta/recipes-support/source-highlight/source-highlight_3.1.8.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Syntax highlight utility"
+DESCRIPTION = "Source-highlight converts source code to formatted text with syntax highlighting."
+HOMEPAGE = "https://www.gnu.org/software/src-highlite/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ff95bfe019feaf92f524b73dd79e76eb"
+
+SRC_URI = "${GNU_MIRROR}/src-highlite/${BPN}-${PV}.tar.gz \
+ file://0001-source-highlight.pc.in-do-not-add-Boost-s-libraries-.patch"
+SRC_URI[md5sum] = "3243470706ef5fefdc3e43b5306a4e41"
+SRC_URI[sha256sum] = "01336a7ea1d1ccc374201f7b81ffa94d0aecb33afc7d6903ebf9fbf33a55ada3"
+
+inherit autotools
+
+DEPENDS_append = " boost"
+
+DEPENDS_append_class-target = " source-highlight-native"
+
+EXTRA_OECONF = "--with-boost=yes --with-boost-libdir=${STAGING_DIR_TARGET}${libdir}"
+
+BBCLASSEXTEND = "native"
+
+# source-highlight is using its own binary from the build tree to make documentation
+# let's substitute the native binary instead
+do_configure_prepend_class-target () {
+ sed -i -e 's,^SRCHILITEEXE = $(top_builddir).*,SRCHILITEEXE = source-highlight,' ${S}/doc/Makefile.am
+}
+
+RDEPENDS_source-highlight += "bash"
diff --git a/poky/meta/recipes-support/sqlite/sqlite3.inc b/poky/meta/recipes-support/sqlite/sqlite3.inc
new file mode 100644
index 000000000..95ec89cef
--- /dev/null
+++ b/poky/meta/recipes-support/sqlite/sqlite3.inc
@@ -0,0 +1,57 @@
+SUMMARY = "Embeddable SQL database engine"
+HOMEPAGE = "http://www.sqlite.org"
+SECTION = "libs"
+
+PE = "3"
+
+def sqlite_download_version(d):
+ pvsplit = d.getVar('PV').split('.')
+ if len(pvsplit) < 4:
+ pvsplit.append('0')
+ return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
+
+SQLITE_PV = "${@sqlite_download_version(d)}"
+
+S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
+
+UPSTREAM_CHECK_URI = "http://www.sqlite.org/"
+UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
+
+CVE_PRODUCT = "sqlite"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ?= ""
+PACKAGECONFIG_class-native = ""
+
+PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit"
+PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
+
+EXTRA_OECONF = " \
+ --enable-shared \
+ --enable-threadsafe \
+ --disable-static-shell \
+"
+
+CFLAGS_append = " -fPIC"
+
+# pread() is in POSIX.1-2001 so any reasonable system must surely support it
+BUILD_CFLAGS += "-DUSE_PREAD"
+TARGET_CFLAGS += "-DUSE_PREAD"
+
+# Provide column meta-data API
+BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+TARGET_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+
+PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
+
+FILES_${PN} = "${bindir}/*"
+FILES_lib${BPN} = "${libdir}/*.so.*"
+FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
+ ${libdir}/pkgconfig ${includedir}"
+FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
+FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
+
+AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/poky/meta/recipes-support/sqlite/sqlite3_3.22.0.bb b/poky/meta/recipes-support/sqlite/sqlite3_3.22.0.bb
new file mode 100644
index 000000000..ef88659e9
--- /dev/null
+++ b/poky/meta/recipes-support/sqlite/sqlite3_3.22.0.bb
@@ -0,0 +1,10 @@
+require sqlite3.inc
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
+
+SRC_URI = "\
+ http://www.sqlite.org/2018/sqlite-autoconf-${SQLITE_PV}.tar.gz \
+ "
+SRC_URI[md5sum] = "96b5648d542e8afa6ab7ffb8db8ddc3d"
+SRC_URI[sha256sum] = "2824ab1238b706bc66127320afbdffb096361130e23291f26928a027b885c612"
diff --git a/poky/meta/recipes-support/taglib/taglib/CVE-2017-12678.patch b/poky/meta/recipes-support/taglib/taglib/CVE-2017-12678.patch
new file mode 100644
index 000000000..4bd9f2be1
--- /dev/null
+++ b/poky/meta/recipes-support/taglib/taglib/CVE-2017-12678.patch
@@ -0,0 +1,40 @@
+From eb9ded1206f18f2c319157337edea2533a40bea6 Mon Sep 17 00:00:00 2001
+From: "Stephen F. Booth" <me@sbooth.org>
+Date: Sun, 23 Jul 2017 10:11:09 -0400
+Subject: [PATCH] Don't assume TDRC is an instance of TextIdentificationFrame
+
+If TDRC is encrypted, FrameFactory::createFrame() returns UnknownFrame
+which causes problems in rebuildAggregateFrames() when it is assumed
+that TDRC is a TextIdentificationFrame
+
+Upstream-Status: Backport
+[https://github.com/taglib/taglib/pull/831/commits/eb9ded1206f18f2c319157337edea2533a40bea6]
+
+CVE: CVE-2017-12678
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ taglib/mpeg/id3v2/id3v2framefactory.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/taglib/mpeg/id3v2/id3v2framefactory.cpp b/taglib/mpeg/id3v2/id3v2framefactory.cpp
+index 759a9b7b..9347ab86 100644
+--- a/taglib/mpeg/id3v2/id3v2framefactory.cpp
++++ b/taglib/mpeg/id3v2/id3v2framefactory.cpp
+@@ -334,10 +334,11 @@ void FrameFactory::rebuildAggregateFrames(ID3v2::Tag *tag) const
+ tag->frameList("TDAT").size() == 1)
+ {
+ TextIdentificationFrame *tdrc =
+- static_cast<TextIdentificationFrame *>(tag->frameList("TDRC").front());
++ dynamic_cast<TextIdentificationFrame *>(tag->frameList("TDRC").front());
+ UnknownFrame *tdat = static_cast<UnknownFrame *>(tag->frameList("TDAT").front());
+
+- if(tdrc->fieldList().size() == 1 &&
++ if(tdrc &&
++ tdrc->fieldList().size() == 1 &&
+ tdrc->fieldList().front().size() == 4 &&
+ tdat->data().size() >= 5)
+ {
+--
+2.13.5
+
diff --git a/poky/meta/recipes-support/taglib/taglib_1.11.1.bb b/poky/meta/recipes-support/taglib/taglib_1.11.1.bb
new file mode 100644
index 000000000..50439bc14
--- /dev/null
+++ b/poky/meta/recipes-support/taglib/taglib_1.11.1.bb
@@ -0,0 +1,43 @@
+SUMMARY = "Library for reading and editing the meta-data of popular audio formats"
+SECTION = "libs/multimedia"
+HOMEPAGE = "http://taglib.github.io/"
+LICENSE = "LGPLv2.1 | MPL-1"
+LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \
+ file://COPYING.MPL;md5=bfe1f75d606912a4111c90743d6c7325 \
+ file://taglib/audioproperties.h;beginline=1;endline=24;md5=9df2c7399519b7310568a7c55042ecee"
+
+DEPENDS = "zlib"
+
+SRC_URI = "http://taglib.github.io/releases/${BP}.tar.gz \
+ file://CVE-2017-12678.patch \
+ "
+
+SRC_URI[md5sum] = "cee7be0ccfc892fa433d6c837df9522a"
+SRC_URI[sha256sum] = "b6d1a5a610aae6ff39d93de5efd0fdc787aa9e9dc1e7026fa4c961b26563526b"
+
+UPSTREAM_CHECK_URI = "http://github.com/taglib/taglib/releases/"
+
+BINCONFIG = "${bindir}/taglib-config"
+
+inherit cmake pkgconfig binconfig-disabled
+
+PACKAGES =+ "${PN}-c"
+FILES_${PN}-c = "${libdir}/libtag_c.so.*"
+
+EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON \
+ -DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE \
+ -DHAVE_BOOST_BYTESWAP=FALSE \
+ -DCMAKE_CXX_STANDARD=11 \
+ -DCMAKE_CXX_STANDARD_REQUIRED=OFF \
+ -DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')} \
+"
+CXXFLAGS += "-std=c++11"
+
+do_configure_prepend () {
+ rm -f ${S}/admin/ltmain.sh
+ rm -f ${S}/admin/libtool.m4.in
+}
+
+# without -fPIC depending packages failed with many error like:
+# | <...>/ld: error: <...>/usr/lib/libtag.a(modfilebase.cpp.o): requires unsupported dynamic reloc R_ARM_THM_MOVW_ABS_NC; recompile with -fPIC
+CXXFLAGS += "-fPIC"
diff --git a/poky/meta/recipes-support/user-creation/files/system-xuser.conf b/poky/meta/recipes-support/user-creation/files/system-xuser.conf
new file mode 100644
index 000000000..d42e3d1f5
--- /dev/null
+++ b/poky/meta/recipes-support/user-creation/files/system-xuser.conf
@@ -0,0 +1,11 @@
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <policy user="xuser">
+ <allow send_destination="net.connman"/>
+ <allow send_destination="net.connman.vpn"/>
+ <allow send_destination="org.ofono"/>
+ <allow send_destination="org.bluez"/>
+ </policy>
+</busconfig>
+
diff --git a/poky/meta/recipes-support/user-creation/xuser-account_0.1.bb b/poky/meta/recipes-support/user-creation/xuser-account_0.1.bb
new file mode 100644
index 000000000..81817d1e2
--- /dev/null
+++ b/poky/meta/recipes-support/user-creation/xuser-account_0.1.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Creates an 'xuser' account used for running X11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = "file://system-xuser.conf"
+
+inherit allarch useradd
+
+do_configure() {
+ :
+}
+
+do_compile() {
+ :
+}
+
+do_install() {
+ install -D -m 0644 ${WORKDIR}/system-xuser.conf ${D}${sysconfdir}/dbus-1/system.d/system-xuser.conf
+}
+
+FILES_${PN} = "${sysconfdir}/dbus-1/system.d/system-xuser.conf"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--create-home \
+ --groups video,tty,audio,input,shutdown,disk \
+ --user-group xuser"
+
+ALLOW_EMPTY_${PN} = "1"
diff --git a/poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch b/poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch
new file mode 100644
index 000000000..1c5630ed9
--- /dev/null
+++ b/poky/meta/recipes-support/vte/vte/0001-Add-m4-vapigen.m4.patch
@@ -0,0 +1,119 @@
+From 08ca1c48b25c332b75bba2a6b5d757da006e955b Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 7 Oct 2016 16:27:57 +0300
+Subject: [PATCH] Add m4/vapigen.m4
+
+Building without vala will fail if we don't have a vapigen.m4.
+
+Upstream-Status: Pending
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ m4/vapigen.m4 | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 96 insertions(+)
+ create mode 100644 m4/vapigen.m4
+
+diff --git a/m4/vapigen.m4 b/m4/vapigen.m4
+new file mode 100644
+index 0000000..f2df12f
+--- /dev/null
++++ b/m4/vapigen.m4
+@@ -0,0 +1,96 @@
++dnl vapigen.m4
++dnl
++dnl Copyright 2012 Evan Nemerson
++dnl
++dnl This library is free software; you can redistribute it and/or
++dnl modify it under the terms of the GNU Lesser General Public
++dnl License as published by the Free Software Foundation; either
++dnl version 2.1 of the License, or (at your option) any later version.
++dnl
++dnl This library is distributed in the hope that it will be useful,
++dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
++dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++dnl Lesser General Public License for more details.
++dnl
++dnl You should have received a copy of the GNU Lesser General Public
++dnl License along with this library; if not, write to the Free Software
++dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++
++# VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND-INTROSPECTION], [DEFAULT])
++# --------------------------------------
++# Check vapigen existence and version
++#
++# See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation
++AC_DEFUN([VAPIGEN_CHECK],
++[
++ AC_BEFORE([GOBJECT_INTROSPECTION_CHECK],[$0])
++ AC_BEFORE([GOBJECT_INTROSPECTION_REQUIRE],[$0])
++
++ AC_ARG_ENABLE([vala],
++ [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[
++ AS_IF([test "x$4" = "x"], [
++ enable_vala=auto
++ ], [
++ enable_vala=$4
++ ])
++ ])
++
++ AS_CASE([$enable_vala], [no], [enable_vala=no],
++ [yes], [
++ AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
++ AC_MSG_ERROR([Vala bindings require GObject Introspection])
++ ])
++ ], [auto], [
++ AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [
++ enable_vala=no
++ ])
++ ], [
++ AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@])
++ ])
++
++ AS_IF([test "x$2" = "x"], [
++ vapigen_pkg_name=vapigen
++ ], [
++ vapigen_pkg_name=vapigen-$2
++ ])
++ AS_IF([test "x$1" = "x"], [
++ vapigen_pkg="$vapigen_pkg_name"
++ ], [
++ vapigen_pkg="$vapigen_pkg_name >= $1"
++ ])
++
++ PKG_PROG_PKG_CONFIG
++
++ PKG_CHECK_EXISTS([$vapigen_pkg], [
++ AS_IF([test "$enable_vala" = "auto"], [
++ enable_vala=yes
++ ])
++ ], [
++ AS_CASE([$enable_vala], [yes], [
++ AC_MSG_ERROR([$vapigen_pkg not found])
++ ], [auto], [
++ enable_vala=no
++ ])
++ ])
++
++ AC_MSG_CHECKING([for vala])
++
++ AS_CASE([$enable_vala],
++ [yes], [
++ VAPIGEN=`$PKG_CONFIG --variable=vapigen vapigen`
++ VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir vapigen`/vala/Makefile.vapigen
++ AS_IF([test "x$2" = "x"], [
++ VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir vapigen`
++ ], [
++ VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned vapigen`
++ ])
++ ])
++
++ AC_MSG_RESULT([$enable_vala])
++
++ AC_SUBST([VAPIGEN])
++ AC_SUBST([VAPIGEN_VAPIDIR])
++ AC_SUBST([VAPIGEN_MAKEFILE])
++
++ AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes")
++])
+--
+2.1.4
+
diff --git a/poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch b/poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch
new file mode 100644
index 000000000..fcfc55975
--- /dev/null
+++ b/poky/meta/recipes-support/vte/vte/0001-Don-t-enable-stack-protection-by-default.patch
@@ -0,0 +1,29 @@
+From b0a579d83e355545b64742c997fe8b1d58bf4207 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Mon, 13 Jun 2016 11:05:00 +0300
+Subject: [PATCH] Don't enable stack-protection by default
+
+These are set by security_flags.inc.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 068d072..d580f84 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -138,8 +138,6 @@ m4_define([compiler_flags_common],[ dnl
+ -fno-common dnl
+ -fdiagnostics-show-option dnl
+ -fno-strict-aliasing dnl
+- -fstack-protector dnl
+- -fstack-protector-strong dnl
+ -fno-semantic-interposition dnl
+ -Wno-deprecated-declarations dnl
+ ])
+--
+2.1.4
+
diff --git a/poky/meta/recipes-support/vte/vte_0.50.2.bb b/poky/meta/recipes-support/vte/vte_0.50.2.bb
new file mode 100644
index 000000000..8b9ee33ec
--- /dev/null
+++ b/poky/meta/recipes-support/vte/vte_0.50.2.bb
@@ -0,0 +1,48 @@
+SUMMARY = "Virtual terminal emulator GTK+ widget library"
+BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
+LICENSE = "LGPLv2.1+"
+DEPENDS = "glib-2.0 gtk+3 libpcre2 intltool-native libxml2-native gperf-native"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+inherit gnomebase gtk-doc distro_features_check upstream-version-is-even gobject-introspection
+
+# vapigen.m4 is required when vala is not present (but the one from vala should be used normally)
+SRC_URI += "file://0001-Don-t-enable-stack-protection-by-default.patch \
+ ${@bb.utils.contains('PACKAGECONFIG', 'vala', '', 'file://0001-Add-m4-vapigen.m4.patch', d) } \
+ "
+SRC_URI[archive.md5sum] = "1912cfd1d9cdd30cebeb908507acadc5"
+SRC_URI[archive.sha256sum] = "79dd316bfaff48f2fb74d066baae0d830e1f44436796fe410a57297e5c5f09cf"
+
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
+
+# Instead of "inherit vala" we do the relevant settings here so we can
+# set DEPENDS based on PACKAGECONFIG.
+
+# Our patched version of Vala looks in STAGING_DATADIR for .vapi files
+export STAGING_DATADIR
+# Upstream Vala >= 0.11 looks in XDG_DATA_DIRS for .vapi files
+export XDG_DATA_DIRS = "${STAGING_DATADIR}"
+
+# Help g-ir-scanner find the .so for linking
+do_compile_prepend() {
+ export GIR_EXTRA_LIBS_PATH="${B}/src/.libs"
+}
+
+# Package additional files
+FILES_${PN}-dev += "${datadir}/vala/vapi/*"
+
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[vala] = "--enable-vala,--disable-vala,vala-native vala"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+
+CFLAGS += "-D_GNU_SOURCE"
+
+EXTRA_OECONF = "--disable-test-application"
+
+# libtool adds "-nostdlib" when g++ is used. This breaks PIE builds.
+# Use libtool-cross (which has a hack to prevent that) instead.
+EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
+
+PACKAGES =+ "libvte"
+FILES_libvte = "${libdir}/*.so.* ${libdir}/girepository-1.0/*"
OpenPOWER on IntegriCloud