summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/recipes-support
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-support')
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr-util/configfix.patch51
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr-util/configure_fixes.patch31
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr-util/run-ptest6
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr-util_1.5.4.bb81
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch32
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr/cleanup.patch43
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr/configfix.patch53
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr/configure_fixes.patch68
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr/run-ptest6
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch45
-rw-r--r--yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb96
-rw-r--r--yocto-poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb30
-rw-r--r--yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.16.0.bb22
-rw-r--r--yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch54
-rw-r--r--yocto-poky/meta/recipes-support/atk/at-spi2-core_2.16.0.bb23
-rw-r--r--yocto-poky/meta/recipes-support/atk/atk_2.16.0.bb21
-rw-r--r--yocto-poky/meta/recipes-support/attr/acl.inc39
-rw-r--r--yocto-poky/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch198
-rw-r--r--yocto-poky/meta/recipes-support/attr/acl/add-missing-configure.ac.patch59
-rw-r--r--yocto-poky/meta/recipes-support/attr/acl/run-ptest7
-rw-r--r--yocto-poky/meta/recipes-support/attr/acl_2.2.52.bb9
-rw-r--r--yocto-poky/meta/recipes-support/attr/attr.inc39
-rw-r--r--yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb10
-rw-r--r--yocto-poky/meta/recipes-support/attr/ea-acl.inc52
-rw-r--r--yocto-poky/meta/recipes-support/attr/files/attr-Missing-configure.ac.patch63
-rw-r--r--yocto-poky/meta/recipes-support/attr/files/relative-libdir.patch25
-rw-r--r--yocto-poky/meta/recipes-support/attr/files/run-ptest5
-rw-r--r--yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch35
-rw-r--r--yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb43
-rw-r--r--yocto-poky/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch34
-rw-r--r--yocto-poky/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch37
-rw-r--r--yocto-poky/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch43
-rw-r--r--yocto-poky/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch39
-rw-r--r--yocto-poky/meta/recipes-support/beecrypt/beecrypt/fix-security.patch47
-rw-r--r--yocto-poky/meta/recipes-support/beecrypt/beecrypt/run-ptest5
-rw-r--r--yocto-poky/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb48
-rw-r--r--yocto-poky/meta/recipes-support/boost/bjam-native_1.58.0.bb18
-rw-r--r--yocto-poky/meta/recipes-support/boost/boost-1.58.0.inc22
-rw-r--r--yocto-poky/meta/recipes-support/boost/boost.inc192
-rw-r--r--yocto-poky/meta/recipes-support/boost/boost/arm-intrinsics.patch55
-rw-r--r--yocto-poky/meta/recipes-support/boost/boost_1.58.0.bb6
-rw-r--r--yocto-poky/meta/recipes-support/boost/files/0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch33
-rw-r--r--yocto-poky/meta/recipes-support/boost/files/0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch40
-rw-r--r--yocto-poky/meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch50
-rw-r--r--yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch30
-rw-r--r--yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch46
-rw-r--r--yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch46
-rw-r--r--yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch50
-rw-r--r--yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch20
-rw-r--r--yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20150426.bb80
-rw-r--r--yocto-poky/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch33
-rw-r--r--yocto-poky/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch19
-rw-r--r--yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb51
-rw-r--r--yocto-poky/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch61
-rw-r--r--yocto-poky/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch22
-rw-r--r--yocto-poky/meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch31
-rw-r--r--yocto-poky/meta/recipes-support/createrepo/createrepo/fix-native-install.patch163
-rw-r--r--yocto-poky/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch47
-rw-r--r--yocto-poky/meta/recipes-support/createrepo/createrepo/recommends.patch71
-rwxr-xr-xyocto-poky/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py64
-rw-r--r--yocto-poky/meta/recipes-support/createrepo/createrepo_0.4.11.bb50
-rw-r--r--yocto-poky/meta/recipes-support/curl/curl/configure_ac.patch13
-rw-r--r--yocto-poky/meta/recipes-support/curl/curl/pkgconfig_fix.patch32
-rw-r--r--yocto-poky/meta/recipes-support/curl/curl_7.44.0.bb53
-rw-r--r--yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch30
-rw-r--r--yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch48
-rw-r--r--yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch19
-rw-r--r--yocto-poky/meta/recipes-support/db/db_5.3.28.bb116
-rw-r--r--yocto-poky/meta/recipes-support/db/db_6.0.30.bb118
-rw-r--r--yocto-poky/meta/recipes-support/debianutils/debianutils_4.5.1.bb47
-rw-r--r--yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb32
-rw-r--r--yocto-poky/meta/recipes-support/gdbm/files/ptest.patch36
-rwxr-xr-xyocto-poky/meta/recipes-support/gdbm/files/run-ptest7
-rw-r--r--yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch22
-rw-r--r--yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch22
-rw-r--r--yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch60
-rw-r--r--yocto-poky/meta/recipes-support/gdbm/gdbm_1.11.bb43
-rw-r--r--yocto-poky/meta/recipes-support/gdbm/gdbm_1.8.3.bb29
-rw-r--r--yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch39
-rw-r--r--yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch56
-rw-r--r--yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/amd64.patch18
-rw-r--r--yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/append_user_provided_flags.patch52
-rw-r--r--yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/configure.patch222
-rw-r--r--yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/gmp-6.0.0-ppc64.patch26
-rw-r--r--yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/use-includedir.patch15
-rw-r--r--yocto-poky/meta/recipes-support/gmp/gmp.inc16
-rw-r--r--yocto-poky/meta/recipes-support/gmp/gmp_4.2.1.bb15
-rw-r--r--yocto-poky/meta/recipes-support/gmp/gmp_6.0.0.bb33
-rw-r--r--yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch35
-rw-r--r--yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb21
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch62
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch44
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch153
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch63
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch17
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch27
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch19
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch50
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch16
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg/pkgconfig.patch90
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch72
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb105
-rw-r--r--yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.7.bb41
-rw-r--r--yocto-poky/meta/recipes-support/gnutls/gnutls.inc49
-rw-r--r--yocto-poky/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch31
-rw-r--r--yocto-poky/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch67
-rw-r--r--yocto-poky/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch67
-rw-r--r--yocto-poky/meta/recipes-support/gnutls/gnutls_3.3.17.1.bb8
-rw-r--r--yocto-poky/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch14
-rw-r--r--yocto-poky/meta/recipes-support/gnutls/libtasn1_4.5.bb20
-rw-r--r--yocto-poky/meta/recipes-support/gpgme/gpgme/gpgme.pc10
-rw-r--r--yocto-poky/meta/recipes-support/gpgme/gpgme/pkgconfig.patch279
-rw-r--r--yocto-poky/meta/recipes-support/gpgme/gpgme_1.5.4.bb39
-rw-r--r--yocto-poky/meta/recipes-support/icu/icu.inc51
-rw-r--r--yocto-poky/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch28
-rw-r--r--yocto-poky/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch29
-rw-r--r--yocto-poky/meta/recipes-support/icu/icu_55.1.bb21
-rw-r--r--yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.58.bb15
-rw-r--r--yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch158
-rw-r--r--yocto-poky/meta/recipes-support/libassuan/libassuan_2.2.1.bb28
-rw-r--r--yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb29
-rw-r--r--yocto-poky/meta/recipes-support/libbsd/libbsd_0.7.0.bb21
-rw-r--r--yocto-poky/meta/recipes-support/libcap-ng/libcap-ng/python.patch58
-rw-r--r--yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb39
-rw-r--r--yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb77
-rw-r--r--yocto-poky/meta/recipes-support/libcheck/libcheck_0.10.0.bb24
-rw-r--r--yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.8.bb21
-rw-r--r--yocto-poky/meta/recipes-support/libdaemon/libdaemon/fix-includes.patch20
-rw-r--r--yocto-poky/meta/recipes-support/libdaemon/libdaemon_0.14.bb18
-rw-r--r--yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.2.bb14
-rw-r--r--yocto-poky/meta/recipes-support/libevent/libevent/run-ptest18
-rw-r--r--yocto-poky/meta/recipes-support/libevent/libevent_2.0.22.bb39
-rw-r--r--yocto-poky/meta/recipes-support/libexif/libexif_0.6.21.bb17
-rw-r--r--yocto-poky/meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch54
-rw-r--r--yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.3.bb25
-rw-r--r--yocto-poky/meta/recipes-support/libfm/libfm_1.2.3.bb38
-rw-r--r--yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch151
-rw-r--r--yocto-poky/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch71
-rw-r--r--yocto-poky/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch32
-rw-r--r--yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc49
-rw-r--r--yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.3.bb4
-rw-r--r--yocto-poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch150
-rw-r--r--yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.19.bb51
-rw-r--r--yocto-poky/meta/recipes-support/libical/libical_1.0.0.bb13
-rw-r--r--yocto-poky/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch50
-rw-r--r--yocto-poky/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch26
-rw-r--r--yocto-poky/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch5008
-rw-r--r--yocto-poky/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch50
-rw-r--r--yocto-poky/meta/recipes-support/libiconv/libiconv_1.11.1.bb47
-rw-r--r--yocto-poky/meta/recipes-support/libiconv/libiconv_1.14.bb51
-rw-r--r--yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch152
-rw-r--r--yocto-poky/meta/recipes-support/libksba/libksba_1.3.3.bb25
-rw-r--r--yocto-poky/meta/recipes-support/libmpc/libmpc.inc7
-rw-r--r--yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb13
-rw-r--r--yocto-poky/meta/recipes-support/libnl/libnl/fix-pc-file.patch17
-rw-r--r--yocto-poky/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch36
-rw-r--r--yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb44
-rw-r--r--yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch41
-rw-r--r--yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch19
-rw-r--r--yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch222
-rw-r--r--yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch24
-rw-r--r--yocto-poky/meta/recipes-support/liboil/liboil_0.3.17.bb27
-rw-r--r--yocto-poky/meta/recipes-support/libpcre/libpcre/Makefile183
-rw-r--r--yocto-poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch41
-rw-r--r--yocto-poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch48
-rw-r--r--yocto-poky/meta/recipes-support/libpcre/libpcre/run-ptest3
-rw-r--r--yocto-poky/meta/recipes-support/libpcre/libpcre_8.37.bb73
-rw-r--r--yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch37
-rw-r--r--yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb35
-rw-r--r--yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.50.0.bb28
-rw-r--r--yocto-poky/meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch30
-rw-r--r--yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch40
-rw-r--r--yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.5.bb28
-rw-r--r--yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch29
-rw-r--r--yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch2529
-rw-r--r--yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch28
-rw-r--r--yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch42
-rw-r--r--yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch72
-rw-r--r--yocto-poky/meta/recipes-support/libunwind/libunwind.inc31
-rw-r--r--yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb12
-rw-r--r--yocto-poky/meta/recipes-support/liburcu/liburcu/0001-uatomic-Specify-complete-types-for-atomic-function-c.patch158
-rw-r--r--yocto-poky/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch47
-rw-r--r--yocto-poky/meta/recipes-support/liburcu/liburcu/aarch64.patch19
-rw-r--r--yocto-poky/meta/recipes-support/liburcu/liburcu_0.8.7.bb21
-rw-r--r--yocto-poky/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch30
-rw-r--r--yocto-poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb39
-rw-r--r--yocto-poky/meta/recipes-support/libusb/libusb1_1.0.19.bb34
-rw-r--r--yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig.patch118
-rw-r--r--yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch24
-rw-r--r--yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb46
-rw-r--r--yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch32
-rw-r--r--yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.6.bb21
-rw-r--r--yocto-poky/meta/recipes-support/lz4/lz4.bb21
-rw-r--r--yocto-poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch70
-rw-r--r--yocto-poky/meta/recipes-support/lzo/lzo/acinclude.m4358
-rw-r--r--yocto-poky/meta/recipes-support/lzo/lzo/run-ptest8
-rw-r--r--yocto-poky/meta/recipes-support/lzo/lzo_2.09.bb35
-rw-r--r--yocto-poky/meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch100
-rw-r--r--yocto-poky/meta/recipes-support/lzop/lzop/acinclude.m4390
-rw-r--r--yocto-poky/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch36
-rw-r--r--yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb29
-rw-r--r--yocto-poky/meta/recipes-support/mpfr/mpfr-3.1.3/long-long-thumb.patch39
-rw-r--r--yocto-poky/meta/recipes-support/mpfr/mpfr.inc6
-rw-r--r--yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb17
-rw-r--r--yocto-poky/meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch68
-rw-r--r--yocto-poky/meta/recipes-support/neon/neon/pkgconfig.patch15
-rw-r--r--yocto-poky/meta/recipes-support/neon/neon_0.30.1.bb27
-rw-r--r--yocto-poky/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch46
-rw-r--r--yocto-poky/meta/recipes-support/nettle/files/run-ptest36
-rw-r--r--yocto-poky/meta/recipes-support/nettle/nettle.inc43
-rw-r--r--yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb12
-rw-r--r--yocto-poky/meta/recipes-support/nettle/nettle_3.1.1.bb11
-rw-r--r--yocto-poky/meta/recipes-support/npth/npth/pkgconfig.patch49
-rw-r--r--yocto-poky/meta/recipes-support/npth/npth_1.2.bb21
-rw-r--r--yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch52
-rw-r--r--yocto-poky/meta/recipes-support/nspr/nspr/nspr.pc.in11
-rw-r--r--yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch26
-rw-r--r--yocto-poky/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch19
-rw-r--r--yocto-poky/meta/recipes-support/nspr/nspr_4.10.8.bb176
-rw-r--r--yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb29
-rw-r--r--yocto-poky/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch110
-rw-r--r--yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch35
-rw-r--r--yocto-poky/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch71
-rw-r--r--yocto-poky/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch26
-rw-r--r--yocto-poky/meta/recipes-support/nss/nss/nss.pc.in11
-rw-r--r--yocto-poky/meta/recipes-support/nss/nss/signlibs.sh20
-rw-r--r--yocto-poky/meta/recipes-support/nss/nss_3.19.2.bb223
-rw-r--r--yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb18
-rw-r--r--yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb31
-rw-r--r--yocto-poky/meta/recipes-support/popt/popt/disable_tests.patch21
-rw-r--r--yocto-poky/meta/recipes-support/popt/popt/pkgconfig_fix.patch15
-rw-r--r--yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch21
-rw-r--r--yocto-poky/meta/recipes-support/popt/popt_1.16.bb20
-rw-r--r--yocto-poky/meta/recipes-support/ptest-runner/files/ptest-runner27
-rw-r--r--yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb24
-rw-r--r--yocto-poky/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch105
-rw-r--r--yocto-poky/meta/recipes-support/pth/files/pth-fix-parallel.patch48
-rw-r--r--yocto-poky/meta/recipes-support/pth/pth_2.0.7.bb31
-rw-r--r--yocto-poky/meta/recipes-support/serf/serf/env.patch28
-rw-r--r--yocto-poky/meta/recipes-support/serf/serf/norpath.patch42
-rw-r--r--yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb26
-rw-r--r--yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info.inc36
-rw-r--r--yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch23
-rw-r--r--yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch33
-rw-r--r--yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.4.bb7
-rw-r--r--yocto-poky/meta/recipes-support/sqlite/files/0001-using-the-dynamic-library.patch30
-rw-r--r--yocto-poky/meta/recipes-support/sqlite/sqlite3.inc34
-rw-r--r--yocto-poky/meta/recipes-support/sqlite/sqlite3_3.8.10.2.bb23
-rw-r--r--yocto-poky/meta/recipes-support/taglib/taglib_1.9.1.bb30
-rw-r--r--yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb27
-rw-r--r--yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch14
-rw-r--r--yocto-poky/meta/recipes-support/vte/vte.inc16
-rw-r--r--yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb14
253 files changed, 19507 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-support/apr/apr-util/configfix.patch b/yocto-poky/meta/recipes-support/apr/apr-util/configfix.patch
new file mode 100644
index 000000000..dbb114880
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/apr/apr-util/configure_fixes.patch b/yocto-poky/meta/recipes-support/apr/apr-util/configure_fixes.patch
new file mode 100644
index 000000000..91e244ce2
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/apr/apr-util/run-ptest b/yocto-poky/meta/recipes-support/apr/apr-util/run-ptest
new file mode 100644
index 000000000..ae19a1d11
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/apr/apr-util_1.5.4.bb b/yocto-poky/meta/recipes-support/apr/apr-util_1.5.4.bb
new file mode 100644
index 000000000..6a14d14d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/apr/apr-util_1.5.4.bb
@@ -0,0 +1,81 @@
+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=519e0a18e03f7c023070568c14b077bb \
+ 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] = "866825c04da827c6e5f53daff5569f42"
+SRC_URI[sha256sum] = "976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19"
+
+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 \
+ --without-sqlite3 \
+ --with-expat=${STAGING_DIR_HOST}${prefix}"
+
+
+inherit autotools lib_package binconfig
+
+PR = "r1"
+
+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#" ${S}/build/rules.mk
+ sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${S}/build/rules.mk
+ sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${S}/build/rules.mk
+ sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${S}/build/rules.mk
+}
+
+FILES_${PN} += "${libdir}/apr-util-1/apr_dbm_gdbm-1.so"
+FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/apr_dbm_gdbm.so* ${libdir}/apr-util-1/apr_dbm_gdbm.la"
+FILES_${PN}-dbg += "${libdir}/apr-util-1/.debug/*"
+FILES_${PN}-staticdev += "${libdir}/apr-util-1/apr_dbm_gdbm.a"
+
+inherit ptest
+
+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/yocto-poky/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch b/yocto-poky/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
new file mode 100644
index 000000000..6805b8b6e
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/apr/apr/Fix-packet-discards-HTTP-redirect.patch
@@ -0,0 +1,32 @@
+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>
+---
+ 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 c133a26..e8faf15 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.7.9.5
+
diff --git a/yocto-poky/meta/recipes-support/apr/apr/cleanup.patch b/yocto-poky/meta/recipes-support/apr/apr/cleanup.patch
new file mode 100644
index 000000000..b6784e015
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/apr/apr/cleanup.patch
@@ -0,0 +1,43 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: apr-1.4.2/build/buildcheck.sh
+===================================================================
+--- apr-1.4.2.orig/build/buildcheck.sh 2009-11-13 08:27:16.000000000 +0800
++++ apr-1.4.2/build/buildcheck.sh 2010-11-26 15:44:00.000000000 +0800
+@@ -32,35 +32,4 @@
+ echo "buildconf: autoconf version $ac_version (ok)"
+ fi
+
+-# Sample libtool --version outputs:
+-# ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
+-# ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
+-# output is multiline from 1.5 onwards
+-
+-# Require libtool 1.4 or newer
+-libtool=`build/PrintPath glibtool1 glibtool libtool libtool15 libtool14`
+-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."
+-echo " You need libtool version 1.4 or newer installed"
+-echo " to build APR from SVN."
+-exit 1
+-fi
+-lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
+-IFS=.; set $lt_version; IFS=' '
+-lt_status="good"
+-if test "$1" = "1"; then
+- if test "$2" -lt "4"; then
+- lt_status="bad"
+- fi
+-fi
+-if test $lt_status = "good"; then
+- echo "buildconf: libtool version $lt_pversion (ok)"
+- exit 0
+-fi
+-
+-echo "buildconf: libtool version $lt_pversion found."
+-echo " You need libtool version 1.4 or newer installed"
+-echo " to build APR from SVN."
+-
+-exit 1
++exit 0
diff --git a/yocto-poky/meta/recipes-support/apr/apr/configfix.patch b/yocto-poky/meta/recipes-support/apr/apr/configfix.patch
new file mode 100644
index 000000000..605c4f632
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/apr/apr/configfix.patch
@@ -0,0 +1,53 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: apr-1.3.3/apr-config.in
+===================================================================
+--- apr-1.3.3.orig/apr-config.in 2009-01-12 15:16:31.000000000 +0000
++++ apr-1.3.3/apr-config.in 2009-01-12 15:19:25.000000000 +0000
+@@ -152,14 +152,7 @@
+ 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 +167,14 @@
+ 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"
diff --git a/yocto-poky/meta/recipes-support/apr/apr/configure_fixes.patch b/yocto-poky/meta/recipes-support/apr/apr/configure_fixes.patch
new file mode 100644
index 000000000..051400059
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/apr/apr/configure_fixes.patch
@@ -0,0 +1,68 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: apr-1.3.3/configure.in
+===================================================================
+--- apr-1.3.3.orig/configure.in
++++ apr-1.3.3/configure.in
+@@ -794,39 +794,6 @@ AC_CHECK_FUNCS([mmap munmap shm_open shm
+ create_area])
+
+ APR_CHECK_DEFINE(MAP_ANON, sys/mman.h)
+-AC_CHECK_FILE(/dev/zero)
+-
+-# Not all systems can mmap /dev/zero (such as HP-UX). Check for that.
+-if test "$ac_cv_func_mmap" = "yes" &&
+- test "$ac_cv_file__dev_zero" = "yes"; then
+- AC_MSG_CHECKING(for mmap that can map /dev/zero)
+- AC_TRY_RUN([
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#ifdef HAVE_SYS_MMAN_H
+-#include <sys/mman.h>
+-#endif
+- int main()
+- {
+- int fd;
+- void *m;
+- fd = open("/dev/zero", O_RDWR);
+- if (fd < 0) {
+- return 1;
+- }
+- m = mmap(0, sizeof(void*), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+- if (m == (void *)-1) { /* aka MAP_FAILED */
+- return 2;
+- }
+- if (munmap(m, sizeof(void*)) < 0) {
+- return 3;
+- }
+- return 0;
+- }], [], [ac_cv_file__dev_zero=no], [ac_cv_file__dev_zero=no])
+-
+- AC_MSG_RESULT($ac_cv_file__dev_zero)
+-fi
+
+ # Now we determine which one is our anonymous shmem preference.
+ haveshmgetanon="0"
+@@ -1518,13 +1485,14 @@ else
+ bigendian=0
+ fi
+
+-APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
+-#include <sys/uio.h>],struct iovec,0)
+-if test "$ac_cv_sizeof_struct_iovec" = "0"; then
+- have_iovec=0
+-else
+- have_iovec=1
+-fi
++#APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>
++##include <sys/uio.h>],struct iovec,0)
++#if test "$ac_cv_sizeof_struct_iovec" = "0"; then
++# have_iovec=0
++#else
++# have_iovec=1
++#fi
++have_iovec=1
+
+ AC_SUBST(voidp_size)
+ AC_SUBST(short_value)
diff --git a/yocto-poky/meta/recipes-support/apr/apr/run-ptest b/yocto-poky/meta/recipes-support/apr/apr/run-ptest
new file mode 100644
index 000000000..ae19a1d11
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch b/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
new file mode 100644
index 000000000..9569645b8
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
@@ -0,0 +1,45 @@
+Makefile.in: fix cross compiling failed
+
+The tools/gen_test_char was invoked at build time,
+and it didn't work for the cross compiling, so we
+compile it with $BUILD_CC.
+
+Remove the 'tools' dir creation, it always existed.
+And it caused gen_test_char unexpected rebuilt at
+do_install time.
+
+Upstream-Status: inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.in | 10 ++--------
+ 1 file changed, 2 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index a2a5194..5fe028f 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -46,7 +46,6 @@ 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 \
+ include/private/apr_escape_test_char.h
+ DISTCLEAN_TARGETS = config.cache config.log config.status \
+ include/apr.h include/arch/unix/apr_private.h \
+@@ -129,13 +128,8 @@ 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
+- $(APR_MKDIR) tools
+- $(LT_COMPILE)
+-
+-tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char)
+- $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS)
++tools/gen_test_char@EXEEXT@: tools/gen_test_char.c
++ $(BUILD_CC) $(CFLAGS_FOR_BUILD) $< -o $@
+
+ include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@
+ $(APR_MKDIR) include/private
diff --git a/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb b/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb
new file mode 100644
index 000000000..c1f7f380e
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb
@@ -0,0 +1,96 @@
+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://configure_fixes.patch \
+ file://cleanup.patch \
+ file://configfix.patch \
+ file://run-ptest \
+ file://upgrade-and-fix-1.5.1.patch \
+ file://Fix-packet-discards-HTTP-redirect.patch \
+"
+
+SRC_URI[md5sum] = "4e9769f3349fe11fc0a5e1b224c236aa"
+SRC_URI[sha256sum] = "7d03ed29c22a7152be45b8e50431063736df9e1daa1ddf93f6a547ba7a28f67a"
+
+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"
+
+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}
+ ./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
+ cp ${S}/${HOST_SYS}-libtool ${D}${datadir}/build-1/libtool
+}
+
+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/
+}
+
+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/yocto-poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb b/yocto-poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb
new file mode 100644
index 000000000..7cf17d65d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb
@@ -0,0 +1,30 @@
+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"
+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_${PN}-dbg += "${libdir}/aspell-0.60/.debu*"
+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/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.16.0.bb b/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.16.0.bb
new file mode 100644
index 000000000..7d95fdbd8
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.16.0.bb
@@ -0,0 +1,22 @@
+SUMMARY = "AT-SPI 2 Toolkit Bridge"
+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] = "8936488c8cdce0e158f80b2e247527f9"
+SRC_URI[sha256sum] = "78efc45ec36383bf785f8636e64a8d866defeb020e00a08f92978f1fc3772ff9"
+
+DEPENDS = "dbus glib-2.0 atk at-spi2-core"
+
+inherit autotools pkgconfig distro_features_check
+
+# 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.*"
+FILES_${PN}-dbg += "${libdir}/gtk-2.0/modules/.debug"
diff --git a/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch b/yocto-poky/meta/recipes-support/atk/at-spi2-core/0001-nls.m4-Take-it-from-gettext-0.15.patch
new file mode 100644
index 000000000..69a51d566
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/atk/at-spi2-core/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/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.16.0.bb b/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.16.0.bb
new file mode 100644
index 000000000..933cbe70f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.16.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
+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-nls.m4-Take-it-from-gettext-0.15.patch \
+ "
+
+SRC_URI[md5sum] = "be6eeea370f913b7639b609913b2cf02"
+SRC_URI[sha256sum] = "1c0b77fb8ce81abbf1d80c0afee9858b3f9229f673b7881995fe0fc16b1a74d0"
+
+DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native"
+
+inherit autotools gtk-doc pkgconfig distro_features_check
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = "--disable-introspection --disable-xevie --with-dbus-daemondir=${bindir}"
+
+FILES_${PN} += "${datadir}/dbus-1/services/*.service \
+ ${datadir}/dbus-1/accessibility-services/*.service"
diff --git a/yocto-poky/meta/recipes-support/atk/atk_2.16.0.bb b/yocto-poky/meta/recipes-support/atk/atk_2.16.0.bb
new file mode 100644
index 000000000..0f8f9b520
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/atk/atk_2.16.0.bb
@@ -0,0 +1,21 @@
+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
+
+SRC_URI[archive.md5sum] = "c7c5002bd6e58b4723a165f1bf312116"
+SRC_URI[archive.sha256sum] = "095f986060a6a0b22eb15eef84ae9f14a1cf8082488faa6886d94c37438ae562"
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF = "--disable-glibtest \
+ --disable-introspection"
diff --git a/yocto-poky/meta/recipes-support/attr/acl.inc b/yocto-poky/meta/recipes-support/attr/acl.inc
new file mode 100644
index 000000000..b2bc8bac2
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/acl.inc
@@ -0,0 +1,39 @@
+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://run-ptest \
+ file://acl-fix-the-order-of-expected-output-of-getfacl.patch \
+"
+
+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 -cf - test/ --exclude nfs | ( 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/
+}
+
+RDEPENDS_${PN}-ptest = "acl bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow"
diff --git a/yocto-poky/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch b/yocto-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/yocto-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/yocto-poky/meta/recipes-support/attr/acl/add-missing-configure.ac.patch b/yocto-poky/meta/recipes-support/attr/acl/add-missing-configure.ac.patch
new file mode 100644
index 000000000..eb6979fa3
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/acl/add-missing-configure.ac.patch
@@ -0,0 +1,59 @@
+Upstream-Status: Backport [configure.ac is missing from tarball]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: acl-2.2.52/configure.ac
+===================================================================
+--- /dev/null
++++ acl-2.2.52/configure.ac
+@@ -0,0 +1,50 @@
++
++# 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/yocto-poky/meta/recipes-support/attr/acl/run-ptest b/yocto-poky/meta/recipes-support/attr/acl/run-ptest
new file mode 100644
index 000000000..3b31cc99a
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/acl/run-ptest
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+gpasswd -a daemon bin
+make -C test -k tests root-tests |sed \
+ -e 's|^\[.*\] \(.*\) -- ok$|PASS: \1|' \
+ -e 's|^\[.*\] \(.*\) -- failed|FAIL: \1|'
+gpasswd -d daemon bin
diff --git a/yocto-poky/meta/recipes-support/attr/acl_2.2.52.bb b/yocto-poky/meta/recipes-support/attr/acl_2.2.52.bb
new file mode 100644
index 000000000..ecdbdb6b7
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/acl_2.2.52.bb
@@ -0,0 +1,9 @@
+require acl.inc
+
+SRC_URI += "file://add-missing-configure.ac.patch"
+
+SRC_URI[md5sum] = "a61415312426e9c2212bd7dc7929abda"
+SRC_URI[sha256sum] = "179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23"
+
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/attr/attr.inc b/yocto-poky/meta/recipes-support/attr/attr.inc
new file mode 100644
index 000000000..28c750f98
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/attr.inc
@@ -0,0 +1,39 @@
+SUMMARY = "Utilities for manipulating filesystem extended attributes"
+HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
+SECTION = "libs"
+
+DEPENDS = "ncurses 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 -cf - test/ --exclude ext | ( 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
+}
+
+RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
+
+BBCLASSEXTEND = "native nativesdk" \ No newline at end of file
diff --git a/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb b/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb
new file mode 100644
index 000000000..ad40c9b72
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb
@@ -0,0 +1,10 @@
+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_append += "file://attr-Missing-configure.ac.patch"
+
+SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
+SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/attr/ea-acl.inc b/yocto-poky/meta/recipes-support/attr/ea-acl.inc
new file mode 100644
index 000000000..370e16f4a
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/ea-acl.inc
@@ -0,0 +1,52 @@
+# this build system is mostly shared by attr and acl
+
+SRC_URI += "file://relative-libdir.patch;striplevel=0 \
+ "
+
+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_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
+
+do_install () {
+ oe_runmake install install-lib install-dev DIST_ROOT="${D}"
+}
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}"
+
+BBCLASSEXTEND = "native"
+# Only append ldflags for target recipe and if USE_NLS is enabled
+LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
+EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"
+
+fix_symlink () {
+ if [ "${BB_CURRENTTASK}" != "populate_sysroot" -a "${BB_CURRENTTASK}" != "populate_sysroot_setscene" ]
+ then
+ return
+ fi
+
+ if test "${libdir}" = "${base_libdir}" ; then
+ return
+ fi
+ # Remove bad symlinks & create the correct symlinks
+ if test -L ${libdir}/lib${BPN}.so ; then
+ rm -rf ${libdir}/lib${BPN}.so
+ ln -sf ${base_libdir}/lib${BPN}.so ${libdir}/lib${BPN}.so
+ fi
+ if test -L ${base_libdir}/lib${BPN}.a ; then
+ rm -rf ${base_libdir}/lib${BPN}.a
+ ln -sf ${libdir}/lib${BPN}.a ${base_libdir}/lib${BPN}.a
+ fi
+ if test -L ${base_libdir}/lib${BPN}.la ; then
+ rm -rf ${base_libdir}/lib${BPN}.la
+ ln -sf ${libdir}/lib${BPN}.la ${base_libdir}/lib${BPN}.la
+ fi
+}
+SSTATEPOSTINSTFUNCS_class-native += "fix_symlink"
diff --git a/yocto-poky/meta/recipes-support/attr/files/attr-Missing-configure.ac.patch b/yocto-poky/meta/recipes-support/attr/files/attr-Missing-configure.ac.patch
new file mode 100644
index 000000000..20fcc3cee
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/files/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/yocto-poky/meta/recipes-support/attr/files/relative-libdir.patch b/yocto-poky/meta/recipes-support/attr/files/relative-libdir.patch
new file mode 100644
index 000000000..b72bf184d
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/attr/files/run-ptest b/yocto-poky/meta/recipes-support/attr/files/run-ptest
new file mode 100644
index 000000000..a6c6867f2
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch b/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch
new file mode 100644
index 000000000..ab907fca0
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-fix-build-with-musl.patch
@@ -0,0 +1,35 @@
+From 829a89e7f5785239a9384e3afd46c900f9d76ada Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 31 Aug 2015 19:55:32 +0000
+Subject: [PATCH] fix build with musl
+
+signal.h already includes bits/sigcontext.h
+Documentation seems to indicate that if you need the definitions in
+sigcontext.h, you are supposed to include signal.h and not sigcontext.h.
+
+a good fix should be to remove glibc
+specific understanding, in those ifdef's
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ os_dep.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/os_dep.c b/os_dep.c
+index 08c501d..5cb7873 100644
+--- a/os_dep.c
++++ b/os_dep.c
+@@ -41,7 +41,7 @@
+ # else /* __GLIBC__ < 2 */
+ /* libc5 doesn't have <sigcontext.h>: go directly with the kernel */
+ /* one. Check LINUX_VERSION_CODE to see which we should reference. */
+-# include <asm/sigcontext.h>
++# include <signal.h>
+ # endif /* __GLIBC__ < 2 */
+ # endif
+ #endif /* LINUX && !POWERPC */
+--
+2.5.1
+
diff --git a/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb b/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
new file mode 100644
index 000000000..95e358f8e
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
@@ -0,0 +1,43 @@
+SUMMARY = "A garbage collector for C and C++"
+
+DESCRIPTION = "The Boehm-Demers-Weiser conservative garbage collector can be\
+ used as a garbage collecting replacement for C malloc or C++ new. It allows\
+ you to allocate memory basically as you normally would, without explicitly\
+ deallocating memory that is no longer useful. The collector automatically\
+ recycles memory when it determines that it can no longer be otherwise\
+ accessed.\
+ The collector is also used by a number of programming language\
+ implementations that either use C as intermediate code, want to facilitate\
+ easier interoperation with C libraries, or just prefer the simple collector\
+ interface.\
+ Alternatively, the garbage collector may be used as a leak detector for C\
+ or C++ programs, though that is not its primary goal.\
+ Empirically, this collector works with most unmodified C programs, simply\
+ by replacing malloc with GC_malloc calls, replacing realloc with GC_realloc\
+ calls, and removing free calls."
+
+HOMEPAGE = "http://www.hboehm.info/gc/"
+SECTION = "devel"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://README.QUICK;md5=55f5088f90a982fed7af9a4897047ef7"
+
+SRC_URI = "http://www.hboehm.info/gc/gc_source/gc-${PV}.tar.gz \
+ file://0001-fix-build-with-musl.patch \
+ "
+
+SRC_URI[md5sum] = "12c05fd2811d989341d8c6d81f66af87"
+SRC_URI[sha256sum] = "63320ad7c45460e4a40e03f5aa4c6893783f21a16416c3282b994f933312afa2"
+FILES_${PN}-doc = "/usr/share"
+
+REAL_PV = "${@[d.getVar('PV',1)[:-1], d.getVar('PV',1)][(d.getVar('PV',1)[-1]).isdigit()]}"
+S = "${WORKDIR}/gc-${REAL_PV}"
+
+ARM_INSTRUCTION_SET = "arm"
+
+inherit autotools pkgconfig
+
+# by default use external libatomic-ops
+PACKAGECONFIG ??= "libatomic-ops"
+PACKAGECONFIG[libatomic-ops] = "--with-libatomic-ops=yes,--with-libatomic-ops=no,libatomic-ops"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch b/yocto-poky/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
new file mode 100644
index 000000000..b3298ce2d
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch b/yocto-poky/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch
new file mode 100644
index 000000000..3e5513fce
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch b/yocto-poky/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch
new file mode 100644
index 000000000..91b1fa6ef
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch b/yocto-poky/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch
new file mode 100644
index 000000000..8144e39be
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/beecrypt/beecrypt/fix-security.patch b/yocto-poky/meta/recipes-support/beecrypt/beecrypt/fix-security.patch
new file mode 100644
index 000000000..6cb0c0020
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/beecrypt/beecrypt/run-ptest b/yocto-poky/meta/recipes-support/beecrypt/beecrypt/run-ptest
new file mode 100644
index 000000000..2ee294d99
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb b/yocto-poky/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
new file mode 100644
index 000000000..1e626f154
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/boost/bjam-native_1.58.0.bb b/yocto-poky/meta/recipes-support/boost/bjam-native_1.58.0.bb
new file mode 100644
index 000000000..32646d707
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/boost/bjam-native_1.58.0.bb
@@ -0,0 +1,18 @@
+include boost-${PV}.inc
+
+SUMMARY = "Portable Boost.Jam build tool for boost"
+SECTION = "devel"
+
+inherit native
+
+SRC_URI += "file://bjam-native-build-bjam.debug.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/yocto-poky/meta/recipes-support/boost/boost-1.58.0.inc b/yocto-poky/meta/recipes-support/boost/boost-1.58.0.inc
new file mode 100644
index 000000000..b47d09133
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/boost/boost-1.58.0.inc
@@ -0,0 +1,22 @@
+# 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",1).split("."))}"
+BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}"
+BOOST_P = "boost_${BOOST_VER}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2 \
+ file://0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch \
+ file://0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch \
+"
+
+SRC_URI[md5sum] = "b8839650e61e9c1c0a89f371dd475546"
+SRC_URI[sha256sum] = "fdfc204fc33ec79c99b9a74944c3e54bd78be4f7f15e260c0e2700a36dc7d3e5"
+
+S = "${WORKDIR}/${BOOST_P}"
diff --git a/yocto-poky/meta/recipes-support/boost/boost.inc b/yocto-poky/meta/recipes-support/boost/boost.inc
new file mode 100644
index 000000000..3288e845f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/boost/boost.inc
@@ -0,0 +1,192 @@
+SUMMARY = "Free peer-reviewed portable C++ source libraries"
+SECTION = "libs"
+DEPENDS = "bjam-native zlib bzip2"
+
+ARM_INSTRUCTION_SET = "arm"
+
+BOOST_LIBS = "\
+ atomic \
+ chrono \
+ date_time \
+ filesystem \
+ graph \
+ iostreams \
+ log \
+ program_options \
+ random \
+ regex \
+ serialization \
+ signals \
+ system \
+ test \
+ thread \
+ "
+
+# optional boost-python library
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[python] = ",,python python3"
+BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)}"
+inherit python-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', True).split( ):
+ # BJAM does not know '--with-python3' (only --with-python)
+ if lib != "python3":
+ extras.append("--with-%s" % lib)
+ pkg = "boost-%s" % lib.replace("_", "-")
+ packages.append(pkg)
+ if lib == "python":
+ # special: python*.so matches python3.so !!
+ if not d.getVar("FILES_%s" % pkg, True):
+ d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s.so.*" % lib)
+ else:
+ if not d.getVar("FILES_%s" % pkg, True):
+ 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_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}"
+RRECOMMENDS_${PN} += "${BOOST_PACKAGES}"
+RRECOMMENDS_${PN}_class-native = ""
+ALLOW_EMPTY_${PN} = "1"
+
+# 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 paralelism causes bjam to segfault or to ignore -j
+# https://svn.boost.org/trac/boost/ticket/7634
+def get_boost_parallel_make(bb, d):
+ pm = d.getVar('PARALLEL_MAKE', True)
+ if pm:
+ # look for '-j' and throw other options (e.g. '-l') away
+ # because they might have different meaning in bjam
+ pm = pm.split()
+ while pm:
+ v = None
+ opt = pm.pop(0)
+ if opt == '-j':
+ v = pm.pop(0)
+ elif opt.startswith('-j'):
+ v = opt[2:].strip()
+ else:
+ v = None
+
+ if v:
+ v = min(64, int(v))
+ return '-j' + str(v)
+
+ return ""
+
+BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}"
+BJAM_OPTS = '${BOOST_PARALLEL_MAKE} \
+ ${BJAM_TOOLS} \
+ -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/example/user-config.jam \
+ --builddir=${S}/${TARGET_SYS} \
+ --disable-icu \
+ ${BJAM_EXTRA}'
+
+# Native compilation of bzip2 isn't working
+BJAM_OPTS_append_class-native = ' -sNO_BZIP2=1'
+
+do_boostconfig() {
+ cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
+
+ # D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation.
+ sed -i "/^using gcc : 4.3.1/d" ${S}/tools/build/example/user-config.jam
+ sed -i "/^using python : ${PYTHON_BASEVERSION}"/d ${S}/tools/build/example/user-config.jam
+ echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam
+ echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam
+ echo "using python : 3.4 : : ${STAGING_INCDIR}/python3.4m ;" >> ${S}/tools/build/example/user-config.jam
+
+ CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
+ sed -i '/^using python/d' project-config.jam
+}
+
+do_boostconfig[dirs] = "${S}"
+addtask do_boostconfig after do_patch before do_configure
+
+do_compile() {
+ set -ex
+ bjam ${BJAM_OPTS} --prefix=${prefix} \
+ --exec-prefix=${exec_prefix} \
+ --libdir=${libdir} \
+ --includedir=${includedir}
+}
+
+do_install() {
+ set -ex
+ 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/yocto-poky/meta/recipes-support/boost/boost/arm-intrinsics.patch b/yocto-poky/meta/recipes-support/boost/boost/arm-intrinsics.patch
new file mode 100644
index 000000000..fe85c69a8
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/boost/boost_1.58.0.bb b/yocto-poky/meta/recipes-support/boost/boost_1.58.0.bb
new file mode 100644
index 000000000..c09d5f431
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/boost/boost_1.58.0.bb
@@ -0,0 +1,6 @@
+include boost-${PV}.inc
+include boost.inc
+
+SRC_URI += "\
+ file://arm-intrinsics.patch \
+"
diff --git a/yocto-poky/meta/recipes-support/boost/files/0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch b/yocto-poky/meta/recipes-support/boost/files/0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch
new file mode 100644
index 000000000..329b4c361
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/boost/files/0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch
@@ -0,0 +1,33 @@
+From 817aed0d755bf8c0ba4ef6a77d41538e50b571fd Mon Sep 17 00:00:00 2001
+From: claymore <carlosmf.pt@gmail.com>
+Date: Fri, 24 Apr 2015 02:28:47 +0100
+Subject: [PATCH 1/2] mips1 fix added gcc.jam was passing the options -m32 and
+ -m64 to mips cross-compilers, when those do not use
+ such options This modification solves it by adding mips
+ as an exception
+
+Signed-off-by: Carlos M. Ferreira carlosmf.pt@gmail.com
+
+Upstream-Status: Backport
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+---
+ tools/build/src/tools/gcc.jam | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
+index db04534..eff95ae 100644
+--- a/tools/build/src/tools/gcc.jam
++++ b/tools/build/src/tools/gcc.jam
+@@ -451,7 +451,7 @@ rule setup-address-model ( targets * : sources * : properties * )
+ else
+ {
+ local arch = [ feature.get-values architecture : $(properties) ] ;
+- if $(arch) != arm
++ if $(arch) != arm && $(arch) != mips1
+ {
+ if $(model) = 32
+ {
+--
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-support/boost/files/0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch b/yocto-poky/meta/recipes-support/boost/files/0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch
new file mode 100644
index 000000000..ecf7e550f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/boost/files/0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch
@@ -0,0 +1,40 @@
+From f825634a56b119dfa9d712119a66279cc7635978 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
+Date: Sat, 2 May 2015 14:24:02 +0200
+Subject: [PATCH 2/2] Don't pass -m32/-m64 where it's not supported.
+
+Only PowerPC, SPARC, and x86 do support the -m32 and -m64 compiler options [1].
+
+Rather then excluding all architectures not supporting these options as it is
+done in commit c0634341d9ee2c02d3a55c91dafb988afc066c49 [2], include all
+architectures that do support them.
+
+This will fix building Boost for the SuperH architecture with Buildroot [3].
+
+[1] https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
+[2] https://github.com/boostorg/build/commit/c0634341d9ee2c02d3a55c91dafb988afc066c49
+[3] http://autobuild.buildroot.net/results/ccd/ccd5c83963032ba49b1627b1dff39e34a9486943/build-end.log
+
+Upstream-Status: Backport
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+---
+ tools/build/src/tools/gcc.jam | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
+index eff95ae..2f6af93 100644
+--- a/tools/build/src/tools/gcc.jam
++++ b/tools/build/src/tools/gcc.jam
+@@ -451,7 +451,7 @@ rule setup-address-model ( targets * : sources * : properties * )
+ else
+ {
+ local arch = [ feature.get-values architecture : $(properties) ] ;
+- if $(arch) != arm && $(arch) != mips1
++ if $(arch) = power || $(arch) = sparc || $(arch) = x86
+ {
+ if $(model) = 32
+ {
+--
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch b/yocto-poky/meta/recipes-support/boost/files/bjam-native-build-bjam.debug.patch
new file mode 100644
index 000000000..9f8b7eac0
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch b/yocto-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..4b4b287d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch
@@ -0,0 +1,30 @@
+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
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.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/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch
new file mode 100644
index 000000000..bf027233d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch
@@ -0,0 +1,46 @@
+Upstream-Status: Pending
+
+From 111e905fe931da1a3800accfc675cc01c8ee080c Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <ulf@emagii.com>
+Date: Tue, 28 Feb 2012 06:42:58 +0100
+Subject: [PATCH] update-ca-certificates: remove c rehash
+
+Updated earlier patch to apply clean on 2012-02-12
+Signed-off-by: Ulf Samuelsson <ulf@emagii.com>
+---
+ sbin/update-ca-certificates | 20 ++++++++++----------
+ 1 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
+index 5375950..c567e3d 100755
+--- a/sbin/update-ca-certificates
++++ b/sbin/update-ca-certificates
+@@ -132,16 +132,16 @@ rm -f "$CERTBUNDLE"
+ ADDED_CNT=$(wc -l < "$ADDED")
+ REMOVED_CNT=$(wc -l < "$REMOVED")
+
+-if [ "$ADDED_CNT" -gt 0 ] || [ "$REMOVED_CNT" -gt 0 ]
+-then
+- # only run if set of files has changed
+- if [ "$verbose" = 0 ]
+- then
+- c_rehash . > /dev/null
+- else
+- c_rehash .
+- fi
+-fi
++#if [ "$ADDED_CNT" -gt 0 ] || [ "$REMOVED_CNT" -gt 0 ]
++#then
++# # only run if set of files has changed
++# if [ "$verbose" = 0 ]
++# then
++# c_rehash . > /dev/null
++# else
++# c_rehash .
++# fi
++#fi
+
+ chmod 0644 "$TEMPBUNDLE"
+ mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
+--
+1.7.4.1
diff --git a/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch b/yocto-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/yocto-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/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch
new file mode 100644
index 000000000..f8b0791be
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch
new file mode 100644
index 000000000..a113fa8b1
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20150426.bb b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20150426.bb
new file mode 100644
index 000000000..716e3dfca
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20150426.bb
@@ -0,0 +1,80 @@
+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=48d2baf97986999e776b43c8dd9e0c5a"
+
+# This is needed to ensure we can run the postinst at image creation time
+DEPENDS = "ca-certificates-native"
+DEPENDS_class-native = ""
+
+# tag: debian/20150426 + 2
+SRCREV = "d4790d2832aaac9152f450e06661511067592227"
+
+SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
+ file://0001-update-ca-certificates-remove-c-rehash.patch \
+ file://0002-update-ca-certificates-use-SYSROOT.patch \
+ file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
+ file://default-sysroot.patch \
+ file://sbindir.patch"
+
+S = "${WORKDIR}/git"
+
+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} () {
+ SYSROOT="$D" update-ca-certificates
+}
+
+CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf"
+
+# Postinsts don't seem to be run for nativesdk packages when populating SDKs.
+CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt"
+do_install_append_class-nativesdk () {
+ SYSROOT="${D}${SDKPATHNATIVE}" update-ca-certificates
+}
+
+do_install_append_class-native () {
+ SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
+}
+
+BBCLASSEXTEND += "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch b/yocto-poky/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch
new file mode 100644
index 000000000..ad879d466
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch b/yocto-poky/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch
new file mode 100644
index 000000000..f2f9b9c68
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb
new file mode 100644
index 000000000..66a892a7d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb
@@ -0,0 +1,51 @@
+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.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '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} += "${localstatedir}/log/ConsoleKit ${exec_prefix}/lib/ConsoleKit \
+ ${libdir}/ConsoleKit ${systemd_unitdir} ${base_libdir} \
+ ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
+FILES_${PN}-dbg += "${base_libdir}/security/.debug"
+
+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/run from package as console-kit-daemon will populate it on startup
+ rm -fr "${D}${localstatedir}/run"
+}
diff --git a/yocto-poky/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch b/yocto-poky/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
new file mode 100644
index 000000000..72755981a
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/createrepo/createrepo/createrepo-dbpath.patch
@@ -0,0 +1,61 @@
+createrepo: Implement --dbpath command line option
+
+--dbpath option allows to specify path to the directory
+with rpm database. By default createrepo uses or creates
+rpm database in /var/lib/rpm/
+
+Upstream-Status: Pending
+
+Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
+
+--- createrepo-0.4.11.orig/genpkgmetadata.py 2015-03-30 22:18:19.904000000 +0300
++++ createrepo-0.4.11/genpkgmetadata.py 2015-03-30 22:28:49.208000000 +0300
+@@ -65,6 +65,7 @@
+ -p, --pretty = output xml files in pretty format.
+ --update = update existing metadata (if present)
+ -d, --database = generate the sqlite databases.
++ --dbpath <dir> = specify path to rpm db directory.
+ """)
+
+ sys.exit(retval)
+@@ -72,10 +73,13 @@
+ class MetaDataGenerator:
+ def __init__(self, cmds):
+ self.cmds = cmds
+- self.ts = rpm.TransactionSet()
+ self.pkgcount = 0
+ self.files = []
+
++ if self.cmds['dbpath']:
++ rpm.addMacro("_dbpath", self.cmds['dbpath'])
++ self.ts = rpm.TransactionSet()
++
+ def _os_path_walk(self, top, func, arg):
+ """Directory tree walk with callback function.
+ copy of os.path.walk, fixes the link/stating problem
+@@ -435,6 +439,7 @@
+ cmds['dir-pattern-match'] = ['.*bin\/.*', '^\/etc\/.*']
+ cmds['skip-symlinks'] = False
+ cmds['pkglist'] = []
++ cmds['dbpath'] = None
+
+ try:
+ gopts, argsleft = getopt.getopt(args, 'phqVvndg:s:x:u:c:o:CSi:', ['help', 'exclude=',
+@@ -442,7 +447,7 @@
+ 'baseurl=', 'groupfile=', 'checksum=',
+ 'version', 'pretty', 'split', 'outputdir=',
+ 'noepoch', 'checkts', 'database', 'update',
+- 'skip-symlinks', 'pkglist='])
++ 'skip-symlinks', 'pkglist=', 'dbpath='])
+ except getopt.error, e:
+ errorprint(_('Options Error: %s.') % e)
+ usage()
+@@ -516,6 +521,8 @@
+ cmds['skip-symlinks'] = True
+ elif arg in ['-i', '--pkglist']:
+ cmds['pkglist'] = a
++ elif arg == '--dbpath':
++ cmds['dbpath'] = os.path.realpath(a)
+
+ except ValueError, e:
+ errorprint(_('Options Error: %s') % e)
diff --git a/yocto-poky/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch b/yocto-poky/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
new file mode 100644
index 000000000..bc7200d07
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch
@@ -0,0 +1,22 @@
+dumpMetadata.py: Fix for RPM5 - 5.4.9 integration
+
+RPM5 no longer has a switch to disable signature validation. (Due to security
+validation concerns.)
+
+Upstream-Status: Inappropriate [other]
+ createrepo does not support RPM5 upstream
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+diff -u createrepo-0.4.11.orig/dumpMetadata.py createrepo-0.4.11/dumpMetadata.py
+--- createrepo-0.4.11.orig/dumpMetadata.py 2012-06-05 10:12:55.687964222 -0500
++++ createrepo-0.4.11/dumpMetadata.py 2012-06-05 10:40:08.154060600 -0500
+@@ -92,7 +92,7 @@
+ fdno = package # let's assume this is an fdno and go with it :)
+ except OSError:
+ raise MDError, "Error opening file"
+- ts.setVSFlags((rpm._RPMVSF_NOSIGNATURES|rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
++ ts.setVSFlags((rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
+ try:
+ hdr = ts.hdrFromFdno(fdno)
+ except rpm.error:
diff --git a/yocto-poky/meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch b/yocto-poky/meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch
new file mode 100644
index 000000000..905531f84
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/createrepo/createrepo/dumpMetadata-disable-signature-validation.patch
@@ -0,0 +1,31 @@
+dumpMetadata: disable signature validation
+
+Makes it possible to work on RPM repositories that contain signed packages
+without the need of importing the public part of the signing key into the RPM
+database.
+
+Upstream-Status: Pending
+
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ dumpMetadata.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/dumpMetadata.py b/dumpMetadata.py
+index e40e8ac..ca6a82d 100644
+--- a/dumpMetadata.py
++++ b/dumpMetadata.py
+@@ -92,7 +92,9 @@ def returnHdr(ts, package):
+ fdno = package # let's assume this is an fdno and go with it :)
+ except OSError:
+ raise MDError, "Error opening file"
+- ts.setVSFlags((rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD))
++ ts.setVSFlags((rpm.RPMVSF_NOMD5|rpm.RPMVSF_NEEDPAYLOAD|
++ rpm.RPMVSF_NODSA|rpm.RPMVSF_NORSA|
++ rpm.RPMVSF_NODSAHEADER|rpm.RPMVSF_NORSAHEADER))
+ try:
+ hdr = ts.hdrFromFdno(fdno)
+ except rpm.error:
+--
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-support/createrepo/createrepo/fix-native-install.patch b/yocto-poky/meta/recipes-support/createrepo/createrepo/fix-native-install.patch
new file mode 100644
index 000000000..d8202a4f7
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/createrepo/createrepo/fix-native-install.patch
@@ -0,0 +1,163 @@
+Upstream-Status: Inappropriate [configuration]
+
+Date: Jan 31, 2011
+
+There are two fixes:
+ 1. -native needs to customize prefix
+ 2. needs to change python reference in binaries
+
+Signed-off-by: Qing He <qing.he@intel.com>
+
+diff --git a/Makefile b/Makefile
+index b2d1a32..3c3639f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,22 +3,22 @@ VERSION = 0.4.11
+ SHELL = /bin/sh
+ top_srcdir = .
+ srcdir = .
+-prefix = /usr
+-exec_prefix = ${prefix}
+-
+-bindir = ${exec_prefix}/bin
+-sbindir = ${exec_prefix}/sbin
+-libexecdir = ${exec_prefix}/libexec
+-datadir = ${prefix}/share
+-sysconfdir = ${prefix}/etc
+-sharedstatedir = ${prefix}/com
+-localstatedir = ${prefix}/var
+-libdir = ${exec_prefix}/lib
+-infodir = ${prefix}/info
++prefix ?= /usr
++exec_prefix ?= ${prefix}
++
++bindir ?= ${exec_prefix}/bin
++sbindir ?= ${exec_prefix}/sbin
++libexecdir ?= ${exec_prefix}/libexec
++datadir ?= ${prefix}/share
++sysconfdir ?= ${prefix}/etc
++sharedstatedir ?= ${prefix}/com
++localstatedir ?= ${prefix}/var
++libdir ?= ${exec_prefix}/lib
++infodir ?= ${prefix}/info
+ docdir =
+-includedir = ${prefix}/include
++includedir ?= ${prefix}/include
+ oldincludedir = /usr/include
+-mandir = ${prefix}/share/man
++mandir ?= ${prefix}/share/man
+
+ pkgdatadir = $(datadir)/$(PACKAGE)
+ pkglibdir = $(libdir)/$(PACKAGE)
+diff --git a/bin/Makefile b/bin/Makefile
+index 52c1f50..e30610e 100644
+--- a/bin/Makefile
++++ b/bin/Makefile
+@@ -1,22 +1,22 @@
+ SHELL = /bin/sh
+ top_srcdir = ..
+ srcdir = ../bin
+-prefix = /usr
+-exec_prefix = ${prefix}
+-
+-bindir = ${exec_prefix}/bin
+-sbindir = ${exec_prefix}/sbin
+-libexecdir = ${exec_prefix}/libexec
+-datadir = ${prefix}/share
+-sysconfdir = ${prefix}/etc
+-sharedstatedir = ${prefix}/com
+-localstatedir = ${prefix}/var
+-libdir = ${exec_prefix}/lib
+-infodir = ${prefix}/info
++prefix ?= /usr
++exec_prefix ?= ${prefix}
++
++bindir ?= ${exec_prefix}/bin
++sbindir ?= ${exec_prefix}/sbin
++libexecdir ?= ${exec_prefix}/libexec
++datadir ?= ${prefix}/share
++sysconfdir ?= ${prefix}/etc
++sharedstatedir ?= ${prefix}/com
++localstatedir ?= ${prefix}/var
++libdir ?= ${exec_prefix}/lib
++infodir ?= ${prefix}/info
+ docdir =
+-includedir = ${prefix}/include
++includedir ?= ${prefix}/include
+ oldincludedir = /usr/include
+-mandir = ${prefix}/man
++mandir ?= ${prefix}/man
+
+ pkgdatadir = $(datadir)/$(PACKAGE)
+ pkglibdir = $(libdir)/$(PACKAGE)
+@@ -40,8 +40,11 @@ all: $(srcdir)/$(PACKAGE)
+
+
+ install: all installdirs
+- $(INSTALL_BIN) $(srcdir)/$(PACKAGE) $(DESTDIR)$(bindir)/$(PACKAGE)
+- $(INSTALL_BIN) $(srcdir)/modifyrepo $(DESTDIR)$(bindir)/modifyrepo
++ sed -e "s|@DATADIR@|$(datadir)|" $(srcdir)/$(PACKAGE) > $(srcdir)/$(PACKAGE).tmp
++ sed -e "s|@DATADIR@|$(datadir)|" $(srcdir)/modifyrepo > $(srcdir)/modifyrepo.tmp
++ $(INSTALL_BIN) $(srcdir)/$(PACKAGE).tmp $(DESTDIR)$(bindir)/$(PACKAGE)
++ $(INSTALL_BIN) $(srcdir)/modifyrepo.tmp $(DESTDIR)$(bindir)/modifyrepo
++ rm -f $(srcdir)/$(PACKAGE).tmp $(srcdir)/modifyrepo.tmp
+
+
+ uninstall:
+diff --git a/bin/createrepo b/bin/createrepo
+index b0de515..eaacb39 100755
+--- a/bin/createrepo
++++ b/bin/createrepo
+@@ -1,2 +1,2 @@
+ #!/bin/sh
+-exec /usr/share/createrepo/genpkgmetadata.py "$@"
++exec @DATADIR@/createrepo/genpkgmetadata.py "$@"
+diff --git a/bin/modifyrepo b/bin/modifyrepo
+index c9732d8..6f7c1d4 100755
+--- a/bin/modifyrepo
++++ b/bin/modifyrepo
+@@ -1,2 +1,2 @@
+ #!/bin/sh
+-exec /usr/share/createrepo/modifyrepo.py "$@"
++exec @DATADIR@/createrepo/modifyrepo.py "$@"
+diff --git a/docs/Makefile b/docs/Makefile
+index 0a41179..e128c85 100644
+--- a/docs/Makefile
++++ b/docs/Makefile
+@@ -1,22 +1,22 @@
+ SHELL = /bin/sh
+ top_srcdir = ..
+ srcdir = ../docs
+-prefix = /usr
+-exec_prefix = ${prefix}
+-
+-bindir = ${exec_prefix}/bin
+-sbindir = ${exec_prefix}/sbin
+-libexecdir = ${exec_prefix}/libexec
+-datadir = ${prefix}/share
+-sysconfdir = ${prefix}/etc
+-sharedstatedir = ${prefix}/com
+-localstatedir = ${prefix}/var
+-libdir = ${exec_prefix}/lib
+-infodir = ${prefix}/info
++prefix ?= /usr
++exec_prefix ?= ${prefix}
++
++bindir ?= ${exec_prefix}/bin
++sbindir ?= ${exec_prefix}/sbin
++libexecdir ?= ${exec_prefix}/libexec
++datadir ?= ${prefix}/share
++sysconfdir ?= ${prefix}/etc
++sharedstatedir ?= ${prefix}/com
++localstatedir ?= ${prefix}/var
++libdir ?= ${exec_prefix}/lib
++infodir ?= ${prefix}/info
+ docdir =
+-includedir = ${prefix}/include
++includedir ?= ${prefix}/include
+ oldincludedir = /usr/include
+-mandir = ${datadir}/man
++mandir ?= ${datadir}/man
+
+ pkgdatadir = $(datadir)/$(PACKAGE)
+ pkglibdir = $(libdir)/$(PACKAGE)
diff --git a/yocto-poky/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch b/yocto-poky/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
new file mode 100644
index 000000000..80205a150
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch
@@ -0,0 +1,47 @@
+Author: Andrei Gherzan <andrei@gherzan.ro>
+
+Python interpreter should be use from PATH - native python - and not the one from
+host.
+
+Upstream-Status: Inappropriate [configuration]
+
+Index: createrepo-0.4.11/genpkgmetadata.py
+===================================================================
+--- createrepo-0.4.11.orig/genpkgmetadata.py 2012-04-10 17:14:05.278649384 +0300
++++ createrepo-0.4.11/genpkgmetadata.py 2012-04-10 17:14:22.290648886 +0300
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python -t
++#! /usr/bin/env python
+ # primary functions and glue for generating the repository metadata
+ #
+
+Index: createrepo-0.4.11/modifyrepo.py
+===================================================================
+--- createrepo-0.4.11.orig/modifyrepo.py 2012-04-10 17:14:09.106649272 +0300
++++ createrepo-0.4.11/modifyrepo.py 2012-04-10 17:14:27.818648725 +0300
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#! /usr/bin/env python
+ # $Id$
+ #
+ # This tools is used to insert arbitrary metadata into an RPM repository.
+Index: createrepo-0.4.11/dumpMetadata.py
+===================================================================
+--- createrepo-0.4.11.orig/dumpMetadata.py 2012-04-10 17:19:23.874640068 +0300
++++ createrepo-0.4.11/dumpMetadata.py 2012-04-10 17:19:34.502639756 +0300
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python -t
++#! /usr/bin/env python
+ # base classes and functions for dumping out package Metadata
+ #
+ # This program is free software; you can redistribute it and/or modify
+Index: createrepo-0.4.11/readMetadata.py
+===================================================================
+--- createrepo-0.4.11.orig/readMetadata.py 2012-04-10 17:19:19.626640193 +0300
++++ createrepo-0.4.11/readMetadata.py 2012-04-10 17:19:40.198639590 +0300
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python -t
++#! /usr/bin/env python
+
+ # 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
diff --git a/yocto-poky/meta/recipes-support/createrepo/createrepo/recommends.patch b/yocto-poky/meta/recipes-support/createrepo/createrepo/recommends.patch
new file mode 100644
index 000000000..dc5de2b5b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/createrepo/createrepo/recommends.patch
@@ -0,0 +1,71 @@
+createrepo: implement recommends support
+
+Record against the corresponding requires entry in the output metadata
+if a dependency relationship is marked with the RPMSENSE_MISSINGOK flag
+(indicating it is a recommendation, rather than a hard dependency).
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+
+diff --git a/dumpMetadata.py b/dumpMetadata.py
+index 70bb2d8..e40e8ac 100644
+--- a/dumpMetadata.py
++++ b/dumpMetadata.py
+@@ -319,6 +319,23 @@ class RpmMetaData:
+ reqs.append(0)
+ return reqs
+
++ def _checkMissingOk(self, flags):
++ reqs=[]
++ if flags is None:
++ return reqs
++
++ if type(flags) is not types.ListType:
++ flags = [flags]
++ for flag in flags:
++ newflag = flag
++ if flag is not None:
++ newflag = flag & rpm.RPMSENSE_MISSINGOK
++ if newflag:
++ reqs.append(1)
++ else:
++ reqs.append(0)
++ return reqs
++
+
+ def _correctVersion(self, vers):
+ returnvers = []
+@@ -537,9 +554,10 @@ class RpmMetaData:
+ tmpflags = self.hdr[rpm.RPMTAG_REQUIREFLAGS]
+ flags = self._correctFlags(tmpflags)
+ prereq = self._checkPreReq(tmpflags)
++ missingok = self._checkMissingOk(tmpflags)
+ ver = self._correctVersion(self.hdr[rpm.RPMTAG_REQUIREVERSION])
+ if names is not None:
+- lst = zip(names, flags, ver, prereq)
++ lst = zip(names, flags, ver, prereq, missingok)
+ return self._uniq(lst)
+
+ def obsoletesList(self):
+@@ -692,7 +710,7 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
+ depsList = rpmObj.depsList()
+ if len(depsList) > 0:
+ rpconode = format.newChild(formatns, 'requires', None)
+- for (name, flags, (e,v,r), prereq) in depsList:
++ for (name, flags, (e,v,r), prereq, missingok) in depsList:
+ entry = rpconode.newChild(formatns, 'entry', None)
+ entry.newProp('name', name)
+ if flags != 0:
+@@ -711,6 +729,8 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
+ entry.newProp('rel', str(r))
+ if prereq == 1:
+ entry.newProp('pre', str(prereq))
++ if missingok:
++ entry.newProp('missingok', '1')
+
+ for file in rpmObj.usefulFiles():
+ files = format.newChild(None, 'file', None)
+--
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py b/yocto-poky/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
new file mode 100755
index 000000000..a5b61bade
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+#
+# This script generates a solution database for a directory containing rpm packages
+# but tries to be efficient about this, only doing so when the packages have changed
+# in some way.
+#
+# It is assumed something already went through and removed all the solvedb.done stamp files
+# in advance.
+#
+# First argument - the rpm binary to use
+# Subsequent arguments - paths to process solution databases for
+#
+
+import sys, os
+import hashlib
+import stat
+import subprocess
+
+if len(sys.argv) < 1:
+ print("Error, rpm command not specified")
+ sys.exit(1)
+
+if len(sys.argv) < 2:
+ print("Error, no paths specified")
+ sys.exit(1)
+
+paths = sys.argv[2:]
+
+for path in paths:
+ if os.path.exists(path + "/solvedb.done"):
+ continue
+ data = ""
+ manifest = []
+ for root, dirs, files in os.walk(path):
+ for file in files:
+ f = os.path.join(root, file)
+ if f.startswith(path + "/" + "solvedb"):
+ continue
+ data = data + str(os.stat(f)[stat.ST_MTIME])
+ manifest.append(f)
+ checksum = hashlib.md5(data).hexdigest()
+
+ if os.path.exists(path + "/solvedb.checksum") and open(path + "/solvedb.checksum", "r").read() == checksum:
+ open(path + "/solvedb.done", "w")
+ continue
+
+ if os.path.exists(path + "/solvedb"):
+ subprocess.call("rm -rf %s" % (path + "/solvedb"), shell=True)
+ os.mkdir(path + "/solvedb")
+ m = open(path + "/solvedb/manifest", "w")
+ m.write("# Dynamically generated solve manifest\n")
+ for f in manifest:
+ m.write(f + "\n")
+ m.close()
+
+ cmd = sys.argv[1] + ' -i --replacepkgs --replacefiles --oldpackage -D "_dbpath ' + path + '/solvedb" --justdb \
+ --noaid --nodeps --noorder --noscripts --notriggers --noparentdirs --nolinktos --stats \
+ --ignoresize --nosignature --nodigest -D "__dbi_txn create nofsync" \
+ ' + path + '/solvedb/manifest'
+ subprocess.call(cmd, shell=True)
+
+ open(path + "/solvedb.checksum", "w").write(checksum)
+ open(path + "/solvedb.done", "w")
+
diff --git a/yocto-poky/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/yocto-poky/meta/recipes-support/createrepo/createrepo_0.4.11.bb
new file mode 100644
index 000000000..5f9ecf65f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/createrepo/createrepo_0.4.11.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Creates metadata indexes for RPM package repositories"
+HOMEPAGE = "http://createrepo.baseurl.org/"
+
+RECIPE_NO_UPDATE_REASON = "Versions after 0.9.* use YUM, so we hold at 0.4.11"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
+
+DEPENDS_class-native += "libxml2-native rpm-native"
+RDEPENDS_${PN}_class-target = "libxml2-python"
+
+PR = "r9"
+
+SRC_URI = "http://createrepo.baseurl.org/download/${BP}.tar.gz \
+ file://fix-native-install.patch \
+ file://python-scripts-should-use-interpreter-from-env.patch \
+ file://createrepo-rpm549.patch \
+ file://recommends.patch \
+ file://createrepo-dbpath.patch \
+ file://dumpMetadata-disable-signature-validation.patch \
+ file://rpm-createsolvedb.py \
+ "
+
+SRC_URI[md5sum] = "3e9ccf4abcffe3f49af078c83611eda2"
+SRC_URI[sha256sum] = "a73ae11a0dcde8bde36d900bc3f7f8f1083ba752c70a5c61b72d1e1e7608f21b"
+
+BBCLASSEXTEND = "native"
+
+do_install () {
+ oe_runmake -e 'DESTDIR=${D}' install
+ install -m 0755 ${WORKDIR}/rpm-createsolvedb.py ${D}${bindir}/
+}
+
+# Wrap the python script since the native python is
+# ${bindir}/python-native/python, and the "#! /usr/bin/env python" can't
+# find it since it is not in PATH.
+do_install_append_class-native () {
+ # Not all the python scripts should be wrapped since some of
+ # them are modules (be imported).
+ for i in ${D}${datadir}/createrepo/genpkgmetadata.py \
+ ${D}${datadir}/createrepo/modifyrepo.py \
+ ${D}${bindir}/rpm-createsolvedb.py ; do
+ sed -i -e 's|^#!.*/usr/bin/env python|#! /usr/bin/env nativepython|' $i
+ done
+
+ create_wrapper ${D}/${bindir}/createrepo \
+ RPM_USRLIBRPM=${STAGING_LIBDIR_NATIVE}/rpm \
+ RPM_ETCRPM=${STAGING_ETCDIR_NATIVE}/rpm \
+ RPM_LOCALEDIRRPM=${STAGING_DATADIR_NATIVE}/locale
+}
diff --git a/yocto-poky/meta/recipes-support/curl/curl/configure_ac.patch b/yocto-poky/meta/recipes-support/curl/curl/configure_ac.patch
new file mode 100644
index 000000000..b8bd304d7
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/curl/curl/configure_ac.patch
@@ -0,0 +1,13 @@
+Upstream-Status: Pending
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -281,7 +281,7 @@ dnl ************************************
+
+ CURL_CHECK_COMPILER
+ CURL_SET_COMPILER_BASIC_OPTS
+-CURL_SET_COMPILER_DEBUG_OPTS
++dnl CURL_SET_COMPILER_DEBUG_OPTS
+ CURL_SET_COMPILER_OPTIMIZE_OPTS
+ CURL_SET_COMPILER_WARNING_OPTS
+
diff --git a/yocto-poky/meta/recipes-support/curl/curl/pkgconfig_fix.patch b/yocto-poky/meta/recipes-support/curl/curl/pkgconfig_fix.patch
new file mode 100644
index 000000000..5d8769d52
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/curl/curl/pkgconfig_fix.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Inappropriate [packaging]
+
+diff -Nurd curl-7.29.0/configure.ac curl-7.29.0/configure.ac
+--- curl-7.29.0/configure.ac 2013-02-06 11:47:19.000000000 +0200
++++ curl-7.29.0/configure.ac 2013-02-16 12:32:22.132327764 +0200
+@@ -1883,6 +1883,7 @@
+ AC_SUBST(USE_GNUTLS, [1])
+ GNUTLS_ENABLED=1
+ USE_GNUTLS="yes"
++ GNUTLS_REQUIRED="gnutls"
+ curl_ssl_msg="enabled (GnuTLS)"
+ ],
+ [
+@@ -1953,6 +1954,8 @@
+ ])
+ fi
+
++AC_SUBST(GNUTLS_REQUIRED)
++
+ dnl ----------------------------------------------------
+ dnl check for PolarSSL
+ dnl ----------------------------------------------------
+diff -Nurd curl-7.29.0/libcurl.pc.in curl-7.29.0/libcurl.pc.in
+--- curl-7.29.0/libcurl.pc.in 2012-12-12 00:32:22.000000000 +0200
++++ curl-7.29.0/libcurl.pc.in 2013-02-16 12:33:27.063844337 +0200
+@@ -35,5 +35,5 @@
+ Description: Library to transfer files with ftp, http, etc.
+ Version: @CURLVERSION@
+ Libs: -L${libdir} -lcurl
+-Libs.private: @LIBCURL_LIBS@
++Libs.private: -ldl -lz
+ Cflags: -I${includedir} @CPPFLAG_CURL_STATICLIB@
diff --git a/yocto-poky/meta/recipes-support/curl/curl_7.44.0.bb b/yocto-poky/meta/recipes-support/curl/curl_7.44.0.bb
new file mode 100644
index 000000000..b293303da
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/curl/curl_7.44.0.bb
@@ -0,0 +1,53 @@
+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=7;md5=3a34942f4ae3fbf1a303160714e664ac"
+
+SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
+ file://pkgconfig_fix.patch \
+ "
+
+# curl likes to set -g0 in CFLAGS, so we stop it
+# from mucking around with debug options
+#
+SRC_URI += " file://configure_ac.patch"
+
+SRC_URI[md5sum] = "6b952ca00e5473b16a11f05f06aa8dae"
+SRC_URI[sha256sum] = "1e2541bae6582bb697c0fbae49e1d3e6fad5d05d5aa80dbd6f072e0a44341814"
+
+inherit autotools pkgconfig binconfig multilib_header
+
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)} gnutls zlib"
+PACKAGECONFIG_class-native = "ipv6 ssl zlib"
+PACKAGECONFIG_class-nativesdk = "ipv6 ssl zlib"
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
+PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
+PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
+PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
+
+EXTRA_OECONF = "--without-libidn \
+ --enable-crypto-auth \
+ --disable-ldap \
+ --disable-ldaps \
+ --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
+"
+# see https://lists.yoctoproject.org/pipermail/poky/2013-December/009435.html
+# We should ideally drop ac_cv_sizeof_off_t from site files but until then
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)}"
+
+do_install_append() {
+ oe_multilib_header curl/curlbuild.h
+}
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${libdir}/lib*.so.*"
+RRECOMMENDS_lib${BPN} += "ca-certificates"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch b/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
new file mode 100644
index 000000000..329bff5d3
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/db/db/Makefile-let-libso_target-depend-on-bt_rec.patch
@@ -0,0 +1,30 @@
+From c640ff9340f358a00835816d0fea03d27a7be978 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Tue, 31 Mar 2015 00:56:44 -0700
+Subject: [PATCH] Makefile: let libso_target depend on bt_rec
+
+Fixed parallel issue:
+libtool: link: `bt_rec.lo' is not a valid libtool object
+Makefile:867: recipe for target 'libdb-6.0.la' failed
+make: *** [libdb-6.0.la] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index e451f70..0a42375 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
+ $(LN) -s $(libdb_version) $(libdb)
+
+ # Shared C library.
+-$(libso_target): $(C_OBJS)
++$(libso_target): $(C_OBJS) bt_rec@o@
+ $(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
+ $(LIBCSO_LIBS)
+ $(RM) $(libdb)
diff --git a/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
new file mode 100644
index 000000000..34e8db84d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch
@@ -0,0 +1,48 @@
+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
+
+--- db-5.1.19/src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600
++++ db-5.1.19/src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600
+@@ -474,6 +474,25 @@
+
+ #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 @@
+ ); \
+ __r & 1; \
+ })
++#endif
+
+ #define MUTEX_UNSET(tsl) (*(volatile tsl_t *)(tsl) = 0)
+ #define MUTEX_INIT(tsl) (MUTEX_UNSET(tsl), 0)
diff --git a/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch b/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch
new file mode 100644
index 000000000..2c7f1e186
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/db/db/fix-parallel-build.patch
@@ -0,0 +1,19 @@
+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>
+
+--- dist.orig/Makefile.in 2012-05-11 19:57:48.000000000 +0200
++++ dist/Makefile.in 2013-10-31 18:17:11.875532522 +0100
+@@ -1034,7 +1034,7 @@
+ 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/yocto-poky/meta/recipes-support/db/db_5.3.28.bb b/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
new file mode 100644
index 000000000..e8b814e06
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
@@ -0,0 +1,116 @@
+# 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/technology/products/berkeley-db/db/index.html"
+LICENSE = "Sleepycat"
+VIRTUAL_NAME ?= "virtual/db"
+RCONFLICTS_${PN} = "db3"
+
+SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
+SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \
+ file://fix-parallel-build.patch \
+ "
+
+SRC_URI[md5sum] = "b99454564d5b4479750567031d66fe24"
+SRC_URI[sha256sum] = "e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628"
+
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=ed1158e31437f4f87cdd4ab2b8613955"
+
+inherit autotools
+
+# Put virtual/db in any appropriate provider of a
+# relational database, use it as a dependency in
+# place of a specific db and use:
+#
+# PREFERRED_PROVIDER_virtual/db
+#
+# to select the correct db in the build (distro) .conf
+PROVIDES += "${VIRTUAL_NAME}"
+
+# bitbake isn't quite clever enough to deal with sleepycat,
+# the distribution sits in the expected directory, but all
+# the builds must occur from a sub-directory. The following
+# persuades bitbake to go to the right place
+S = "${WORKDIR}/db-${PV}/dist"
+B = "${WORKDIR}/db-${PV}/build_unix"
+SPDX_S = "${WORKDIR}/db-${PV}"
+
+# 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}"
+
+# Cancel the site stuff - it's set for db3 and destroys the
+# configure.
+CONFIG_SITE = ""
+do_configure() {
+ gnu-configize --force ${S}
+ export STRIP="true"
+ oe_runconf
+}
+
+do_compile_prepend() {
+ sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \
+ ${B}/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/yocto-poky/meta/recipes-support/db/db_6.0.30.bb b/yocto-poky/meta/recipes-support/db/db_6.0.30.bb
new file mode 100644
index 000000000..d49df62b9
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/db/db_6.0.30.bb
@@ -0,0 +1,118 @@
+# Version 6 of the Berkeley DB from Oracle (formerly 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 DB6 can both be installed on the
+# same system at the same time if really necessary.
+SECTION = "libs"
+SUMMARY = "Berkeley Database v6"
+HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
+LICENSE = "AGPL-3.0"
+VIRTUAL_NAME ?= "virtual/db"
+RCONFLICTS_${PN} = "db3"
+
+RECIPE_NO_UPDATE_REASON = "Updating to 6.1.x requires also updating rpm to 5.4.15"
+
+SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
+SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \
+ file://fix-parallel-build.patch \
+ file://Makefile-let-libso_target-depend-on-bt_rec.patch \
+ "
+
+SRC_URI[md5sum] = "ad28eb86ad3203b5422844db179c585b"
+SRC_URI[sha256sum] = "608e4b1cf390e9bf54c0ef00c5bd9ca76d36e2261b9f4d33d54516f3f6a20fd2"
+
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490"
+
+inherit autotools
+
+# Put virtual/db in any appropriate provider of a
+# relational database, use it as a dependency in
+# place of a specific db and use:
+#
+# PREFERRED_PROVIDER_virtual/db
+#
+# to select the correct db in the build (distro) .conf
+PROVIDES += "${VIRTUAL_NAME}"
+
+# bitbake isn't quite clever enough to deal with sleepycat,
+# the distribution sits in the expected directory, but all
+# the builds must occur from a sub-directory. The following
+# persuades bitbake to go to the right place
+S = "${WORKDIR}/db-${PV}/dist"
+B = "${WORKDIR}/db-${PV}/build_unix"
+SPDX_S = "${WORKDIR}/db-${PV}"
+
+# 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 = "-6*.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)
+DB6_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disable-replication --disable-verify --disable-compat185 --disable-sql"
+
+EXTRA_OECONF = "${DB6_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
+ARM_MUTEX = "--with-mutex=ARM/gcc-assembly"
+MUTEX = ""
+MUTEX_arm = "${ARM_MUTEX}"
+MUTEX_armeb = "${ARM_MUTEX}"
+EXTRA_OECONF += "${MUTEX}"
+
+# Cancel the site stuff - it's set for db3 and destroys the
+# configure.
+CONFIG_SITE = ""
+do_configure() {
+ gnu-configize --force ${S}
+ export STRIP="true"
+ oe_runconf
+}
+
+do_compile_prepend() {
+ sed -i -e 's|hardcode_into_libs=yes|hardcode_into_libs=no|' \
+ ${B}/libtool
+}
+
+do_install_append() {
+ mkdir -p ${D}/${includedir}/db60
+ mv ${D}/${includedir}/db.h ${D}/${includedir}/db60/.
+ mv ${D}/${includedir}/db_cxx.h ${D}/${includedir}/db60/.
+ ln -s db60/db.h ${D}/${includedir}/db.h
+ ln -s db60/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/yocto-poky/meta/recipes-support/debianutils/debianutils_4.5.1.bb b/yocto-poky/meta/recipes-support/debianutils/debianutils_4.5.1.bb
new file mode 100644
index 000000000..6b665fb2c
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/debianutils/debianutils_4.5.1.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Miscellaneous utilities specific to Debian"
+SECTION = "base"
+LICENSE = "GPLv2 & SMAIL_GPL"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz"
+
+SRC_URI[md5sum] = "487524518cd5833a6a4f7007b5d1bd5b"
+SRC_URI[sha256sum] = "a531c23e0105fe01cfa928457a8343a1e947e2621b3cd4d05f4e9656020c63b7"
+
+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"
+
+
+ALTERNATIVE_PRIORITY="100"
+ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
+ALTERNATIVE_${PN}-run-parts = "run-parts"
+
+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"
diff --git a/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb b/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb
new file mode 100644
index 000000000..97a47614c
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/enchant/enchant_1.6.0.bb
@@ -0,0 +1,32 @@
+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 = "aspell 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"
+
+EXTRA_OECONF = "--with-aspell-prefix=${STAGING_DIR_HOST}${prefix} \
+ --enable-aspell 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"
+
+RDEPENDS_${PN} += "aspell"
+
diff --git a/yocto-poky/meta/recipes-support/gdbm/files/ptest.patch b/yocto-poky/meta/recipes-support/gdbm/files/ptest.patch
new file mode 100644
index 000000000..65236fb48
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gdbm/files/ptest.patch
@@ -0,0 +1,36 @@
+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
+
+diff -ur a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2011-08-16 10:13:10.000000000 +0200
++++ b/Makefile.am 2013-04-12 18:02:16.473715873 +0200
+@@ -31,3 +31,8 @@
+ d=`date '+%d/%m/%Y'`; \
+ sed 's|/\*@DIST_DATE@\*/|"'"$$d"'"|' $(srcdir)/src/version.c > \
+ $(distdir)/src/version.c
++
++install-ptest:
++ @for subdir in $(SUBDIRS); do \
++ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
++ done
+diff -ur a/tests/Makefile.am b/tests/Makefile.am
+--- a/tests/Makefile.am 2011-11-11 19:39:42.000000000 +0100
++++ b/tests/Makefile.am 2013-04-12 18:30:57.066301037 +0200
+@@ -132,4 +132,14 @@
+ 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
diff --git a/yocto-poky/meta/recipes-support/gdbm/files/run-ptest b/yocto-poky/meta/recipes-support/gdbm/files/run-ptest
new file mode 100755
index 000000000..615da8444
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch b/yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch
new file mode 100644
index 000000000..d3cb43b9b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch
@@ -0,0 +1,22 @@
+Obey LDFLAGS
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-Status: Inappropriate [old version]
+
+--- gdbm-1.8.3.orig/Makefile.in
++++ gdbm-1.8.3/Makefile.in
+@@ -156,12 +156,12 @@ install-compat:
+
+ libgdbm.la: $(LOBJS) gdbm.h
+ rm -f libgdbm.la
+- $(LIBTOOL) --mode=link $(CC) -o libgdbm.la -rpath $(libdir) \
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libgdbm.la -rpath $(libdir) \
+ -version-info $(SHLIB_VER) $(LOBJS)
+
+ libgdbm_compat.la: $(C_LOBJS) gdbm.h
+ rm -f libgdbm_compat.la
+- $(LIBTOOL) --mode=link $(CC) -o libgdbm_compat.la -rpath $(libdir) \
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libgdbm_compat.la -rpath $(libdir) \
+ -version-info $(SHLIB_VER) $(C_LOBJS)
+
+ gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2
diff --git a/yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch b/yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch
new file mode 100644
index 000000000..0f9d04f4a
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch
@@ -0,0 +1,22 @@
+Upstream-Status: Pending
+
+--- gdbm-1.8.3/Makefile.in.orig 2006-02-16 15:17:25.000000000 +0000
++++ gdbm-1.8.3/Makefile.in 2006-02-16 15:18:08.000000000 +0000
+@@ -131,7 +131,7 @@
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \
+ $(DESTDIR)$(infodir)
+- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
++ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
+ $(INSTALL_DATA) gdbm.h \
+ $(DESTDIR)$(includedir)/gdbm.h
+ $(INSTALL_DATA) $(srcdir)/gdbm.3 \
+@@ -142,7 +142,7 @@
+ install-compat:
+ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(includedir)
+- $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
++ $(LIBTOOL) --mode=install $(INSTALL) -c libgdbm_compat.la \
+ $(DESTDIR)$(libdir)/libgdbm_compat.la
+ $(INSTALL_DATA) $(srcdir)/dbm.h \
+ $(DESTDIR)$(includedir)/dbm.h
diff --git a/yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch b/yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch
new file mode 100644
index 000000000..369145c41
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch
@@ -0,0 +1,60 @@
+Upstream-Status: Pending
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- gdbm-1.8.3/Makefile.in~makefile
++++ gdbm-1.8.3/Makefile.in
+@@ -22,6 +22,7 @@
+ TEXI2DVI = texi2dvi
+
+ DEFS =
++DESTDIR =
+
+ # Where the system [n]dbm routines are...
+ LIBS = @LIBS@ -lc
+@@ -127,26 +128,26 @@
+ progs: $(PROGS)
+
+ install: libgdbm.la gdbm.h gdbm.info
+- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
+- $(INSTALL_ROOT)$(includedir) $(INSTALL_ROOT)$(man3dir) \
+- $(INSTALL_ROOT)$(infodir)
+- $(LIBTOOL) $(INSTALL) -c libgdbm.la $(INSTALL_ROOT)$(libdir)/libgdbm.la
+- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) gdbm.h \
+- $(INSTALL_ROOT)$(includedir)/gdbm.h
+- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.3 \
+- $(INSTALL_ROOT)$(man3dir)/gdbm.3
+- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/gdbm.info \
+- $(INSTALL_ROOT)$(infodir)/gdbm.info
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
++ $(DESTDIR)$(includedir) $(DESTDIR)$(man3dir) \
++ $(DESTDIR)$(infodir)
++ $(LIBTOOL) $(INSTALL) -c libgdbm.la $(DESTDIR)$(libdir)/libgdbm.la
++ $(INSTALL_DATA) gdbm.h \
++ $(DESTDIR)$(includedir)/gdbm.h
++ $(INSTALL_DATA) $(srcdir)/gdbm.3 \
++ $(DESTDIR)$(man3dir)/gdbm.3
++ $(INSTALL_DATA) $(srcdir)/gdbm.info \
++ $(DESTDIR)$(infodir)/gdbm.info
+
+ install-compat:
+- $(srcdir)/mkinstalldirs $(INSTALL_ROOT)$(libdir) \
+- $(INSTALL_ROOT)$(includedir)
++ $(srcdir)/mkinstalldirs $(DESTDIR)$(libdir) \
++ $(DESTDIR)$(includedir)
+ $(LIBTOOL) $(INSTALL) -c libgdbm_compat.la \
+- $(INSTALL_ROOT)$(libdir)/libgdbm_compat.la
+- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/dbm.h \
+- $(INSTALL_ROOT)$(includedir)/dbm.h
+- $(INSTALL_DATA) -o $(BINOWN) -g $(BINGRP) $(srcdir)/ndbm.h \
+- $(INSTALL_ROOT)$(includedir)/ndbm.h
++ $(DESTDIR)$(libdir)/libgdbm_compat.la
++ $(INSTALL_DATA) $(srcdir)/dbm.h \
++ $(DESTDIR)$(includedir)/dbm.h
++ $(INSTALL_DATA) $(srcdir)/ndbm.h \
++ $(DESTDIR)$(includedir)/ndbm.h
+
+ #libgdbm.a: $(OBJS) gdbm.h
+ # rm -f libgdbm.a
diff --git a/yocto-poky/meta/recipes-support/gdbm/gdbm_1.11.bb b/yocto-poky/meta/recipes-support/gdbm/gdbm_1.11.bb
new file mode 100644
index 000000000..adf8c5bd3
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gdbm/gdbm_1.11.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] = "72c832680cf0999caedbe5b265c8c1bd"
+SRC_URI[sha256sum] = "8d912f44f05d0b15a4a5d96a76f852e905d051bb88022fcdfd98b43be093e3c3"
+
+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/yocto-poky/meta/recipes-support/gdbm/gdbm_1.8.3.bb b/yocto-poky/meta/recipes-support/gdbm/gdbm_1.8.3.bb
new file mode 100644
index 000000000..af01b6c40
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gdbm/gdbm_1.8.3.bb
@@ -0,0 +1,29 @@
+SUMMARY = "Key/value database library with extensible hashing"
+HOMEPAGE = "http://www.gnu.org/software/gdbm/"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d8e20eece214df8ef953ed5857862150"
+
+PR = "r4"
+
+SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \
+ file://makefile.patch \
+ file://libtool-mode.patch \
+ file://ldflags.patch"
+
+SRC_URI[md5sum] = "1d1b1d5c0245b1c00aff92da751e9aa1"
+SRC_URI[sha256sum] = "cc340338a2e28b40058ab9eb5354a21d53f88a1582ea21ba0bb185c37a281dc9"
+
+inherit autotools texinfo
+
+BBCLASSEXTEND = "native nativesdk"
+
+do_install_append () {
+ install -d ${D}${includedir}/gdbm
+ install -m 0644 ${S}/dbm.h ${D}${includedir}/
+ install -m 0644 ${S}/ndbm.h ${D}${includedir}/
+ # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
+ # these headers
+ ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
+ ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
+}
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch b/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch
new file mode 100644
index 000000000..5decb1cec
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/disable-stdc.patch
@@ -0,0 +1,39 @@
+This patch was removed in f181c6ce8b3 when gmp 4.2.1 was mistakenly
+dropped.
+
+Upstream is not interested in patches for ancient versions.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+# "extern inline" in traditional gcc means that the function should be
+# inlined wherever it's seen, while in C99, "extern inline" means that i
+# the function should only be inlined where the inline definition is
+# seen while in other places it's not inlined:
+# http://gcc.gnu.org/ml/gcc/2006-11/msg00006.html
+#
+# gmp checks "--std=gnu99" to use C99 convention however it internally
+# defines some "extern inline" functions in gmp.h, which is included
+# by mainly .c files and finally lead a flood of redefinition function
+# errors when linking objects together.
+#
+# So disable C99/ANSI detection to stick to tranditional gcc behavior
+#
+# by Kevin Tian <kevin.tian@intel.com>, 2010-08-13
+#
+# (this patch is licensed under GPLv2+)
+
+diff --git a/configure.in b/configure.in
+index 450cc92..aab0b59 100644
+--- a/configure.in
++++ b/configure.in
+@@ -1869,9 +1869,7 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
+
+ # The C compiler and preprocessor, put into ANSI mode if possible.
+ AC_PROG_CC
+-AC_PROG_CC_STDC
+ AC_PROG_CPP
+-GMP_H_ANSI
+
+
+ # The C compiler on the build system, and associated tests.
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch b/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch
new file mode 100644
index 000000000..63aed05ec
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/gmp_fix_for_automake-1.12.patch
@@ -0,0 +1,56 @@
+automake 1.12 has depricated automatic de-ANSI-fication support
+
+this patch avoids these kinds of errors:
+
+| configure.in:2240: error: automatic de-ANSI-fication support has been removed
+| Makefile.am:28: error: automatic de-ANSI-fication support has been removed
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2012/05/02
+
+
+This patch was removed in f181c6ce8b3 when gmp 4.2.1 was mistakenly
+dropped.
+
+Upstream is not interested in patches for ancient versions.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+
+Index: gmp-4.2.1/configure.in
+===================================================================
+--- gmp-4.2.1.orig/configure.in
++++ gmp-4.2.1/configure.in
+@@ -67,7 +67,7 @@ dnl
+ dnl Note that there's a copy of these options in the top-level Makefile.am,
+ dnl so update there too if changing anything.
+ dnl
+-AM_INIT_AUTOMAKE([1.8 gnu no-dependencies $(top_builddir)/ansi2knr])
++AM_INIT_AUTOMAKE([1.8 gnu no-dependencies])
+ AM_CONFIG_HEADER(config.h:config.in)
+ AM_MAINTAINER_MODE
+
+@@ -2022,9 +2022,6 @@ fi
+ echo " MPN_PATH=\"$path\""
+
+
+-# Automake ansi2knr support.
+-AM_C_PROTOTYPES
+-
+ GMP_PROG_AR
+ GMP_PROG_NM
+
+Index: gmp-4.2.1/Makefile.am
+===================================================================
+--- gmp-4.2.1.orig/Makefile.am
++++ gmp-4.2.1/Makefile.am
+@@ -27,7 +27,7 @@
+ # Makefiles in subdirectories, but here we must omit it so automake gives
+ # the actual ansi2knr build rule, not "cd $(top_builddir) && make ansi2knr".
+ #
+-AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies ansi2knr
++AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies
+
+
+ # Libtool -version-info for libgmp.la and libmp.la. See "Versioning" in the
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/amd64.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/amd64.patch
new file mode 100644
index 000000000..564d12d42
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/amd64.patch
@@ -0,0 +1,18 @@
+Upstream-Status: Pending
+
+Index: gmp-5.0.3/longlong.h
+===================================================================
+--- gmp-5.0.3.orig/longlong.h
++++ gmp-5.0.3/longlong.h
+@@ -994,8 +994,10 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
+ 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 /* x86_64 */
+
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/append_user_provided_flags.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/append_user_provided_flags.patch
new file mode 100644
index 000000000..ae1386c4c
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/append_user_provided_flags.patch
@@ -0,0 +1,52 @@
+Upstream-Status: Inappropriate
+
+Append the user provided flags to the auto-detected ones.
+
+Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
+
+Index: gmp-5.1.1/configure.ac
+===================================================================
+--- gmp-5.1.1.orig/configure.ac 2014-02-11 15:05:44.925202403 +0200
++++ gmp-5.1.1/configure.ac 2014-02-11 15:19:03.918511398 +0200
+@@ -1745,8 +1745,12 @@
+ 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"
+@@ -2175,7 +2179,7 @@
+ want_cxx=no
+ AC_PROG_CXX
+ if test $enable_cxx != no; then
+- test_CXXFLAGS=${CXXFLAGS+set}
++ test_CXXFLAGS=
+
+ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
+ cxxflags_ac_prog_cxx=$CXXFLAGS
+@@ -2202,7 +2206,7 @@
+ # 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])
+@@ -2292,6 +2296,8 @@
+ # done
+ fi
+
++CFLAGS="$CFLAGS $user_CFLAGS"
++CPPFLAGS="$CPPFLAGS $user_CPPFLAGS"
+
+ cat >&AS_MESSAGE_LOG_FD() <<EOF
+ Decided:
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/configure.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/configure.patch
new file mode 100644
index 000000000..349da3c6b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/configure.patch
@@ -0,0 +1,222 @@
+Upstream-Status: Pending
+
+Updated to apply to gmp-5.1.0
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+
+---
+ acinclude.m4 | 32 +++++++++++++++++---------------
+ configure.ac | 26 +++++++++-----------------
+ 2 files changed, 26 insertions(+), 32 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 227712a..199aa6f 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -40,29 +40,29 @@ dnl a_out.exe - OpenVMS DEC C called via GNV wrapper (gnv.sourceforge.net)
+ dnl conftest.exe - various DOS compilers
+
+
+-define(IA64_PATTERN,
++define([IA64_PATTERN],
+ [[ia64*-*-* | itanium-*-* | itanium2-*-*]])
+
+ dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
+ dnl of which config.sub accepts. (Though none of which are likely to work
+ dnl with GMP.)
+ dnl
+-define(M68K_PATTERN,
++define([M68K_PATTERN],
+ [[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
+
+-define(POWERPC64_PATTERN,
++define([POWERPC64_PATTERN],
+ [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
+
+-define(S390_PATTERN,
++define([S390_PATTERN],
+ [[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
+
+-define(S390X_PATTERN,
++define([S390X_PATTERN],
+ [[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
+
+-define(X86_PATTERN,
++define([X86_PATTERN],
+ [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
+
+-define(X86_64_PATTERN,
++define([X86_64_PATTERN],
+ [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar-*-* | bulldozer-*-* | piledriver-*-* | steamroller-*-* | excavator-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
+
+ dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
+@@ -80,7 +80,7 @@ dnl x86 -> x86
+ dnl x86/k6 -> k6
+ dnl x86/k6/mmx -> k6_mmx
+
+-define(GMP_FAT_SUFFIX,
++define([GMP_FAT_SUFFIX],
+ [[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
+
+
+@@ -89,7 +89,7 @@ dnl ----------------------------------
+ dnl Emit code to remove any occurrence of ITEM from $LISTVAR. ITEM can be a
+ dnl shell expression like $foo if desired.
+
+-define(GMP_REMOVE_FROM_LIST,
++define([GMP_REMOVE_FROM_LIST],
+ [remove_from_list_tmp=
+ for remove_from_list_i in $[][$1]; do
+ if test $remove_from_list_i = [$2]; then :;
+@@ -105,12 +105,12 @@ dnl GMP_STRIP_PATH(subdir)
+ dnl ----------------------
+ dnl Strip entries */subdir from $path and $fat_path.
+
+-define(GMP_STRIP_PATH,
++define([GMP_STRIP_PATH],
+ [GMP_STRIP_PATH_VAR(path, [$1])
+ GMP_STRIP_PATH_VAR(fat_path, [$1])
+ ])
+
+-define(GMP_STRIP_PATH_VAR,
++define([GMP_STRIP_PATH_VAR],
+ [tmp_path=
+ for i in $[][$1]; do
+ case $i in
+@@ -131,7 +131,7 @@ dnl
+ dnl Dummy value for GMP_LIMB_BITS is enough
+ dnl for all current configure-time uses of gmp.h.
+
+-define(GMP_INCLUDE_GMP_H,
++define([GMP_INCLUDE_GMP_H],
+ [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
+ #define GMP_NAIL_BITS $GMP_NAIL_BITS
+ #define GMP_LIMB_BITS 123
+@@ -146,7 +146,7 @@ dnl Expand at autoconf time to the value of a "#define NAME" from the given
+ dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
+ dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
+
+-define(GMP_HEADER_GETVAL,
++define([GMP_HEADER_GETVAL],
+ [patsubst(patsubst(
+ esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
+ [^.*$1[ ]+],[]),
+@@ -160,7 +160,7 @@ dnl The gmp version number, extracted from the #defines in gmp-h.in at
+ dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
+ dnl like 3.0.1 if patchlevel > 0.
+
+-define(GMP_VERSION,
++define([GMP_VERSION],
+ [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
+ .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
+ .GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
+@@ -1524,7 +1524,9 @@ esac
+ echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
+
+ # All CPUs use asm-defs.m4
+-echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
++echo -n ["include("] >>$gmp_tmpconfigm4i
++echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
++echo [")"] >>$gmp_tmpconfigm4i
+ ])
+
+
+diff --git a/configure.ac b/configure.ac
+index 64b2c50..f07b821 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,14 +39,6 @@ AC_REVISION($Revision$)
+ AC_PREREQ(2.59)
+ AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html], gmp)
+ AC_CONFIG_SRCDIR(gmp-impl.h)
+-m4_pattern_forbid([^[ \t]*GMP_])
+-m4_pattern_allow(GMP_LDFLAGS)
+-m4_pattern_allow(GMP_LIMB_BITS)
+-m4_pattern_allow(GMP_MPARAM_H_SUGGEST)
+-m4_pattern_allow(GMP_NAIL_BITS)
+-m4_pattern_allow(GMP_NUMB_BITS)
+-m4_pattern_allow(GMP_NONSTD_ABI)
+-m4_pattern_allow(GMP_CPU_TYPE)
+
+ # If --target is not used then $target_alias is empty, but if say
+ # "./configure athlon-pc-freebsd3.5" is used, then all three of
+@@ -348,7 +340,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
+ # After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
+ # called. User selections of CC etc are respected.
+ #
+-# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
++# Care is taken not to use macros like AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) during the GMP
+ # pre-testing, since they of course depend on AC_PROG_CC, and also some of
+ # them cache their results, which is not wanted.
+ #
+@@ -440,7 +432,7 @@ abilist="standard"
+ # FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
+ # c89 over cc here. But note that on HP-UX c89 provides a castrated
+ # environment, and would want to be excluded somehow. Maybe
+-# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
++# already does enough to stick cc into ANSI mode and
+ # we don't need to worry.
+ #
+ cclist="gcc cc"
+@@ -1843,7 +1835,7 @@ esac
+ CFLAGS_or_unset=${CFLAGS-'(unset)'}
+ CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
+
+-cat >&AC_FD_CC <<EOF
++cat >&AS_MESSAGE_LOG_FD() <<EOF
+ User:
+ ABI=$ABI
+ CC=$CC
+@@ -2264,7 +2256,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
+
+ # The C compiler and preprocessor, put into ANSI mode if possible.
+ AC_PROG_CC
+-AC_PROG_CC_STDC
+ AC_PROG_CPP
+
+
+@@ -2286,11 +2277,11 @@ AC_SUBST(CCAS)
+
+ # The C++ compiler, if desired.
+ want_cxx=no
++AC_PROG_CXX
+ if test $enable_cxx != no; then
+ test_CXXFLAGS=${CXXFLAGS+set}
+- AC_PROG_CXX
+
+- echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
++ echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
+ cxxflags_ac_prog_cxx=$CXXFLAGS
+ cxxflags_list=ac_prog_cxx
+
+@@ -2412,7 +2403,7 @@ if test "$enable_assembly" = "no"; then
+ fi
+
+
+-cat >&AC_FD_CC <<EOF
++cat >&AS_MESSAGE_LOG_FD() <<EOF
+ Decided:
+ ABI=$ABI
+ CC=$CC
+@@ -3781,7 +3772,7 @@ GMP_FINISH
+ # FIXME: Upcoming version of autoconf/automake may not like broken lines.
+ # Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
+
+-AC_OUTPUT(Makefile \
++AC_CONFIG_FILES([Makefile \
+ mpf/Makefile mpn/Makefile mpq/Makefile \
+ mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile \
+ tests/Makefile tests/devel/Makefile \
+@@ -3790,7 +3781,8 @@ AC_OUTPUT(Makefile \
+ tests/cxx/Makefile \
+ doc/Makefile tune/Makefile \
+ demos/Makefile demos/calc/Makefile demos/expr/Makefile \
+- gmp.h:gmp-h.in)
++ gmp.h:gmp-h.in])
++AC_OUTPUT
+
+ AC_MSG_NOTICE([summary of build options:
+
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/gmp-6.0.0-ppc64.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/gmp-6.0.0-ppc64.patch
new file mode 100644
index 000000000..1113b41ec
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/gmp-6.0.0-ppc64.patch
@@ -0,0 +1,26 @@
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+This patch with pulled from gmp.
+https://gmplib.org/repo/gmp/rev/4a6d258b467f
+Upstream-Status: Backport
+
+# HG changeset patch
+# User Torbjorn Granlund <tege@gmplib.org>
+# Date 1395835068 -3600
+# Node ID 4a6d258b467f661da0894cc60ecd060f2e3c67c7
+# Parent 301ce2788826a2d4d2725bd5cf01e998638db37a
+Provide default for BMOD_1_TO_MOD_1_THRESHOLD.
+
+diff -r 301ce2788826 -r 4a6d258b467f mpn/powerpc64/mode64/gcd_1.asm
+--- a/mpn/powerpc64/mode64/gcd_1.asm Tue Mar 25 15:34:52 2014 +0100
++++ b/mpn/powerpc64/mode64/gcd_1.asm Wed Mar 26 12:57:48 2014 +0100
+@@ -43,6 +43,9 @@
+ define(`n', `r4')
+ define(`v0', `r5')
+
++ifdef(`BMOD_1_TO_MOD_1_THRESHOLD',,
++ `define(`BMOD_1_TO_MOD_1_THRESHOLD',30)')
++
+ EXTERN_FUNC(mpn_mod_1)
+ EXTERN_FUNC(mpn_modexact_1c_odd)
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/use-includedir.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/use-includedir.patch
new file mode 100644
index 000000000..74904a253
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/use-includedir.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Pending
+
+Index: gmp-4.2.4/Makefile.am
+===================================================================
+--- gmp-4.2.4.orig/Makefile.am 2008-09-10 19:31:27.000000000 +0000
++++ gmp-4.2.4/Makefile.am 2009-07-06 20:19:19.000000000 +0000
+@@ -106,7 +106,7 @@
+ # but anyone knowledgable 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 $(MPBSD_HEADERS_OPTION)
+ lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) $(MPBSD_LTLIBRARIES_OPTION)
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp.inc b/yocto-poky/meta/recipes-support/gmp/gmp.inc
new file mode 100644
index 000000000..6752a39d1
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp.inc
@@ -0,0 +1,16 @@
+SECTION = "devel"
+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/"
+
+REVISION ?= ""
+SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2"
+
+inherit autotools texinfo
+
+ARM_INSTRUCTION_SET = "arm"
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline"
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp_4.2.1.bb b/yocto-poky/meta/recipes-support/gmp/gmp_4.2.1.bb
new file mode 100644
index 000000000..928c01a5b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp_4.2.1.bb
@@ -0,0 +1,15 @@
+require gmp.inc
+
+LICENSE = "LGPLv2.1+ & GPLv2+"
+LICENSE_${PN} = "LGPLv2.1+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a \
+ file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24 \
+ file://gmp-h.in;beginline=6;endline=21;md5=e056f74a12c3277d730dbcfb85d2ca34"
+
+SRC_URI += "file://disable-stdc.patch \
+ file://gmp_fix_for_automake-1.12.patch \
+ "
+
+SRC_URI[md5sum] = "091c56e0e1cca6b09b17b69d47ef18e3"
+SRC_URI[sha256sum] = "d07ffcb37eecec35c5ec72516d10b35fdf6e6fef1fcf1dcd37e30b8cbf8bf941"
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp_6.0.0.bb b/yocto-poky/meta/recipes-support/gmp/gmp_6.0.0.bb
new file mode 100644
index 000000000..19b63e568
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp_6.0.0.bb
@@ -0,0 +1,33 @@
+require gmp.inc
+
+LICENSE="GPLv2+ | LGPLv3+"
+
+REVISION="a"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+ file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+"
+
+SRC_URI += "file://configure.patch \
+ file://amd64.patch \
+ file://use-includedir.patch \
+ file://append_user_provided_flags.patch \
+ file://gmp-6.0.0-ppc64.patch \
+ "
+SRC_URI[md5sum] = "b7ff2d88cae7f8085bd5006096eed470"
+SRC_URI[sha256sum] = "7f8e9a804b9c6d07164cf754207be838ece1219425d64e28cfa3e70d5c759aaf"
+
+acpaths = ""
+
+EXTRA_OECONF += " --enable-cxx=detect"
+
+PACKAGES =+ "libgmpxx"
+FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}"
+
+do_install_append_class-target() {
+ sed -i "s|--sysroot=${STAGING_DIR_HOST}||g" ${D}${includedir}/gmp.h
+}
+
+SSTATE_SCAN_FILES += "gmp.h"
+
diff --git a/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch b/yocto-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/yocto-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/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb b/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
new file mode 100644
index 000000000..482de99d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
@@ -0,0 +1,21 @@
+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 \
+ "
+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/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
new file mode 100644
index 000000000..c9addca28
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
@@ -0,0 +1,62 @@
+From e2202ff2b704623efc6277fb5256e4e15bac5676 Mon Sep 17 00:00:00 2001
+From: Werner Koch <wk@gnupg.org>
+Date: Thu, 25 Jul 2013 11:17:52 +0200
+Subject: [PATCH] Mitigate a flush+reload cache attack on RSA secret
+ exponents.
+
+commit e2202ff2b704623efc6277fb5256e4e15bac5676 from
+git://git.gnupg.org/libgcrypt.git
+
+* mpi/mpi-pow.c (gcry_mpi_powm): Always perfrom the mpi_mul for
+exponents in secure memory.
+
+Upstream-Status: Backport
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+--
+
+The attack is published as http://eprint.iacr.org/2013/448 :
+
+Flush+Reload: a High Resolution, Low Noise, L3 Cache Side-Channel
+Attack by Yuval Yarom and Katrina Falkner. 18 July 2013.
+
+ Flush+Reload is a cache side-channel attack that monitors access to
+ data in shared pages. In this paper we demonstrate how to use the
+ attack to extract private encryption keys from GnuPG. The high
+ resolution and low noise of the Flush+Reload attack enables a spy
+ program to recover over 98% of the bits of the private key in a
+ single decryption or signing round. Unlike previous attacks, the
+ attack targets the last level L3 cache. Consequently, the spy
+ program and the victim do not need to share the execution core of
+ the CPU. The attack is not limited to a traditional OS and can be
+ used in a virtualised environment, where it can attack programs
+ executing in a different VM.
+
+Index: gnupg-1.4.7/mpi/mpi-pow.c
+===================================================================
+--- gnupg-1.4.7.orig/mpi/mpi-pow.c
++++ gnupg-1.4.7/mpi/mpi-pow.c
+@@ -212,7 +212,13 @@ mpi_powm( MPI res, MPI base, MPI exponen
+ tp = rp; rp = xp; xp = tp;
+ rsize = xsize;
+
+- if( (mpi_limb_signed_t)e < 0 ) {
++ /* To mitigate the Yarom/Falkner flush+reload cache
++ * side-channel attack on the RSA secret exponent, we do
++ * the multiplication regardless of the value of the
++ * high-bit of E. But to avoid this performance penalty
++ * we do it only if the exponent has been stored in secure
++ * memory and we can thus assume it is a secret exponent. */
++ if (esec || (mpi_limb_signed_t)e < 0) {
+ /*mpihelp_mul( xp, rp, rsize, bp, bsize );*/
+ if( bsize < KARATSUBA_THRESHOLD ) {
+ mpihelp_mul( xp, rp, rsize, bp, bsize );
+@@ -227,6 +233,8 @@ mpi_powm( MPI res, MPI base, MPI exponen
+ mpihelp_divrem(xp + msize, 0, xp, xsize, mp, msize);
+ xsize = msize;
+ }
++ }
++ if ( (mpi_limb_signed_t)e < 0 ) {
+
+ tp = rp; rp = xp; xp = tp;
+ rsize = xsize;
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch
new file mode 100644
index 000000000..b29ede423
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch
@@ -0,0 +1,44 @@
+Upstream-Status: Backport
+
+Index: gnupg-1.4.7/g10/getkey.c
+===================================================================
+--- gnupg-1.4.7.orig/g10/getkey.c 2007-03-05 16:54:41.000000000 +0800
++++ gnupg-1.4.7/g10/getkey.c 2013-11-28 14:41:59.640212240 +0800
+@@ -1454,7 +1454,11 @@
+
+ if(flags)
+ key_usage |= PUBKEY_USAGE_UNKNOWN;
++ if (!key_usage)
++ key_usage |= PUBKEY_USAGE_NONE;
+ }
++ else if (p)
++ key_usage |= PUBKEY_USAGE_NONE;
+
+ /* We set PUBKEY_USAGE_UNKNOWN to indicate that this key has a
+ capability that we do not handle. This serves to distinguish
+Index: gnupg-1.4.7/g10/keygen.c
+===================================================================
+--- gnupg-1.4.7.orig/g10/keygen.c 2007-02-05 00:27:40.000000000 +0800
++++ gnupg-1.4.7/g10/keygen.c 2013-11-28 14:43:05.016670092 +0800
+@@ -209,9 +209,6 @@
+ if (use & PUBKEY_USAGE_AUTH)
+ buf[0] |= 0x20;
+
+- if (!buf[0])
+- return;
+-
+ build_sig_subpkt (sig, SIGSUBPKT_KEY_FLAGS, buf, 1);
+ }
+
+Index: gnupg-1.4.7/include/cipher.h
+===================================================================
+--- gnupg-1.4.7.orig/include/cipher.h 2006-04-21 20:39:49.000000000 +0800
++++ gnupg-1.4.7/include/cipher.h 2013-11-28 14:49:24.159322744 +0800
+@@ -52,6 +52,7 @@
+ #define PUBKEY_USAGE_CERT 4 /* key is also good to certify other keys*/
+ #define PUBKEY_USAGE_AUTH 8 /* key is good for authentication */
+ #define PUBKEY_USAGE_UNKNOWN 128 /* key has an unknown usage bit */
++#define PUBKEY_USAGE_NONE 256 /* No usage given. */
+
+ #define DIGEST_ALGO_MD5 1
+ #define DIGEST_ALGO_SHA1 2
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch
new file mode 100644
index 000000000..b1a22f585
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch
@@ -0,0 +1,153 @@
+Upstream-Status: Backport
+
+Index: gnupg-1.4.7/cipher/dsa.c
+===================================================================
+--- gnupg-1.4.7.orig/cipher/dsa.c 2006-12-12 02:27:21.000000000 +0800
++++ gnupg-1.4.7/cipher/dsa.c 2014-01-23 11:30:17.300915919 +0800
+@@ -287,6 +287,8 @@
+ MPI kinv;
+ MPI tmp;
+
++ mpi_normalize (hash);
++
+ /* select a random k with 0 < k < q */
+ k = gen_k( skey->q );
+
+Index: gnupg-1.4.7/cipher/elgamal.c
+===================================================================
+--- gnupg-1.4.7.orig/cipher/elgamal.c 2006-12-12 03:08:05.000000000 +0800
++++ gnupg-1.4.7/cipher/elgamal.c 2014-01-23 11:30:17.300915919 +0800
+@@ -376,6 +376,9 @@
+ {
+ MPI t1 = mpi_alloc_secure( mpi_get_nlimbs( skey->p ) );
+
++ mpi_normalize (a);
++ mpi_normalize (b);
++
+ /* output = b/(a^x) mod p */
+ mpi_powm( t1, a, skey->x, skey->p );
+ mpi_invm( t1, t1, skey->p );
+Index: gnupg-1.4.7/cipher/random.c
+===================================================================
+--- gnupg-1.4.7.orig/cipher/random.c 2006-11-03 18:09:39.000000000 +0800
++++ gnupg-1.4.7/cipher/random.c 2014-01-23 11:31:53.993495462 +0800
+@@ -273,6 +273,18 @@
+ }
+
+
++/* Randomize the MPI */
++void
++randomize_mpi (MPI mpi, size_t nbits, int level)
++{
++ unsigned char *buffer;
++
++ buffer = get_random_bits (nbits, level, mpi_is_secure (mpi));
++ mpi_set_buffer (mpi, buffer, (nbits+7)/8, 0);
++ xfree (buffer);
++}
++
++
+ int
+ random_is_faked()
+ {
+Index: gnupg-1.4.7/cipher/random.h
+===================================================================
+--- gnupg-1.4.7.orig/cipher/random.h 2006-02-09 19:29:29.000000000 +0800
++++ gnupg-1.4.7/cipher/random.h 2014-01-23 11:30:17.300915919 +0800
+@@ -32,6 +32,7 @@
+ int random_is_faked(void);
+ void random_disable_locking (void);
+ void randomize_buffer( byte *buffer, size_t length, int level );
++void randomize_mpi (MPI mpi, size_t nbits, int level);
+ byte *get_random_bits( size_t nbits, int level, int secure );
+ void fast_random_poll( void );
+
+Index: gnupg-1.4.7/cipher/rsa.c
+===================================================================
+--- gnupg-1.4.7.orig/cipher/rsa.c 2006-12-12 03:09:00.000000000 +0800
++++ gnupg-1.4.7/cipher/rsa.c 2014-01-23 11:35:04.330639125 +0800
+@@ -301,9 +301,26 @@
+ #if 0
+ mpi_powm( output, input, skey->d, skey->n );
+ #else
+- MPI m1 = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
+- MPI m2 = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
+- MPI h = mpi_alloc_secure( mpi_get_nlimbs(skey->n)+1 );
++ int nlimbs = mpi_get_nlimbs (skey->n)+1;
++ MPI m1 = mpi_alloc_secure (nlimbs);
++ MPI m2 = mpi_alloc_secure (nlimbs);
++ MPI h = mpi_alloc_secure (nlimbs);
++# if 1
++ MPI bdata= mpi_alloc_secure (nlimbs);
++ MPI r = mpi_alloc_secure (nlimbs);
++# endif
++
++ /* Remove superfluous leading zeroes from INPUT. */
++ mpi_normalize (input);
++
++# if 1
++ /* Blind: bdata = (data * r^e) mod n */
++ randomize_mpi (r, mpi_get_nbits (skey->n), 0);
++ mpi_fdiv_r (r, r, skey->n);
++ mpi_powm (bdata, r, skey->e, skey->n);
++ mpi_mulm (bdata, bdata, input, skey->n);
++ input = bdata;
++# endif
+
+ /* m1 = c ^ (d mod (p-1)) mod p */
+ mpi_sub_ui( h, skey->p, 1 );
+@@ -321,8 +338,15 @@
+ /* m = m2 + h * p */
+ mpi_mul ( h, h, skey->p );
+ mpi_add ( output, m1, h );
+- /* ready */
+-
++
++# if 1
++ mpi_free (bdata);
++ /* Unblind: output = (output * r^(-1)) mod n */
++ mpi_invm (r, r, skey->n);
++ mpi_mulm (output, output, r, skey->n);
++ mpi_free (r);
++# endif
++
+ mpi_free ( h );
+ mpi_free ( m1 );
+ mpi_free ( m2 );
+@@ -397,6 +421,7 @@
+ rsa_decrypt( int algo, MPI *result, MPI *data, MPI *skey )
+ {
+ RSA_secret_key sk;
++ MPI input;
+
+ if( algo != 1 && algo != 2 )
+ return G10ERR_PUBKEY_ALGO;
+@@ -407,8 +432,14 @@
+ sk.p = skey[3];
+ sk.q = skey[4];
+ sk.u = skey[5];
+- *result = mpi_alloc_secure( mpi_get_nlimbs( sk.n ) );
+- secret( *result, data[0], &sk );
++
++ /* Mitigates side-channel attacks (CVE-2013-4576). */
++ input = mpi_alloc (0);
++ mpi_normalize (data[0]);
++ mpi_fdiv_r (input, data[0], sk.n);
++ *result = mpi_alloc_secure (mpi_get_nlimbs (sk.n));
++ secret (*result, input, &sk);
++ mpi_free (input);
+ return 0;
+ }
+
+Index: gnupg-1.4.7/g10/gpgv.c
+===================================================================
+--- gnupg-1.4.7.orig/g10/gpgv.c 2006-12-13 19:25:04.000000000 +0800
++++ gnupg-1.4.7/g10/gpgv.c 2014-01-23 11:30:17.300915919 +0800
+@@ -390,6 +390,7 @@
+ void random_dump_stats(void) {}
+ int quick_random_gen( int onoff ) { return -1;}
+ void randomize_buffer( byte *buffer, size_t length, int level ) {}
++void randomize_mpi (MPI mpi, size_t nbits, int level) {}
+ int random_is_faked() { return -1;}
+ byte *get_random_bits( size_t nbits, int level, int secure ) { return NULL;}
+ void set_random_seed_file( const char *name ) {}
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch
new file mode 100644
index 000000000..8b5d9a169
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch
@@ -0,0 +1,63 @@
+commit f0b33b6fb8e0586e9584a7a409dcc31263776a67
+Author: Werner Koch <wk@gnupg.org>
+Date: Thu Dec 20 09:43:41 2012 +0100
+
+ gpg: Import only packets which are allowed in a keyblock.
+
+ * g10/import.c (valid_keyblock_packet): New.
+ (read_block): Store only valid packets.
+ --
+
+ A corrupted key, which for example included a mangled public key
+ encrypted packet, used to corrupt the keyring. This change skips all
+ packets which are not allowed in a keyblock.
+
+ GnuPG-bug-id: 1455
+
+ (cherry-picked from commit f795a0d59e197455f8723c300eebf59e09853efa)
+
+Upstream-Status: Backport
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+diff --git a/g10/import.c b/g10/import.c
+index bfe02eb..a57b32e 100644
+--- a/g10/import.c
++++ b/g10/import.c
+@@ -384,6 +384,27 @@ import_print_stats (void *hd)
+ }
+
+
++/* Return true if PKTTYPE is valid in a keyblock. */
++static int
++valid_keyblock_packet (int pkttype)
++{
++ switch (pkttype)
++ {
++ case PKT_PUBLIC_KEY:
++ case PKT_PUBLIC_SUBKEY:
++ case PKT_SECRET_KEY:
++ case PKT_SECRET_SUBKEY:
++ case PKT_SIGNATURE:
++ case PKT_USER_ID:
++ case PKT_ATTRIBUTE:
++ case PKT_RING_TRUST:
++ return 1;
++ default:
++ return 0;
++ }
++}
++
++
+ /****************
+ * Read the next keyblock from stream A.
+ * PENDING_PKT should be initialzed to NULL
+@@ -461,7 +482,7 @@ read_block( IOBUF a, PACKET **pending_pkt, KBNODE *ret_root )
+ }
+ in_cert = 1;
+ default:
+- if( in_cert ) {
++ if (in_cert && valid_keyblock_packet (pkt->pkttype)) {
+ if( !root )
+ root = new_kbnode( pkt );
+ else
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch
new file mode 100644
index 000000000..e005ac658
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch
@@ -0,0 +1,17 @@
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: gnupg-1.4.7/configure.ac
+===================================================================
+--- gnupg-1.4.7.orig/configure.ac
++++ gnupg-1.4.7/configure.ac
+@@ -827,7 +827,6 @@ else
+ AC_SUBST(USE_NLS)
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
+- AM_PO_SUBDIRS
+ fi
+
+ if test "$try_extensions" = yes || test x"$card_support" = xyes ; then
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch
new file mode 100644
index 000000000..e5fb24aa6
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch
@@ -0,0 +1,27 @@
+
+This has been discussed in a couple of different bug reported
+upstream:
+
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486250
+http://bugs.sourcemage.org/show_bug.cgi?id=14446
+
+Fix:
+http://lists.gnupg.org/pipermail/gnupg-devel/2008-April/024344.html
+
+Upstream-Status: Backport [Debian]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+Index: gnupg-1.4.7/keyserver/gpgkeys_curl.c
+===================================================================
+--- gnupg-1.4.7.orig/keyserver/gpgkeys_curl.c
++++ gnupg-1.4.7/keyserver/gpgkeys_curl.c
+@@ -286,7 +286,7 @@ main(int argc,char *argv[])
+ curl_easy_setopt(curl,CURLOPT_VERBOSE,1);
+ }
+
+- curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,opt->flags.check_cert);
++ curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,(long)opt->flags.check_cert);
+ curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file);
+
+ if(proxy)
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch
new file mode 100644
index 000000000..2855cab24
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch
@@ -0,0 +1,19 @@
+Orignal Patch came from OpenWrt via OE-Classic
+https://dev.openwrt.org/browser/packages/utils/gnupg/patches/001-mips_gcc4.4
+which is no longer a valid revision!
+
+Upstream-Status: Inappropriate [configuration]
+
+
+--- gnupg/mpi/longlong.h~ 2006-02-14 10:09:55.000000000 +0000
++++ gnupg/mpi/longlong.h 2008-10-27 13:11:09.000000000 +0000
+@@ -181,7 +181,7 @@
+ /***************************************
+ ************** ARM ******************
+ ***************************************/
+-#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 %1, %4, %5\n" \
+ "adc %0, %2, %3" \
+
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch
new file mode 100644
index 000000000..9a03b2b70
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch
@@ -0,0 +1,50 @@
+
+From Openembedded-Classic
+
+ gnupg-1.4.10: Readd the ARM Thumb patch as debian has no thumb support
+
+
+Upstream-Status: Inappropriate [embedded-specific]
+
+Index: gnupg-1.4.10/mpi/longlong.h
+===================================================================
+--- gnupg-1.4.10.orig/mpi/longlong.h 2008-12-11 17:39:43.000000000 +0100
++++ gnupg-1.4.10/mpi/longlong.h 2010-03-27 14:27:53.000000000 +0100
+@@ -706,18 +706,35 @@
+ #endif /* __m88110__ */
+ #endif /* __m88000__ */
+
++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
++#if defined (__GNUC__) && defined (__GNUC_MINOR__)
++#define __GNUC_PREREQ(maj, min) \
++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++#else
++#define __GNUC_PREREQ(maj, min) 0
++#endif
++
+ /***************************************
+ ************** MIPS *****************
+ ***************************************/
+ #if defined (__mips__) && W_TYPE_SIZE == 32
+-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
++#if __GNUC_PREREQ (4,4)
++#define umul_ppmm(w1, w0, u, v) \
++ do { \
++ UDItype __ll = (UDItype)(u) * (v); \
++ w1 = __ll >> 32; \
++ w0 = __ll; \
++ } while (0)
++#endif
++#if !defined (umul_ppmm) && __GNUC_PREREQ (2,7)
+ #define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("multu %2,%3" \
+ : "=l" ((USItype)(w0)), \
+ "=h" ((USItype)(w1)) \
+ : "d" ((USItype)(u)), \
+ "d" ((USItype)(v)))
+-#else
++#endif
++#if !defined (umul_ppmm)
+ #define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("multu %2,%3 \n" \
+ "mflo %0 \n" \
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch
new file mode 100644
index 000000000..7af1955d5
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg/dirmngr-uses-libgpg-error.patch
@@ -0,0 +1,16 @@
+Upstream-Status: Pending
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+Index: gnupg-2.1.0/dirmngr/Makefile.am
+===================================================================
+--- gnupg-2.1.0.orig/dirmngr/Makefile.am
++++ gnupg-2.1.0/dirmngr/Makefile.am
+@@ -78,7 +78,8 @@ endif
+ dirmngr_LDADD = $(libcommontlsnpth) $(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
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg/pkgconfig.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
new file mode 100644
index 000000000..f958603ca
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg/pkgconfig.patch
@@ -0,0 +1,90 @@
+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
+
+Index: gnupg-2.1.0/m4/gnupg-pth.m4
+===================================================================
+--- gnupg-2.1.0.orig/m4/gnupg-pth.m4
++++ gnupg-2.1.0/m4/gnupg-pth.m4
+@@ -17,33 +17,9 @@ dnl implied warranty of MERCHANTABILITY
+ # 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)
+ ])
+-
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch
new file mode 100644
index 000000000..c6dbf1b75
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg/use-pkgconfig-instead-of-npth-config.patch
@@ -0,0 +1,72 @@
+Upstream-Status: Inappropriate [openembedded specific]
+
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+
+Index: gnupg-2.1.0/m4/npth.m4
+===================================================================
+--- gnupg-2.1.0.orig/m4/npth.m4
++++ gnupg-2.1.0/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])
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb b/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb
new file mode 100644
index 000000000..6999f81f8
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb
@@ -0,0 +1,105 @@
+SUMMARY = "GNU Privacy Guard - encryption and signing tools"
+HOMEPAGE = "http://www.gnupg.org/"
+DEPENDS = "zlib bzip2 readline"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
+
+PR = "r9"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-${PV}.tar.bz2 \
+ file://long-long-thumb.patch \
+ file://configure.patch \
+ file://mips_gcc4.4.patch \
+ file://GnuPG1-CVE-2012-6085.patch \
+ file://curl_typeof_fix_backport.patch \
+ file://CVE-2013-4351.patch \
+ file://CVE-2013-4576.patch \
+ file://CVE-2013-4242.patch \
+ "
+
+SRC_URI[md5sum] = "b06a141cca5cd1a55bbdd25ab833303c"
+SRC_URI[sha256sum] = "69d18b7d193f62ca27ed4febcb4c9044aa0c95305d3258fe902e2fae5fc6468d"
+
+inherit autotools gettext texinfo
+
+# --with-egd-socket=NAME use NAME for the EGD socket
+# --with-photo-viewer=FIXED_VIEWER set a fixed photo ID viewer
+# --with-included-zlib use the zlib code included here
+# --with-capabilities use linux capabilities default=no
+# --with-mailprog=NAME use "NAME -t" for mail transport
+# --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+# --without-libiconv-prefix don't search for libiconv in includedir and libdir
+# --with-included-gettext use the GNU gettext library included here
+# --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
+# --without-libintl-prefix don't search for libintl in includedir and libdir
+# --without-readline do not support fancy command line editing
+# --with-included-regex use the included GNU regex library
+# --with-zlib=DIR use libz in DIR
+# --with-bzip2=DIR look for bzip2 in DIR
+# --enable-static-rnd=egd|unix|linux|auto
+# --disable-dev-random disable the use of dev random
+# --disable-asm do not use assembler modules
+# --enable-m-guard enable memory guard facility
+# --enable-selinux-support
+# enable SELinux support
+# --disable-card-support disable OpenPGP card support
+# --disable-gnupg-iconv disable the new iconv code
+# --enable-backsigs enable the experimental backsigs code
+# --enable-minimal build the smallest gpg binary possible
+# --disable-rsa disable the RSA public key algorithm
+# --disable-idea disable the IDEA cipher
+# --disable-cast5 disable the CAST5 cipher
+# --disable-blowfish disable the BLOWFISH cipher
+# --disable-aes disable the AES, AES192, and AES256 ciphers
+# --disable-twofish disable the TWOFISH cipher
+# --disable-sha256 disable the SHA-256 digest
+# --disable-sha512 disable the SHA-384 and SHA-512 digests
+# --disable-bzip2 disable the BZIP2 compression algorithm
+# --disable-exec disable all external program execution
+# --disable-photo-viewers disable photo ID viewers
+# --disable-keyserver-helpers disable all external keyserver support
+# --disable-ldap disable LDAP keyserver interface
+# --disable-hkp disable HKP keyserver interface
+# --disable-http disable HTTP key fetching interface
+# --disable-finger disable Finger key fetching interface
+# --disable-mailto disable email keyserver interface
+# --disable-keyserver-path disable the exec-path option for keyserver helpers
+# --enable-key-cache=SIZE Set key cache to SIZE (default 4096)
+# --disable-largefile omit support for large files
+# --disable-dns-srv disable the use of DNS SRV in HKP and HTTP
+# --disable-nls do not use Native Language Support
+# --disable-regex do not handle regular expressions in trust sigs
+
+EXTRA_OECONF = "--disable-ldap \
+ --with-zlib=${STAGING_LIBDIR}/.. \
+ --with-bzip2=${STAGING_LIBDIR}/.. \
+ --disable-selinux-support \
+ --with-readline=${STAGING_LIBDIR}/.. \
+ ac_cv_sys_symbol_underscore=no \
+ "
+
+# Force gcc's traditional handling of inline to avoid issues with gcc 5
+CFLAGS += "-fgnu89-inline"
+
+do_install () {
+ autotools_do_install
+ install -d ${D}${docdir}/${BPN}
+ mv ${D}${datadir}/${BPN}/* ${D}/${docdir}/${BPN}/ || :
+ mv ${D}${prefix}/doc/* ${D}/${docdir}/${BPN}/ || :
+}
+
+# split out gpgv from main package
+RDEPENDS_${PN} = "gpgv"
+PACKAGES =+ "gpgv"
+FILES_gpgv = "${bindir}/gpgv"
+
+# Exclude debug files from the main packages
+FILES_${PN} = "${bindir}/* ${datadir}/${BPN} ${libexecdir}/${BPN}/*"
+FILES_${PN}-dbg += "${libexecdir}/${BPN}/.debug"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[curl] = "--with-libcurl=${STAGING_LIBDIR},--without-libcurl,curl"
+PACKAGECONFIG[libusb] = "--with-libusb=${STAGING_LIBDIR},--without-libusb,libusb-compat"
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.7.bb b/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.7.bb
new file mode 100644
index 000000000..48c7c9622
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.7.bb
@@ -0,0 +1,41 @@
+SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
+HOMEPAGE = "http://www.gnupg.org/"
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+ file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+
+DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
+
+inherit autotools gettext texinfo pkgconfig
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://pkgconfig.patch \
+ file://use-pkgconfig-instead-of-npth-config.patch \
+ file://dirmngr-uses-libgpg-error.patch \
+ "
+
+SRC_URI[md5sum] = "ebdf92b15b8bcd8579b643c7f41a3238"
+SRC_URI[sha256sum] = "c18a3776d47fec98892d51d28b6574ef16bf0a25eabb0956231058aaf2e7846e"
+
+EXTRA_OECONF = "--disable-ldap \
+ --disable-ccid-driver \
+ --with-zlib=${STAGING_LIBDIR}/.. \
+ --with-bzip2=${STAGING_LIBDIR}/.. \
+ --with-readline=${STAGING_LIBDIR}/.. \
+ "
+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
+}
+
+RDEPENDS_${PN} = "gnutls"
diff --git a/yocto-poky/meta/recipes-support/gnutls/gnutls.inc b/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
new file mode 100644
index 000000000..e9b138a03
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
@@ -0,0 +1,49 @@
+SUMMARY = "GNU Transport Layer Security Library"
+HOMEPAGE = "http://www.gnu.org/software/gnutls/"
+BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
+DEPENDS = "nettle"
+
+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://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+
+SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).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
+
+EXTRA_OECONF="--disable-rpath \
+ --with-included-libtasn1 \
+ --enable-local-libopts \
+ --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
+ --disable-guile \
+ --disable-crywrap \
+ --without-p11-kit \
+ "
+
+do_configure_prepend() {
+ for dir in . lib; do
+ rm -f ${dir}/aclocal.m4 ${dir}/m4/libtool.m4 ${dir}/m4/lt*.m4
+ done
+}
+
+PACKAGECONFIG ??= "zlib"
+PACKAGECONFIG[tpm] = "--with-tpm, --without-tpm, trousers"
+PACKAGECONFIG[zlib] = "--with-zlib, --without-zlib, zlib"
+
+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.*"
+
+LDFLAGS_append_libc-uclibc += " -pthread"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch b/yocto-poky/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch
new file mode 100644
index 000000000..44a9934b5
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch
@@ -0,0 +1,31 @@
+From eb93aa7b986c84da60a3db40afb29d1a70c50223 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sat, 17 Jan 2015 17:02:15 +0000
+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>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c6818a0..1c4582d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -466,7 +466,7 @@ if test "$NEED_LIBOPTS_DIR" = "true";then
+ dnl replace libopts-generated files with distributed backups, if present
+ missing_baks=
+ for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
+- nam=`echo $i|sed 's/.bak//g'`
++ nam=`echo $i|sed 's/\.bak$//'`
+ if test -f $i;then
+ cp -f $i $nam
+ else
+--
+2.0.1
+
diff --git a/yocto-poky/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch b/yocto-poky/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
new file mode 100644
index 000000000..5e452c52e
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch
@@ -0,0 +1,67 @@
+From ae3370788ed3447bba16969d9eb1bf1b9631e1b7 Mon Sep 17 00:00:00 2001
+From: Valentin Popa <valentin.popa@intel.com>
+Date: Fri, 25 Apr 2014 13:58:55 +0300
+Subject: [PATCH] Correct rpl_gettimeofday signature
+
+Currently we fail on uclibc like below
+
+| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0,
+| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/ucontext.h:26,
+| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/signal.h:392,
+| from ../../gl/signal.h:52,
+| from ../../gl/sys/select.h:58,
+| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/types.h:220,
+| from ../../gl/sys/types.h:28,
+| from ../../lib/includes/gnutls/gnutls.h:46,
+| from ex-cxx.cpp:3:
+| ../../gl/sys/time.h:396:66: error: conflicting declaration 'void* restrict'
+| ../../gl/sys/time.h:396:50: error: 'restrict' has a previous declaration as 'timeval* restrict'
+| make[4]: *** [ex-cxx.o] Error 1
+| make[4]: *** Waiting for unfinished jobs....
+
+GCC detects that we call 'restrict' as param name in function
+signatures and complains since both params are called 'restrict'
+therefore we use __restrict to denote the C99 keywork
+
+This only happens of uclibc since this code is not excercised with
+eglibc otherwise we will have same issue there too
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gl/sys_time.in.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
+index 84a17c9..6ceadc3 100644
+--- a/gl/sys_time.in.h
++++ b/gl/sys_time.in.h
+@@ -93,20 +93,20 @@ struct timeval
+ # define gettimeofday rpl_gettimeofday
+ # endif
+ _GL_FUNCDECL_RPL (gettimeofday, int,
+- (struct timeval *restrict, void *restrict)
++ (struct timeval *__restrict, void *__restrict)
+ _GL_ARG_NONNULL ((1)));
+ _GL_CXXALIAS_RPL (gettimeofday, int,
+- (struct timeval *restrict, void *restrict));
++ (struct timeval *__restrict, void *__restrict));
+ # else
+ # if !@HAVE_GETTIMEOFDAY@
+ _GL_FUNCDECL_SYS (gettimeofday, int,
+- (struct timeval *restrict, void *restrict)
++ (struct timeval *__restrict, void *__restrict)
+ _GL_ARG_NONNULL ((1)));
+ # endif
+ /* Need to cast, because on glibc systems, by default, the second argument is
+ struct timezone *. */
+ _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
+- (struct timeval *restrict, void *restrict));
++ (struct timeval *__restrict, void *__restrict));
+ # endif
+ _GL_CXXALIASWARN (gettimeofday);
+ #elif defined GNULIB_POSIXCHECK
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch b/yocto-poky/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
new file mode 100644
index 000000000..0e1b7c8f7
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
@@ -0,0 +1,67 @@
+From cee80af1fe93f5b76765afeebfcc3b902768f5d6 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 26 May 2015 21:41:24 -0700
+Subject: [PATCH] use pkg-config to locate zlib
+
+AC_LIB_HAVE_LINKFLAGS can sometimes find host libs and is therefore not
+robust when cross-compiling. Remove it for zlib and use PKG_CHECK_MODULES
+instead.
+
+Removing AC_LIB_HAVE_LINKFLAGS for zlib also removes the --with-libz-prefix
+configure option. If zlib support is enabled, then failure to find zlib via
+pkg-config is now treated as a fatal error.
+
+Change based on ChromeOS gnutls 2.12.23 cross-compile fixes patch:
+
+ https://chromium-review.googlesource.com/#/c/271661/
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ configure.ac | 24 ++++++++++--------------
+ 1 file changed, 10 insertions(+), 14 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1b561d5..0c787dc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -508,25 +508,21 @@ AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],
+ AC_MSG_CHECKING([whether to include zlib compression support])
+ if test x$ac_zlib != xno; then
+ AC_MSG_RESULT(yes)
+- AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
+- if test x$ac_cv_libz != xyes; then
+- AC_MSG_WARN(
+-***
+-*** ZLIB was not found. You will not be able to use ZLIB compression.)
+- fi
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+-PKG_CHECK_EXISTS(zlib, ZLIB_HAS_PKGCONFIG=y, ZLIB_HAS_PKGCONFIG=n)
+-
+ if test x$ac_zlib != xno; then
+- if test "$ZLIB_HAS_PKGCONFIG" = "y" ; then
+- if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
+- GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
+- else
+- GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
+- fi
++ PKG_CHECK_MODULES(ZLIB, zlib)
++ HAVE_LIBZ=yes
++ AC_DEFINE([HAVE_LIBZ], [1], [zlib is enabled])
++ AC_SUBST(HAVE_LIBZ)
++ LTLIBZ=$ZLIB_LIBS
++ AC_SUBST(LTLIBZ)
++ if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
++ GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
++ else
++ GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
+ fi
+ fi
+ AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-support/gnutls/gnutls_3.3.17.1.bb b/yocto-poky/meta/recipes-support/gnutls/gnutls_3.3.17.1.bb
new file mode 100644
index 000000000..018579752
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnutls/gnutls_3.3.17.1.bb
@@ -0,0 +1,8 @@
+require gnutls.inc
+
+SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
+ file://configure.ac-fix-sed-command.patch \
+ file://use-pkg-config-to-locate-zlib.patch \
+ "
+SRC_URI[md5sum] = "8d01c7e7f2cbc5871fdca832d2260b6b"
+SRC_URI[sha256sum] = "b40f158030a92f450a07b20300a3996710ca19800848d9f6fd62493170c5bbb4"
diff --git a/yocto-poky/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch b/yocto-poky/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch
new file mode 100644
index 000000000..2ac89f3b3
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.5.bb b/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.5.bb
new file mode 100644
index 000000000..f874574c5
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.5.bb
@@ -0,0 +1,20 @@
+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 \
+ "
+
+SRC_URI[md5sum] = "81d272697545e82d39f6bd14854b68f0"
+SRC_URI[sha256sum] = "89b3b5dce119273431544ecb305081f3530911001bb12e5d76588907edb71bda"
+
+inherit autotools texinfo binconfig lib_package
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/gpgme/gpgme/gpgme.pc b/yocto-poky/meta/recipes-support/gpgme/gpgme/gpgme.pc
new file mode 100644
index 000000000..30a4d56d6
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gpgme/gpgme/gpgme.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: gpgme
+Description: GNU Privacy Guard Made Easy
+Version: 1.4.3
+Requires:
+Libs: -L${libdir} -lgpgme -lassuan -lgpg-error
+Cflags: -I${includedir}
diff --git a/yocto-poky/meta/recipes-support/gpgme/gpgme/pkgconfig.patch b/yocto-poky/meta/recipes-support/gpgme/gpgme/pkgconfig.patch
new file mode 100644
index 000000000..e2f1f4ffb
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gpgme/gpgme/pkgconfig.patch
@@ -0,0 +1,279 @@
+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
+
+diff --git a/configure.ac b/configure.ac
+index 298a22b..c778b61 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -622,6 +622,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/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
+ AC_OUTPUT
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 58922f9..40d0dca 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -20,11 +20,13 @@
+
+ # Note: moc_kdpipeiodevice should actually be a dependecy below.
+ EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \
+- gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp
++ gpgme.h.in versioninfo.rc.in gpgme.def moc_kdpipeiodevice.cpp gpgme.pc.in gpgme-pthread.pc.in
+
+ bin_SCRIPTS = gpgme-config
+ m4datadir = $(datadir)/aclocal
+ m4data_DATA = gpgme.m4
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = gpgme.pc gpgme-pthread.pc
+ nodist_include_HEADERS = gpgme.h
+
+ bin_PROGRAMS = gpgme-tool
+diff --git a/src/gpgme-pthread.pc.in b/src/gpgme-pthread.pc.in
+new file mode 100644
+index 0000000..980a48e
+--- /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 (threaded version)
++Version: @VERSION@
++Libs: -L${libdir} -lgpgme-pthread -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
diff --git a/yocto-poky/meta/recipes-support/gpgme/gpgme_1.5.4.bb b/yocto-poky/meta/recipes-support/gpgme/gpgme_1.5.4.bb
new file mode 100644
index 000000000..1598377d6
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gpgme/gpgme_1.5.4.bb
@@ -0,0 +1,39 @@
+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=71ba2ae8d6ca034ed10bd099a8cf473c \
+ file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/${BP}.tar.bz2 \
+ file://gpgme.pc \
+ file://pkgconfig.patch \
+ "
+
+SRC_URI[md5sum] = "feafa03ea064e1d1dc11bc2b88404623"
+SRC_URI[sha256sum] = "bb38c0ec8815c9e94e6047b484984808a8dad9d6bec8df33dc5339fd55ffea6c"
+
+DEPENDS = "libgpg-error libassuan"
+
+BINCONFIG = "${bindir}/gpgme-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+PACKAGES =+ "${PN}-pthread"
+FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*"
+FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/*"
+
+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
+}
+
+do_install_append () {
+ install -d ${D}${libdir}/pkgconfig
+ install -m 0644 ${WORKDIR}/gpgme.pc ${D}${libdir}/pkgconfig/
+}
diff --git a/yocto-poky/meta/recipes-support/icu/icu.inc b/yocto-poky/meta/recipes-support/icu/icu.inc
new file mode 100644
index 000000000..cc6f222a5
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/icu/icu.inc
@@ -0,0 +1,51 @@
+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 = ""
+
+S = "${WORKDIR}/icu/source"
+SPDX_S = "${WORKDIR}/icu"
+STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}"
+
+CPPFLAGS_append_libc-uclibc = " -DU_TIMEZONE=0"
+
+BINCONFIG = "${bindir}/icu-config"
+
+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}"
+
+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}
+}
+
+PACKAGES =+ "libicudata libicuuc libicui18n libicule libiculx libicutu libicuio"
+
+FILES_${PN}-dev += "${libdir}/${BPN}/"
+
+FILES_libicudata = "${libdir}/libicudata.so.*"
+FILES_libicuuc = "${libdir}/libicuuc.so.*"
+FILES_libicui18n = "${libdir}/libicui18n.so.*"
+FILES_libicule = "${libdir}/libicule.so.*"
+FILES_libiculx = "${libdir}/libiculx.so.*"
+FILES_libicutu = "${libdir}/libicutu.so.*"
+FILES_libicuio = "${libdir}/libicuio.so.*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch b/yocto-poky/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch
new file mode 100644
index 000000000..2968d571b
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch b/yocto-poky/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
new file mode 100644
index 000000000..6e4065922
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch
@@ -0,0 +1,29 @@
+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>
+---
+ tools/pkgdata/pkgdata.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/pkgdata/pkgdata.cpp b/tools/pkgdata/pkgdata.cpp
+--- a/tools/pkgdata/pkgdata.cpp
++++ b/tools/pkgdata/pkgdata.cpp
+@@ -1019,7 +1019,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,
+--
+1.7.10.4
+
diff --git a/yocto-poky/meta/recipes-support/icu/icu_55.1.bb b/yocto-poky/meta/recipes-support/icu/icu_55.1.bb
new file mode 100644
index 000000000..f63a9bd08
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/icu/icu_55.1.bb
@@ -0,0 +1,21 @@
+require icu.inc
+
+LIC_FILES_CHKSUM = "file://../license.html;md5=64eff4aadff4d104d6d437c4fde0e6d7"
+
+def icu_download_version(d):
+ pvsplit = d.getVar('PV', True).split('.')
+ return pvsplit[0] + "_" + pvsplit[1]
+
+ICU_PV = "${@icu_download_version(d)}"
+
+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 \
+ "
+
+SRC_URI_append_class-target = "\
+ file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
+ "
+SRC_URI[md5sum] = "e2d523df79d6cb7855c2fbe284f4db29"
+SRC_URI[sha256sum] = "e16b22cbefdd354bec114541f7849a12f8fc2015320ca5282ee4fd787571457b"
+
diff --git a/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.58.bb b/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.58.bb
new file mode 100644
index 000000000..7112e461b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.58.bb
@@ -0,0 +1,15 @@
+SUMMARY = "ISO language, territory, currency, script codes and their translations"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fbc093901857fcd118f065f900982c24"
+
+SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
+SRC_URI[md5sum] = "34097a0085f0979e28f9db66ec274c5e"
+SRC_URI[sha256sum] = "86af5735dce6e4eff2b983e5d8aa9a3dea1b8db702333ff20be89e45f7f35a72"
+
+# 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/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch b/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
new file mode 100644
index 000000000..b6ccdda6a
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch
@@ -0,0 +1,158 @@
+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>
+
+Index: libassuan-2.1.2/Makefile.am
+===================================================================
+--- libassuan-2.1.2.orig/Makefile.am
++++ libassuan-2.1.2/Makefile.am
+@@ -24,10 +24,13 @@ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gz
+ # (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 \
+ 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
+
+ SUBDIRS = m4 src doc tests
+
+Index: libassuan-2.1.2/libassuan.pc.in
+===================================================================
+--- /dev/null
++++ libassuan-2.1.2/libassuan.pc.in
+@@ -0,0 +1,14 @@
++prefix=@prefix@
++exec_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.1.2/configure.ac
+===================================================================
+--- libassuan-2.1.2.orig/configure.ac
++++ libassuan-2.1.2/configure.ac
+@@ -439,7 +439,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
+
+ echo "
+Index: libassuan-2.1.2/src/libassuan.m4
+===================================================================
+--- libassuan-2.1.2.orig/src/libassuan.m4
++++ libassuan-2.1.2/src/libassuan.m4
+@@ -15,18 +15,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
+@@ -37,51 +25,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
+@@ -96,7 +45,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([[
+@@ -137,12 +86,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/yocto-poky/meta/recipes-support/libassuan/libassuan_2.2.1.bb b/yocto-poky/meta/recipes-support/libassuan/libassuan_2.2.1.bb
new file mode 100644
index 000000000..75ae43f02
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libassuan/libassuan_2.2.1.bb
@@ -0,0 +1,28 @@
+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+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+ file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://src/assuan.c;endline=20;md5=0f465544183405055ec179869fc5b5ba \
+ file://src/assuan-defs.h;endline=20;md5=20cd55535260ca1779edae5c7b80b21e"
+
+DEPENDS = "libgpg-error"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-${PV}.tar.bz2 \
+ file://libassuan-add-pkgconfig-support.patch"
+
+SRC_URI[md5sum] = "6290e750ee87be3bfd9579fc44c6a186"
+SRC_URI[sha256sum] = "949285bb79345362cb72a40c798defefc007031c60f2f10251720bf60a9de2de"
+
+BINCONFIG = "${bindir}/libassuan-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+do_configure_prepend () {
+ # Else these could be used in prefernce to those in aclocal-copy
+ rm -f ${S}/m4/*.m4
+}
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb b/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb
new file mode 100644
index 000000000..4d0e299f4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb
@@ -0,0 +1,29 @@
+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 \
+ "
+
+SRC_URI = "http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "1d6538604b314d2fccdf86915e5c0857"
+SRC_URI[sha256sum] = "04fa615f62992547bcbda562260e28b504bc4c06e2f985f267f3ade30304b5dd"
+
+S = "${WORKDIR}/libatomic_ops-${PV}"
+
+ALLOW_EMPTY_${PN} = "1"
+
+ARM_INSTRUCTION_SET = "arm"
+
+inherit autotools pkgconfig
+
+do_install_append() {
+ # those contain only docs, not necessary for now.
+ install -m 0755 -d ${D}${docdir}
+ mv ${D}${datadir}/libatomic_ops ${D}${docdir}/${BPN}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/libbsd/libbsd_0.7.0.bb b/yocto-poky/meta/recipes-support/libbsd/libbsd_0.7.0.bb
new file mode 100644
index 000000000..902666da7
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libbsd/libbsd_0.7.0.bb
@@ -0,0 +1,21 @@
+# 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/"
+LICENSE = "BSD-4-Clause & MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f1530ea92aeaa1c5e2547cfd43905d8c"
+SECTION = "libs"
+DEPENDS = ""
+
+SRC_URI = "http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "fcceb4e66fd448ca4ed42ba22a8babb0"
+SRC_URI[sha256sum] = "0f3b0e17e5c34c038126e0a04351b11e23c6101a7d0ce3beeab29bb6415c10bb"
+
+inherit autotools pkgconfig
diff --git a/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng/python.patch b/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng/python.patch
new file mode 100644
index 000000000..59591eb46
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb b/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb
new file mode 100644
index 000000000..a31d5dc43
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb
@@ -0,0 +1,39 @@
+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 pythonnative
+
+SRC_URI[md5sum] = "3d7d126b29e2869a0257c17c8b0d9b2e"
+SRC_URI[sha256sum] = "615549ce39b333f6b78baee0c0b4ef18bc726c6bf1cca123dfd89dd963f6d06b"
+
+DEPENDS += "swig-native python"
+
+EXTRA_OECONF += "--without-python3"
+
+EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' PYINC='${STAGING_INCDIR}/${PYLIBVER}'"
+
+PACKAGES += "${PN}-python"
+
+FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug"
+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/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb b/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb
new file mode 100644
index 000000000..36b94ee74
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb
@@ -0,0 +1,77 @@
+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 = "perl-native-runtime"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "d43ab9f680435a7fff35b4ace8d45b80"
+SRC_URI[sha256sum] = "cee4568f78dc851d726fc93f25f4ed91cc223b1fe8259daa4a77158d174e6c65"
+
+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
+
+ # disable gperf detection
+ sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
+}
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)}"
+PACKAGECONFIG_class-native ??= ""
+
+PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr"
+PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
+
+EXTRA_OEMAKE = " \
+ INDENT= \
+ lib=${@os.path.basename('${libdir}')} \
+ RAISE_SETFCAP=no \
+ DYNAMIC=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 ${EXTRA_OECONF}
+}
+
+do_install() {
+ oe_runmake install \
+ ${EXTRA_OECONF} \
+ DESTDIR="${D}" \
+ prefix="${prefix}" \
+ SBINDIR="${D}${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"
+FILES_${PN}-dbg += "${base_libdir}/security/.debug/*.so"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/libcheck/libcheck_0.10.0.bb b/yocto-poky/meta/recipes-support/libcheck/libcheck_0.10.0.bb
new file mode 100644
index 000000000..c0b459f66
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libcheck/libcheck_0.10.0.bb
@@ -0,0 +1,24 @@
+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 = "${SOURCEFORGE_MIRROR}/check/check-${PV}.tar.gz \
+ "
+
+SRC_URI[md5sum] = "53c5e5c77d090e103a17f3ed7fd7d8b8"
+SRC_URI[sha256sum] = "f5f50766aa6f8fe5a2df752666ca01a950add45079aa06416b83765b1cf71052"
+
+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"
diff --git a/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.8.bb b/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.8.bb
new file mode 100644
index 000000000..2b1b91063
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.8.bb
@@ -0,0 +1,21 @@
+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"
+EXTRA_OECONF += "--enable-Bsymbolic=auto"
+PR = "r2"
+
+BINCONFIG = "${bindir}/croco-0.6-config"
+
+inherit autotools pkgconfig gnomebase gtk-doc binconfig-disabled
+
+SRC_URI[archive.md5sum] = "767e73c4174f75b99695d4530fd9bb80"
+SRC_URI[archive.sha256sum] = "ea6e1b858c55219cefd7109756bff5bc1a774ba7a55f7d3ccd734d6b871b8570"
diff --git a/yocto-poky/meta/recipes-support/libdaemon/libdaemon/fix-includes.patch b/yocto-poky/meta/recipes-support/libdaemon/libdaemon/fix-includes.patch
new file mode 100644
index 000000000..1027ae8e6
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/libdaemon/libdaemon_0.14.bb b/yocto-poky/meta/recipes-support/libdaemon/libdaemon_0.14.bb
new file mode 100644
index 000000000..070ee1890
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.2.bb b/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.2.bb
new file mode 100644
index 000000000..f851305c5
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.2.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] = "debfcd5153558eba25a8e71eb2534ae8"
+SRC_URI[sha256sum] = "7c77b213f075706d428a2af54b66bf86b03a68e9fb390e7ec48cf55065970643"
+
+inherit autotools pkgconfig
diff --git a/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest b/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest
new file mode 100644
index 000000000..d521688e7
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libevent/libevent/run-ptest
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+fail=0
+for test in ./test/*
+do
+ $test
+ if [ $? -eq 0 ]
+ then
+ fail=1
+ fi
+done
+
+if [ $fail -eq 0 ]
+then
+ echo "PASS: libevent"
+else
+ echo "FAIL: libevent"
+fi
diff --git a/yocto-poky/meta/recipes-support/libevent/libevent_2.0.22.bb b/yocto-poky/meta/recipes-support/libevent/libevent_2.0.22.bb
new file mode 100644
index 000000000..58c263c4d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libevent/libevent_2.0.22.bb
@@ -0,0 +1,39 @@
+SUMMARY = "An asynchronous event notification library"
+HOMEPAGE = "http://libevent.org/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=50884&atid=461322"
+SECTION = "libs"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=45c5316ff684bcfe2f9f86d8b1279559"
+
+SRC_URI = " \
+ ${SOURCEFORGE_MIRROR}/levent/${BP}-stable.tar.gz \
+ file://run-ptest \
+"
+
+SRC_URI[md5sum] = "c4c56f986aa985677ca1db89630a2e11"
+SRC_URI[sha256sum] = "71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3"
+
+S = "${WORKDIR}/${BPN}-${PV}-stable"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+
+inherit autotools
+
+# Needed for Debian packaging
+LEAD_SONAME = "libevent-2.0.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/yocto-poky/meta/recipes-support/libexif/libexif_0.6.21.bb b/yocto-poky/meta/recipes-support/libexif/libexif_0.6.21.bb
new file mode 100644
index 000000000..cff4caede
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/libfm/libfm-extra/0001-nls.m4-Take-it-from-gettext-0.15.patch b/yocto-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/yocto-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/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.3.bb b/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.3.bb
new file mode 100644
index 000000000..46d2d62b9
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.3.bb
@@ -0,0 +1,25 @@
+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 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] = "3ff38200701658f7e80e25ed395d92dd"
+SRC_URI[sha256sum] = "c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9"
+
+S = "${WORKDIR}/libfm-${PV}"
+
+EXTRA_OECONF = "--with-extra-only --with-gtk=no"
+
+PR = "r1"
+
+inherit autotools pkgconfig gtk-doc
+
+do_configure[dirs] =+ "${S}/m4"
diff --git a/yocto-poky/meta/recipes-support/libfm/libfm_1.2.3.bb b/yocto-poky/meta/recipes-support/libfm/libfm_1.2.3.bb
new file mode 100644
index 000000000..629502f68
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libfm/libfm_1.2.3.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Library for file management"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+ 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 pango gtk+ menu-cache intltool-native libexif libfm-extra"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "3ff38200701658f7e80e25ed395d92dd"
+SRC_URI[sha256sum] = "c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9"
+
+PR = "r1"
+
+inherit autotools pkgconfig gtk-doc
+
+do_configure[dirs] =+ "${S}/m4"
+
+PACKAGES += "${PN}-mime"
+FILES_${PN}-mime = "${datadir}/mime/"
+FILES_${PN}-dbg += "${libdir}/libfm/modules/.debug"
+
+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}${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/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch b/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
new file mode 100644
index 000000000..67ddfc640
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch
@@ -0,0 +1,151 @@
+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
+
+Index: libgcrypt-1.2.4/configure.ac
+===================================================================
+--- libgcrypt-1.2.4.orig/configure.ac 2008-03-19 22:14:50.000000000 +0000
++++ libgcrypt-1.2.4/configure.ac 2008-03-19 22:14:58.000000000 +0000
+@@ -807,6 +807,7 @@
+ doc/Makefile
+ src/Makefile
+ src/gcrypt.h
++src/libgcrypt.pc
+ src/libgcrypt-config
+ tests/Makefile
+ w32-dll/Makefile
+Index: libgcrypt-1.2.4/src/libgcrypt.pc.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libgcrypt-1.2.4/src/libgcrypt.pc.in 2008-03-19 22:14:58.000000000 +0000
+@@ -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}
+Index: libgcrypt-1.6.1/src/libgcrypt.m4
+===================================================================
+--- libgcrypt-1.6.1.orig/src/libgcrypt.m4 2013-12-16 17:44:32.000000000 +0000
++++ libgcrypt-1.6.1/src/libgcrypt.m4 2014-05-13 21:25:37.478389833 +0000
+@@ -22,17 +22,7 @@
+ 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_prefix != x ; then
+- if test x${LIBGCRYPT_CONFIG+set} != xset ; then
+- LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
+- fi
+- fi
+
+- AC_PATH_TOOL(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/'`
+@@ -42,48 +32,13 @@
+ 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
+@@ -96,10 +51,8 @@
+ 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([[
+@@ -113,8 +66,6 @@
+ fi
+ fi
+ else
+- LIBGCRYPT_CFLAGS=""
+- LIBGCRYPT_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(LIBGCRYPT_CFLAGS)
diff --git a/yocto-poky/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch b/yocto-poky/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch
new file mode 100644
index 000000000..582e62f70
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch
@@ -0,0 +1,71 @@
+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]
+
+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 bd05064..28c2438 100644
+--- a/tests/bench-slope.c
++++ b/tests/bench-slope.c
+@@ -1197,7 +1197,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},
+ };
+@@ -1349,7 +1349,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.1.2
+
diff --git a/yocto-poky/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/yocto-poky/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
new file mode 100644
index 000000000..a3e540369
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Pending
+
+libgcrypt: fix building error with '-O2' in sysroot path
+
+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>
+---
+ cipher/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cipher/Makefile.am b/cipher/Makefile.am
+index 76cdc96..9a89792 100644
+--- a/cipher/Makefile.am
++++ b/cipher/Makefile.am
+@@ -69,7 +69,7 @@ rfc2268.c \
+ camellia.c camellia.h camellia-glue.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.7.9.5
+
diff --git a/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc b/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc
new file mode 100644
index 000000000..683be780f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -0,0 +1,49 @@
+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 libcap"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \
+ file://add-pkgconfig-support.patch \
+ file://libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
+ file://fix-ICE-failure-on-mips-with-option-O-and-g.patch \
+"
+
+BINCONFIG = "${bindir}/libgcrypt-config"
+
+PR = "r1"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+EXTRA_OECONF = "--disable-asm --with-capabilities"
+
+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"
+
+ARM_INSTRUCTION_SET = "arm"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.3.bb b/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.3.bb
new file mode 100644
index 000000000..cd06ce73a
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.3.bb
@@ -0,0 +1,4 @@
+require libgcrypt.inc
+
+SRC_URI[md5sum] = "de03b867d02fdf115a1bac8bb8b5c3a3"
+SRC_URI[sha256sum] = "69e94e1a7084d94e1a6ca26d436068cb74862d10a7353cfae579a2d88674ff09"
diff --git a/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch b/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error/pkgconfig.patch
new file mode 100644
index 000000000..9ffeedbe5
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.19.bb b/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.19.bb
new file mode 100644
index 000000000..39dbbcf33
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.19.bb
@@ -0,0 +1,51 @@
+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=8b204918f0ca707136394d8bb20c7ebc \
+ file://src/init.c;endline=20;md5=8f5a9b59634f4aebcd0ec9d3ebd53bfe"
+
+
+SECTION = "libs"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
+ file://pkgconfig.patch"
+SRC_URI[md5sum] = "c04c16245b92829281f43b5bef7d16da"
+SRC_URI[sha256sum] = "53120e1333d5c5d28d87ff2854e9e98719c8e214152f17ad5291704d25c4978b"
+
+BINCONFIG = "${bindir}/gpg-error-config"
+
+inherit autotools binconfig-disabled pkgconfig gettext
+CPPFLAGS += "-P"
+do_compile_prepend() {
+ TARGET_FILE=linux-gnu
+ if [ ${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 ;;
+ mips64el) TUPLE=mipsel-unknown-linux-gnu ;;
+ mips64) TUPLE=mips-unknown-linux-gnu ;;
+ x86_64) TUPLE=x86_64-pc-linux-gnu ;;
+ *) TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;;
+ esac
+
+ cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
+ ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
+}
+
+do_install_append() {
+ # we don't have common lisp in OE
+ rm -rf "${D}${datadir}/common-lisp/"
+}
+
+FILES_${PN}-dev += "${bindir}/gpg-error"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/libical/libical_1.0.0.bb b/yocto-poky/meta/recipes-support/libical/libical_1.0.0.bb
new file mode 100644
index 000000000..be6b635ca
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libical/libical_1.0.0.bb
@@ -0,0 +1,13 @@
+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}/archive/v${PV}.tar.gz"
+SRC_URI[md5sum] = "f4b8e33ae5efb2f025eb43ce69682a36"
+SRC_URI[sha256sum] = "0072e83834092315772e6719b85fc8b11530b1ff53f4d108315fb38cddbce8c2"
+
+inherit autotools
diff --git a/yocto-poky/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch b/yocto-poky/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch
new file mode 100644
index 000000000..3cbf549d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch
@@ -0,0 +1,50 @@
+It adds the variables that are needed
+for autoconf 2.65 to reconfigure libiconv and defines the m4 macros
+directory. Its imported from OE.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libiconv-1.11.1/configure.ac
+===================================================================
+--- libiconv-1.11.1.orig/configure.ac
++++ libiconv-1.11.1/configure.ac
+@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR(build-aux)
+ AM_INIT_AUTOMAKE(libiconv, 1.11)
+ AC_CONFIG_HEADERS(config.h lib/config.h)
+ AC_PROG_MAKE_SET
+-
++AC_CONFIG_MACRO_DIR([m4])
+ dnl checks for basic programs
+
+ AC_PROG_CC
+Index: libiconv-1.11.1/libcharset/configure.ac
+===================================================================
+--- libiconv-1.11.1.orig/libcharset/configure.ac
++++ libiconv-1.11.1/libcharset/configure.ac
+@@ -16,17 +16,17 @@ dnl along with the GNU CHARSET Library;
+ dnl write to the Free Software Foundation, Inc., 51 Franklin Street,
+ dnl Fifth Floor, Boston, MA 02110-1301, USA.
+
+-AC_PREREQ(2.13)
++AC_PREREQ(2.61)
++AC_INIT([libcharset],[1.4] )
++AC_CONFIG_SRCDIR([lib/localcharset.c])
+
+-PACKAGE=libcharset
+-VERSION=1.4
+-
+-AC_INIT(lib/localcharset.c)
+ AC_CONFIG_AUX_DIR(build-aux)
+ AC_CONFIG_HEADER(config.h)
+ AC_PROG_MAKE_SET
+-AC_SUBST(PACKAGE)
+-AC_SUBST(VERSION)
++dnl AC_SUBST(PACKAGE)
++dnl AC_SUBST(VERSION)
++
++AC_CONFIG_MACRO_DIR([m4])
+
+ dnl checks for basic programs
+
diff --git a/yocto-poky/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch b/yocto-poky/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch
new file mode 100644
index 000000000..fb07f7366
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch
@@ -0,0 +1,26 @@
+With libtool generating shared and static version of libraries needs -fPIC flags
+without this it will not generate the commands to create shared linked library
+Its more enforced by libtool 2.4. I have not checked it with older libtool
+libiconv 1.11.x is relatively old release and libtool 2.4 did not exist when it
+was released these kind of problem are more likely
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libiconv-1.11.1/lib/Makefile.in
+===================================================================
+--- libiconv-1.11.1.orig/lib/Makefile.in
++++ libiconv-1.11.1/lib/Makefile.in
+@@ -70,9 +70,9 @@ preloadable_libiconv.so : preloadable_li
+
+ preloadable_libiconv_linux.so : $(SOURCES)
+ if test -n "@GCC@"; then \
+- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
++ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -rpath $(libdir) -o libpreload_iconv.la && cp .libs/libpreload_iconv.so preloadable_libiconv_linux.so; \
+ else \
+- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -shared -o preloadable_libiconv_linux.so; \
++ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) -rpath $(libdir) -o libpreload_iconv.la && cp .libs/libpreload_iconv.so preloadable_libiconv_linux.so; \
+ fi
+
+ preloadable_libiconv_solaris.so : $(SOURCES)
diff --git a/yocto-poky/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch b/yocto-poky/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch
new file mode 100644
index 000000000..6af377b4c
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch
@@ -0,0 +1,5008 @@
+This patch is needed to solve issues like
+| iconv.o: In function `main':
+| /home/james/stuff/beagle/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libiconv-1.14-r0/libiconv-1.14/src/./iconv.c:861: undefined reference to `relocate'
+| ../srclib/libicrt.a(progreloc.o): In function `prepare_relocate':
+| /home/james/stuff/beagle/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libiconv-1.14-r0/libiconv-1.14/srclib/progreloc.c:297: undefined reference to `compute_curr_prefix'
+| /home/james/stuff/beagle/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/libiconv-1.14-r0/libiconv-1.14/srclib/progreloc.c:302: undefined reference to `set_relocation_prefix'
+| collect2: ld returned 1 exit status
+| make[1]: *** [install] Error 1
+
+Upstream-Status: Inappropriate [OE config specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+diff -Naurp libiconv-1.14.org//build-aux/arg-nonnull.h libiconv-1.14/build-aux/arg-nonnull.h
+--- libiconv-1.14.org//build-aux/arg-nonnull.h 1969-12-31 16:00:00.000000000 -0800
++++ libiconv-1.14/build-aux/arg-nonnull.h 2012-01-08 02:07:39.930484438 -0800
+@@ -0,0 +1,26 @@
++/* A C macro for declaring that specific arguments must not be NULL.
++ Copyright (C) 2009-2011 Free Software Foundation, Inc.
++
++ 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 3 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/>. */
++
++/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
++ that the values passed as arguments n, ..., m must be non-NULL pointers.
++ n = 1 stands for the first argument, n = 2 for the second argument etc. */
++#ifndef _GL_ARG_NONNULL
++# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
++# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
++# else
++# define _GL_ARG_NONNULL(params)
++# endif
++#endif
+diff -Naurp libiconv-1.14.org//build-aux/c++defs.h libiconv-1.14/build-aux/c++defs.h
+--- libiconv-1.14.org//build-aux/c++defs.h 1969-12-31 16:00:00.000000000 -0800
++++ libiconv-1.14/build-aux/c++defs.h 2012-01-08 02:07:39.942484438 -0800
+@@ -0,0 +1,271 @@
++/* C++ compatible function declaration macros.
++ Copyright (C) 2010-2011 Free Software Foundation, Inc.
++
++ 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 3 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/>. */
++
++#ifndef _GL_CXXDEFS_H
++#define _GL_CXXDEFS_H
++
++/* The three most frequent use cases of these macros are:
++
++ * For providing a substitute for a function that is missing on some
++ platforms, but is declared and works fine on the platforms on which
++ it exists:
++
++ #if @GNULIB_FOO@
++ # if !@HAVE_FOO@
++ _GL_FUNCDECL_SYS (foo, ...);
++ # endif
++ _GL_CXXALIAS_SYS (foo, ...);
++ _GL_CXXALIASWARN (foo);
++ #elif defined GNULIB_POSIXCHECK
++ ...
++ #endif
++
++ * For providing a replacement for a function that exists on all platforms,
++ but is broken/insufficient and needs to be replaced on some platforms:
++
++ #if @GNULIB_FOO@
++ # if @REPLACE_FOO@
++ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
++ # undef foo
++ # define foo rpl_foo
++ # endif
++ _GL_FUNCDECL_RPL (foo, ...);
++ _GL_CXXALIAS_RPL (foo, ...);
++ # else
++ _GL_CXXALIAS_SYS (foo, ...);
++ # endif
++ _GL_CXXALIASWARN (foo);
++ #elif defined GNULIB_POSIXCHECK
++ ...
++ #endif
++
++ * For providing a replacement for a function that exists on some platforms
++ but is broken/insufficient and needs to be replaced on some of them and
++ is additionally either missing or undeclared on some other platforms:
++
++ #if @GNULIB_FOO@
++ # if @REPLACE_FOO@
++ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
++ # undef foo
++ # define foo rpl_foo
++ # endif
++ _GL_FUNCDECL_RPL (foo, ...);
++ _GL_CXXALIAS_RPL (foo, ...);
++ # else
++ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
++ _GL_FUNCDECL_SYS (foo, ...);
++ # endif
++ _GL_CXXALIAS_SYS (foo, ...);
++ # endif
++ _GL_CXXALIASWARN (foo);
++ #elif defined GNULIB_POSIXCHECK
++ ...
++ #endif
++*/
++
++/* _GL_EXTERN_C declaration;
++ performs the declaration with C linkage. */
++#if defined __cplusplus
++# define _GL_EXTERN_C extern "C"
++#else
++# define _GL_EXTERN_C extern
++#endif
++
++/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
++ declares a replacement function, named rpl_func, with the given prototype,
++ consisting of return type, parameters, and attributes.
++ Example:
++ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
++ _GL_ARG_NONNULL ((1)));
++ */
++#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
++ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
++#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
++ _GL_EXTERN_C rettype rpl_func parameters_and_attributes
++
++/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
++ declares the system function, named func, with the given prototype,
++ consisting of return type, parameters, and attributes.
++ Example:
++ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
++ _GL_ARG_NONNULL ((1)));
++ */
++#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
++ _GL_EXTERN_C rettype func parameters_and_attributes
++
++/* _GL_CXXALIAS_RPL (func, rettype, parameters);
++ declares a C++ alias called GNULIB_NAMESPACE::func
++ that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
++ Example:
++ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
++ */
++#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
++ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
++#if defined __cplusplus && defined GNULIB_NAMESPACE
++# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
++ namespace GNULIB_NAMESPACE \
++ { \
++ rettype (*const func) parameters = ::rpl_func; \
++ } \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#else
++# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#endif
++
++/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
++ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
++ except that the C function rpl_func may have a slightly different
++ declaration. A cast is used to silence the "invalid conversion" error
++ that would otherwise occur. */
++#if defined __cplusplus && defined GNULIB_NAMESPACE
++# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
++ namespace GNULIB_NAMESPACE \
++ { \
++ rettype (*const func) parameters = \
++ reinterpret_cast<rettype(*)parameters>(::rpl_func); \
++ } \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#else
++# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#endif
++
++/* _GL_CXXALIAS_SYS (func, rettype, parameters);
++ declares a C++ alias called GNULIB_NAMESPACE::func
++ that redirects to the system provided function func, if GNULIB_NAMESPACE
++ is defined.
++ Example:
++ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
++ */
++#if defined __cplusplus && defined GNULIB_NAMESPACE
++ /* If we were to write
++ rettype (*const func) parameters = ::func;
++ like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
++ better (remove an indirection through a 'static' pointer variable),
++ but then the _GL_CXXALIASWARN macro below would cause a warning not only
++ for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
++# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
++ namespace GNULIB_NAMESPACE \
++ { \
++ static rettype (*func) parameters = ::func; \
++ } \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#else
++# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#endif
++
++/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
++ is like _GL_CXXALIAS_SYS (func, rettype, parameters);
++ except that the C function func may have a slightly different declaration.
++ A cast is used to silence the "invalid conversion" error that would
++ otherwise occur. */
++#if defined __cplusplus && defined GNULIB_NAMESPACE
++# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
++ namespace GNULIB_NAMESPACE \
++ { \
++ static rettype (*func) parameters = \
++ reinterpret_cast<rettype(*)parameters>(::func); \
++ } \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#else
++# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#endif
++
++/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
++ is like _GL_CXXALIAS_SYS (func, rettype, parameters);
++ except that the C function is picked among a set of overloaded functions,
++ namely the one with rettype2 and parameters2. Two consecutive casts
++ are used to silence the "cannot find a match" and "invalid conversion"
++ errors that would otherwise occur. */
++#if defined __cplusplus && defined GNULIB_NAMESPACE
++ /* The outer cast must be a reinterpret_cast.
++ The inner cast: When the function is defined as a set of overloaded
++ functions, it works as a static_cast<>, choosing the designated variant.
++ When the function is defined as a single variant, it works as a
++ reinterpret_cast<>. The parenthesized cast syntax works both ways. */
++# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
++ namespace GNULIB_NAMESPACE \
++ { \
++ static rettype (*func) parameters = \
++ reinterpret_cast<rettype(*)parameters>( \
++ (rettype2(*)parameters2)(::func)); \
++ } \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#else
++# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#endif
++
++/* _GL_CXXALIASWARN (func);
++ causes a warning to be emitted when ::func is used but not when
++ GNULIB_NAMESPACE::func is used. func must be defined without overloaded
++ variants. */
++#if defined __cplusplus && defined GNULIB_NAMESPACE
++# define _GL_CXXALIASWARN(func) \
++ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
++# define _GL_CXXALIASWARN_1(func,namespace) \
++ _GL_CXXALIASWARN_2 (func, namespace)
++/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
++ we enable the warning only when not optimizing. */
++# if !__OPTIMIZE__
++# define _GL_CXXALIASWARN_2(func,namespace) \
++ _GL_WARN_ON_USE (func, \
++ "The symbol ::" #func " refers to the system function. " \
++ "Use " #namespace "::" #func " instead.")
++# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
++# define _GL_CXXALIASWARN_2(func,namespace) \
++ extern __typeof__ (func) func
++# else
++# define _GL_CXXALIASWARN_2(func,namespace) \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++# endif
++#else
++# define _GL_CXXALIASWARN(func) \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#endif
++
++/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
++ causes a warning to be emitted when the given overloaded variant of ::func
++ is used but not when GNULIB_NAMESPACE::func is used. */
++#if defined __cplusplus && defined GNULIB_NAMESPACE
++# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
++ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
++ GNULIB_NAMESPACE)
++# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
++ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
++/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
++ we enable the warning only when not optimizing. */
++# if !__OPTIMIZE__
++# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
++ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
++ "The symbol ::" #func " refers to the system function. " \
++ "Use " #namespace "::" #func " instead.")
++# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
++# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
++ extern __typeof__ (func) func
++# else
++# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++# endif
++#else
++# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
++ _GL_EXTERN_C int _gl_cxxalias_dummy
++#endif
++
++#endif /* _GL_CXXDEFS_H */
+diff -Naurp libiconv-1.14.org//build-aux/snippet/arg-nonnull.h libiconv-1.14/build-aux/snippet/arg-nonnull.h
+--- libiconv-1.14.org//build-aux/snippet/arg-nonnull.h 2011-08-07 06:22:07.000000000 -0700
++++ libiconv-1.14/build-aux/snippet/arg-nonnull.h 1969-12-31 16:00:00.000000000 -0800
+@@ -1,26 +0,0 @@
+-/* A C macro for declaring that specific arguments must not be NULL.
+- Copyright (C) 2009-2011 Free Software Foundation, Inc.
+-
+- 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 3 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/>. */
+-
+-/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
+- that the values passed as arguments n, ..., m must be non-NULL pointers.
+- n = 1 stands for the first argument, n = 2 for the second argument etc. */
+-#ifndef _GL_ARG_NONNULL
+-# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+-# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
+-# else
+-# define _GL_ARG_NONNULL(params)
+-# endif
+-#endif
+diff -Naurp libiconv-1.14.org//build-aux/snippet/c++defs.h libiconv-1.14/build-aux/snippet/c++defs.h
+--- libiconv-1.14.org//build-aux/snippet/c++defs.h 2011-08-07 06:22:07.000000000 -0700
++++ libiconv-1.14/build-aux/snippet/c++defs.h 1969-12-31 16:00:00.000000000 -0800
+@@ -1,271 +0,0 @@
+-/* C++ compatible function declaration macros.
+- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+-
+- 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 3 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/>. */
+-
+-#ifndef _GL_CXXDEFS_H
+-#define _GL_CXXDEFS_H
+-
+-/* The three most frequent use cases of these macros are:
+-
+- * For providing a substitute for a function that is missing on some
+- platforms, but is declared and works fine on the platforms on which
+- it exists:
+-
+- #if @GNULIB_FOO@
+- # if !@HAVE_FOO@
+- _GL_FUNCDECL_SYS (foo, ...);
+- # endif
+- _GL_CXXALIAS_SYS (foo, ...);
+- _GL_CXXALIASWARN (foo);
+- #elif defined GNULIB_POSIXCHECK
+- ...
+- #endif
+-
+- * For providing a replacement for a function that exists on all platforms,
+- but is broken/insufficient and needs to be replaced on some platforms:
+-
+- #if @GNULIB_FOO@
+- # if @REPLACE_FOO@
+- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+- # undef foo
+- # define foo rpl_foo
+- # endif
+- _GL_FUNCDECL_RPL (foo, ...);
+- _GL_CXXALIAS_RPL (foo, ...);
+- # else
+- _GL_CXXALIAS_SYS (foo, ...);
+- # endif
+- _GL_CXXALIASWARN (foo);
+- #elif defined GNULIB_POSIXCHECK
+- ...
+- #endif
+-
+- * For providing a replacement for a function that exists on some platforms
+- but is broken/insufficient and needs to be replaced on some of them and
+- is additionally either missing or undeclared on some other platforms:
+-
+- #if @GNULIB_FOO@
+- # if @REPLACE_FOO@
+- # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+- # undef foo
+- # define foo rpl_foo
+- # endif
+- _GL_FUNCDECL_RPL (foo, ...);
+- _GL_CXXALIAS_RPL (foo, ...);
+- # else
+- # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
+- _GL_FUNCDECL_SYS (foo, ...);
+- # endif
+- _GL_CXXALIAS_SYS (foo, ...);
+- # endif
+- _GL_CXXALIASWARN (foo);
+- #elif defined GNULIB_POSIXCHECK
+- ...
+- #endif
+-*/
+-
+-/* _GL_EXTERN_C declaration;
+- performs the declaration with C linkage. */
+-#if defined __cplusplus
+-# define _GL_EXTERN_C extern "C"
+-#else
+-# define _GL_EXTERN_C extern
+-#endif
+-
+-/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
+- declares a replacement function, named rpl_func, with the given prototype,
+- consisting of return type, parameters, and attributes.
+- Example:
+- _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
+- _GL_ARG_NONNULL ((1)));
+- */
+-#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
+- _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
+-#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
+- _GL_EXTERN_C rettype rpl_func parameters_and_attributes
+-
+-/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
+- declares the system function, named func, with the given prototype,
+- consisting of return type, parameters, and attributes.
+- Example:
+- _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
+- _GL_ARG_NONNULL ((1)));
+- */
+-#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
+- _GL_EXTERN_C rettype func parameters_and_attributes
+-
+-/* _GL_CXXALIAS_RPL (func, rettype, parameters);
+- declares a C++ alias called GNULIB_NAMESPACE::func
+- that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
+- Example:
+- _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
+- */
+-#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
+- _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
+-#if defined __cplusplus && defined GNULIB_NAMESPACE
+-# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
+- namespace GNULIB_NAMESPACE \
+- { \
+- rettype (*const func) parameters = ::rpl_func; \
+- } \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#else
+-# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#endif
+-
+-/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
+- is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
+- except that the C function rpl_func may have a slightly different
+- declaration. A cast is used to silence the "invalid conversion" error
+- that would otherwise occur. */
+-#if defined __cplusplus && defined GNULIB_NAMESPACE
+-# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
+- namespace GNULIB_NAMESPACE \
+- { \
+- rettype (*const func) parameters = \
+- reinterpret_cast<rettype(*)parameters>(::rpl_func); \
+- } \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#else
+-# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#endif
+-
+-/* _GL_CXXALIAS_SYS (func, rettype, parameters);
+- declares a C++ alias called GNULIB_NAMESPACE::func
+- that redirects to the system provided function func, if GNULIB_NAMESPACE
+- is defined.
+- Example:
+- _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
+- */
+-#if defined __cplusplus && defined GNULIB_NAMESPACE
+- /* If we were to write
+- rettype (*const func) parameters = ::func;
+- like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
+- better (remove an indirection through a 'static' pointer variable),
+- but then the _GL_CXXALIASWARN macro below would cause a warning not only
+- for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
+-# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+- namespace GNULIB_NAMESPACE \
+- { \
+- static rettype (*func) parameters = ::func; \
+- } \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#else
+-# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#endif
+-
+-/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
+- is like _GL_CXXALIAS_SYS (func, rettype, parameters);
+- except that the C function func may have a slightly different declaration.
+- A cast is used to silence the "invalid conversion" error that would
+- otherwise occur. */
+-#if defined __cplusplus && defined GNULIB_NAMESPACE
+-# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
+- namespace GNULIB_NAMESPACE \
+- { \
+- static rettype (*func) parameters = \
+- reinterpret_cast<rettype(*)parameters>(::func); \
+- } \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#else
+-# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#endif
+-
+-/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
+- is like _GL_CXXALIAS_SYS (func, rettype, parameters);
+- except that the C function is picked among a set of overloaded functions,
+- namely the one with rettype2 and parameters2. Two consecutive casts
+- are used to silence the "cannot find a match" and "invalid conversion"
+- errors that would otherwise occur. */
+-#if defined __cplusplus && defined GNULIB_NAMESPACE
+- /* The outer cast must be a reinterpret_cast.
+- The inner cast: When the function is defined as a set of overloaded
+- functions, it works as a static_cast<>, choosing the designated variant.
+- When the function is defined as a single variant, it works as a
+- reinterpret_cast<>. The parenthesized cast syntax works both ways. */
+-# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
+- namespace GNULIB_NAMESPACE \
+- { \
+- static rettype (*func) parameters = \
+- reinterpret_cast<rettype(*)parameters>( \
+- (rettype2(*)parameters2)(::func)); \
+- } \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#else
+-# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#endif
+-
+-/* _GL_CXXALIASWARN (func);
+- causes a warning to be emitted when ::func is used but not when
+- GNULIB_NAMESPACE::func is used. func must be defined without overloaded
+- variants. */
+-#if defined __cplusplus && defined GNULIB_NAMESPACE
+-# define _GL_CXXALIASWARN(func) \
+- _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
+-# define _GL_CXXALIASWARN_1(func,namespace) \
+- _GL_CXXALIASWARN_2 (func, namespace)
+-/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
+- we enable the warning only when not optimizing. */
+-# if !__OPTIMIZE__
+-# define _GL_CXXALIASWARN_2(func,namespace) \
+- _GL_WARN_ON_USE (func, \
+- "The symbol ::" #func " refers to the system function. " \
+- "Use " #namespace "::" #func " instead.")
+-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+-# define _GL_CXXALIASWARN_2(func,namespace) \
+- extern __typeof__ (func) func
+-# else
+-# define _GL_CXXALIASWARN_2(func,namespace) \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-# endif
+-#else
+-# define _GL_CXXALIASWARN(func) \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#endif
+-
+-/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
+- causes a warning to be emitted when the given overloaded variant of ::func
+- is used but not when GNULIB_NAMESPACE::func is used. */
+-#if defined __cplusplus && defined GNULIB_NAMESPACE
+-# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
+- _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
+- GNULIB_NAMESPACE)
+-# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
+- _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
+-/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
+- we enable the warning only when not optimizing. */
+-# if !__OPTIMIZE__
+-# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+- _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
+- "The symbol ::" #func " refers to the system function. " \
+- "Use " #namespace "::" #func " instead.")
+-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+-# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+- extern __typeof__ (func) func
+-# else
+-# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-# endif
+-#else
+-# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
+- _GL_EXTERN_C int _gl_cxxalias_dummy
+-#endif
+-
+-#endif /* _GL_CXXDEFS_H */
+diff -Naurp libiconv-1.14.org//build-aux/snippet/_Noreturn.h libiconv-1.14/build-aux/snippet/_Noreturn.h
+--- libiconv-1.14.org//build-aux/snippet/_Noreturn.h 2011-08-07 06:22:07.000000000 -0700
++++ libiconv-1.14/build-aux/snippet/_Noreturn.h 1969-12-31 16:00:00.000000000 -0800
+@@ -1,10 +0,0 @@
+-#ifndef _Noreturn
+-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+- || 0x5110 <= __SUNPRO_C)
+-# define _Noreturn __attribute__ ((__noreturn__))
+-# elif 1200 <= _MSC_VER
+-# define _Noreturn __declspec (noreturn)
+-# else
+-# define _Noreturn
+-# endif
+-#endif
+diff -Naurp libiconv-1.14.org//build-aux/snippet/warn-on-use.h libiconv-1.14/build-aux/snippet/warn-on-use.h
+--- libiconv-1.14.org//build-aux/snippet/warn-on-use.h 2011-08-07 06:22:07.000000000 -0700
++++ libiconv-1.14/build-aux/snippet/warn-on-use.h 1969-12-31 16:00:00.000000000 -0800
+@@ -1,109 +0,0 @@
+-/* A C macro for emitting warnings if a function is used.
+- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+-
+- 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 3 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/>. */
+-
+-/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
+- for FUNCTION which will then trigger a compiler warning containing
+- the text of "literal string" anywhere that function is called, if
+- supported by the compiler. If the compiler does not support this
+- feature, the macro expands to an unused extern declaration.
+-
+- This macro is useful for marking a function as a potential
+- portability trap, with the intent that "literal string" include
+- instructions on the replacement function that should be used
+- instead. However, one of the reasons that a function is a
+- portability trap is if it has the wrong signature. Declaring
+- FUNCTION with a different signature in C is a compilation error, so
+- this macro must use the same type as any existing declaration so
+- that programs that avoid the problematic FUNCTION do not fail to
+- compile merely because they included a header that poisoned the
+- function. But this implies that _GL_WARN_ON_USE is only safe to
+- use if FUNCTION is known to already have a declaration. Use of
+- this macro implies that there must not be any other macro hiding
+- the declaration of FUNCTION; but undefining FUNCTION first is part
+- of the poisoning process anyway (although for symbols that are
+- provided only via a macro, the result is a compilation error rather
+- than a warning containing "literal string"). Also note that in
+- C++, it is only safe to use if FUNCTION has no overloads.
+-
+- For an example, it is possible to poison 'getline' by:
+- - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
+- [getline]) in configure.ac, which potentially defines
+- HAVE_RAW_DECL_GETLINE
+- - adding this code to a header that wraps the system <stdio.h>:
+- #undef getline
+- #if HAVE_RAW_DECL_GETLINE
+- _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
+- "not universally present; use the gnulib module getline");
+- #endif
+-
+- It is not possible to directly poison global variables. But it is
+- possible to write a wrapper accessor function, and poison that
+- (less common usage, like &environ, will cause a compilation error
+- rather than issue the nice warning, but the end result of informing
+- the developer about their portability problem is still achieved):
+- #if HAVE_RAW_DECL_ENVIRON
+- static inline char ***rpl_environ (void) { return &environ; }
+- _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
+- # undef environ
+- # define environ (*rpl_environ ())
+- #endif
+- */
+-#ifndef _GL_WARN_ON_USE
+-
+-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+-/* A compiler attribute is available in gcc versions 4.3.0 and later. */
+-# define _GL_WARN_ON_USE(function, message) \
+-extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
+-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+-/* Verify the existence of the function. */
+-# define _GL_WARN_ON_USE(function, message) \
+-extern __typeof__ (function) function
+-# else /* Unsupported. */
+-# define _GL_WARN_ON_USE(function, message) \
+-_GL_WARN_EXTERN_C int _gl_warn_on_use
+-# endif
+-#endif
+-
+-/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
+- is like _GL_WARN_ON_USE (function, "string"), except that the function is
+- declared with the given prototype, consisting of return type, parameters,
+- and attributes.
+- This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
+- not work in this case. */
+-#ifndef _GL_WARN_ON_USE_CXX
+-# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+-# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+-extern rettype function parameters_and_attributes \
+- __attribute__ ((__warning__ (msg)))
+-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+-/* Verify the existence of the function. */
+-# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+-extern rettype function parameters_and_attributes
+-# else /* Unsupported. */
+-# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+-_GL_WARN_EXTERN_C int _gl_warn_on_use
+-# endif
+-#endif
+-
+-/* _GL_WARN_EXTERN_C declaration;
+- performs the declaration with C linkage. */
+-#ifndef _GL_WARN_EXTERN_C
+-# if defined __cplusplus
+-# define _GL_WARN_EXTERN_C extern "C"
+-# else
+-# define _GL_WARN_EXTERN_C extern
+-# endif
+-#endif
+diff -Naurp libiconv-1.14.org//build-aux/warn-on-use.h libiconv-1.14/build-aux/warn-on-use.h
+--- libiconv-1.14.org//build-aux/warn-on-use.h 1969-12-31 16:00:00.000000000 -0800
++++ libiconv-1.14/build-aux/warn-on-use.h 2012-01-08 02:07:39.950484439 -0800
+@@ -0,0 +1,109 @@
++/* A C macro for emitting warnings if a function is used.
++ Copyright (C) 2010-2011 Free Software Foundation, Inc.
++
++ 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 3 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/>. */
++
++/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
++ for FUNCTION which will then trigger a compiler warning containing
++ the text of "literal string" anywhere that function is called, if
++ supported by the compiler. If the compiler does not support this
++ feature, the macro expands to an unused extern declaration.
++
++ This macro is useful for marking a function as a potential
++ portability trap, with the intent that "literal string" include
++ instructions on the replacement function that should be used
++ instead. However, one of the reasons that a function is a
++ portability trap is if it has the wrong signature. Declaring
++ FUNCTION with a different signature in C is a compilation error, so
++ this macro must use the same type as any existing declaration so
++ that programs that avoid the problematic FUNCTION do not fail to
++ compile merely because they included a header that poisoned the
++ function. But this implies that _GL_WARN_ON_USE is only safe to
++ use if FUNCTION is known to already have a declaration. Use of
++ this macro implies that there must not be any other macro hiding
++ the declaration of FUNCTION; but undefining FUNCTION first is part
++ of the poisoning process anyway (although for symbols that are
++ provided only via a macro, the result is a compilation error rather
++ than a warning containing "literal string"). Also note that in
++ C++, it is only safe to use if FUNCTION has no overloads.
++
++ For an example, it is possible to poison 'getline' by:
++ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
++ [getline]) in configure.ac, which potentially defines
++ HAVE_RAW_DECL_GETLINE
++ - adding this code to a header that wraps the system <stdio.h>:
++ #undef getline
++ #if HAVE_RAW_DECL_GETLINE
++ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
++ "not universally present; use the gnulib module getline");
++ #endif
++
++ It is not possible to directly poison global variables. But it is
++ possible to write a wrapper accessor function, and poison that
++ (less common usage, like &environ, will cause a compilation error
++ rather than issue the nice warning, but the end result of informing
++ the developer about their portability problem is still achieved):
++ #if HAVE_RAW_DECL_ENVIRON
++ static inline char ***rpl_environ (void) { return &environ; }
++ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
++ # undef environ
++ # define environ (*rpl_environ ())
++ #endif
++ */
++#ifndef _GL_WARN_ON_USE
++
++# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
++/* A compiler attribute is available in gcc versions 4.3.0 and later. */
++# define _GL_WARN_ON_USE(function, message) \
++extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
++# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
++/* Verify the existence of the function. */
++# define _GL_WARN_ON_USE(function, message) \
++extern __typeof__ (function) function
++# else /* Unsupported. */
++# define _GL_WARN_ON_USE(function, message) \
++_GL_WARN_EXTERN_C int _gl_warn_on_use
++# endif
++#endif
++
++/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
++ is like _GL_WARN_ON_USE (function, "string"), except that the function is
++ declared with the given prototype, consisting of return type, parameters,
++ and attributes.
++ This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
++ not work in this case. */
++#ifndef _GL_WARN_ON_USE_CXX
++# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
++# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
++extern rettype function parameters_and_attributes \
++ __attribute__ ((__warning__ (msg)))
++# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
++/* Verify the existence of the function. */
++# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
++extern rettype function parameters_and_attributes
++# else /* Unsupported. */
++# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
++_GL_WARN_EXTERN_C int _gl_warn_on_use
++# endif
++#endif
++
++/* _GL_WARN_EXTERN_C declaration;
++ performs the declaration with C linkage. */
++#ifndef _GL_WARN_EXTERN_C
++# if defined __cplusplus
++# define _GL_WARN_EXTERN_C extern "C"
++# else
++# define _GL_WARN_EXTERN_C extern
++# endif
++#endif
+diff -Naurp libiconv-1.14.org//srclib/allocator.h libiconv-1.14/srclib/allocator.h
+--- libiconv-1.14.org//srclib/allocator.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/allocator.h 2012-01-08 02:07:40.050484444 -0800
+@@ -45,11 +45,10 @@ struct allocator
+ /* Call FREE to free memory, like 'free'. */
+ void (*free) (void *);
+
+- /* If nonnull, call DIE (SIZE) if MALLOC (SIZE) or REALLOC (...,
+- SIZE) fails. DIE should not return. SIZE should equal SIZE_MAX
+- if size_t overflow was detected while calculating sizes to be
+- passed to MALLOC or REALLOC. */
+- void (*die) (size_t);
++ /* If nonnull, call DIE if MALLOC or REALLOC fails. DIE should not
++ return. DIE can be used by code that detects memory overflow
++ while calculating sizes to be passed to MALLOC or REALLOC. */
++ void (*die) (void);
+ };
+
+ /* An allocator using the stdlib functions and a null DIE function. */
+diff -Naurp libiconv-1.14.org//srclib/canonicalize-lgpl.c libiconv-1.14/srclib/canonicalize-lgpl.c
+--- libiconv-1.14.org//srclib/canonicalize-lgpl.c 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/canonicalize-lgpl.c 2012-01-08 02:07:40.094484446 -0800
+@@ -125,7 +125,7 @@ __realpath (const char *name, char *reso
+ #else
+ path_max = pathconf (name, _PC_PATH_MAX);
+ if (path_max <= 0)
+- path_max = 8192;
++ path_max = 1024;
+ #endif
+
+ if (resolved == NULL)
+diff -Naurp libiconv-1.14.org//srclib/careadlinkat.c libiconv-1.14/srclib/careadlinkat.c
+--- libiconv-1.14.org//srclib/careadlinkat.c 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/careadlinkat.c 2012-01-08 02:07:40.102484445 -0800
+@@ -133,7 +133,6 @@ careadlinkat (int fd, char const *filena
+ if (buf == stack_buf)
+ {
+ char *b = (char *) alloc->allocate (link_size);
+- buf_size = link_size;
+ if (! b)
+ break;
+ memcpy (b, buf, link_size);
+@@ -157,11 +156,6 @@ careadlinkat (int fd, char const *filena
+ buf_size *= 2;
+ else if (buf_size < buf_size_max)
+ buf_size = buf_size_max;
+- else if (buf_size_max < SIZE_MAX)
+- {
+- errno = ENAMETOOLONG;
+- return NULL;
+- }
+ else
+ break;
+ buf = (char *) alloc->allocate (buf_size);
+@@ -169,7 +163,7 @@ careadlinkat (int fd, char const *filena
+ while (buf);
+
+ if (alloc->die)
+- alloc->die (buf_size);
++ alloc->die ();
+ errno = ENOMEM;
+ return NULL;
+ }
+diff -Naurp libiconv-1.14.org//srclib/errno.in.h libiconv-1.14/srclib/errno.in.h
+--- libiconv-1.14.org//srclib/errno.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/errno.in.h 2012-01-08 02:07:40.122484446 -0800
+@@ -16,7 +16,7 @@
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+-#ifndef _@GUARD_PREFIX@_ERRNO_H
++#ifndef _GL_ERRNO_H
+
+ #if __GNUC__ >= 3
+ @PRAGMA_SYSTEM_HEADER@
+@@ -26,8 +26,8 @@
+ /* The include_next requires a split double-inclusion guard. */
+ #@INCLUDE_NEXT@ @NEXT_ERRNO_H@
+
+-#ifndef _@GUARD_PREFIX@_ERRNO_H
+-#define _@GUARD_PREFIX@_ERRNO_H
++#ifndef _GL_ERRNO_H
++#define _GL_ERRNO_H
+
+
+ /* On native Windows platforms, many macros are not defined. */
+@@ -147,16 +147,6 @@
+ # define GNULIB_defined_ENOTSUP 1
+ # endif
+
+-# ifndef ENETRESET
+-# define ENETRESET 2011
+-# define GNULIB_defined_ENETRESET 1
+-# endif
+-
+-# ifndef ECONNABORTED
+-# define ECONNABORTED 2012
+-# define GNULIB_defined_ECONNABORTED 1
+-# endif
+-
+ # ifndef ESTALE
+ # define ESTALE 2009
+ # define GNULIB_defined_ESTALE 1
+@@ -173,5 +163,5 @@
+ # endif
+
+
+-#endif /* _@GUARD_PREFIX@_ERRNO_H */
+-#endif /* _@GUARD_PREFIX@_ERRNO_H */
++#endif /* _GL_ERRNO_H */
++#endif /* _GL_ERRNO_H */
+diff -Naurp libiconv-1.14.org//srclib/error.c libiconv-1.14/srclib/error.c
+--- libiconv-1.14.org//srclib/error.c 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/error.c 2012-01-08 02:07:40.134484448 -0800
+@@ -97,15 +97,11 @@ extern void __error_at_line (int status,
+ /* The gnulib override of fcntl is not needed in this file. */
+ # undef fcntl
+
+-# if !HAVE_DECL_STRERROR_R
++# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
+ # ifndef HAVE_DECL_STRERROR_R
+ "this configure-time declaration test was not run"
+ # endif
+-# if STRERROR_R_CHAR_P
+ char *strerror_r ();
+-# else
+-int strerror_r ();
+-# endif
+ # endif
+
+ /* The calling program should define program_name and set it to the
+diff -Naurp libiconv-1.14.org//srclib/fcntl.in.h libiconv-1.14/srclib/fcntl.in.h
+--- libiconv-1.14.org//srclib/fcntl.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/fcntl.in.h 2012-01-08 02:07:40.154484449 -0800
+@@ -40,7 +40,7 @@
+ #else
+ /* Normal invocation convention. */
+
+-#ifndef _@GUARD_PREFIX@_FCNTL_H
++#ifndef _GL_FCNTL_H
+
+ #include <sys/types.h>
+ /* On some systems other than glibc, <sys/stat.h> is a prerequisite of
+@@ -55,8 +55,8 @@
+ /* The include_next requires a split double-inclusion guard. */
+ #@INCLUDE_NEXT@ @NEXT_FCNTL_H@
+
+-#ifndef _@GUARD_PREFIX@_FCNTL_H
+-#define _@GUARD_PREFIX@_FCNTL_H
++#ifndef _GL_FCNTL_H
++#define _GL_FCNTL_H
+
+ #ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
+ # include <unistd.h>
+@@ -320,6 +320,6 @@ _GL_WARN_ON_USE (openat, "openat is not
+ #endif
+
+
+-#endif /* _@GUARD_PREFIX@_FCNTL_H */
+-#endif /* _@GUARD_PREFIX@_FCNTL_H */
++#endif /* _GL_FCNTL_H */
++#endif /* _GL_FCNTL_H */
+ #endif
+diff -Naurp libiconv-1.14.org//srclib/intprops.h libiconv-1.14/srclib/intprops.h
+--- libiconv-1.14.org//srclib/intprops.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/intprops.h 2012-01-08 02:07:40.174484450 -0800
+@@ -22,13 +22,14 @@
+
+ #include <limits.h>
+
+-/* Return an integer value, converted to the same type as the integer
+- expression E after integer type promotion. V is the unconverted value. */
+-#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
++/* Return a integer value, converted to the same type as the integer
++ expression E after integer type promotion. V is the unconverted value.
++ E should not have side effects. */
++#define _GL_INT_CONVERT(e, v) ((e) - (e) + (v))
+
+ /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
+-#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
++#define _GL_INT_NEGATE_CONVERT(e, v) ((e) - (e) - (v))
+
+ /* The extra casts in the following macros work around compiler bugs,
+ e.g., in Cray C 5.0.3.0. */
+@@ -52,7 +53,7 @@
+ #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+ /* Return 1 if the integer expression E, after integer promotion, has
+- a signed type. */
++ a signed type. E should not have side effects. */
+ #define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+
+
+@@ -310,10 +311,13 @@
+ /* Return 1 if the expression A <op> B would overflow,
+ where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
+ assuming MIN and MAX are the minimum and maximum for the result type.
+- Arguments should be free of side effects. */
++
++ This macro assumes that A | B is a valid integer if both A and B are,
++ which is true of all known practical hosts. If this is a problem
++ for you, please let us know how to fix it for your host. */
+ #define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \
+ op_result_overflow (a, b, \
+- _GL_INT_MINIMUM (0 * (b) + (a)), \
+- _GL_INT_MAXIMUM (0 * (b) + (a)))
++ _GL_INT_MINIMUM ((a) | (b)), \
++ _GL_INT_MAXIMUM ((a) | (b)))
+
+ #endif /* _GL_INTPROPS_H */
+diff -Naurp libiconv-1.14.org//srclib/Makefile.gnulib libiconv-1.14/srclib/Makefile.gnulib
+--- libiconv-1.14.org//srclib/Makefile.gnulib 2012-01-08 02:05:18.754477606 -0800
++++ libiconv-1.14/srclib/Makefile.gnulib 2012-01-08 02:07:43.138484592 -0800
+@@ -9,7 +9,7 @@
+ # the same distribution terms as the rest of that program.
+ #
+ # Generated by gnulib-tool.
+-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
++# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
+
+
+ MOSTLYCLEANFILES += core *.stackdump
+@@ -60,12 +60,60 @@ EXTRA_DIST += areadlink.h
+
+ ## end gnulib module areadlink
+
++## begin gnulib module arg-nonnull
++
++# The BUILT_SOURCES created by this Makefile snippet are not used via #include
++# statements but through direct file reference. Therefore this snippet must be
++# present in all Makefile.am that need it. This is ensured by the applicability
++# 'all' defined above.
++
++BUILT_SOURCES += arg-nonnull.h
++# The arg-nonnull.h that gets inserted into generated .h files is the same as
++# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
++arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
++ $(AM_V_GEN)rm -f $@-t $@ && \
++ sed -n -e '/GL_ARG_NONNULL/,$$p' \
++ < $(top_srcdir)/build-aux/arg-nonnull.h \
++ > $@-t && \
++ mv $@-t $@
++MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
++
++ARG_NONNULL_H=arg-nonnull.h
++
++EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
++
++## end gnulib module arg-nonnull
++
+ ## begin gnulib module binary-io
+
+ libicrt_a_SOURCES += binary-io.h
+
+ ## end gnulib module binary-io
+
++## begin gnulib module c++defs
++
++# The BUILT_SOURCES created by this Makefile snippet are not used via #include
++# statements but through direct file reference. Therefore this snippet must be
++# present in all Makefile.am that need it. This is ensured by the applicability
++# 'all' defined above.
++
++BUILT_SOURCES += c++defs.h
++# The c++defs.h that gets inserted into generated .h files is the same as
++# build-aux/c++defs.h, except that it has the copyright header cut off.
++c++defs.h: $(top_srcdir)/build-aux/c++defs.h
++ $(AM_V_GEN)rm -f $@-t $@ && \
++ sed -n -e '/_GL_CXXDEFS/,$$p' \
++ < $(top_srcdir)/build-aux/c++defs.h \
++ > $@-t && \
++ mv $@-t $@
++MOSTLYCLEANFILES += c++defs.h c++defs.h-t
++
++CXXDEFS_H=c++defs.h
++
++EXTRA_DIST += $(top_srcdir)/build-aux/c++defs.h
++
++## end gnulib module c++defs
++
+ ## begin gnulib module canonicalize-lgpl
+
+
+@@ -100,8 +148,7 @@ if GL_GENERATE_ERRNO_H
+ errno.h: errno.in.h $(top_builddir)/config.status
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
++ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+@@ -142,15 +189,14 @@ BUILT_SOURCES += fcntl.h
+ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
++ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
+- -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \
+- -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \
+- -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \
+- -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \
++ -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
++ -e 's|@''GNULIB_NONBLOCKING''@|$(GNULIB_NONBLOCKING)|g' \
++ -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
++ -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
+ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
+ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
+ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
+@@ -297,7 +343,7 @@ EXTRA_DIST += $(top_srcdir)/build-aux/co
+ ## begin gnulib module relocatable-prog-wrapper
+
+
+-EXTRA_DIST += allocator.c allocator.h areadlink.c areadlink.h c-ctype.c c-ctype.h canonicalize-lgpl.c careadlinkat.c careadlinkat.h malloca.c malloca.h progname.c progname.h progreloc.c readlink.c relocatable.c relocatable.h relocwrapper.c setenv.c
++EXTRA_DIST += allocator.c allocator.h areadlink.c areadlink.h c-ctype.c c-ctype.h canonicalize-lgpl.c careadlinkat.c careadlinkat.h malloca.c malloca.h progname.c progname.h progreloc.c readlink.c relocatable.c relocatable.h relocwrapper.c setenv.c strerror.c
+
+ EXTRA_DIST += $(top_srcdir)/build-aux/install-reloc
+
+@@ -305,9 +351,10 @@ EXTRA_DIST += $(top_srcdir)/build-aux/in
+
+ ## begin gnulib module safe-read
+
+-libicrt_a_SOURCES += safe-read.c
+
+-EXTRA_DIST += safe-read.h
++EXTRA_DIST += safe-read.c safe-read.h
++
++EXTRA_libicrt_a_SOURCES += safe-read.c
+
+ ## end gnulib module safe-read
+
+@@ -320,24 +367,20 @@ BUILT_SOURCES += signal.h
+ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
++ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
+- -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
+- -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
+- -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
+- -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
++ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \
++ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \
++ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \
+ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+- -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
+ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
+ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
+ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
+ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
+- -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+@@ -368,87 +411,6 @@ EXTRA_libicrt_a_SOURCES += sigprocmask.c
+
+ ## end gnulib module sigprocmask
+
+-## begin gnulib module snippet/_Noreturn
+-
+-# Because this Makefile snippet defines a variable used by other
+-# gnulib Makefile snippets, it must be present in all Makefile.am that
+-# need it. This is ensured by the applicability 'all' defined above.
+-
+-_NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h
+-
+-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/_Noreturn.h
+-
+-## end gnulib module snippet/_Noreturn
+-
+-## begin gnulib module snippet/arg-nonnull
+-
+-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+-# statements but through direct file reference. Therefore this snippet must be
+-# present in all Makefile.am that need it. This is ensured by the applicability
+-# 'all' defined above.
+-
+-BUILT_SOURCES += arg-nonnull.h
+-# The arg-nonnull.h that gets inserted into generated .h files is the same as
+-# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
+-# off.
+-arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+- $(AM_V_GEN)rm -f $@-t $@ && \
+- sed -n -e '/GL_ARG_NONNULL/,$$p' \
+- < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
+- > $@-t && \
+- mv $@-t $@
+-MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+-
+-ARG_NONNULL_H=arg-nonnull.h
+-
+-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/arg-nonnull.h
+-
+-## end gnulib module snippet/arg-nonnull
+-
+-## begin gnulib module snippet/c++defs
+-
+-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+-# statements but through direct file reference. Therefore this snippet must be
+-# present in all Makefile.am that need it. This is ensured by the applicability
+-# 'all' defined above.
+-
+-BUILT_SOURCES += c++defs.h
+-# The c++defs.h that gets inserted into generated .h files is the same as
+-# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
+-c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
+- $(AM_V_GEN)rm -f $@-t $@ && \
+- sed -n -e '/_GL_CXXDEFS/,$$p' \
+- < $(top_srcdir)/build-aux/snippet/c++defs.h \
+- > $@-t && \
+- mv $@-t $@
+-MOSTLYCLEANFILES += c++defs.h c++defs.h-t
+-
+-CXXDEFS_H=c++defs.h
+-
+-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/c++defs.h
+-
+-## end gnulib module snippet/c++defs
+-
+-## begin gnulib module snippet/warn-on-use
+-
+-BUILT_SOURCES += warn-on-use.h
+-# The warn-on-use.h that gets inserted into generated .h files is the same as
+-# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
+-# off.
+-warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
+- $(AM_V_GEN)rm -f $@-t $@ && \
+- sed -n -e '/^.ifndef/,$$p' \
+- < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
+- > $@-t && \
+- mv $@-t $@
+-MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+-
+-WARN_ON_USE_H=warn-on-use.h
+-
+-EXTRA_DIST += $(top_srcdir)/build-aux/snippet/warn-on-use.h
+-
+-## end gnulib module snippet/warn-on-use
+-
+ ## begin gnulib module stat
+
+
+@@ -491,8 +453,7 @@ if GL_GENERATE_STDDEF_H
+ stddef.h: stddef.in.h $(top_builddir)/config.status
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
++ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+@@ -521,8 +482,7 @@ if GL_GENERATE_STDINT_H
+ stdint.h: stdint.in.h $(top_builddir)/config.status
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
++ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@@ -570,63 +530,62 @@ BUILT_SOURCES += stdio.h
+ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
++ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+- -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \
+- -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \
+- -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \
+- -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \
+- -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \
+- -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \
+- -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \
+- -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \
+- -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \
+- -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \
+- -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \
+- -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \
+- -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \
+- -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \
+- -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \
+- -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \
+- -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \
+- -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \
+- -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \
+- -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \
+- -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
+- -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
+- -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
+- -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \
+- -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
+- -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
+- -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \
+- -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \
+- -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \
+- -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \
+- -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \
+- -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \
+- -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \
+- -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \
+- -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \
+- -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \
+- -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \
+- -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \
+- -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \
+- -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \
+- -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \
+- -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \
+- -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \
+- -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \
+- -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \
+- -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \
+- -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \
+- -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \
+- -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \
+- -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \
+- -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \
+- -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \
++ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
++ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
++ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
++ -e 's|@''GNULIB_FGETC''@|$(GNULIB_FGETC)|g' \
++ -e 's|@''GNULIB_FGETS''@|$(GNULIB_FGETS)|g' \
++ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
++ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
++ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
++ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
++ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
++ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
++ -e 's|@''GNULIB_FREAD''@|$(GNULIB_FREAD)|g' \
++ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
++ -e 's|@''GNULIB_FSCANF''@|$(GNULIB_FSCANF)|g' \
++ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
++ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
++ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
++ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
++ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
++ -e 's|@''GNULIB_GETC''@|$(GNULIB_GETC)|g' \
++ -e 's|@''GNULIB_GETCHAR''@|$(GNULIB_GETCHAR)|g' \
++ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
++ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
++ -e 's|@''GNULIB_GETS''@|$(GNULIB_GETS)|g' \
++ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
++ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
++ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
++ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
++ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
++ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
++ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
++ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
++ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
++ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
++ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
++ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
++ -e 's|@''GNULIB_SCANF''@|$(GNULIB_SCANF)|g' \
++ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
++ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
++ -e 's|@''GNULIB_STDIO_H_NONBLOCKING''@|$(GNULIB_STDIO_H_NONBLOCKING)|g' \
++ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
++ -e 's|@''GNULIB_TMPFILE''@|$(GNULIB_TMPFILE)|g' \
++ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
++ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
++ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
++ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
++ -e 's|@''GNULIB_VFSCANF''@|$(GNULIB_VFSCANF)|g' \
++ -e 's|@''GNULIB_VSCANF''@|$(GNULIB_VSCANF)|g' \
++ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
++ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
++ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
++ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+ < $(srcdir)/stdio.in.h | \
+ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+ -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
+@@ -691,43 +650,41 @@ BUILT_SOURCES += stdlib.h
+
+ # We need the following in order to create <stdlib.h> when the system
+ # doesn't have one that works with the given compiler.
+-stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
+- $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
++stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
++ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+- -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \
+- -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
+- -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
+- -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
+- -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
+- -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
+- -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \
+- -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \
+- -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \
+- -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \
+- -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \
+- -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \
+- -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \
+- -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \
+- -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
+- -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
+- -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
+- -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
+- -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
+- -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \
+- -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \
+- -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \
+- -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \
+- -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \
+- -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \
+- -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \
+- -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \
+- -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \
++ -e 's|@''GNULIB__EXIT''@|$(GNULIB__EXIT)|g' \
++ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
++ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
++ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
++ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
++ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
++ -e 's|@''GNULIB_GRANTPT''@|$(GNULIB_GRANTPT)|g' \
++ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
++ -e 's|@''GNULIB_MBTOWC''@|$(GNULIB_MBTOWC)|g' \
++ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
++ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
++ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
++ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
++ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
++ -e 's|@''GNULIB_PTSNAME''@|$(GNULIB_PTSNAME)|g' \
++ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
++ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
++ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
++ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
++ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
++ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
++ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
++ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
++ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
++ -e 's|@''GNULIB_SYSTEM_POSIX''@|$(GNULIB_SYSTEM_POSIX)|g' \
++ -e 's|@''GNULIB_UNLOCKPT''@|$(GNULIB_UNLOCKPT)|g' \
++ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
++ -e 's|@''GNULIB_WCTOMB''@|$(GNULIB_WCTOMB)|g' \
+ < $(srcdir)/stdlib.in.h | \
+ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
+@@ -766,7 +723,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/co
+ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
+ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+- -e '/definition of _Noreturn/r $(_NORETURN_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ } > $@-t && \
+@@ -793,15 +749,6 @@ EXTRA_libicrt_a_SOURCES += strerror.c
+
+ ## end gnulib module strerror
+
+-## begin gnulib module strerror-override
+-
+-
+-EXTRA_DIST += strerror-override.c strerror-override.h
+-
+-EXTRA_libicrt_a_SOURCES += strerror-override.c
+-
+-## end gnulib module strerror-override
+-
+ ## begin gnulib module string
+
+ BUILT_SOURCES += string.h
+@@ -811,52 +758,47 @@ BUILT_SOURCES += string.h
+ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
++ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+- -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \
+- -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \
+- -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \
+- -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \
+- -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \
+- -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \
+- -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \
+- -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \
+- -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \
+- -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \
+- -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \
+- -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \
+- -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \
+- -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \
+- -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \
+- -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \
+- -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \
+- -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \
+- -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \
+- -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \
+- -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \
+- -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \
+- -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \
+- -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \
+- -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \
+- -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \
+- -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \
+- -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \
+- -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \
+- -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \
+- -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \
+- -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \
+- -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \
+- -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \
+- -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \
+- -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \
+- -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \
++ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
++ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
++ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
++ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
++ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
++ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
++ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
++ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
++ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
++ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
++ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
++ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
++ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
++ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
++ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
++ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
++ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
++ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
++ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
++ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
++ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
++ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
++ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
++ -e 's|@''GNULIB_STRNCAT''@|$(GNULIB_STRNCAT)|g' \
++ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
++ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
++ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
++ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
++ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
++ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
++ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
++ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
++ -e 's|@''GNULIB_STRERROR_R''@|$(GNULIB_STRERROR_R)|g' \
++ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
++ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+ < $(srcdir)/string.in.h | \
+- sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
+- -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
+- -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
++ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \
+ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+@@ -912,23 +854,22 @@ sys/stat.h: sys_stat.in.h $(top_builddir
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
++ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+- -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
+- -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
+- -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+- -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
+- -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
+- -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
+- -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
+- -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
+- -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
+- -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
+- -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
+- -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
++ -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
++ -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
++ -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
++ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
++ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
++ -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
++ -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
++ -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
++ -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
++ -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
++ -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
++ -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
+ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
+ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
+ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+@@ -971,16 +912,15 @@ BUILT_SOURCES += time.h
+ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
++ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+- -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
+- -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
+- -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
+- -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
+- -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
++ -e 's|@''GNULIB_MKTIME''@|$(GNULIB_MKTIME)|g' \
++ -e 's|@''GNULIB_NANOSLEEP''@|$(GNULIB_NANOSLEEP)|g' \
++ -e 's|@''GNULIB_STRPTIME''@|$(GNULIB_STRPTIME)|g' \
++ -e 's|@''GNULIB_TIMEGM''@|$(GNULIB_TIMEGM)|g' \
++ -e 's|@''GNULIB_TIME_R''@|$(GNULIB_TIME_R)|g' \
+ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
+ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
+ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
+@@ -1013,56 +953,55 @@ BUILT_SOURCES += unistd.h
+ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+- sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+- -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
++ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+- -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \
+- -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+- -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \
+- -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \
+- -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \
+- -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \
+- -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \
+- -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \
+- -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \
+- -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \
+- -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \
+- -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \
+- -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \
+- -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \
+- -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \
+- -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
+- -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
+- -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+- -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
+- -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
+- -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
+- -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
+- -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
+- -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
+- -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \
+- -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \
+- -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \
+- -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \
+- -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \
+- -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \
+- -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \
+- -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \
+- -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \
+- -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \
+- -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \
+- -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \
+- -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \
+- -e 's/@''GNULIB_UNISTD_H_GETOPT''@/$(GNULIB_UNISTD_H_GETOPT)/g' \
+- -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \
+- -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \
+- -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \
+- -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \
+- -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \
+- -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \
++ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
++ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
++ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
++ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
++ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
++ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
++ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
++ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
++ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
++ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
++ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
++ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
++ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
++ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
++ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
++ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
++ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
++ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
++ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
++ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
++ -e 's|@''GNULIB_GROUP_MEMBER''@|$(GNULIB_GROUP_MEMBER)|g' \
++ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
++ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
++ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
++ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
++ -e 's|@''GNULIB_PIPE''@|$(GNULIB_PIPE)|g' \
++ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
++ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
++ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
++ -e 's|@''GNULIB_READ''@|$(GNULIB_READ)|g' \
++ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
++ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
++ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
++ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
++ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
++ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
++ -e 's|@''GNULIB_TTYNAME_R''@|$(GNULIB_TTYNAME_R)|g' \
++ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
++ -e 's|@''GNULIB_UNISTD_H_NONBLOCKING''@|$(GNULIB_UNISTD_H_NONBLOCKING)|g' \
++ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
++ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
++ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
++ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
++ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+ < $(srcdir)/unistd.in.h | \
+ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+@@ -1198,6 +1137,25 @@ EXTRA_DIST += verify.h
+
+ ## end gnulib module verify
+
++## begin gnulib module warn-on-use
++
++BUILT_SOURCES += warn-on-use.h
++# The warn-on-use.h that gets inserted into generated .h files is the same as
++# build-aux/warn-on-use.h, except that it has the copyright header cut off.
++warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
++ $(AM_V_GEN)rm -f $@-t $@ && \
++ sed -n -e '/^.ifndef/,$$p' \
++ < $(top_srcdir)/build-aux/warn-on-use.h \
++ > $@-t && \
++ mv $@-t $@
++MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
++
++WARN_ON_USE_H=warn-on-use.h
++
++EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
++
++## end gnulib module warn-on-use
++
+ ## begin gnulib module xalloc
+
+ libicrt_a_SOURCES += xalloc.h xmalloc.c xstrdup.c
+diff -Naurp libiconv-1.14.org//srclib/pathmax.h libiconv-1.14/srclib/pathmax.h
+--- libiconv-1.14.org//srclib/pathmax.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/pathmax.h 2012-01-08 02:07:40.218484451 -0800
+@@ -19,27 +19,6 @@
+ #ifndef _PATHMAX_H
+ # define _PATHMAX_H
+
+-/* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename,
+- including the terminating NUL byte.
+- <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html>
+- PATH_MAX is not defined on systems which have no limit on filename length,
+- such as GNU/Hurd.
+-
+- This file does *not* define PATH_MAX always. Programs that use this file
+- can handle the GNU/Hurd case in several ways:
+- - Either with a package-wide handling, or with a per-file handling,
+- - Either through a
+- #ifdef PATH_MAX
+- or through a fallback like
+- #ifndef PATH_MAX
+- # define PATH_MAX 8192
+- #endif
+- or through a fallback like
+- #ifndef PATH_MAX
+- # define PATH_MAX pathconf ("/", _PC_PATH_MAX)
+- #endif
+- */
+-
+ # include <unistd.h>
+
+ # include <limits.h>
+@@ -48,6 +27,11 @@
+ # define _POSIX_PATH_MAX 256
+ # endif
+
++# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF
++# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
++ : pathconf ("/", _PC_PATH_MAX))
++# endif
++
+ /* Don't include sys/param.h if it already has been. */
+ # if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+ # include <sys/param.h>
+@@ -57,13 +41,8 @@
+ # define PATH_MAX MAXPATHLEN
+ # endif
+
+-# ifdef __hpux
+-/* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename,
+- *not* including the terminating NUL byte, and is set to 1023.
+- Additionally, when _XOPEN_SOURCE is defined to 500 or more, PATH_MAX is
+- not defined at all any more. */
+-# undef PATH_MAX
+-# define PATH_MAX 1024
++# ifndef PATH_MAX
++# define PATH_MAX _POSIX_PATH_MAX
+ # endif
+
+ #endif /* _PATHMAX_H */
+diff -Naurp libiconv-1.14.org//srclib/relocwrapper.c libiconv-1.14/srclib/relocwrapper.c
+--- libiconv-1.14.org//srclib/relocwrapper.c 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/relocwrapper.c 2012-01-08 02:07:40.282484455 -0800
+@@ -29,6 +29,7 @@
+ -> relocatable
+ -> setenv
+ -> malloca
++ -> strerror
+ -> c-ctype
+
+ Macros that need to be set while compiling this file:
+diff -Naurp libiconv-1.14.org//srclib/safe-read.h libiconv-1.14/srclib/safe-read.h
+--- libiconv-1.14.org//srclib/safe-read.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/safe-read.h 2012-01-08 02:07:40.298484455 -0800
+@@ -14,19 +14,6 @@
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+-/* Some system calls may be interrupted and fail with errno = EINTR in the
+- following situations:
+- - The process is stopped and restarted (signal SIGSTOP and SIGCONT, user
+- types Ctrl-Z) on some platforms: MacOS X.
+- - The process receives a signal for which a signal handler was installed
+- with sigaction() with an sa_flags field that does not contain
+- SA_RESTART.
+- - The process receives a signal for which a signal handler was installed
+- with signal() and for which no call to siginterrupt(sig,0) was done,
+- on some platforms: AIX, HP-UX, IRIX, OSF/1, Solaris.
+-
+- This module provides a wrapper around read() that handles EINTR. */
+-
+ #include <stddef.h>
+
+ #ifdef __cplusplus
+diff -Naurp libiconv-1.14.org//srclib/signal.in.h libiconv-1.14/srclib/signal.in.h
+--- libiconv-1.14.org//srclib/signal.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/signal.in.h 2012-01-08 02:07:40.314484456 -0800
+@@ -20,49 +20,21 @@
+ #endif
+ @PRAGMA_COLUMNS@
+
+-#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T)
+-/* Special invocation convention:
+- - Inside glibc header files.
+- - On glibc systems we have a sequence of nested includes
+- <signal.h> -> <ucontext.h> -> <signal.h>.
+- In this situation, the functions are not yet declared, therefore we cannot
+- provide the C++ aliases.
+- - On glibc systems with GCC 4.3 we have a sequence of nested includes
+- <csignal> -> </usr/include/signal.h> -> <sys/ucontext.h> -> <signal.h>.
+- In this situation, some of the functions are not yet declared, therefore
+- we cannot provide the C++ aliases. */
++#if defined __need_sig_atomic_t || defined __need_sigset_t
++/* Special invocation convention inside glibc header files. */
+
+ # @INCLUDE_NEXT@ @NEXT_SIGNAL_H@
+
+ #else
+ /* Normal invocation convention. */
+
+-#ifndef _@GUARD_PREFIX@_SIGNAL_H
+-
+-#define _GL_ALREADY_INCLUDING_SIGNAL_H
+-
+-/* Define pid_t, uid_t.
+- Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.
+- On Solaris 10, <signal.h> includes <sys/types.h>, which eventually includes
+- us; so include <sys/types.h> now, before the second inclusion guard. */
+-#include <sys/types.h>
++#ifndef _GL_SIGNAL_H
+
+ /* The include_next requires a split double-inclusion guard. */
+ #@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
+
+-#undef _GL_ALREADY_INCLUDING_SIGNAL_H
+-
+-#ifndef _@GUARD_PREFIX@_SIGNAL_H
+-#define _@GUARD_PREFIX@_SIGNAL_H
+-
+-/* MacOS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
+- pthread_sigmask in <pthread.h>, not in <signal.h>.
+- But avoid namespace pollution on glibc systems.*/
+-#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
+- && ((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ || defined __sun) \
+- && ! defined __GLIBC__
+-# include <pthread.h>
+-#endif
++#ifndef _GL_SIGNAL_H
++#define _GL_SIGNAL_H
+
+ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+@@ -70,6 +42,10 @@
+
+ /* The definition of _GL_WARN_ON_USE is copied here. */
+
++/* Define pid_t, uid_t.
++ Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
++#include <sys/types.h>
++
+ /* On AIX, sig_atomic_t already includes volatile. C99 requires that
+ 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not.
+ Hence, redefine this to a non-volatile type as needed. */
+@@ -124,34 +100,6 @@ typedef void (*sighandler_t) (int);
+ #endif
+
+
+-#if @GNULIB_PTHREAD_SIGMASK@
+-# if @REPLACE_PTHREAD_SIGMASK@
+-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-# undef pthread_sigmask
+-# define pthread_sigmask rpl_pthread_sigmask
+-# endif
+-_GL_FUNCDECL_RPL (pthread_sigmask, int,
+- (int how, const sigset_t *new_mask, sigset_t *old_mask));
+-_GL_CXXALIAS_RPL (pthread_sigmask, int,
+- (int how, const sigset_t *new_mask, sigset_t *old_mask));
+-# else
+-# if !@HAVE_PTHREAD_SIGMASK@
+-_GL_FUNCDECL_SYS (pthread_sigmask, int,
+- (int how, const sigset_t *new_mask, sigset_t *old_mask));
+-# endif
+-_GL_CXXALIAS_SYS (pthread_sigmask, int,
+- (int how, const sigset_t *new_mask, sigset_t *old_mask));
+-# endif
+-_GL_CXXALIASWARN (pthread_sigmask);
+-#elif defined GNULIB_POSIXCHECK
+-# undef pthread_sigmask
+-# if HAVE_RAW_DECL_PTHREAD_SIGMASK
+-_GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - "
+- "use gnulib module pthread_sigmask for portability");
+-# endif
+-#endif
+-
+-
+ #if @GNULIB_SIGPROCMASK@
+ # if !@HAVE_POSIX_SIGNALBLOCKING@
+
+@@ -423,6 +371,6 @@ _GL_WARN_ON_USE (sigaction, "sigaction i
+ #endif
+
+
+-#endif /* _@GUARD_PREFIX@_SIGNAL_H */
+-#endif /* _@GUARD_PREFIX@_SIGNAL_H */
++#endif /* _GL_SIGNAL_H */
++#endif /* _GL_SIGNAL_H */
+ #endif
+diff -Naurp libiconv-1.14.org//srclib/stat.c libiconv-1.14/srclib/stat.c
+--- libiconv-1.14.org//srclib/stat.c 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/stat.c 2012-01-08 02:07:40.330484457 -0800
+@@ -38,7 +38,6 @@ orig_stat (const char *filename, struct
+ #include <stdbool.h>
+ #include <string.h>
+ #include "dosname.h"
+-#include "verify.h"
+
+ /* Store information about NAME into ST. Work around bugs with
+ trailing slashes. Mingw has other bugs (such as st_ino always
+@@ -64,12 +63,6 @@ rpl_stat (char const *name, struct stat
+ }
+ #endif /* REPLACE_FUNC_STAT_FILE */
+ #if REPLACE_FUNC_STAT_DIR
+- /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also
+- have a constant PATH_MAX. */
+-# ifndef PATH_MAX
+-# error "Please port this replacement to your platform"
+-# endif
+-
+ if (result == -1 && errno == ENOENT)
+ {
+ /* Due to mingw's oddities, there are some directories (like
+@@ -84,7 +77,6 @@ rpl_stat (char const *name, struct stat
+ char fixed_name[PATH_MAX + 1] = {0};
+ size_t len = strlen (name);
+ bool check_dir = false;
+- verify (PATH_MAX <= 4096);
+ if (PATH_MAX <= len)
+ errno = ENAMETOOLONG;
+ else if (len)
+diff -Naurp libiconv-1.14.org//srclib/stddef.in.h libiconv-1.14/srclib/stddef.in.h
+--- libiconv-1.14.org//srclib/stddef.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/stddef.in.h 2012-01-08 02:07:40.346484458 -0800
+@@ -38,9 +38,9 @@
+ remember if special invocation has ever been used to obtain wint_t,
+ in which case we need to clean up NULL yet again. */
+
+-# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
++# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
+ # ifdef __need_wint_t
+-# undef _@GUARD_PREFIX@_STDDEF_H
++# undef _GL_STDDEF_H
+ # define _GL_STDDEF_WINT_T
+ # endif
+ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
+@@ -49,14 +49,14 @@
+ #else
+ /* Normal invocation convention. */
+
+-# ifndef _@GUARD_PREFIX@_STDDEF_H
++# ifndef _GL_STDDEF_H
+
+ /* The include_next requires a split double-inclusion guard. */
+
+ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
+
+-# ifndef _@GUARD_PREFIX@_STDDEF_H
+-# define _@GUARD_PREFIX@_STDDEF_H
++# ifndef _GL_STDDEF_H
++# define _GL_STDDEF_H
+
+ /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
+ #if @REPLACE_NULL@
+@@ -82,6 +82,6 @@
+ # define wchar_t int
+ #endif
+
+-# endif /* _@GUARD_PREFIX@_STDDEF_H */
+-# endif /* _@GUARD_PREFIX@_STDDEF_H */
++# endif /* _GL_STDDEF_H */
++# endif /* _GL_STDDEF_H */
+ #endif /* __need_XXX */
+diff -Naurp libiconv-1.14.org//srclib/stdint.in.h libiconv-1.14/srclib/stdint.in.h
+--- libiconv-1.14.org//srclib/stdint.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/stdint.in.h 2012-01-08 02:07:40.358484458 -0800
+@@ -21,7 +21,7 @@
+ * <http://www.opengroup.org/susv3xbd/stdint.h.html>
+ */
+
+-#ifndef _@GUARD_PREFIX@_STDINT_H
++#ifndef _GL_STDINT_H
+
+ #if __GNUC__ >= 3
+ @PRAGMA_SYSTEM_HEADER@
+@@ -52,13 +52,13 @@
+ /* Other systems may have an incomplete or buggy <stdint.h>.
+ Include it before <inttypes.h>, since any "#include <stdint.h>"
+ in <inttypes.h> would reinclude us, skipping our contents because
+- _@GUARD_PREFIX@_STDINT_H is defined.
++ _GL_STDINT_H is defined.
+ The include_next requires a split double-inclusion guard. */
+ # @INCLUDE_NEXT@ @NEXT_STDINT_H@
+ #endif
+
+-#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+-#define _@GUARD_PREFIX@_STDINT_H
++#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
++#define _GL_STDINT_H
+
+ /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
+ IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
+@@ -270,36 +270,26 @@ typedef unsigned long int gl_uintptr_t;
+ /* Note: These types are compiler dependent. It may be unwise to use them in
+ public header files. */
+
+-/* If the system defines INTMAX_MAX, assume that intmax_t works, and
+- similarly for UINTMAX_MAX and uintmax_t. This avoids problems with
+- assuming one type where another is used by the system. */
+-
+-#ifndef INTMAX_MAX
+-# undef INTMAX_C
+-# undef intmax_t
+-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
++#undef intmax_t
++#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+ typedef long long int gl_intmax_t;
+-# define intmax_t gl_intmax_t
+-# elif defined GL_INT64_T
+-# define intmax_t int64_t
+-# else
++# define intmax_t gl_intmax_t
++#elif defined GL_INT64_T
++# define intmax_t int64_t
++#else
+ typedef long int gl_intmax_t;
+-# define intmax_t gl_intmax_t
+-# endif
++# define intmax_t gl_intmax_t
+ #endif
+
+-#ifndef UINTMAX_MAX
+-# undef UINTMAX_C
+-# undef uintmax_t
+-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
++#undef uintmax_t
++#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+ typedef unsigned long long int gl_uintmax_t;
+-# define uintmax_t gl_uintmax_t
+-# elif defined GL_UINT64_T
+-# define uintmax_t uint64_t
+-# else
++# define uintmax_t gl_uintmax_t
++#elif defined GL_UINT64_T
++# define uintmax_t uint64_t
++#else
+ typedef unsigned long int gl_uintmax_t;
+-# define uintmax_t gl_uintmax_t
+-# endif
++# define uintmax_t gl_uintmax_t
+ #endif
+
+ /* Verify that intmax_t and uintmax_t have the same size. Too much code
+@@ -441,23 +431,21 @@ typedef int _verify_intmax_size[sizeof (
+
+ /* 7.18.2.5. Limits of greatest-width integer types */
+
+-#ifndef INTMAX_MAX
+-# undef INTMAX_MIN
+-# ifdef INT64_MAX
+-# define INTMAX_MIN INT64_MIN
+-# define INTMAX_MAX INT64_MAX
+-# else
+-# define INTMAX_MIN INT32_MIN
+-# define INTMAX_MAX INT32_MAX
+-# endif
++#undef INTMAX_MIN
++#undef INTMAX_MAX
++#ifdef INT64_MAX
++# define INTMAX_MIN INT64_MIN
++# define INTMAX_MAX INT64_MAX
++#else
++# define INTMAX_MIN INT32_MIN
++# define INTMAX_MAX INT32_MAX
+ #endif
+
+-#ifndef UINTMAX_MAX
+-# ifdef UINT64_MAX
+-# define UINTMAX_MAX UINT64_MAX
+-# else
+-# define UINTMAX_MAX UINT32_MAX
+-# endif
++#undef UINTMAX_MAX
++#ifdef UINT64_MAX
++# define UINTMAX_MAX UINT64_MAX
++#else
++# define UINTMAX_MAX UINT32_MAX
+ #endif
+
+ /* 7.18.3. Limits of other integer types */
+@@ -580,27 +568,25 @@ typedef int _verify_intmax_size[sizeof (
+
+ /* 7.18.4.2. Macros for greatest-width integer constants */
+
+-#ifndef INTMAX_C
+-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+-# define INTMAX_C(x) x##LL
+-# elif defined GL_INT64_T
+-# define INTMAX_C(x) INT64_C(x)
+-# else
+-# define INTMAX_C(x) x##L
+-# endif
++#undef INTMAX_C
++#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
++# define INTMAX_C(x) x##LL
++#elif defined GL_INT64_T
++# define INTMAX_C(x) INT64_C(x)
++#else
++# define INTMAX_C(x) x##L
+ #endif
+
+-#ifndef UINTMAX_C
+-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+-# define UINTMAX_C(x) x##ULL
+-# elif defined GL_UINT64_T
+-# define UINTMAX_C(x) UINT64_C(x)
+-# else
+-# define UINTMAX_C(x) x##UL
+-# endif
++#undef UINTMAX_C
++#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
++# define UINTMAX_C(x) x##ULL
++#elif defined GL_UINT64_T
++# define UINTMAX_C(x) UINT64_C(x)
++#else
++# define UINTMAX_C(x) x##UL
+ #endif
+
+ #endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
+
+-#endif /* _@GUARD_PREFIX@_STDINT_H */
+-#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
++#endif /* _GL_STDINT_H */
++#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
+diff -Naurp libiconv-1.14.org//srclib/stdio.in.h libiconv-1.14/srclib/stdio.in.h
+--- libiconv-1.14.org//srclib/stdio.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/stdio.in.h 2012-01-08 02:07:40.378484459 -0800
+@@ -35,7 +35,7 @@
+ #else
+ /* Normal invocation convention. */
+
+-#ifndef _@GUARD_PREFIX@_STDIO_H
++#ifndef _GL_STDIO_H
+
+ #define _GL_ALREADY_INCLUDING_STDIO_H
+
+@@ -44,8 +44,8 @@
+
+ #undef _GL_ALREADY_INCLUDING_STDIO_H
+
+-#ifndef _@GUARD_PREFIX@_STDIO_H
+-#define _@GUARD_PREFIX@_STDIO_H
++#ifndef _GL_STDIO_H
++#define _GL_STDIO_H
+
+ /* Get va_list. Needed on many systems, including glibc 2.8. */
+ #include <stdarg.h>
+@@ -461,6 +461,25 @@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp
+ _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
+ # endif
+ _GL_CXXALIASWARN (fseeko);
++# if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@
++ /* Provide an fseek function that is consistent with fseeko. */
++ /* In order to avoid that fseek gets defined as a macro here, the
++ developer can request the 'fseek' module. */
++# if !GNULIB_defined_fseek_function
++# undef fseek
++# define fseek rpl_fseek
++static inline int _GL_ARG_NONNULL ((1))
++rpl_fseek (FILE *fp, long offset, int whence)
++{
++# if @REPLACE_FSEEKO@
++ return rpl_fseeko (fp, offset, whence);
++# else
++ return fseeko (fp, offset, whence);
++# endif
++}
++# define GNULIB_defined_fseek_function 1
++# endif
++# endif
+ #elif defined GNULIB_POSIXCHECK
+ # define _GL_FSEEK_WARN /* Category 1, above. */
+ # undef fseek
+@@ -520,6 +539,25 @@ _GL_FUNCDECL_SYS (ftello, off_t, (FILE *
+ _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
+ # endif
+ _GL_CXXALIASWARN (ftello);
++# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@
++ /* Provide an ftell function that is consistent with ftello. */
++ /* In order to avoid that ftell gets defined as a macro here, the
++ developer can request the 'ftell' module. */
++# if !GNULIB_defined_ftell_function
++# undef ftell
++# define ftell rpl_ftell
++static inline long _GL_ARG_NONNULL ((1))
++rpl_ftell (FILE *f)
++{
++# if @REPLACE_FTELLO@
++ return rpl_ftello (f);
++# else
++ return ftello (f);
++# endif
++}
++# define GNULIB_defined_ftell_function 1
++# endif
++# endif
+ #elif defined GNULIB_POSIXCHECK
+ # define _GL_FTELL_WARN /* Category 1, above. */
+ # undef ftell
+@@ -1307,6 +1345,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is
+ #endif
+
+
+-#endif /* _@GUARD_PREFIX@_STDIO_H */
+-#endif /* _@GUARD_PREFIX@_STDIO_H */
++#endif /* _GL_STDIO_H */
++#endif /* _GL_STDIO_H */
+ #endif
+diff -Naurp libiconv-1.14.org//srclib/stdlib.in.h libiconv-1.14/srclib/stdlib.in.h
+--- libiconv-1.14.org//srclib/stdlib.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/stdlib.in.h 2012-01-08 02:07:40.390484459 -0800
+@@ -28,13 +28,13 @@
+ #else
+ /* Normal invocation convention. */
+
+-#ifndef _@GUARD_PREFIX@_STDLIB_H
++#ifndef _GL_STDLIB_H
+
+ /* The include_next requires a split double-inclusion guard. */
+ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@
+
+-#ifndef _@GUARD_PREFIX@_STDLIB_H
+-#define _@GUARD_PREFIX@_STDLIB_H
++#ifndef _GL_STDLIB_H
++#define _GL_STDLIB_H
+
+ /* NetBSD 5.0 mis-defines NULL. */
+ #include <stddef.h>
+@@ -89,7 +89,11 @@ struct random_data
+ # include <unistd.h>
+ #endif
+
+-/* The definition of _Noreturn is copied here. */
++#if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__
++# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
++#else
++# define _GL_ATTRIBUTE_NORETURN
++#endif
+
+ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+@@ -116,7 +120,7 @@ struct random_data
+ /* Terminate the current process with the given return code, without running
+ the 'atexit' handlers. */
+ # if !@HAVE__EXIT@
+-_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
++_GL_FUNCDECL_SYS (_Exit, void, (int status) _GL_ATTRIBUTE_NORETURN);
+ # endif
+ _GL_CXXALIAS_SYS (_Exit, void, (int status));
+ _GL_CXXALIASWARN (_Exit);
+@@ -757,6 +761,6 @@ _GL_CXXALIASWARN (wctomb);
+ #endif
+
+
+-#endif /* _@GUARD_PREFIX@_STDLIB_H */
+-#endif /* _@GUARD_PREFIX@_STDLIB_H */
++#endif /* _GL_STDLIB_H */
++#endif /* _GL_STDLIB_H */
+ #endif
+diff -Naurp libiconv-1.14.org//srclib/strerror.c libiconv-1.14/srclib/strerror.c
+--- libiconv-1.14.org//srclib/strerror.c 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/strerror.c 2012-01-08 02:07:40.406484461 -0800
+@@ -17,54 +17,340 @@
+
+ #include <config.h>
+
+-/* Specification. */
+ #include <string.h>
+
+-#include <errno.h>
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <string.h>
++#if REPLACE_STRERROR
++
++# include <errno.h>
++# include <stdio.h>
++
++# if GNULIB_defined_ESOCK /* native Windows platforms */
++# if HAVE_WINSOCK2_H
++# include <winsock2.h>
++# endif
++# endif
+
+-#include "intprops.h"
+-#include "strerror-override.h"
+-#include "verify.h"
++# include "intprops.h"
+
+ /* Use the system functions, not the gnulib overrides in this file. */
+-#undef sprintf
++# undef sprintf
++
++# undef strerror
++# if ! HAVE_DECL_STRERROR
++# define strerror(n) NULL
++# endif
+
+ char *
+-strerror (int n)
+-#undef strerror
++rpl_strerror (int n)
+ {
+- static char buf[STACKBUF_LEN];
+- size_t len;
++ char const *msg = NULL;
++ /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
++ switch (n)
++ {
++# if GNULIB_defined_ETXTBSY
++ case ETXTBSY:
++ msg = "Text file busy";
++ break;
++# endif
++
++# if GNULIB_defined_ESOCK /* native Windows platforms */
++ /* EWOULDBLOCK is the same as EAGAIN. */
++ case EINPROGRESS:
++ msg = "Operation now in progress";
++ break;
++ case EALREADY:
++ msg = "Operation already in progress";
++ break;
++ case ENOTSOCK:
++ msg = "Socket operation on non-socket";
++ break;
++ case EDESTADDRREQ:
++ msg = "Destination address required";
++ break;
++ case EMSGSIZE:
++ msg = "Message too long";
++ break;
++ case EPROTOTYPE:
++ msg = "Protocol wrong type for socket";
++ break;
++ case ENOPROTOOPT:
++ msg = "Protocol not available";
++ break;
++ case EPROTONOSUPPORT:
++ msg = "Protocol not supported";
++ break;
++ case ESOCKTNOSUPPORT:
++ msg = "Socket type not supported";
++ break;
++ case EOPNOTSUPP:
++ msg = "Operation not supported";
++ break;
++ case EPFNOSUPPORT:
++ msg = "Protocol family not supported";
++ break;
++ case EAFNOSUPPORT:
++ msg = "Address family not supported by protocol";
++ break;
++ case EADDRINUSE:
++ msg = "Address already in use";
++ break;
++ case EADDRNOTAVAIL:
++ msg = "Cannot assign requested address";
++ break;
++ case ENETDOWN:
++ msg = "Network is down";
++ break;
++ case ENETUNREACH:
++ msg = "Network is unreachable";
++ break;
++ case ENETRESET:
++ msg = "Network dropped connection on reset";
++ break;
++ case ECONNABORTED:
++ msg = "Software caused connection abort";
++ break;
++ case ECONNRESET:
++ msg = "Connection reset by peer";
++ break;
++ case ENOBUFS:
++ msg = "No buffer space available";
++ break;
++ case EISCONN:
++ msg = "Transport endpoint is already connected";
++ break;
++ case ENOTCONN:
++ msg = "Transport endpoint is not connected";
++ break;
++ case ESHUTDOWN:
++ msg = "Cannot send after transport endpoint shutdown";
++ break;
++ case ETOOMANYREFS:
++ msg = "Too many references: cannot splice";
++ break;
++ case ETIMEDOUT:
++ msg = "Connection timed out";
++ break;
++ case ECONNREFUSED:
++ msg = "Connection refused";
++ break;
++ case ELOOP:
++ msg = "Too many levels of symbolic links";
++ break;
++ case EHOSTDOWN:
++ msg = "Host is down";
++ break;
++ case EHOSTUNREACH:
++ msg = "No route to host";
++ break;
++ case EPROCLIM:
++ msg = "Too many processes";
++ break;
++ case EUSERS:
++ msg = "Too many users";
++ break;
++ case EDQUOT:
++ msg = "Disk quota exceeded";
++ break;
++ case ESTALE:
++ msg = "Stale NFS file handle";
++ break;
++ case EREMOTE:
++ msg = "Object is remote";
++ break;
++# if HAVE_WINSOCK2_H
++ /* WSA_INVALID_HANDLE maps to EBADF */
++ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
++ /* WSA_INVALID_PARAMETER maps to EINVAL */
++ case WSA_OPERATION_ABORTED:
++ msg = "Overlapped operation aborted";
++ break;
++ case WSA_IO_INCOMPLETE:
++ msg = "Overlapped I/O event object not in signaled state";
++ break;
++ case WSA_IO_PENDING:
++ msg = "Overlapped operations will complete later";
++ break;
++ /* WSAEINTR maps to EINTR */
++ /* WSAEBADF maps to EBADF */
++ /* WSAEACCES maps to EACCES */
++ /* WSAEFAULT maps to EFAULT */
++ /* WSAEINVAL maps to EINVAL */
++ /* WSAEMFILE maps to EMFILE */
++ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
++ /* WSAEINPROGRESS is EINPROGRESS */
++ /* WSAEALREADY is EALREADY */
++ /* WSAENOTSOCK is ENOTSOCK */
++ /* WSAEDESTADDRREQ is EDESTADDRREQ */
++ /* WSAEMSGSIZE is EMSGSIZE */
++ /* WSAEPROTOTYPE is EPROTOTYPE */
++ /* WSAENOPROTOOPT is ENOPROTOOPT */
++ /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
++ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
++ /* WSAEOPNOTSUPP is EOPNOTSUPP */
++ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
++ /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
++ /* WSAEADDRINUSE is EADDRINUSE */
++ /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
++ /* WSAENETDOWN is ENETDOWN */
++ /* WSAENETUNREACH is ENETUNREACH */
++ /* WSAENETRESET is ENETRESET */
++ /* WSAECONNABORTED is ECONNABORTED */
++ /* WSAECONNRESET is ECONNRESET */
++ /* WSAENOBUFS is ENOBUFS */
++ /* WSAEISCONN is EISCONN */
++ /* WSAENOTCONN is ENOTCONN */
++ /* WSAESHUTDOWN is ESHUTDOWN */
++ /* WSAETOOMANYREFS is ETOOMANYREFS */
++ /* WSAETIMEDOUT is ETIMEDOUT */
++ /* WSAECONNREFUSED is ECONNREFUSED */
++ /* WSAELOOP is ELOOP */
++ /* WSAENAMETOOLONG maps to ENAMETOOLONG */
++ /* WSAEHOSTDOWN is EHOSTDOWN */
++ /* WSAEHOSTUNREACH is EHOSTUNREACH */
++ /* WSAENOTEMPTY maps to ENOTEMPTY */
++ /* WSAEPROCLIM is EPROCLIM */
++ /* WSAEUSERS is EUSERS */
++ /* WSAEDQUOT is EDQUOT */
++ /* WSAESTALE is ESTALE */
++ /* WSAEREMOTE is EREMOTE */
++ case WSASYSNOTREADY:
++ msg = "Network subsystem is unavailable";
++ break;
++ case WSAVERNOTSUPPORTED:
++ msg = "Winsock.dll version out of range";
++ break;
++ case WSANOTINITIALISED:
++ msg = "Successful WSAStartup not yet performed";
++ break;
++ case WSAEDISCON:
++ msg = "Graceful shutdown in progress";
++ break;
++ case WSAENOMORE: case WSA_E_NO_MORE:
++ msg = "No more results";
++ break;
++ case WSAECANCELLED: case WSA_E_CANCELLED:
++ msg = "Call was canceled";
++ break;
++ case WSAEINVALIDPROCTABLE:
++ msg = "Procedure call table is invalid";
++ break;
++ case WSAEINVALIDPROVIDER:
++ msg = "Service provider is invalid";
++ break;
++ case WSAEPROVIDERFAILEDINIT:
++ msg = "Service provider failed to initialize";
++ break;
++ case WSASYSCALLFAILURE:
++ msg = "System call failure";
++ break;
++ case WSASERVICE_NOT_FOUND:
++ msg = "Service not found";
++ break;
++ case WSATYPE_NOT_FOUND:
++ msg = "Class type not found";
++ break;
++ case WSAEREFUSED:
++ msg = "Database query was refused";
++ break;
++ case WSAHOST_NOT_FOUND:
++ msg = "Host not found";
++ break;
++ case WSATRY_AGAIN:
++ msg = "Nonauthoritative host not found";
++ break;
++ case WSANO_RECOVERY:
++ msg = "Nonrecoverable error";
++ break;
++ case WSANO_DATA:
++ msg = "Valid name, no data record of requested type";
++ break;
++ /* WSA_QOS_* omitted */
++# endif
++# endif
++
++# if GNULIB_defined_ENOMSG
++ case ENOMSG:
++ msg = "No message of desired type";
++ break;
++# endif
++
++# if GNULIB_defined_EIDRM
++ case EIDRM:
++ msg = "Identifier removed";
++ break;
++# endif
++
++# if GNULIB_defined_ENOLINK
++ case ENOLINK:
++ msg = "Link has been severed";
++ break;
++# endif
++
++# if GNULIB_defined_EPROTO
++ case EPROTO:
++ msg = "Protocol error";
++ break;
++# endif
++
++# if GNULIB_defined_EMULTIHOP
++ case EMULTIHOP:
++ msg = "Multihop attempted";
++ break;
++# endif
++
++# if GNULIB_defined_EBADMSG
++ case EBADMSG:
++ msg = "Bad message";
++ break;
++# endif
++
++# if GNULIB_defined_EOVERFLOW
++ case EOVERFLOW:
++ msg = "Value too large for defined data type";
++ break;
++# endif
++
++# if GNULIB_defined_ENOTSUP
++ case ENOTSUP:
++ msg = "Not supported";
++ break;
++# endif
++
++# if GNULIB_defined_ESTALE
++ case ESTALE:
++ msg = "Stale NFS file handle";
++ break;
++# endif
++
++# if GNULIB_defined_EDQUOT
++ case EDQUOT:
++ msg = "Disk quota exceeded";
++ break;
++# endif
++
++# if GNULIB_defined_ECANCELED
++ case ECANCELED:
++ msg = "Operation canceled";
++ break;
++# endif
++ }
+
+- /* Cast away const, due to the historical signature of strerror;
+- callers should not be modifying the string. */
+- const char *msg = strerror_override (n);
+ if (msg)
+ return (char *) msg;
+
+- msg = strerror (n);
++ {
++ char *result = strerror (n);
+
+- /* Our strerror_r implementation might use the system's strerror
+- buffer, so all other clients of strerror have to see the error
+- copied into a buffer that we manage. This is not thread-safe,
+- even if the system strerror is, but portable programs shouldn't
+- be using strerror if they care about thread-safety. */
+- if (!msg || !*msg)
+- {
+- static char const fmt[] = "Unknown error %d";
+- verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
+- sprintf (buf, fmt, n);
+- errno = EINVAL;
+- return buf;
+- }
++ if (result == NULL || result[0] == '\0')
++ {
++ static char const fmt[] = "Unknown error (%d)";
++ static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)];
++ sprintf (msg_buf, fmt, n);
++ return msg_buf;
++ }
+
+- /* Fix STACKBUF_LEN if this ever aborts. */
+- len = strlen (msg);
+- if (sizeof buf <= len)
+- abort ();
+-
+- return memcpy (buf, msg, len + 1);
++ return result;
++ }
+ }
++
++#endif
+diff -Naurp libiconv-1.14.org//srclib/strerror-override.c libiconv-1.14/srclib/strerror-override.c
+--- libiconv-1.14.org//srclib/strerror-override.c 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/strerror-override.c 1969-12-31 16:00:00.000000000 -0800
+@@ -1,279 +0,0 @@
+-/* strerror-override.c --- POSIX compatible system error routine
+-
+- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+-
+- 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 3 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/>. */
+-
+-/* Written by Bruno Haible <bruno@clisp.org>, 2010. */
+-
+-#include <config.h>
+-
+-#include "strerror-override.h"
+-
+-#include <errno.h>
+-
+-#if GNULIB_defined_ESOCK /* native Windows platforms */
+-# if HAVE_WINSOCK2_H
+-# include <winsock2.h>
+-# endif
+-#endif
+-
+-/* If ERRNUM maps to an errno value defined by gnulib, return a string
+- describing the error. Otherwise return NULL. */
+-const char *
+-strerror_override (int errnum)
+-{
+- /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
+- switch (errnum)
+- {
+-#if REPLACE_STRERROR_0
+- case 0:
+- return "Success";
+-#endif
+-
+-#if GNULIB_defined_ETXTBSY
+- case ETXTBSY:
+- return "Text file busy";
+-#endif
+-
+-#if GNULIB_defined_ESOCK /* native Windows platforms */
+- /* EWOULDBLOCK is the same as EAGAIN. */
+- case EINPROGRESS:
+- return "Operation now in progress";
+- case EALREADY:
+- return "Operation already in progress";
+- case ENOTSOCK:
+- return "Socket operation on non-socket";
+- case EDESTADDRREQ:
+- return "Destination address required";
+- case EMSGSIZE:
+- return "Message too long";
+- case EPROTOTYPE:
+- return "Protocol wrong type for socket";
+- case ENOPROTOOPT:
+- return "Protocol not available";
+- case EPROTONOSUPPORT:
+- return "Protocol not supported";
+- case ESOCKTNOSUPPORT:
+- return "Socket type not supported";
+- case EOPNOTSUPP:
+- return "Operation not supported";
+- case EPFNOSUPPORT:
+- return "Protocol family not supported";
+- case EAFNOSUPPORT:
+- return "Address family not supported by protocol";
+- case EADDRINUSE:
+- return "Address already in use";
+- case EADDRNOTAVAIL:
+- return "Cannot assign requested address";
+- case ENETDOWN:
+- return "Network is down";
+- case ENETUNREACH:
+- return "Network is unreachable";
+- case ENETRESET:
+- return "Network dropped connection on reset";
+- case ECONNABORTED:
+- return "Software caused connection abort";
+- case ECONNRESET:
+- return "Connection reset by peer";
+- case ENOBUFS:
+- return "No buffer space available";
+- case EISCONN:
+- return "Transport endpoint is already connected";
+- case ENOTCONN:
+- return "Transport endpoint is not connected";
+- case ESHUTDOWN:
+- return "Cannot send after transport endpoint shutdown";
+- case ETOOMANYREFS:
+- return "Too many references: cannot splice";
+- case ETIMEDOUT:
+- return "Connection timed out";
+- case ECONNREFUSED:
+- return "Connection refused";
+- case ELOOP:
+- return "Too many levels of symbolic links";
+- case EHOSTDOWN:
+- return "Host is down";
+- case EHOSTUNREACH:
+- return "No route to host";
+- case EPROCLIM:
+- return "Too many processes";
+- case EUSERS:
+- return "Too many users";
+- case EDQUOT:
+- return "Disk quota exceeded";
+- case ESTALE:
+- return "Stale NFS file handle";
+- case EREMOTE:
+- return "Object is remote";
+-# if HAVE_WINSOCK2_H
+- /* WSA_INVALID_HANDLE maps to EBADF */
+- /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
+- /* WSA_INVALID_PARAMETER maps to EINVAL */
+- case WSA_OPERATION_ABORTED:
+- return "Overlapped operation aborted";
+- case WSA_IO_INCOMPLETE:
+- return "Overlapped I/O event object not in signaled state";
+- case WSA_IO_PENDING:
+- return "Overlapped operations will complete later";
+- /* WSAEINTR maps to EINTR */
+- /* WSAEBADF maps to EBADF */
+- /* WSAEACCES maps to EACCES */
+- /* WSAEFAULT maps to EFAULT */
+- /* WSAEINVAL maps to EINVAL */
+- /* WSAEMFILE maps to EMFILE */
+- /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
+- /* WSAEINPROGRESS is EINPROGRESS */
+- /* WSAEALREADY is EALREADY */
+- /* WSAENOTSOCK is ENOTSOCK */
+- /* WSAEDESTADDRREQ is EDESTADDRREQ */
+- /* WSAEMSGSIZE is EMSGSIZE */
+- /* WSAEPROTOTYPE is EPROTOTYPE */
+- /* WSAENOPROTOOPT is ENOPROTOOPT */
+- /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
+- /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
+- /* WSAEOPNOTSUPP is EOPNOTSUPP */
+- /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
+- /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
+- /* WSAEADDRINUSE is EADDRINUSE */
+- /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
+- /* WSAENETDOWN is ENETDOWN */
+- /* WSAENETUNREACH is ENETUNREACH */
+- /* WSAENETRESET is ENETRESET */
+- /* WSAECONNABORTED is ECONNABORTED */
+- /* WSAECONNRESET is ECONNRESET */
+- /* WSAENOBUFS is ENOBUFS */
+- /* WSAEISCONN is EISCONN */
+- /* WSAENOTCONN is ENOTCONN */
+- /* WSAESHUTDOWN is ESHUTDOWN */
+- /* WSAETOOMANYREFS is ETOOMANYREFS */
+- /* WSAETIMEDOUT is ETIMEDOUT */
+- /* WSAECONNREFUSED is ECONNREFUSED */
+- /* WSAELOOP is ELOOP */
+- /* WSAENAMETOOLONG maps to ENAMETOOLONG */
+- /* WSAEHOSTDOWN is EHOSTDOWN */
+- /* WSAEHOSTUNREACH is EHOSTUNREACH */
+- /* WSAENOTEMPTY maps to ENOTEMPTY */
+- /* WSAEPROCLIM is EPROCLIM */
+- /* WSAEUSERS is EUSERS */
+- /* WSAEDQUOT is EDQUOT */
+- /* WSAESTALE is ESTALE */
+- /* WSAEREMOTE is EREMOTE */
+- case WSASYSNOTREADY:
+- return "Network subsystem is unavailable";
+- case WSAVERNOTSUPPORTED:
+- return "Winsock.dll version out of range";
+- case WSANOTINITIALISED:
+- return "Successful WSAStartup not yet performed";
+- case WSAEDISCON:
+- return "Graceful shutdown in progress";
+- case WSAENOMORE: case WSA_E_NO_MORE:
+- return "No more results";
+- case WSAECANCELLED: case WSA_E_CANCELLED:
+- return "Call was canceled";
+- case WSAEINVALIDPROCTABLE:
+- return "Procedure call table is invalid";
+- case WSAEINVALIDPROVIDER:
+- return "Service provider is invalid";
+- case WSAEPROVIDERFAILEDINIT:
+- return "Service provider failed to initialize";
+- case WSASYSCALLFAILURE:
+- return "System call failure";
+- case WSASERVICE_NOT_FOUND:
+- return "Service not found";
+- case WSATYPE_NOT_FOUND:
+- return "Class type not found";
+- case WSAEREFUSED:
+- return "Database query was refused";
+- case WSAHOST_NOT_FOUND:
+- return "Host not found";
+- case WSATRY_AGAIN:
+- return "Nonauthoritative host not found";
+- case WSANO_RECOVERY:
+- return "Nonrecoverable error";
+- case WSANO_DATA:
+- return "Valid name, no data record of requested type";
+- /* WSA_QOS_* omitted */
+-# endif
+-#endif
+-
+-#if GNULIB_defined_ENOMSG
+- case ENOMSG:
+- return "No message of desired type";
+-#endif
+-
+-#if GNULIB_defined_EIDRM
+- case EIDRM:
+- return "Identifier removed";
+-#endif
+-
+-#if GNULIB_defined_ENOLINK
+- case ENOLINK:
+- return "Link has been severed";
+-#endif
+-
+-#if GNULIB_defined_EPROTO
+- case EPROTO:
+- return "Protocol error";
+-#endif
+-
+-#if GNULIB_defined_EMULTIHOP
+- case EMULTIHOP:
+- return "Multihop attempted";
+-#endif
+-
+-#if GNULIB_defined_EBADMSG
+- case EBADMSG:
+- return "Bad message";
+-#endif
+-
+-#if GNULIB_defined_EOVERFLOW
+- case EOVERFLOW:
+- return "Value too large for defined data type";
+-#endif
+-
+-#if GNULIB_defined_ENOTSUP
+- case ENOTSUP:
+- return "Not supported";
+-#endif
+-
+-#if GNULIB_defined_ENETRESET
+- case ENETRESET:
+- return "Network dropped connection on reset";
+-#endif
+-
+-#if GNULIB_defined_ECONNABORTED
+- case ECONNABORTED:
+- return "Software caused connection abort";
+-#endif
+-
+-#if GNULIB_defined_ESTALE
+- case ESTALE:
+- return "Stale NFS file handle";
+-#endif
+-
+-#if GNULIB_defined_EDQUOT
+- case EDQUOT:
+- return "Disk quota exceeded";
+-#endif
+-
+-#if GNULIB_defined_ECANCELED
+- case ECANCELED:
+- return "Operation canceled";
+-#endif
+-
+- default:
+- return NULL;
+- }
+-}
+diff -Naurp libiconv-1.14.org//srclib/strerror-override.h libiconv-1.14/srclib/strerror-override.h
+--- libiconv-1.14.org//srclib/strerror-override.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/strerror-override.h 1969-12-31 16:00:00.000000000 -0800
+@@ -1,52 +0,0 @@
+-/* strerror-override.h --- POSIX compatible system error routine
+-
+- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+-
+- 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 3 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/>. */
+-
+-#ifndef _GL_STRERROR_OVERRIDE_H
+-# define _GL_STRERROR_OVERRIDE_H
+-
+-# include <errno.h>
+-# include <stddef.h>
+-
+-/* Reasonable buffer size that should never trigger ERANGE; if this
+- proves too small, we intentionally abort(), to remind us to fix
+- this value. */
+-# define STACKBUF_LEN 256
+-
+-/* If ERRNUM maps to an errno value defined by gnulib, return a string
+- describing the error. Otherwise return NULL. */
+-# if REPLACE_STRERROR_0 \
+- || GNULIB_defined_ETXTBSY \
+- || GNULIB_defined_ESOCK \
+- || GNULIB_defined_ENOMSG \
+- || GNULIB_defined_EIDRM \
+- || GNULIB_defined_ENOLINK \
+- || GNULIB_defined_EPROTO \
+- || GNULIB_defined_EMULTIHOP \
+- || GNULIB_defined_EBADMSG \
+- || GNULIB_defined_EOVERFLOW \
+- || GNULIB_defined_ENOTSUP \
+- || GNULIB_defined_ENETRESET \
+- || GNULIB_defined_ECONNABORTED \
+- || GNULIB_defined_ESTALE \
+- || GNULIB_defined_EDQUOT \
+- || GNULIB_defined_ECANCELED
+-extern const char *strerror_override (int errnum);
+-# else
+-# define strerror_override(ignored) NULL
+-# endif
+-
+-#endif /* _GL_STRERROR_OVERRIDE_H */
+diff -Naurp libiconv-1.14.org//srclib/string.in.h libiconv-1.14/srclib/string.in.h
+--- libiconv-1.14.org//srclib/string.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/string.in.h 2012-01-08 02:07:40.418484461 -0800
+@@ -16,7 +16,7 @@
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+-#ifndef _@GUARD_PREFIX@_STRING_H
++#ifndef _GL_STRING_H
+
+ #if __GNUC__ >= 3
+ @PRAGMA_SYSTEM_HEADER@
+@@ -26,8 +26,8 @@
+ /* The include_next requires a split double-inclusion guard. */
+ #@INCLUDE_NEXT@ @NEXT_STRING_H@
+
+-#ifndef _@GUARD_PREFIX@_STRING_H
+-#define _@GUARD_PREFIX@_STRING_H
++#ifndef _GL_STRING_H
++#define _GL_STRING_H
+
+ /* NetBSD 5.0 mis-defines NULL. */
+ #include <stddef.h>
+@@ -59,36 +59,6 @@
+ /* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+-/* Find the index of the least-significant set bit. */
+-#if @GNULIB_FFSL@
+-# if !@HAVE_FFSL@
+-_GL_FUNCDECL_SYS (ffsl, int, (long int i));
+-# endif
+-_GL_CXXALIAS_SYS (ffsl, int, (long int i));
+-_GL_CXXALIASWARN (ffsl);
+-#elif defined GNULIB_POSIXCHECK
+-# undef ffsl
+-# if HAVE_RAW_DECL_FFSL
+-_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
+-# endif
+-#endif
+-
+-
+-/* Find the index of the least-significant set bit. */
+-#if @GNULIB_FFSLL@
+-# if !@HAVE_FFSLL@
+-_GL_FUNCDECL_SYS (ffsll, int, (long long int i));
+-# endif
+-_GL_CXXALIAS_SYS (ffsll, int, (long long int i));
+-_GL_CXXALIASWARN (ffsll);
+-#elif defined GNULIB_POSIXCHECK
+-# undef ffsll
+-# if HAVE_RAW_DECL_FFSLL
+-_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
+-# endif
+-#endif
+-
+-
+ /* Return the first instance of C within N bytes of S, or NULL. */
+ #if @GNULIB_MEMCHR@
+ # if @REPLACE_MEMCHR@
+@@ -1007,5 +977,5 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp
+ #endif
+
+
+-#endif /* _@GUARD_PREFIX@_STRING_H */
+-#endif /* _@GUARD_PREFIX@_STRING_H */
++#endif /* _GL_STRING_H */
++#endif /* _GL_STRING_H */
+diff -Naurp libiconv-1.14.org//srclib/sys_stat.in.h libiconv-1.14/srclib/sys_stat.in.h
+--- libiconv-1.14.org//srclib/sys_stat.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/sys_stat.in.h 2012-01-08 02:07:40.430484461 -0800
+@@ -34,7 +34,7 @@
+ #else
+ /* Normal invocation convention. */
+
+-#ifndef _@GUARD_PREFIX@_SYS_STAT_H
++#ifndef _GL_SYS_STAT_H
+
+ /* Get nlink_t. */
+ #include <sys/types.h>
+@@ -45,8 +45,8 @@
+ /* The include_next requires a split double-inclusion guard. */
+ #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
+
+-#ifndef _@GUARD_PREFIX@_SYS_STAT_H
+-#define _@GUARD_PREFIX@_SYS_STAT_H
++#ifndef _GL_SYS_STAT_H
++#define _GL_SYS_STAT_H
+
+ /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+@@ -653,6 +653,6 @@ _GL_WARN_ON_USE (utimensat, "utimensat i
+ #endif
+
+
+-#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
+-#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
++#endif /* _GL_SYS_STAT_H */
++#endif /* _GL_SYS_STAT_H */
+ #endif
+diff -Naurp libiconv-1.14.org//srclib/time.in.h libiconv-1.14/srclib/time.in.h
+--- libiconv-1.14.org//srclib/time.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/time.in.h 2012-01-08 02:07:40.438484462 -0800
+@@ -28,13 +28,13 @@
+ without adding our own declarations. */
+ #if (defined __need_time_t || defined __need_clock_t \
+ || defined __need_timespec \
+- || defined _@GUARD_PREFIX@_TIME_H)
++ || defined _GL_TIME_H)
+
+ # @INCLUDE_NEXT@ @NEXT_TIME_H@
+
+ #else
+
+-# define _@GUARD_PREFIX@_TIME_H
++# define _GL_TIME_H
+
+ # @INCLUDE_NEXT@ @NEXT_TIME_H@
+
+diff -Naurp libiconv-1.14.org//srclib/unistd.in.h libiconv-1.14/srclib/unistd.in.h
+--- libiconv-1.14.org//srclib/unistd.in.h 2011-08-07 06:42:06.000000000 -0700
++++ libiconv-1.14/srclib/unistd.in.h 2012-01-08 02:07:40.450484462 -0800
+@@ -36,7 +36,7 @@
+ # define _GL_WINSOCK2_H_WITNESS
+
+ /* Normal invocation. */
+-#elif !defined _@GUARD_PREFIX@_UNISTD_H
++#elif !defined _GL_UNISTD_H
+
+ /* The include_next requires a split double-inclusion guard. */
+ #if @HAVE_UNISTD_H@
+@@ -51,8 +51,8 @@
+ # undef _GL_INCLUDING_WINSOCK2_H
+ #endif
+
+-#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
+-#define _@GUARD_PREFIX@_UNISTD_H
++#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
++#define _GL_UNISTD_H
+
+ /* NetBSD 5.0 mis-defines NULL. Also get size_t. */
+ #include <stddef.h>
+@@ -117,77 +117,78 @@
+ /* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+-/* Hide some function declarations from <winsock2.h>. */
+-
+-#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
+-# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
+-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-# undef socket
+-# define socket socket_used_without_including_sys_socket_h
+-# undef connect
+-# define connect connect_used_without_including_sys_socket_h
+-# undef accept
+-# define accept accept_used_without_including_sys_socket_h
+-# undef bind
+-# define bind bind_used_without_including_sys_socket_h
+-# undef getpeername
+-# define getpeername getpeername_used_without_including_sys_socket_h
+-# undef getsockname
+-# define getsockname getsockname_used_without_including_sys_socket_h
+-# undef getsockopt
+-# define getsockopt getsockopt_used_without_including_sys_socket_h
+-# undef listen
+-# define listen listen_used_without_including_sys_socket_h
+-# undef recv
+-# define recv recv_used_without_including_sys_socket_h
+-# undef send
+-# define send send_used_without_including_sys_socket_h
+-# undef recvfrom
+-# define recvfrom recvfrom_used_without_including_sys_socket_h
+-# undef sendto
+-# define sendto sendto_used_without_including_sys_socket_h
+-# undef setsockopt
+-# define setsockopt setsockopt_used_without_including_sys_socket_h
+-# undef shutdown
+-# define shutdown shutdown_used_without_including_sys_socket_h
+-# else
+- _GL_WARN_ON_USE (socket,
+- "socket() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (connect,
+- "connect() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (accept,
+- "accept() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (bind,
+- "bind() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (getpeername,
+- "getpeername() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (getsockname,
+- "getsockname() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (getsockopt,
+- "getsockopt() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (listen,
+- "listen() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (recv,
+- "recv() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (send,
+- "send() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (recvfrom,
+- "recvfrom() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (sendto,
+- "sendto() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (setsockopt,
+- "setsockopt() used without including <sys/socket.h>");
+- _GL_WARN_ON_USE (shutdown,
+- "shutdown() used without including <sys/socket.h>");
++#if @GNULIB_GETHOSTNAME@
++/* Get all possible declarations of gethostname(). */
++# if @UNISTD_H_HAVE_WINSOCK2_H@
++# if !defined _GL_SYS_SOCKET_H
++# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
++# undef socket
++# define socket socket_used_without_including_sys_socket_h
++# undef connect
++# define connect connect_used_without_including_sys_socket_h
++# undef accept
++# define accept accept_used_without_including_sys_socket_h
++# undef bind
++# define bind bind_used_without_including_sys_socket_h
++# undef getpeername
++# define getpeername getpeername_used_without_including_sys_socket_h
++# undef getsockname
++# define getsockname getsockname_used_without_including_sys_socket_h
++# undef getsockopt
++# define getsockopt getsockopt_used_without_including_sys_socket_h
++# undef listen
++# define listen listen_used_without_including_sys_socket_h
++# undef recv
++# define recv recv_used_without_including_sys_socket_h
++# undef send
++# define send send_used_without_including_sys_socket_h
++# undef recvfrom
++# define recvfrom recvfrom_used_without_including_sys_socket_h
++# undef sendto
++# define sendto sendto_used_without_including_sys_socket_h
++# undef setsockopt
++# define setsockopt setsockopt_used_without_including_sys_socket_h
++# undef shutdown
++# define shutdown shutdown_used_without_including_sys_socket_h
++# else
++ _GL_WARN_ON_USE (socket,
++ "socket() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (connect,
++ "connect() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (accept,
++ "accept() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (bind,
++ "bind() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (getpeername,
++ "getpeername() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (getsockname,
++ "getsockname() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (getsockopt,
++ "getsockopt() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (listen,
++ "listen() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (recv,
++ "recv() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (send,
++ "send() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (recvfrom,
++ "recvfrom() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (sendto,
++ "sendto() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (setsockopt,
++ "setsockopt() used without including <sys/socket.h>");
++ _GL_WARN_ON_USE (shutdown,
++ "shutdown() used without including <sys/socket.h>");
++# endif
+ # endif
+-# endif
+-# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
+-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-# undef select
+-# define select select_used_without_including_sys_select_h
+-# else
+- _GL_WARN_ON_USE (select,
+- "select() used without including <sys/select.h>");
++# if !defined _GL_SYS_SELECT_H
++# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
++# undef select
++# define select select_used_without_including_sys_select_h
++# else
++ _GL_WARN_ON_USE (select,
++ "select() used without including <sys/select.h>");
++# endif
+ # endif
+ # endif
+ #endif
+@@ -1061,7 +1062,6 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unport
+ specification <http://www.opengroup.org/susv3xsh/pread.html>. */
+ # if @REPLACE_PREAD@
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-# undef pread
+ # define pread rpl_pread
+ # endif
+ _GL_FUNCDECL_RPL (pread, ssize_t,
+@@ -1096,7 +1096,6 @@ _GL_WARN_ON_USE (pread, "pread is unport
+ <http://www.opengroup.org/susv3xsh/pwrite.html>. */
+ # if @REPLACE_PWRITE@
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-# undef pwrite
+ # define pwrite rpl_pwrite
+ # endif
+ _GL_FUNCDECL_RPL (pwrite, ssize_t,
+@@ -1417,5 +1416,5 @@ _GL_CXXALIASWARN (write);
+ #endif
+
+
+-#endif /* _@GUARD_PREFIX@_UNISTD_H */
+-#endif /* _@GUARD_PREFIX@_UNISTD_H */
++#endif /* _GL_UNISTD_H */
++#endif /* _GL_UNISTD_H */
+diff -Naurp libiconv-1.14.org//srclib/verify.h libiconv-1.14/srclib/verify.h
+--- libiconv-1.14.org//srclib/verify.h 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srclib/verify.h 2012-01-08 02:07:40.494484464 -0800
+@@ -164,13 +164,10 @@
+ (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC)))
+
+ # ifdef __cplusplus
+-# if !GNULIB_defined_struct__gl_verify_type
+ template <int w>
+ struct _gl_verify_type {
+ unsigned int _gl_verify_error_if_negative: w;
+ };
+-# define GNULIB_defined_struct__gl_verify_type 1
+-# endif
+ # define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \
+ _gl_verify_type<(R) ? 1 : -1>
+ # elif defined _GL_HAVE__STATIC_ASSERT
+@@ -209,7 +206,7 @@ template <int w>
+ # endif
+ # endif
+
+-/* @assert.h omit start@ */
++# ifdef _GL_VERIFY_H
+
+ /* Each of these macros verifies that its argument R is nonzero. To
+ be portable, R should be an integer constant expression. Unlike
+@@ -221,23 +218,15 @@ template <int w>
+ contexts, e.g., the top level. */
+
+ /* Verify requirement R at compile-time, as an integer constant expression.
+- Return 1. This is equivalent to verify_expr (R, 1).
+-
+- verify_true is obsolescent; please use verify_expr instead. */
+-
+-# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
++ Return 1. */
+
+-/* Verify requirement R at compile-time. Return the value of the
+- expression E. */
+-
+-# define verify_expr(R, E) \
+- (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
++# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
+
+ /* Verify requirement R at compile-time, as a declaration without a
+ trailing ';'. */
+
+-# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
++# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
+
+-/* @assert.h omit end@ */
++# endif
+
+ #endif
+diff -Naurp libiconv-1.14.org//srcm4/canonicalize.m4 libiconv-1.14/srcm4/canonicalize.m4
+--- libiconv-1.14.org//srcm4/canonicalize.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/canonicalize.m4 2012-01-08 02:07:40.566484469 -0800
+@@ -1,4 +1,4 @@
+-# canonicalize.m4 serial 23
++# canonicalize.m4 serial 21
+
+ dnl Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
+
+@@ -10,6 +10,8 @@ dnl with or without modifications, as lo
+ # not provide or fix realpath.
+ AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
+ [
++ AC_LIBOBJ([canonicalize])
++
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
+ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+@@ -28,14 +30,16 @@ AC_DEFUN([gl_CANONICALIZE_LGPL],
+ AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE])
+ if test $ac_cv_func_canonicalize_file_name = no; then
+ HAVE_CANONICALIZE_FILE_NAME=0
++ AC_LIBOBJ([canonicalize-lgpl])
+ if test $ac_cv_func_realpath = no; then
+ HAVE_REALPATH=0
+ elif test "$gl_cv_func_realpath_works" != yes; then
+ REPLACE_REALPATH=1
+ fi
+ elif test "$gl_cv_func_realpath_works" != yes; then
+- REPLACE_CANONICALIZE_FILE_NAME=1
++ AC_LIBOBJ([canonicalize-lgpl])
+ REPLACE_REALPATH=1
++ REPLACE_CANONICALIZE_FILE_NAME=1
+ fi
+ ])
+
+diff -Naurp libiconv-1.14.org//srcm4/errno_h.m4 libiconv-1.14/srcm4/errno_h.m4
+--- libiconv-1.14.org//srcm4/errno_h.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/errno_h.m4 2012-01-08 02:07:40.590484469 -0800
+@@ -1,4 +1,4 @@
+-# errno_h.m4 serial 10
++# errno_h.m4 serial 9
+ dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -34,12 +34,6 @@ booboo
+ #if !defined ENOTSUP
+ booboo
+ #endif
+-#if !defined ENETRESET
+-booboo
+-#endif
+-#if !defined ECONNABORTED
+-booboo
+-#endif
+ #if !defined ESTALE
+ booboo
+ #endif
+diff -Naurp libiconv-1.14.org//srcm4/error.m4 libiconv-1.14/srcm4/error.m4
+--- libiconv-1.14.org//srcm4/error.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/error.m4 2012-01-08 02:07:40.598484470 -0800
+@@ -1,4 +1,4 @@
+-#serial 14
++#serial 13
+
+ # Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc.
+ #
+@@ -8,8 +8,16 @@
+
+ AC_DEFUN([gl_ERROR],
+ [
+- dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
+- dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
++ AC_FUNC_ERROR_AT_LINE
++ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
++ gl_PREREQ_ERROR
++])
++
++# Redefine AC_FUNC_ERROR_AT_LINE, because it is no longer maintained in
++# Autoconf.
++AC_DEFUN([AC_FUNC_ERROR_AT_LINE],
++[
++ AC_LIBSOURCES([error.h, error.c])dnl
+ AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+@@ -17,6 +25,9 @@ AC_DEFUN([gl_ERROR],
+ [[error_at_line (0, 0, "", 0, "an error occurred");]])],
+ [ac_cv_lib_error_at_line=yes],
+ [ac_cv_lib_error_at_line=no])])
++ if test $ac_cv_lib_error_at_line = no; then
++ AC_LIBOBJ([error])
++ fi
+ ])
+
+ # Prerequisites of lib/error.c.
+diff -Naurp libiconv-1.14.org//srcm4/extensions.m4 libiconv-1.14/srcm4/extensions.m4
+--- libiconv-1.14.org//srcm4/extensions.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/extensions.m4 2012-01-08 02:07:40.606484471 -0800
+@@ -1,4 +1,4 @@
+-# serial 10 -*- Autoconf -*-
++# serial 9 -*- Autoconf -*-
+ # Enable extensions on systems that normally disable them.
+
+ # Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
+@@ -67,10 +67,6 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+ #ifndef _ALL_SOURCE
+ # undef _ALL_SOURCE
+ #endif
+-/* Enable general extensions on MacOS X. */
+-#ifndef _DARWIN_C_SOURCE
+-# undef _DARWIN_C_SOURCE
+-#endif
+ /* Enable GNU extensions on systems that have them. */
+ #ifndef _GNU_SOURCE
+ # undef _GNU_SOURCE
+@@ -99,7 +95,6 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_ALL_SOURCE])
+- AC_DEFINE([_DARWIN_C_SOURCE])
+ AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+diff -Naurp libiconv-1.14.org//srcm4/gnulib-cache.m4 libiconv-1.14/srcm4/gnulib-cache.m4
+--- libiconv-1.14.org//srcm4/gnulib-cache.m4 2011-08-07 06:42:11.000000000 -0700
++++ libiconv-1.14/srcm4/gnulib-cache.m4 2012-01-08 02:07:43.154484593 -0800
+@@ -15,7 +15,7 @@
+
+
+ # Specification in the form of a command-line invocation:
+-# gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
++# gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libicrt --source-base=srclib --m4-base=srcm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --makefile-name=Makefile.gnulib --no-libtool --macro-prefix=gl --no-vc-files binary-io error gettext gettext-h libiconv-misc mbstate memmove progname relocatable relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc
+
+ # Specification in the form of a few gnulib-tool.m4 macro invocations:
+ gl_LOCAL_DIR([gnulib-local])
+@@ -28,6 +28,7 @@ gl_MODULES([
+ mbstate
+ memmove
+ progname
++ relocatable
+ relocatable-prog
+ safe-read
+ sigpipe
+@@ -49,5 +50,4 @@ gl_LIB([libicrt])
+ gl_MAKEFILE_NAME([Makefile.gnulib])
+ gl_MACRO_PREFIX([gl])
+ gl_PO_DOMAIN([])
+-gl_WITNESS_C_DOMAIN([])
+ gl_VC_FILES([false])
+diff -Naurp libiconv-1.14.org//srcm4/gnulib-common.m4 libiconv-1.14/srcm4/gnulib-common.m4
+--- libiconv-1.14.org//srcm4/gnulib-common.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/gnulib-common.m4 2012-01-08 02:07:40.634484471 -0800
+@@ -1,4 +1,4 @@
+-# gnulib-common.m4 serial 29
++# gnulib-common.m4 serial 24
+ dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -12,19 +12,6 @@ AC_DEFUN([gl_COMMON], [
+ AC_REQUIRE([gl_COMMON_BODY])
+ ])
+ AC_DEFUN([gl_COMMON_BODY], [
+- AH_VERBATIM([_Noreturn],
+-[/* The _Noreturn keyword of draft C1X. */
+-#ifndef _Noreturn
+-# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \
+- || 0x5110 <= __SUNPRO_C)
+-# define _Noreturn __attribute__ ((__noreturn__))
+-# elif 1200 <= _MSC_VER
+-# define _Noreturn __declspec (noreturn)
+-# else
+-# define _Noreturn
+-# endif
+-#endif
+-])
+ AH_VERBATIM([isoc99_inline],
+ [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+@@ -47,20 +34,6 @@ AC_DEFUN([gl_COMMON_BODY], [
+ /* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+ is a misnomer outside of parameter lists. */
+ #define _UNUSED_PARAMETER_ _GL_UNUSED
+-
+-/* The __pure__ attribute was added in gcc 2.96. */
+-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+-#else
+-# define _GL_ATTRIBUTE_PURE /* empty */
+-#endif
+-
+-/* The __const__ attribute was added in gcc 2.95. */
+-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+-# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+-#else
+-# define _GL_ATTRIBUTE_CONST /* empty */
+-#endif
+ ])
+ dnl Preparation for running test programs:
+ dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
+@@ -74,49 +47,16 @@ AC_DEFUN([gl_COMMON_BODY], [
+ # expands to a C preprocessor expression that evaluates to 1 or 0, depending
+ # whether a gnulib module that has been requested shall be considered present
+ # or not.
+-m4_define([gl_MODULE_INDICATOR_CONDITION], [1])
++AC_DEFUN([gl_MODULE_INDICATOR_CONDITION], [1])
+
+ # gl_MODULE_INDICATOR_SET_VARIABLE([modulename])
+ # sets the shell variable that indicates the presence of the given module to
+ # a C preprocessor expression that will evaluate to 1.
+ AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE],
+ [
+- gl_MODULE_INDICATOR_SET_VARIABLE_AUX(
+- [GNULIB_[]m4_translit([[$1]],
+- [abcdefghijklmnopqrstuvwxyz./-],
+- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])],
+- [gl_MODULE_INDICATOR_CONDITION])
+-])
+-
+-# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable])
+-# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION.
+-# The shell variable's value is a C preprocessor expression that evaluates
+-# to 0 or 1.
+-AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX],
+-[
+- m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1],
+- [
+- dnl Simplify the expression VALUE || 1 to 1.
+- $1=1
+- ],
+- [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1],
+- [gl_MODULE_INDICATOR_CONDITION])])
+-])
+-
+-# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition])
+-# modifies the shell variable to include the given condition. The shell
+-# variable's value is a C preprocessor expression that evaluates to 0 or 1.
+-AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR],
+-[
+- dnl Simplify the expression 1 || CONDITION to 1.
+- if test "$[]$1" != 1; then
+- dnl Simplify the expression 0 || CONDITION to CONDITION.
+- if test "$[]$1" = 0; then
+- $1=$2
+- else
+- $1="($[]$1 || $2)"
+- fi
+- fi
++ GNULIB_[]m4_translit([[$1]],
++ [abcdefghijklmnopqrstuvwxyz./-],
++ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION
+ ])
+
+ # gl_MODULE_INDICATOR([modulename])
+@@ -211,35 +151,6 @@ m4_ifndef([AS_VAR_IF],
+ [m4_define([AS_VAR_IF],
+ [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
+
+-# gl_PROG_AR_RANLIB
+-# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler.
+-AC_DEFUN([gl_PROG_AR_RANLIB],
+-[
+- dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler
+- dnl as "cc", and GCC as "gcc". They have different object file formats and
+- dnl library formats. In particular, the GNU binutils programs ar, ranlib
+- dnl produce libraries that work only with gcc, not with cc.
+- AC_REQUIRE([AC_PROG_CC])
+- AC_EGREP_CPP([Amsterdam],
+- [
+-#ifdef __ACK__
+-Amsterdam
+-#endif
+- ],
+- [AR='cc -c.a'
+- ARFLAGS='-o'
+- RANLIB=':'
+- ],
+- [dnl Use the Automake-documented default values for AR and ARFLAGS.
+- AR='ar'
+- ARFLAGS='cru'
+- dnl Use the ranlib program if it is available.
+- AC_PROG_RANLIB
+- ])
+- AC_SUBST([AR])
+- AC_SUBST([ARFLAGS])
+-])
+-
+ # AC_PROG_MKDIR_P
+ # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
+ # for interoperability with automake-1.9.6 from autoconf-2.62.
+diff -Naurp libiconv-1.14.org//srcm4/gnulib-comp.m4 libiconv-1.14/srcm4/gnulib-comp.m4
+--- libiconv-1.14.org//srcm4/gnulib-comp.m4 2011-08-07 06:42:12.000000000 -0700
++++ libiconv-1.14/srcm4/gnulib-comp.m4 2012-01-08 02:07:43.922484630 -0800
+@@ -25,12 +25,14 @@ AC_DEFUN([gl_EARLY],
+ m4_pattern_allow([^gl_ES$])dnl a valid locale name
+ m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
+ m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
+- AC_REQUIRE([gl_PROG_AR_RANLIB])
++ AC_REQUIRE([AC_PROG_RANLIB])
+ AC_REQUIRE([AM_PROG_CC_C_O])
+ # Code from module alloca-opt:
+ # Code from module allocator:
+ # Code from module areadlink:
++ # Code from module arg-nonnull:
+ # Code from module binary-io:
++ # Code from module c++defs:
+ # Code from module canonicalize-lgpl:
+ # Code from module careadlinkat:
+ # Code from module dosname:
+@@ -46,7 +48,6 @@ AC_DEFUN([gl_EARLY],
+ # Code from module havelib:
+ # Code from module include_next:
+ # Code from module intprops:
+- # Code from module largefile:
+ # Code from module libiconv-misc:
+ # Code from module lstat:
+ # Code from module malloca:
+@@ -64,10 +65,6 @@ AC_DEFUN([gl_EARLY],
+ # Code from module signal:
+ # Code from module sigpipe:
+ # Code from module sigprocmask:
+- # Code from module snippet/_Noreturn:
+- # Code from module snippet/arg-nonnull:
+- # Code from module snippet/c++defs:
+- # Code from module snippet/warn-on-use:
+ # Code from module ssize_t:
+ # Code from module stat:
+ # Code from module stdbool:
+@@ -77,7 +74,6 @@ AC_DEFUN([gl_EARLY],
+ # Code from module stdlib:
+ # Code from module streq:
+ # Code from module strerror:
+- # Code from module strerror-override:
+ # Code from module string:
+ # Code from module sys_stat:
+ # Code from module time:
+@@ -87,6 +83,7 @@ AC_DEFUN([gl_EARLY],
+ # Code from module uniwidth/width:
+ # Code from module unlocked-io:
+ # Code from module verify:
++ # Code from module warn-on-use:
+ # Code from module xalloc:
+ # Code from module xreadlink:
+ ])
+@@ -109,9 +106,6 @@ AC_DEFUN([gl_INIT],
+ gl_source_base='srclib'
+ gl_FUNC_ALLOCA
+ gl_CANONICALIZE_LGPL
+-if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
+- AC_LIBOBJ([canonicalize-lgpl])
+-fi
+ gl_MODULE_INDICATOR([canonicalize-lgpl])
+ gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
+ gl_STDLIB_MODULE_INDICATOR([realpath])
+@@ -121,10 +115,6 @@ gl_ENVIRON
+ gl_UNISTD_MODULE_INDICATOR([environ])
+ gl_HEADER_ERRNO_H
+ gl_ERROR
+-if test $ac_cv_lib_error_at_line = no; then
+- AC_LIBOBJ([error])
+- gl_PREREQ_ERROR
+-fi
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
+ AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+@@ -134,43 +124,26 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ gl_FUNC_LSTAT
+-if test $REPLACE_LSTAT = 1; then
+- AC_LIBOBJ([lstat])
+- gl_PREREQ_LSTAT
+-fi
+ gl_SYS_STAT_MODULE_INDICATOR([lstat])
+ gl_MALLOCA
+ AC_TYPE_MBSTATE_T
+ gl_FUNC_MEMMOVE
+-if test $ac_cv_func_memmove = no; then
+- AC_LIBOBJ([memmove])
+- gl_PREREQ_MEMMOVE
+-fi
+ gl_MULTIARCH
+ gl_PATHMAX
+ AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+ AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
+ gl_FUNC_READ
+-if test $REPLACE_READ = 1; then
+- AC_LIBOBJ([read])
+-fi
+ gl_UNISTD_MODULE_INDICATOR([read])
+ gl_FUNC_READLINK
+-if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
+- AC_LIBOBJ([readlink])
+- gl_PREREQ_READLINK
+-fi
+ gl_UNISTD_MODULE_INDICATOR([readlink])
+ gl_RELOCATABLE([$gl_source_base])
+-if test $RELOCATABLE = yes; then
+- AC_LIBOBJ([progreloc])
+-fi
+ gl_FUNC_READLINK_SEPARATE
+ gl_CANONICALIZE_LGPL_SEPARATE
+ gl_MALLOCA
+-gl_RELOCATABLE_LIBRARY
++gl_RELOCATABLE_LIBRARY_SEPARATE
+ gl_FUNC_SETENV_SEPARATE
+-gl_PREREQ_SAFE_READ
++gl_FUNC_STRERROR_SEPARATE
++gl_SAFE_READ
+ gl_SIGNAL_H
+ gl_SIGNAL_SIGPIPE
+ dnl Define the C macro GNULIB_SIGPIPE to 1.
+@@ -186,17 +159,9 @@ dnl Define the substituted variable GNUL
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ GNULIB_UNISTD_H_SIGPIPE=1
+ gl_SIGNALBLOCKING
+-if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+- AC_LIBOBJ([sigprocmask])
+- gl_PREREQ_SIGPROCMASK
+-fi
+ gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
+ gt_TYPE_SSIZE_T
+ gl_FUNC_STAT
+-if test $REPLACE_STAT = 1; then
+- AC_LIBOBJ([stat])
+- gl_PREREQ_STAT
+-fi
+ gl_SYS_STAT_MODULE_INDICATOR([stat])
+ AM_STDBOOL_H
+ gl_STDDEF_H
+@@ -204,17 +169,7 @@ gl_STDINT_H
+ gl_STDIO_H
+ gl_STDLIB_H
+ gl_FUNC_STRERROR
+-if test $REPLACE_STRERROR = 1; then
+- AC_LIBOBJ([strerror])
+-fi
+-gl_MODULE_INDICATOR([strerror])
+ gl_STRING_MODULE_INDICATOR([strerror])
+-AC_REQUIRE([gl_HEADER_ERRNO_H])
+-AC_REQUIRE([gl_FUNC_STRERROR_0])
+-if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+- AC_LIBOBJ([strerror-override])
+- gl_PREREQ_SYS_H_WINSOCK2
+-fi
+ gl_HEADER_STRING_H
+ gl_HEADER_SYS_STAT_H
+ AC_PROG_MKDIR_P
+@@ -364,14 +319,13 @@ AC_DEFUN([gltests_LIBSOURCES], [
+ # This macro records the list of files which have been installed by
+ # gnulib-tool and may be removed by future gnulib-tool invocations.
+ AC_DEFUN([gl_FILE_LIST], [
++ build-aux/arg-nonnull.h
++ build-aux/c++defs.h
+ build-aux/config.libpath
+ build-aux/config.rpath
+ build-aux/install-reloc
+ build-aux/reloc-ldflags
+- build-aux/snippet/_Noreturn.h
+- build-aux/snippet/arg-nonnull.h
+- build-aux/snippet/c++defs.h
+- build-aux/snippet/warn-on-use.h
++ build-aux/warn-on-use.h
+ doc/relocatable.texi
+ lib/alloca.in.h
+ lib/allocator.c
+@@ -419,8 +373,6 @@ AC_DEFUN([gl_FILE_LIST], [
+ lib/stdio.in.h
+ lib/stdlib.in.h
+ lib/streq.h
+- lib/strerror-override.c
+- lib/strerror-override.h
+ lib/strerror.c
+ lib/string.in.h
+ lib/sys_stat.in.h
+@@ -463,7 +415,6 @@ AC_DEFUN([gl_FILE_LIST], [
+ m4/intmax.m4
+ m4/inttypes-pri.m4
+ m4/inttypes_h.m4
+- m4/largefile.m4
+ m4/lcmessage.m4
+ m4/lib-ld.m4
+ m4/lib-link.m4
+@@ -502,7 +453,6 @@ AC_DEFUN([gl_FILE_LIST], [
+ m4/stdlib_h.m4
+ m4/strerror.m4
+ m4/string_h.m4
+- m4/sys_socket_h.m4
+ m4/sys_stat_h.m4
+ m4/threadlib.m4
+ m4/time_h.m4
+diff -Naurp libiconv-1.14.org//srcm4/include_next.m4 libiconv-1.14/srcm4/include_next.m4
+--- libiconv-1.14.org//srcm4/include_next.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/include_next.m4 2012-01-08 02:07:40.650484472 -0800
+@@ -1,4 +1,4 @@
+-# include_next.m4 serial 20
++# include_next.m4 serial 18
+ dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -175,13 +175,11 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL],
+ [AC_CHECK_HEADERS_ONCE([$1])
+ ])
+
+-dnl FIXME: gl_next_header and gl_header_exists must be used unquoted
+-dnl until we can assume autoconf 2.64 or newer.
+ m4_foreach_w([gl_HEADER_NAME], [$1],
+ [AS_VAR_PUSHDEF([gl_next_header],
+ [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
+ if test $gl_cv_have_include_next = yes; then
+- AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
++ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ else
+ AC_CACHE_CHECK(
+ [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
+@@ -210,7 +208,7 @@ dnl until we can assume autoconf 2.64 or
+ dnl eval is necessary to expand gl_absname_cpp.
+ dnl Ultrix and Pyramid sh refuse to redirect output of eval,
+ dnl so use subshell.
+- AS_VAR_SET(gl_next_header,
++ AS_VAR_SET([gl_next_header],
+ ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+ sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
+ s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
+@@ -220,20 +218,20 @@ dnl until we can assume autoconf 2.64 or
+ }'`'"'])
+ m4_if([$2], [check],
+ [else
+- AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>'])
++ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ fi
+ ])
+ ])
+ fi
+ AC_SUBST(
+ AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
+- [AS_VAR_GET(gl_next_header)])
++ [AS_VAR_GET([gl_next_header])])
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'gl_HEADER_NAME'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+- gl_next_as_first_directive=AS_VAR_GET(gl_next_header)
++ gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
+ fi
+ AC_SUBST(
+ AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
+diff -Naurp libiconv-1.14.org//srcm4/largefile.m4 libiconv-1.14/srcm4/largefile.m4
+--- libiconv-1.14.org//srcm4/largefile.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/largefile.m4 1969-12-31 16:00:00.000000000 -0800
+@@ -1,104 +0,0 @@
+-# Enable large files on systems where this is not the default.
+-
+-# Copyright 1992-1996, 1998-2011 Free Software Foundation, Inc.
+-# This file is free software; the Free Software Foundation
+-# gives unlimited permission to copy and/or distribute it,
+-# with or without modifications, as long as this notice is preserved.
+-
+-# The following implementation works around a problem in autoconf <= 2.68;
+-# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5.
+-m4_version_prereq([2.69], [] ,[
+-
+-# _AC_SYS_LARGEFILE_TEST_INCLUDES
+-# -------------------------------
+-m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
+-[@%:@include <sys/types.h>
+- /* Check that off_t can represent 2**63 - 1 correctly.
+- We can't simply define LARGE_OFF_T to be 9223372036854775807,
+- since some C++ compilers masquerading as C compilers
+- incorrectly reject 9223372036854775807. */
+-@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+- int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
+- && LARGE_OFF_T % 2147483647 == 1)
+- ? 1 : -1]];[]dnl
+-])
+-
+-
+-# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
+-# CACHE-VAR,
+-# DESCRIPTION,
+-# PROLOGUE, [FUNCTION-BODY])
+-# --------------------------------------------------------
+-m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
+-[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
+-[while :; do
+- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
+- [AC_LANG_PROGRAM([$5], [$6])],
+- [$3=no; break])
+- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
+- [AC_LANG_PROGRAM([@%:@define $1 $2
+-$5], [$6])],
+- [$3=$2; break])
+- $3=unknown
+- break
+-done])
+-case $$3 in #(
+- no | unknown) ;;
+- *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);;
+-esac
+-rm -rf conftest*[]dnl
+-])# _AC_SYS_LARGEFILE_MACRO_VALUE
+-
+-
+-# AC_SYS_LARGEFILE
+-# ----------------
+-# By default, many hosts won't let programs access large files;
+-# one must use special compiler options to get large-file access to work.
+-# For more details about this brain damage please see:
+-# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html
+-AC_DEFUN([AC_SYS_LARGEFILE],
+-[AC_ARG_ENABLE(largefile,
+- [ --disable-largefile omit support for large files])
+-if test "$enable_largefile" != no; then
+-
+- AC_CACHE_CHECK([for special C compiler options needed for large files],
+- ac_cv_sys_largefile_CC,
+- [ac_cv_sys_largefile_CC=no
+- if test "$GCC" != yes; then
+- ac_save_CC=$CC
+- while :; do
+- # IRIX 6.2 and later do not support large files by default,
+- # so use the C compiler's -n32 option if that helps.
+- AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])])
+- AC_COMPILE_IFELSE([], [break])
+- CC="$CC -n32"
+- AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
+- break
+- done
+- CC=$ac_save_CC
+- rm -f conftest.$ac_ext
+- fi])
+- if test "$ac_cv_sys_largefile_CC" != no; then
+- CC=$CC$ac_cv_sys_largefile_CC
+- fi
+-
+- _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
+- ac_cv_sys_file_offset_bits,
+- [Number of bits in a file offset, on hosts where this is settable.],
+- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
+- if test $ac_cv_sys_file_offset_bits = unknown; then
+- _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
+- ac_cv_sys_large_files,
+- [Define for large files, on AIX-style hosts.],
+- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
+- fi
+-
+- AH_VERBATIM([_DARWIN_USE_64_BIT_INODE],
+-[/* Enable large inode numbers on Mac OS X. */
+-#ifndef _DARWIN_USE_64_BIT_INODE
+-# define _DARWIN_USE_64_BIT_INODE 1
+-#endif])
+-fi
+-])# AC_SYS_LARGEFILE
+-
+-])# m4_version_prereq 2.69
+diff -Naurp libiconv-1.14.org//srcm4/lstat.m4 libiconv-1.14/srcm4/lstat.m4
+--- libiconv-1.14.org//srcm4/lstat.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/lstat.m4 2012-01-08 02:07:40.722484476 -0800
+@@ -1,4 +1,4 @@
+-# serial 23
++# serial 21
+
+ # Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc.
+ #
+@@ -15,28 +15,24 @@ AC_DEFUN([gl_FUNC_LSTAT],
+ dnl "#define lstat stat", and lstat.c is a no-op.
+ AC_CHECK_FUNCS_ONCE([lstat])
+ if test $ac_cv_func_lstat = yes; then
+- AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+- if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
++ AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
++ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
++ dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
+ REPLACE_LSTAT=1
+ fi
++ # Prerequisites of lib/lstat.c.
++ AC_REQUIRE([AC_C_INLINE])
+ else
+ HAVE_LSTAT=0
+ fi
+ ])
+
+-# Prerequisites of lib/lstat.c.
+-AC_DEFUN([gl_PREREQ_LSTAT],
++# Redefine AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, because it is no longer
++# maintained in Autoconf.
++AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
+ [
+- AC_REQUIRE([AC_C_INLINE])
+- :
+-])
+-
+-AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
+-[
+- dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it
+- dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ.
+ AC_CACHE_CHECK([whether lstat correctly handles trailing slash],
+- [gl_cv_func_lstat_dereferences_slashed_symlink],
++ [ac_cv_func_lstat_dereferences_slashed_symlink],
+ [rm -f conftest.sym conftest.file
+ echo >conftest.file
+ if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
+@@ -49,22 +45,25 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_
+ have to compile and use the lstat wrapper. */
+ return lstat ("conftest.sym/", &sbuf) == 0;
+ ]])],
+- [gl_cv_func_lstat_dereferences_slashed_symlink=yes],
+- [gl_cv_func_lstat_dereferences_slashed_symlink=no],
++ [ac_cv_func_lstat_dereferences_slashed_symlink=yes],
++ [ac_cv_func_lstat_dereferences_slashed_symlink=no],
+ [# When cross-compiling, be pessimistic so we will end up using the
+ # replacement version of lstat that checks for trailing slashes and
+ # calls lstat a second time when necessary.
+- gl_cv_func_lstat_dereferences_slashed_symlink=no
++ ac_cv_func_lstat_dereferences_slashed_symlink=no
+ ])
+ else
+ # If the 'ln -s' command failed, then we probably don't even
+ # have an lstat function.
+- gl_cv_func_lstat_dereferences_slashed_symlink=no
++ ac_cv_func_lstat_dereferences_slashed_symlink=no
+ fi
+ rm -f conftest.sym conftest.file
+ ])
+- test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
++ test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
+ AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1],
+ [Define to 1 if `lstat' dereferences a symlink specified
+ with a trailing slash.])
++ if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
++ AC_LIBOBJ([lstat])
++ fi
+ ])
+diff -Naurp libiconv-1.14.org//srcm4/memmove.m4 libiconv-1.14/srcm4/memmove.m4
+--- libiconv-1.14.org//srcm4/memmove.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/memmove.m4 2012-01-08 02:07:40.738484477 -0800
+@@ -1,4 +1,4 @@
+-# memmove.m4 serial 4
++# memmove.m4 serial 3
+ dnl Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -6,7 +6,10 @@ dnl with or without modifications, as lo
+
+ AC_DEFUN([gl_FUNC_MEMMOVE],
+ [
+- AC_CHECK_FUNCS([memmove])
++ AC_REPLACE_FUNCS([memmove])
++ if test $ac_cv_func_memmove = no; then
++ gl_PREREQ_MEMMOVE
++ fi
+ ])
+
+ # Prerequisites of lib/memmove.c.
+diff -Naurp libiconv-1.14.org//srcm4/pathmax.m4 libiconv-1.14/srcm4/pathmax.m4
+--- libiconv-1.14.org//srcm4/pathmax.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/pathmax.m4 2012-01-08 02:07:40.758484478 -0800
+@@ -1,4 +1,4 @@
+-# pathmax.m4 serial 9
++# pathmax.m4 serial 8
+ dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+ dnl Inc.
+ dnl This file is free software; the Free Software Foundation
+@@ -8,5 +8,6 @@ dnl with or without modifications, as lo
+ AC_DEFUN([gl_PATHMAX],
+ [
+ dnl Prerequisites of lib/pathmax.h.
++ AC_CHECK_FUNCS_ONCE([pathconf])
+ AC_CHECK_HEADERS_ONCE([sys/param.h])
+ ])
+diff -Naurp libiconv-1.14.org//srcm4/po.m4 libiconv-1.14/srcm4/po.m4
+--- libiconv-1.14.org//srcm4/po.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/po.m4 2012-01-08 02:07:40.766484477 -0800
+@@ -1,4 +1,4 @@
+-# po.m4 serial 17a
++# po.m4 serial 17 (gettext-0.18)
+ dnl Copyright (C) 1995-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -118,8 +118,7 @@ changequote([,])dnl
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+- gt_tab=`printf '\t'`
+- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
++ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+@@ -255,7 +254,6 @@ EOT
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+- tab=`printf '\t'`
+ sed_x_variable='
+ # Test if the hold space is empty.
+ x
+@@ -263,9 +261,9 @@ s/P/P/
+ x
+ ta
+ # Yes it was empty. Look if we have the expected variable definition.
+-/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
++/^[ ]*VARIABLE[ ]*=/{
+ # Seen the first line of the variable definition.
+- s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
++ s/^[ ]*VARIABLE[ ]*=//
+ ba
+ }
+ bd
+@@ -407,15 +405,14 @@ changequote([,])dnl
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+- tab=`printf '\t'`
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+ $frobbedlang.msg: $lang.po
+-${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+-${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
++ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
++ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+ EOF
+ done
+ fi
+@@ -425,8 +422,8 @@ EOF
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ cat >> "$ac_file.tmp" <<EOF
+ $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+-${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+-${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
++ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
++ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+ EOF
+ done
+ fi
+diff -Naurp libiconv-1.14.org//srcm4/readlink.m4 libiconv-1.14/srcm4/readlink.m4
+--- libiconv-1.14.org//srcm4/readlink.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/readlink.m4 2012-01-08 02:07:40.790484479 -0800
+@@ -1,4 +1,4 @@
+-# readlink.m4 serial 11
++# readlink.m4 serial 10
+ dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -10,6 +10,8 @@ AC_DEFUN([gl_FUNC_READLINK],
+ AC_CHECK_FUNCS_ONCE([readlink])
+ if test $ac_cv_func_readlink = no; then
+ HAVE_READLINK=0
++ AC_LIBOBJ([readlink])
++ gl_PREREQ_READLINK
+ else
+ AC_CACHE_CHECK([whether readlink signature is correct],
+ [gl_cv_decl_readlink_works],
+@@ -38,8 +40,10 @@ AC_DEFUN([gl_FUNC_READLINK],
+ AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
+ fails to recognize a trailing slash.])
+ REPLACE_READLINK=1
++ AC_LIBOBJ([readlink])
+ elif test "$gl_cv_decl_readlink_works" != yes; then
+ REPLACE_READLINK=1
++ AC_LIBOBJ([readlink])
+ fi
+ fi
+ ])
+diff -Naurp libiconv-1.14.org//srcm4/read.m4 libiconv-1.14/srcm4/read.m4
+--- libiconv-1.14.org//srcm4/read.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/read.m4 2012-01-08 02:07:40.782484478 -0800
+@@ -1,4 +1,4 @@
+-# read.m4 serial 2
++# read.m4 serial 1
+ dnl Copyright (C) 2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_READ],
+ gl_NONBLOCKING_IO
+ if test $gl_cv_have_nonblocking != yes; then
+ REPLACE_READ=1
++ AC_LIBOBJ([read])
+ fi
+ ])
+ ])
+diff -Naurp libiconv-1.14.org//srcm4/relocatable-lib.m4 libiconv-1.14/srcm4/relocatable-lib.m4
+--- libiconv-1.14.org//srcm4/relocatable-lib.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/relocatable-lib.m4 2012-01-08 02:07:40.798484480 -0800
+@@ -1,4 +1,4 @@
+-# relocatable-lib.m4 serial 6
++# relocatable-lib.m4 serial 5
+ dnl Copyright (C) 2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -10,6 +10,9 @@ dnl Support for relocatable libraries.
+ AC_DEFUN([gl_RELOCATABLE_LIBRARY],
+ [
+ AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY])
++ if test $RELOCATABLE = yes; then
++ AC_LIBOBJ([relocatable])
++ fi
+ ])
+ AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY],
+ [
+@@ -29,6 +32,13 @@ AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY],
+ fi
+ ])
+
++dnl Like gl_RELOCATABLE_LIBRARY, except prepare for separate compilation
++dnl (no AC_LIBOBJ).
++AC_DEFUN([gl_RELOCATABLE_LIBRARY_SEPARATE],
++[
++ AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY])
++])
++
+ dnl Support for relocatable packages for which it is a nop.
+ AC_DEFUN([gl_RELOCATABLE_NOP],
+ [
+diff -Naurp libiconv-1.14.org//srcm4/relocatable.m4 libiconv-1.14/srcm4/relocatable.m4
+--- libiconv-1.14.org//srcm4/relocatable.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/relocatable.m4 2012-01-08 02:07:40.802484479 -0800
+@@ -1,4 +1,4 @@
+-# relocatable.m4 serial 17
++# relocatable.m4 serial 16
+ dnl Copyright (C) 2003, 2005-2007, 2009-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -14,6 +14,9 @@ AC_DEFUN([gl_RELOCATABLE],
+ [
+ AC_REQUIRE([gl_RELOCATABLE_BODY])
+ gl_RELOCATABLE_LIBRARY
++ if test $RELOCATABLE = yes; then
++ AC_LIBOBJ([progreloc])
++ fi
+ : ${RELOCATABLE_CONFIG_H_DIR='$(top_builddir)'}
+ RELOCATABLE_SRC_DIR="\$(top_srcdir)/$gl_source_base"
+ RELOCATABLE_BUILD_DIR="\$(top_builddir)/$gl_source_base"
+diff -Naurp libiconv-1.14.org//srcm4/safe-read.m4 libiconv-1.14/srcm4/safe-read.m4
+--- libiconv-1.14.org//srcm4/safe-read.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/safe-read.m4 2012-01-08 02:07:40.810484480 -0800
+@@ -1,10 +1,17 @@
+-# safe-read.m4 serial 6
++# safe-read.m4 serial 5
+ dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation,
+ dnl 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.
+
++AC_DEFUN([gl_SAFE_READ],
++[
++ AC_LIBOBJ([safe-read])
++
++ gl_PREREQ_SAFE_READ
++])
++
+ # Prerequisites of lib/safe-read.c.
+ AC_DEFUN([gl_PREREQ_SAFE_READ],
+ [
+diff -Naurp libiconv-1.14.org//srcm4/setenv.m4 libiconv-1.14/srcm4/setenv.m4
+--- libiconv-1.14.org//srcm4/setenv.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/setenv.m4 2012-01-08 02:07:40.818484481 -0800
+@@ -1,4 +1,4 @@
+-# setenv.m4 serial 24
++# setenv.m4 serial 22
+ dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -38,6 +38,9 @@ AC_DEFUN([gl_FUNC_SETENV],
+ REPLACE_SETENV=1
+ fi
+ fi
++ if test $HAVE_SETENV$REPLACE_SETENV != 10; then
++ AC_LIBOBJ([setenv])
++ fi
+ ])
+
+ # Like gl_FUNC_SETENV, except prepare for separate compilation
+@@ -62,9 +65,9 @@ AC_DEFUN([gl_FUNC_UNSETENV],
+ fi
+ AC_CHECK_FUNCS([unsetenv])
+ if test $ac_cv_func_unsetenv = no; then
+- HAVE_UNSETENV=0
++ AC_LIBOBJ([unsetenv])
++ gl_PREREQ_UNSETENV
+ else
+- HAVE_UNSETENV=1
+ dnl Some BSDs return void, failing to do error checking.
+ AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
+ [AC_COMPILE_IFELSE(
+@@ -90,6 +93,7 @@ int unsetenv();
+ AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
+ instead of int.])
+ REPLACE_UNSETENV=1
++ AC_LIBOBJ([unsetenv])
+ fi
+
+ dnl Solaris 10 unsetenv does not remove all copies of a name.
+@@ -122,6 +126,7 @@ int unsetenv();
+ [gl_cv_func_unsetenv_works="guessing no"])])
+ if test "$gl_cv_func_unsetenv_works" != yes; then
+ REPLACE_UNSETENV=1
++ AC_LIBOBJ([unsetenv])
+ fi
+ fi
+ ])
+diff -Naurp libiconv-1.14.org//srcm4/signalblocking.m4 libiconv-1.14/srcm4/signalblocking.m4
+--- libiconv-1.14.org//srcm4/signalblocking.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/signalblocking.m4 2012-01-08 02:07:40.834484482 -0800
+@@ -1,4 +1,4 @@
+-# signalblocking.m4 serial 12
++# signalblocking.m4 serial 10
+ dnl Copyright (C) 2001-2002, 2006-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -12,14 +12,31 @@ dnl with or without modifications, as lo
+ AC_DEFUN([gl_SIGNALBLOCKING],
+ [
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+- AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
+- if test $gl_cv_type_sigset_t = yes; then
++ signals_not_posix=
++ AC_EGREP_HEADER([sigset_t], [signal.h], , [signals_not_posix=1])
++ if test -z "$signals_not_posix"; then
+ AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1])
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
++ AC_LIBOBJ([sigprocmask])
++ gl_PREREQ_SIGPROCMASK
+ fi
+ ])
+
+-# Prerequisites of lib/sigprocmask.c.
+-AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:])
++# Prerequisites of the part of lib/signal.in.h and of lib/sigprocmask.c.
++AC_DEFUN([gl_PREREQ_SIGPROCMASK],
++[
++ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
++ AC_CHECK_TYPES([sigset_t],
++ [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
++ [#include <signal.h>
++/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
++#include <sys/types.h>])
++ if test $gl_cv_type_sigset_t != yes; then
++ HAVE_SIGSET_T=0
++ fi
++ dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has
++ dnl the sigset_t type.
++ AC_SUBST([HAVE_SIGSET_T])
++])
+diff -Naurp libiconv-1.14.org//srcm4/signal_h.m4 libiconv-1.14/srcm4/signal_h.m4
+--- libiconv-1.14.org//srcm4/signal_h.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/signal_h.m4 2012-01-08 02:07:40.826484480 -0800
+@@ -1,4 +1,4 @@
+-# signal_h.m4 serial 16
++# signal_h.m4 serial 12
+ dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -7,7 +7,6 @@ dnl with or without modifications, as lo
+ AC_DEFUN([gl_SIGNAL_H],
+ [
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+- AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
+ gl_NEXT_HEADERS([signal.h])
+
+ # AIX declares sig_atomic_t to already include volatile, and C89 compilers
+@@ -28,25 +27,10 @@ AC_DEFUN([gl_SIGNAL_H],
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <signal.h>
+- ]], [pthread_sigmask sigaction
+- sigaddset sigdelset sigemptyset sigfillset sigismember
++ ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember
+ sigpending sigprocmask])
+ ])
+
+-AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
+-[
+- AC_CHECK_TYPES([sigset_t],
+- [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
+- [[
+- #include <signal.h>
+- /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+- #include <sys/types.h>
+- ]])
+- if test $gl_cv_type_sigset_t != yes; then
+- HAVE_SIGSET_T=0
+- fi
+-])
+-
+ AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
+ [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+@@ -58,13 +42,11 @@ AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
+
+ AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
+ [
+- GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK])
+ GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
+ GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK])
+ GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
+- HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK])
+ HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
+ HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
+ HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
+@@ -73,5 +55,4 @@ AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+ AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
+ HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T])
+- REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK])
+ ])
+diff -Naurp libiconv-1.14.org//srcm4/stat.m4 libiconv-1.14/srcm4/stat.m4
+--- libiconv-1.14.org//srcm4/stat.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/stat.m4 2012-01-08 02:07:40.854484483 -0800
+@@ -1,4 +1,4 @@
+-# serial 8
++# serial 7
+
+ # Copyright (C) 2009-2011 Free Software Foundation, Inc.
+ #
+@@ -58,11 +58,9 @@ AC_DEFUN([gl_FUNC_STAT],
+ AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
+ help when passed a file name with a trailing slash]);;
+ esac
+-])
+-
+-# Prerequisites of lib/stat.c.
+-AC_DEFUN([gl_PREREQ_STAT],
+-[
+- AC_REQUIRE([AC_C_INLINE])
+- :
++ if test $REPLACE_STAT = 1; then
++ AC_LIBOBJ([stat])
++ dnl Prerequisites of lib/stat.c.
++ AC_REQUIRE([AC_C_INLINE])
++ fi
+ ])
+diff -Naurp libiconv-1.14.org//srcm4/strerror.m4 libiconv-1.14/srcm4/strerror.m4
+--- libiconv-1.14.org//srcm4/strerror.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/strerror.m4 2012-01-08 02:07:40.890484484 -0800
+@@ -1,4 +1,4 @@
+-# strerror.m4 serial 16
++# strerror.m4 serial 9
+ dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -6,73 +6,63 @@ dnl with or without modifications, as lo
+
+ AC_DEFUN([gl_FUNC_STRERROR],
+ [
++ AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
++ if test $REPLACE_STRERROR = 1; then
++ AC_LIBOBJ([strerror])
++ AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
++ [Define this to 1 if strerror is broken.])
++ fi
++])
++
++# Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ).
++AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
++[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+- AC_REQUIRE([gl_FUNC_STRERROR_0])
+- m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
+- AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
+- ])
+- if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
++ if test -z "$ERRNO_H"; then
+ AC_CACHE_CHECK([for working strerror function],
+ [gl_cv_func_working_strerror],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+- [[if (!*strerror (-2)) return 1;]])],
++ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no],
+- [dnl Be pessimistic on cross-compiles for now.
+- gl_cv_func_working_strerror="guessing no"])
++ [dnl Assume crossbuild works if it compiles.
++ AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM(
++ [[#include <string.h>
++ ]],
++ [[return !*strerror (-2);]])],
++ [gl_cv_func_working_strerror=yes],
++ [gl_cv_func_working_strerror=no])
++ ])
+ ])
+- if test "$gl_cv_func_working_strerror" != yes; then
++ if test $gl_cv_func_working_strerror = no; then
+ dnl The system's strerror() fails to return a string for out-of-range
+ dnl integers. Replace it.
+ REPLACE_STRERROR=1
+ fi
+- m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
+- dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's
+- dnl buffer, we must replace strerror.
+- case "$gl_cv_func_strerror_r_works" in
+- *no) REPLACE_STRERROR=1 ;;
+- esac
+- ])
+ else
+ dnl The system's strerror() cannot know about the new errno values we add
+- dnl to <errno.h>, or any fix for strerror(0). Replace it.
++ dnl to <errno.h>. Replace it.
+ REPLACE_STRERROR=1
+ fi
++ if test $REPLACE_STRERROR = 1; then
++ gl_PREREQ_STRERROR
++ fi
+ ])
+
+-dnl Detect if strerror(0) passes (that is, does not set errno, and does not
+-dnl return a string that matches strerror(-1)).
+-AC_DEFUN([gl_FUNC_STRERROR_0],
+-[
+- REPLACE_STRERROR_0=0
+- AC_CACHE_CHECK([whether strerror(0) succeeds],
+- [gl_cv_func_strerror_0_works],
+- [AC_RUN_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <string.h>
+- #include <errno.h>
+- ]],
+- [[int result = 0;
+- char *str;
+- errno = 0;
+- str = strerror (0);
+- if (!*str) result |= 1;
+- if (errno) result |= 2;
+- if (strstr (str, "nknown") || strstr (str, "ndefined"))
+- result |= 4;
+- return result;]])],
+- [gl_cv_func_strerror_0_works=yes],
+- [gl_cv_func_strerror_0_works=no],
+- [dnl Be pessimistic on cross-compiles for now.
+- gl_cv_func_strerror_0_works="guessing no"])
+- ])
+- if test "$gl_cv_func_strerror_0_works" != yes; then
+- REPLACE_STRERROR_0=1
+- AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
+- does not return a message implying success.])
++# Prerequisites of lib/strerror.c.
++AC_DEFUN([gl_PREREQ_STRERROR], [
++ AC_CHECK_DECLS([strerror])
++ AC_CHECK_HEADERS_ONCE([sys/socket.h])
++ if test $ac_cv_header_sys_socket_h != yes; then
++ dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
++ dnl the check for those headers unconditional; yet cygwin reports
++ dnl that the headers are present but cannot be compiled (since on
++ dnl cygwin, all socket information should come from sys/socket.h).
++ AC_CHECK_HEADERS([winsock2.h])
+ fi
+ ])
+diff -Naurp libiconv-1.14.org//srcm4/string_h.m4 libiconv-1.14/srcm4/string_h.m4
+--- libiconv-1.14.org//srcm4/string_h.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/string_h.m4 2012-01-08 02:07:40.894484485 -0800
+@@ -5,7 +5,7 @@
+ # gives unlimited permission to copy and/or distribute it,
+ # with or without modifications, as long as this notice is preserved.
+
+-# serial 21
++# serial 20
+
+ # Written by Paul Eggert.
+
+@@ -27,9 +27,9 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
+ dnl guaranteed by C89.
+ gl_WARN_ON_USE_PREPARE([[#include <string.h>
+ ]],
+- [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
+- strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
+- strerror_r strsignal strverscmp])
++ [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
++ strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r
++ strsignal strverscmp])
+ ])
+
+ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
+@@ -43,8 +43,6 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
+
+ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
+ [
+- GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
+- GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
+ GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
+ GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
+ GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
+@@ -82,8 +80,6 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
+ GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
+ HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+- HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
+- HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
+ HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR])
+ HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
+ HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
+diff -Naurp libiconv-1.14.org//srcm4/sys_socket_h.m4 libiconv-1.14/srcm4/sys_socket_h.m4
+--- libiconv-1.14.org//srcm4/sys_socket_h.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/sys_socket_h.m4 1969-12-31 16:00:00.000000000 -0800
+@@ -1,177 +0,0 @@
+-# sys_socket_h.m4 serial 22
+-dnl Copyright (C) 2005-2011 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 From Simon Josefsson.
+-
+-AC_DEFUN([gl_HEADER_SYS_SOCKET],
+-[
+- AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
+- AC_REQUIRE([AC_CANONICAL_HOST])
+- AC_REQUIRE([AC_C_INLINE])
+-
+- dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
+- dnl old-style declarations (with return type 'int' instead of 'ssize_t')
+- dnl unless _POSIX_PII_SOCKET is defined.
+- case "$host_os" in
+- osf*)
+- AC_DEFINE([_POSIX_PII_SOCKET], [1],
+- [Define to 1 in order to get the POSIX compatible declarations
+- of socket functions.])
+- ;;
+- esac
+-
+- AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
+- [gl_cv_header_sys_socket_h_selfcontained],
+- [
+- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[]])],
+- [gl_cv_header_sys_socket_h_selfcontained=yes],
+- [gl_cv_header_sys_socket_h_selfcontained=no])
+- ])
+- if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
+- dnl If the shutdown function exists, <sys/socket.h> should define
+- dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
+- AC_CHECK_FUNCS([shutdown])
+- if test $ac_cv_func_shutdown = yes; then
+- AC_CACHE_CHECK([whether <sys/socket.h> defines the SHUT_* macros],
+- [gl_cv_header_sys_socket_h_shut],
+- [
+- AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM([[#include <sys/socket.h>]],
+- [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])],
+- [gl_cv_header_sys_socket_h_shut=yes],
+- [gl_cv_header_sys_socket_h_shut=no])
+- ])
+- if test $gl_cv_header_sys_socket_h_shut = no; then
+- SYS_SOCKET_H='sys/socket.h'
+- fi
+- fi
+- fi
+- # We need to check for ws2tcpip.h now.
+- gl_PREREQ_SYS_H_SOCKET
+- AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[
+- /* sys/types.h is not needed according to POSIX, but the
+- sys/socket.h in i386-unknown-freebsd4.10 and
+- powerpc-apple-darwin5.5 required it. */
+-#include <sys/types.h>
+-#ifdef HAVE_SYS_SOCKET_H
+-#include <sys/socket.h>
+-#endif
+-#ifdef HAVE_WS2TCPIP_H
+-#include <ws2tcpip.h>
+-#endif
+-])
+- if test $ac_cv_type_struct_sockaddr_storage = no; then
+- HAVE_STRUCT_SOCKADDR_STORAGE=0
+- fi
+- if test $ac_cv_type_sa_family_t = no; then
+- HAVE_SA_FAMILY_T=0
+- fi
+- if test $ac_cv_type_struct_sockaddr_storage != no; then
+- AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],
+- [],
+- [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0],
+- [#include <sys/types.h>
+- #ifdef HAVE_SYS_SOCKET_H
+- #include <sys/socket.h>
+- #endif
+- #ifdef HAVE_WS2TCPIP_H
+- #include <ws2tcpip.h>
+- #endif
+- ])
+- fi
+- if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
+- || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
+- SYS_SOCKET_H='sys/socket.h'
+- fi
+- gl_PREREQ_SYS_H_WINSOCK2
+-
+- dnl Check for declarations of anything we want to poison if the
+- dnl corresponding gnulib module is not in use.
+- gl_WARN_ON_USE_PREPARE([[
+-/* Some systems require prerequisite headers. */
+-#include <sys/types.h>
+-#include <sys/socket.h>
+- ]], [socket connect accept bind getpeername getsockname getsockopt
+- listen recv send recvfrom sendto setsockopt shutdown accept4])
+-])
+-
+-AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
+-[
+- dnl Check prerequisites of the <sys/socket.h> replacement.
+- AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
+- gl_CHECK_NEXT_HEADERS([sys/socket.h])
+- if test $ac_cv_header_sys_socket_h = yes; then
+- HAVE_SYS_SOCKET_H=1
+- HAVE_WS2TCPIP_H=0
+- else
+- HAVE_SYS_SOCKET_H=0
+- if test $ac_cv_header_ws2tcpip_h = yes; then
+- HAVE_WS2TCPIP_H=1
+- else
+- HAVE_WS2TCPIP_H=0
+- fi
+- fi
+- AC_SUBST([HAVE_SYS_SOCKET_H])
+- AC_SUBST([HAVE_WS2TCPIP_H])
+-])
+-
+-# Common prerequisites of the <sys/socket.h> replacement and of the
+-# <sys/select.h> replacement.
+-# Sets and substitutes HAVE_WINSOCK2_H.
+-AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
+-[
+- m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
+- m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
+- AC_CHECK_HEADERS_ONCE([sys/socket.h])
+- if test $ac_cv_header_sys_socket_h != yes; then
+- dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+- dnl the check for those headers unconditional; yet cygwin reports
+- dnl that the headers are present but cannot be compiled (since on
+- dnl cygwin, all socket information should come from sys/socket.h).
+- AC_CHECK_HEADERS([winsock2.h])
+- fi
+- if test "$ac_cv_header_winsock2_h" = yes; then
+- HAVE_WINSOCK2_H=1
+- UNISTD_H_HAVE_WINSOCK2_H=1
+- SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+- else
+- HAVE_WINSOCK2_H=0
+- fi
+- AC_SUBST([HAVE_WINSOCK2_H])
+-])
+-
+-AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
+-[
+- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+- AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
+- gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+- dnl Define it also as a C macro, for the benefit of the unit tests.
+- gl_MODULE_INDICATOR_FOR_TESTS([$1])
+-])
+-
+-AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
+-[
+- GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET])
+- GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT])
+- GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT])
+- GNULIB_BIND=0; AC_SUBST([GNULIB_BIND])
+- GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME])
+- GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME])
+- GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT])
+- GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN])
+- GNULIB_RECV=0; AC_SUBST([GNULIB_RECV])
+- GNULIB_SEND=0; AC_SUBST([GNULIB_SEND])
+- GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM])
+- GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO])
+- GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT])
+- GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN])
+- GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4])
+- HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
+- HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
+- AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
+- HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T])
+- HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4])
+-])
+diff -Naurp libiconv-1.14.org//srcm4/warn-on-use.m4 libiconv-1.14/srcm4/warn-on-use.m4
+--- libiconv-1.14.org//srcm4/warn-on-use.m4 2011-08-07 06:42:07.000000000 -0700
++++ libiconv-1.14/srcm4/warn-on-use.m4 2012-01-08 02:07:40.934484487 -0800
+@@ -1,4 +1,4 @@
+-# warn-on-use.m4 serial 4
++# warn-on-use.m4 serial 2
+ dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -27,8 +27,6 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
+ [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
+ [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
+ undefining macros.])])dnl
+-dnl FIXME: gl_Symbol must be used unquoted until we can assume
+-dnl autoconf 2.64 or newer.
+ for gl_func in m4_flatten([$2]); do
+ AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
+ AC_CACHE_CHECK([whether $gl_func is declared without a macro],
+@@ -37,8 +35,8 @@ dnl autoconf 2.64 or newer.
+ [@%:@undef $gl_func
+ (void) $gl_func;])],
+ [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
+- AS_VAR_IF(gl_Symbol, [yes],
+- [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
++ AS_VAR_IF(gl_Symbol, [yes],
++ [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
+ dnl shortcut - if the raw declaration exists, then set a cache
+ dnl variable to allow skipping any later AC_CHECK_DECL efforts
+ eval ac_cv_have_decl_$gl_func=yes])
diff --git a/yocto-poky/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch b/yocto-poky/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch
new file mode 100644
index 000000000..5d34ce7c0
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch
@@ -0,0 +1,50 @@
+It adds the variables that are needed
+for autoconf 2.65 to reconfigure libiconv and delete the m4 macros
+directory. Its imported from OE.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libiconv-1.13.1/configure.ac
+===================================================================
+--- libiconv-1.13.1.orig/configure.ac
++++ libiconv-1.13.1/configure.ac
+@@ -23,7 +23,7 @@ AC_CONFIG_AUX_DIR([build-aux])
+ AM_INIT_AUTOMAKE([libiconv], [1.13.1])
+ AC_CONFIG_HEADERS([config.h lib/config.h])
+ AC_PROG_MAKE_SET
+-
++AC_CONFIG_MACRO_DIR([m4])
+ dnl checks for basic programs
+
+ AC_PROG_CC
+Index: libiconv-1.13.1/libcharset/configure.ac
+===================================================================
+--- libiconv-1.13.1.orig/libcharset/configure.ac
++++ libiconv-1.13.1/libcharset/configure.ac
+@@ -16,17 +16,17 @@ dnl along with the GNU CHARSET Library;
+ dnl write to the Free Software Foundation, Inc., 51 Franklin Street,
+ dnl Fifth Floor, Boston, MA 02110-1301, USA.
+
+-AC_PREREQ([2.13])
++AC_PREREQ(2.61)
++AC_INIT([libcharset],[1.4] )
++AC_CONFIG_SRCDIR([lib/localcharset.c])
+
+-PACKAGE=libcharset
+-VERSION=1.4
+-
+-AC_INIT([lib/localcharset.c])
+ AC_CONFIG_AUX_DIR([build-aux])
+ AC_CONFIG_HEADER([config.h])
+ AC_PROG_MAKE_SET
+-AC_SUBST([PACKAGE])
+-AC_SUBST([VERSION])
++dnl AC_SUBST(PACKAGE)
++dnl AC_SUBST(VERSION)
++
++AC_CONFIG_MACRO_DIR([m4])
+
+ dnl checks for basic programs
+
diff --git a/yocto-poky/meta/recipes-support/libiconv/libiconv_1.11.1.bb b/yocto-poky/meta/recipes-support/libiconv/libiconv_1.11.1.bb
new file mode 100644
index 000000000..6ce4b96e3
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libiconv/libiconv_1.11.1.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Character encoding support library"
+DESCRIPTION = "GNU libiconv - libiconv is for you if your application needs to support \
+multiple character encodings, but that support lacks from your system."
+HOMEPAGE = "http://www.gnu.org/software/libiconv"
+SECTION = "libs"
+NOTES = "Needs to be stripped down to: ascii iso8859-1 eucjp iso-2022jp gb utf8"
+PROVIDES = "virtual/libiconv"
+
+LICENSE = "LGPLv2.0"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
+ file://libcharset/COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
+ file://autoconf.patch \
+ file://shared_preloadable_libiconv_linux.patch \
+ "
+
+SRC_URI[md5sum] = "d42b97f6ef5dd0ba4469d520ed732fed"
+SRC_URI[sha256sum] = "e78c347a1a0cb15f2648519e9799151f4b4a934b61ad9ee7424478efe2b8257f"
+
+S = "${WORKDIR}/libiconv-${PV}"
+
+inherit autotools pkgconfig gettext
+
+python __anonymous() {
+ if d.getVar("TCLIBC", True) == "glibc":
+ raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
+}
+
+EXTRA_OECONF += "--enable-shared --enable-static --enable-relocatable"
+
+LEAD_SONAME = "libiconv.so"
+
+do_configure_prepend () {
+ rm -f ${S}/m4/libtool.m4 ${S}/m4/ltoptions.m4 ${S}/m4/ltsugar.m4 ${S}/m4/ltversion.m4 ${S}/m4/lt~obsolete.m4 ${S}/libcharset/m4/libtool.m4 ${S}/libcharset/m4/ltoptions.m4 ${S}/libcharset/m4/ltsugar.m4 ${S}/libcharset/m4/ltversion.m4 ${S}/libcharset/m4/lt~obsolete.m4
+}
+
+do_configure_append () {
+ # forcibly remove RPATH from libtool
+ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' *libtool
+ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=_NO_RPATH_|g' *libtool
+}
+
+do_install_append () {
+ rm -rf ${D}${libdir}/preloadable_libiconv.so
+ rm -rf ${D}${libdir}/charset.alias
+}
diff --git a/yocto-poky/meta/recipes-support/libiconv/libiconv_1.14.bb b/yocto-poky/meta/recipes-support/libiconv/libiconv_1.14.bb
new file mode 100644
index 000000000..1b6fe09bb
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libiconv/libiconv_1.14.bb
@@ -0,0 +1,51 @@
+SUMMARY = "Character encoding support library"
+DESCRIPTION = "GNU libiconv - libiconv is for you if your application needs to support \
+multiple character encodings, but that support lacks from your system."
+HOMEPAGE = "http://www.gnu.org/software/libiconv"
+SECTION = "libs"
+NOTES = "Needs to be stripped down to: ascii iso8859-1 eucjp iso-2022jp gb utf8"
+PROVIDES = "virtual/libiconv"
+PR = "r1"
+LICENSE = "LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
+ file://libcharset/COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
+ file://autoconf.patch \
+ file://add-relocatable-module.patch \
+ "
+
+SRC_URI[md5sum] = "e34509b1623cec449dfeb73d7ce9c6c6"
+SRC_URI[sha256sum] = "72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613"
+
+S = "${WORKDIR}/libiconv-${PV}"
+
+inherit autotools pkgconfig gettext
+
+python __anonymous() {
+ if d.getVar("TARGET_OS", True) != "linux":
+ return
+ if d.getVar("TCLIBC", True) == "glibc":
+ raise bb.parse.SkipPackage("libiconv is provided for use with uClibc only - glibc already provides iconv")
+}
+
+EXTRA_OECONF += "--enable-shared --enable-static --enable-relocatable"
+
+LEAD_SONAME = "libiconv.so"
+
+do_configure_prepend () {
+ rm -f ${S}/m4/libtool.m4 ${S}/m4/ltoptions.m4 ${S}/m4/ltsugar.m4 ${S}/m4/ltversion.m4 ${S}/m4/lt~obsolete.m4 ${S}/libcharset/m4/libtool.m4 ${S}/libcharset/m4/ltoptions.m4 ${S}/libcharset/m4/ltsugar.m4 ${S}/libcharset/m4/ltversion.m4 ${S}/libcharset/m4/lt~obsolete.m4
+}
+
+do_configure_append () {
+ # forcibly remove RPATH from libtool
+ sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' *libtool
+ sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=_NO_RPATH_|g' *libtool
+}
+
+do_install_append () {
+ rm -rf ${D}${libdir}/preloadable_libiconv.so
+ rm -rf ${D}${libdir}/charset.alias
+}
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch b/yocto-poky/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch
new file mode 100644
index 000000000..b5886c5b9
--- /dev/null
+++ b/yocto-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.0/Makefile.am
+===================================================================
+--- libksba-1.3.0.orig/Makefile.am 2014-05-13 21:39:22.390385646 +0000
++++ libksba-1.3.0/Makefile.am 2014-05-13 21:39:22.462385646 +0000
+@@ -21,6 +21,9 @@
+ ACLOCAL_AMFLAGS = -I m4 -I gl/m4
+ AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
+
++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.0/configure.ac
+===================================================================
+--- libksba-1.3.0.orig/configure.ac 2014-05-13 21:39:22.390385646 +0000
++++ libksba-1.3.0/configure.ac 2014-05-13 21:39:22.462385646 +0000
+@@ -400,6 +400,7 @@
+ src/Makefile
+ src/ksba-config
+ src/versioninfo.rc
++ksba.pc
+ tests/Makefile
+ doc/Makefile
+ ])
+Index: libksba-1.3.0/ksba.pc.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ libksba-1.3.0/ksba.pc.in 2014-05-13 21:39:22.462385646 +0000
+@@ -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.0/src/ksba.m4
+===================================================================
+--- libksba-1.3.0.orig/src/ksba.m4 2014-05-13 21:39:22.390385646 +0000
++++ libksba-1.3.0/src/ksba.m4 2014-05-13 21:49:03.650382696 +0000
+@@ -22,18 +22,7 @@
+ 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 @@
+ 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 @@
+ 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 @@
+ fi
+ fi
+ else
+- KSBA_CFLAGS=""
+- KSBA_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(KSBA_CFLAGS)
diff --git a/yocto-poky/meta/recipes-support/libksba/libksba_1.3.3.bb b/yocto-poky/meta/recipes-support/libksba/libksba_1.3.3.bb
new file mode 100644
index 000000000..bc2116419
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libksba/libksba_1.3.3.bb
@@ -0,0 +1,25 @@
+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
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
+ file://ksba-add-pkgconfig-support.patch"
+
+SRC_URI[md5sum] = "a5dd3c57fca254935f5cf8db26e39065"
+SRC_URI[sha256sum] = "0c7f5ffe34d0414f6951d9880a46fcc2985c487f7c36369b9f11ad41131c7786"
+
+do_configure_prepend () {
+ # Else these could be used in preference to those in aclocal-copy
+ rm -f ${S}/m4/gpg-error.m4
+}
diff --git a/yocto-poky/meta/recipes-support/libmpc/libmpc.inc b/yocto-poky/meta/recipes-support/libmpc/libmpc.inc
new file mode 100644
index 000000000..b3742543d
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb b/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb
new file mode 100644
index 000000000..f3e5a18ea
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb
@@ -0,0 +1,13 @@
+require libmpc.inc
+
+DEPENDS = "gmp mpfr"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
+SRC_URI = "http://www.multiprecision.org/mpc/download/mpc-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "d6a1d5f8ddea3abd2cc3e98f58352d26"
+SRC_URI[sha256sum] = "617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3"
+
+S = "${WORKDIR}/mpc-${PV}"
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/yocto-poky/meta/recipes-support/libnl/libnl/fix-pc-file.patch b/yocto-poky/meta/recipes-support/libnl/libnl/fix-pc-file.patch
new file mode 100644
index 000000000..fe8b833a1
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch b/yocto-poky/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
new file mode 100644
index 000000000..79aa0bdf1
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch
@@ -0,0 +1,36 @@
+Upstream-Status: Inappropriate [configuration]
+
+libnl has progressed to 0.3.2 and there does not appear to be any
+"make -j" issues with this build after my limited testing on that
+newer version so we can assume this issue is fixed upstream
+
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+
+Index: libnl-3.2.25/lib/Makefile.am
+===================================================================
+--- libnl-3.2.25.orig/lib/Makefile.am
++++ libnl-3.2.25/lib/Makefile.am
+@@ -46,9 +46,12 @@ CLEANFILES = \
+
+ # Hack to avoid using ylwrap. It does not function correctly in combination
+ # with --header-file=
++route/pktloc.lo: route/pktloc_syntax.h route/pktloc_grammar.h
++route/pktloc_grammar.h: route/pktloc_grammar.c
+ route/pktloc_grammar.c: route/pktloc_grammar.l
+ $(AM_V_GEN) $(MKDIR_P) route; $(FLEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^
+
++route/pktloc_syntax.h: route/pktloc_syntax.c
+ route/pktloc_syntax.c: route/pktloc_syntax.y
+ $(AM_V_GEN) $(MKDIR_P) route; $(YACC) -d $(YFLAGS) -o $@ $^
+
+@@ -102,7 +105,9 @@ BUILT_SOURCES = \
+ route/cls/ematch_grammar.c \
+ route/cls/ematch_syntax.c \
+ route/pktloc_grammar.c \
+- route/pktloc_syntax.c
++ route/pktloc_syntax.c \
++ route/pktloc_syntax.h \
++ route/pktloc_grammar.h
+
+ EXTRA_DIST = \
+ route/pktloc_grammar.l \
diff --git a/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb b/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb
new file mode 100644
index 000000000..97814fb13
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb
@@ -0,0 +1,44 @@
+SUMMARY = "A library for applications dealing with netlink sockets"
+HOMEPAGE = "http://www.infradead.org/~tgr/libnl/"
+SECTION = "libs/network"
+
+PE = "1"
+PR = "r1"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "flex-native bison-native"
+
+SRC_URI = "http://www.infradead.org/~tgr/${BPN}/files/${BP}.tar.gz \
+ file://fix-pktloc_syntax_h-race.patch \
+ file://fix-pc-file.patch \
+ "
+
+SRC_URI[md5sum] = "03f74d0cd5037cadc8cdfa313bbd195c"
+SRC_URI[sha256sum] = "8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5"
+
+inherit autotools pkgconfig
+
+FILES_${PN} = "${libdir}/libnl-3.so.* \
+ ${libdir}/libnl.so.* \
+ ${sysconfdir}"
+RREPLACES_${PN} = "libnl2"
+RCONFLICTS_${PN} = "libnl2"
+FILES_${PN}-dbg += "${libdir}/libnl/cli/*/.debug"
+FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.so \
+ ${libdir}/libnl/cli/*/*.la"
+FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
+
+PACKAGES += "${PN}-cli ${PN}-route ${PN}-nf ${PN}-genl ${PN}-idiag"
+FILES_${PN}-cli = "${libdir}/libnl-cli-3.so.* \
+ ${libdir}/libnl/cli/*/*.so.* \
+ ${sbindir}/nl-*"
+FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
+FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
+FILES_${PN}-nf = "${libdir}/libnl-nf-3.so.*"
+FILES_${PN}-genl = "${libdir}/libnl-genl-3.so.* \
+ ${libdir}/libnl-genl.so.* \
+ ${sbindir}/genl-ctrl-list"
+RREPLACES_${PN}-genl = "libnl-genl2 libnl-genl-3-200"
+RCONFLICTS_${PN}-genl = "libnl-genl2 libnl-genl-3-200"
diff --git a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch
new file mode 100644
index 000000000..aff1cb184
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch
@@ -0,0 +1,41 @@
+Upstream-Status: Inappropriate [configuration]
+
+From 1921498bcc06408e8b051a3a9e9ce4182998f748 Mon Sep 17 00:00:00 2001
+From: David Schleef <ds@schleef.org>
+Date: Fri, 8 Apr 2011 10:05:49 -0700
+Subject: [PATCH 10/10] Fix --enable-vfp flag
+
+Patch from Christophe Lyon, fixes #36084.
+---
+ configure.ac | 4 ++--
+ liboil/arm/Makefile.am | 1 +
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 98c81fb..407d88c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -188,8 +188,8 @@ fi
+ AC_ARG_ENABLE(vfp,
+ AC_HELP_STRING([--enable-vfp],[compile with Vector Floating-point unit support]),
+ enable_vfp=$enableval,enable_vfp=yes)
+-if test "x$enable-vfp" = xyes -a x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes; then
+- AS_COMPILER_FLAG(["-Wa,-mfpu=vfp"],
++if test "x$enable_vfp" = xyes -a x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes; then
++ AS_COMPILER_FLAG(["-mfpu=vfp"],
+ [VFP_CFLAGS="$VFP_CFLAGS -mfpu=vfp"],
+ true)
+ #AS_COMPILER_FLAG(["-Wa,-mfloat-abi=softfp"],
+diff --git a/liboil/arm/Makefile.am b/liboil/arm/Makefile.am
+index ead08ed..cd8d9fa 100644
+--- a/liboil/arm/Makefile.am
++++ b/liboil/arm/Makefile.am
+@@ -6,4 +6,5 @@ libarm_la_SOURCES = \
+ math_vfp_asm.S
+
+ libarm_la_CFLAGS = $(LIBOIL_CFLAGS) $(VFP_CFLAGS)
++libarm_la_CCASFLAGS = $(LIBOIL_CFLAGS) $(VFP_CFLAGS)
+
+--
+1.7.6
+
diff --git a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch
new file mode 100644
index 000000000..c8e3c1f72
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch
@@ -0,0 +1,19 @@
+Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=31358
+
+configure: fix whitelisting of x86_64 unaligned memory access
+
+Fix typo in whitelist so cross-compile works for x86_64.
+
+Upstream-Status: Inappropriate [configuration]
+
+--- liboil-0.3.17/m4/as-unaligned-access.m4.orig 2009-02-26 14:40:08.000000000 -0500
++++ liboil-0.3.17/m4/as-unaligned-access.m4 2010-11-03 12:19:55.000000000 -0400
+@@ -9,7 +9,7 @@
+ _AS_ECHO_N([(blacklisted) ])
+ as_cv_unaligned_access=no
+ ;;
+- i?86*|x86_64|amd64|powerpc*|m68k*|cris*)
++ i?86*|x86_64*|amd64*|powerpc*|m68k*|cris*)
+ _AS_ECHO_N([(whitelisted) ])
+ as_cv_unaligned_access=yes
+ ;;
diff --git a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch
new file mode 100644
index 000000000..473380e9f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch
@@ -0,0 +1,222 @@
+Upstream-Status: Pending
+
+Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors.
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2011/12/01
+
+
+Index: liboil-0.3.17/liboil/amd64/wavelet.c
+===================================================================
+--- liboil-0.3.17.orig/liboil/amd64/wavelet.c
++++ liboil-0.3.17/liboil/amd64/wavelet.c
+@@ -21,14 +21,14 @@ deinterleave2_asm (int16_t *d1, int16_t
+ asm volatile ("\n"
+ " sub $2, %%rcx\n"
+ "1:\n"
+- " movw (%1,%%rcx,4), %%ax\n"
+- " movw %%ax, (%0,%%rcx,2)\n"
+- " movw 2(%1,%%rcx,4), %%ax\n"
+- " movw %%ax, (%2,%%rcx,2)\n"
+- " movw 4(%1,%%rcx,4), %%ax\n"
+- " movw %%ax, 2(%0,%%rcx,2)\n"
+- " movw 6(%1,%%rcx,4), %%ax\n"
+- " movw %%ax, 2(%2,%%rcx,2)\n"
++ " movw (%q1,%%rcx,4), %%ax\n"
++ " movw %%ax, (%q0,%%rcx,2)\n"
++ " movw 2(%q1,%%rcx,4), %%ax\n"
++ " movw %%ax, (%q2,%%rcx,2)\n"
++ " movw 4(%q1,%%rcx,4), %%ax\n"
++ " movw %%ax, 2(%q0,%%rcx,2)\n"
++ " movw 6(%q1,%%rcx,4), %%ax\n"
++ " movw %%ax, 2(%q2,%%rcx,2)\n"
+ " sub $2, %%rcx\n"
+ " jge 1b\n"
+ : "+r" (d1), "+r" (s_2xn), "+r" (d2), "+c" (n)
+@@ -53,20 +53,20 @@ deinterleave2_mmx (int16_t *d1, int16_t
+ asm volatile ("\n"
+ " xor %%rcx, %%rcx\n"
+ "1:\n"
+- " movq (%1,%%rcx,4), %%mm0\n"
+- " movq 8(%1,%%rcx,4), %%mm1\n"
++ " movq (%q1,%%rcx,4), %%mm0\n"
++ " movq 8(%q1,%%rcx,4), %%mm1\n"
+ " pslld $16, %%mm0\n"
+ " pslld $16, %%mm1\n"
+ " psrad $16, %%mm0\n"
+ " psrad $16, %%mm1\n"
+ " packssdw %%mm1, %%mm0\n"
+- " movq %%mm0, (%0,%%rcx,2)\n"
+- " movq (%1,%%rcx,4), %%mm0\n"
+- " movq 8(%1,%%rcx,4), %%mm1\n"
++ " movq %%mm0, (%q0,%%rcx,2)\n"
++ " movq (%q1,%%rcx,4), %%mm0\n"
++ " movq 8(%q1,%%rcx,4), %%mm1\n"
+ " psrad $16, %%mm0\n"
+ " psrad $16, %%mm1\n"
+ " packssdw %%mm1, %%mm0\n"
+- " movq %%mm0, (%2,%%rcx,2)\n"
++ " movq %%mm0, (%q2,%%rcx,2)\n"
+ " add $4, %%rcx\n"
+ " cmp %3, %%ecx\n"
+ " jl 1b\n"
+@@ -93,10 +93,10 @@ deinterleave2_mmx_2 (int16_t *d1, int16_
+ asm volatile ("\n"
+ " xor %%rcx, %%rcx\n"
+ "1:\n"
+- " pshufw $0xd8, (%1,%%rcx,4), %%mm0\n"
+- " movd %%mm0, (%0,%%rcx,2)\n"
+- " pshufw $0x8d, (%1,%%rcx,4), %%mm0\n"
+- " movd %%mm0, (%2,%%rcx,2)\n"
++ " pshufw $0xd8, (%q1,%%rcx,4), %%mm0\n"
++ " movd %%mm0, (%q0,%%rcx,2)\n"
++ " pshufw $0x8d, (%q1,%%rcx,4), %%mm0\n"
++ " movd %%mm0, (%q2,%%rcx,2)\n"
+ " add $2, %%rcx\n"
+ " cmp %3, %%ecx\n"
+ " jl 1b\n"
+@@ -123,16 +123,16 @@ deinterleave2_mmx_3 (int16_t *d1, int16_
+ asm volatile ("\n"
+ " xor %%rcx, %%rcx\n"
+ "1:\n"
+- " movq (%1,%%rcx,4), %%mm1\n"
+- " movq (%1,%%rcx,4), %%mm2\n"
+- " movq 8(%1,%%rcx,4), %%mm0\n"
++ " movq (%q1,%%rcx,4), %%mm1\n"
++ " movq (%q1,%%rcx,4), %%mm2\n"
++ " movq 8(%q1,%%rcx,4), %%mm0\n"
+ " punpcklwd %%mm0, %%mm1\n"
+ " punpckhwd %%mm0, %%mm2\n"
+ " movq %%mm1, %%mm0\n"
+ " punpcklwd %%mm2, %%mm0\n"
+ " punpckhwd %%mm2, %%mm1\n"
+- " movq %%mm0, (%0,%%rcx,2)\n"
+- " movq %%mm1, (%2,%%rcx,2)\n"
++ " movq %%mm0, (%q0,%%rcx,2)\n"
++ " movq %%mm1, (%q2,%%rcx,2)\n"
+ " add $4, %%rcx\n"
+ " cmp %3, %%ecx\n"
+ " jl 1b\n"
+@@ -159,26 +159,26 @@ deinterleave2_mmx_4 (int16_t *d1, int16_
+ asm volatile ("\n"
+ " xor %%rcx, %%rcx\n"
+ "1:\n"
+- " movq (%1,%%rcx,4), %%mm1\n"
++ " movq (%q1,%%rcx,4), %%mm1\n"
+ " movq %%mm1, %%mm2\n"
+- " movq 8(%1,%%rcx,4), %%mm0\n"
+- " movq 16(%1,%%rcx,4), %%mm5\n"
++ " movq 8(%q1,%%rcx,4), %%mm0\n"
++ " movq 16(%q1,%%rcx,4), %%mm5\n"
+ " punpcklwd %%mm0, %%mm1\n"
+ " movq %%mm5, %%mm6\n"
+ " punpckhwd %%mm0, %%mm2\n"
+- " movq 24(%1,%%rcx,4), %%mm4\n"
++ " movq 24(%q1,%%rcx,4), %%mm4\n"
+ " movq %%mm1, %%mm0\n"
+ " punpcklwd %%mm4, %%mm5\n"
+ " punpcklwd %%mm2, %%mm0\n"
+ " punpckhwd %%mm4, %%mm6\n"
+ " punpckhwd %%mm2, %%mm1\n"
+ " movq %%mm5, %%mm4\n"
+- " movq %%mm0, (%0,%%rcx,2)\n"
++ " movq %%mm0, (%q0,%%rcx,2)\n"
+ " punpcklwd %%mm6, %%mm4\n"
+- " movq %%mm1, (%2,%%rcx,2)\n"
++ " movq %%mm1, (%q2,%%rcx,2)\n"
+ " punpckhwd %%mm6, %%mm5\n"
+- " movq %%mm4, 8(%0,%%rcx,2)\n"
+- " movq %%mm5, 8(%2,%%rcx,2)\n"
++ " movq %%mm4, 8(%q0,%%rcx,2)\n"
++ " movq %%mm5, 8(%q2,%%rcx,2)\n"
+ " add $8, %%rcx\n"
+ " cmp %3, %%ecx\n"
+ " jl 1b\n"
+@@ -252,13 +252,13 @@ interleave2_mmx (int16_t *d_2xn, int16_t
+ asm volatile ("\n"
+ " xor %%rcx, %%rcx\n"
+ "1:\n"
+- " movq (%1,%%rcx,2), %%mm0\n"
+- " movq (%2,%%rcx,2), %%mm1\n"
++ " movq (%q1,%%rcx,2), %%mm0\n"
++ " movq (%q2,%%rcx,2), %%mm1\n"
+ " movq %%mm0, %%mm2\n"
+ " punpckhwd %%mm1, %%mm0\n"
+ " punpcklwd %%mm1, %%mm2\n"
+- " movq %%mm2, (%0,%%rcx,4)\n"
+- " movq %%mm0, 8(%0,%%rcx,4)\n"
++ " movq %%mm2, (%q0,%%rcx,4)\n"
++ " movq %%mm0, 8(%q0,%%rcx,4)\n"
+ " add $4, %%rcx\n"
+ " cmp %3, %%ecx\n"
+ " jl 1b\n"
+@@ -285,12 +285,12 @@ lift_add_shift1_mmx (int16_t *d, int16_t
+ asm volatile ("\n"
+ " xor %%rcx, %%rcx\n"
+ "1:\n"
+- " movq (%2,%%rcx,2), %%mm1\n"
+- " movq (%3,%%rcx,2), %%mm2\n"
++ " movq (%q2,%%rcx,2), %%mm1\n"
++ " movq (%q3,%%rcx,2), %%mm2\n"
+ " paddw %%mm2, %%mm1\n"
+ " psraw $1, %%mm1\n"
+- " paddw (%1,%%rcx,2), %%mm1\n"
+- " movq %%mm1, (%0,%%rcx,2)\n"
++ " paddw (%q1,%%rcx,2), %%mm1\n"
++ " movq %%mm1, (%q0,%%rcx,2)\n"
+ " add $4, %%rcx\n"
+ " cmp %4, %%ecx\n"
+ " jl 1b\n"
+@@ -317,13 +317,13 @@ lift_sub_shift1_mmx (int16_t *d, int16_t
+ asm volatile ("\n"
+ " xor %%rcx, %%rcx\n"
+ "1:\n"
+- " movq (%2,%%rcx,2), %%mm1\n"
+- " movq (%3,%%rcx,2), %%mm2\n"
+- " movq (%1,%%rcx,2), %%mm0\n"
++ " movq (%q2,%%rcx,2), %%mm1\n"
++ " movq (%q3,%%rcx,2), %%mm2\n"
++ " movq (%q1,%%rcx,2), %%mm0\n"
+ " paddw %%mm2, %%mm1\n"
+ " psraw $1, %%mm1\n"
+ " psubw %%mm1, %%mm0\n"
+- " movq %%mm0, (%0,%%rcx,2)\n"
++ " movq %%mm0, (%q0,%%rcx,2)\n"
+ " add $4, %%rcx\n"
+ " cmp %4, %%ecx\n"
+ " jl 1b\n"
+@@ -350,12 +350,12 @@ lift_add_shift2_mmx (int16_t *d, int16_t
+ asm volatile ("\n"
+ " xor %%rcx, %%rcx\n"
+ "1:\n"
+- " movq (%2,%%rcx,2), %%mm1\n"
+- " movq (%3,%%rcx,2), %%mm2\n"
++ " movq (%q2,%%rcx,2), %%mm1\n"
++ " movq (%q3,%%rcx,2), %%mm2\n"
+ " paddw %%mm2, %%mm1\n"
+ " psraw $2, %%mm1\n"
+- " paddw (%1,%%rcx,2), %%mm1\n"
+- " movq %%mm1, (%0,%%rcx,2)\n"
++ " paddw (%q1,%%rcx,2), %%mm1\n"
++ " movq %%mm1, (%q0,%%rcx,2)\n"
+ " add $4, %%rcx\n"
+ " cmp %4, %%ecx\n"
+ " jl 1b\n"
+@@ -382,13 +382,13 @@ lift_sub_shift2_mmx (int16_t *d, int16_t
+ asm volatile ("\n"
+ " xor %%rcx, %%rcx\n"
+ "1:\n"
+- " movq (%2,%%rcx,2), %%mm1\n"
+- " movq (%3,%%rcx,2), %%mm2\n"
+- " movq (%1,%%rcx,2), %%mm0\n"
++ " movq (%q2,%%rcx,2), %%mm1\n"
++ " movq (%q3,%%rcx,2), %%mm2\n"
++ " movq (%q1,%%rcx,2), %%mm0\n"
+ " paddw %%mm2, %%mm1\n"
+ " psraw $2, %%mm1\n"
+ " psubw %%mm1, %%mm0\n"
+- " movq %%mm0, (%0,%%rcx,2)\n"
++ " movq %%mm0, (%q0,%%rcx,2)\n"
+ " add $4, %%rcx\n"
+ " cmp %4, %%ecx\n"
+ " jl 1b\n"
diff --git a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch
new file mode 100644
index 000000000..892d44131
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch
@@ -0,0 +1,24 @@
+Upstream-Status: Inappropriate [disable feature]
+
+--- liboil-0.3.9/liboil/liboilfunction.c.old 2006-09-18 13:03:20.000000000 +0100
++++ liboil-0.3.9/liboil/liboilfunction.c 2006-09-18 13:04:10.000000000 +0100
+@@ -345,7 +345,9 @@
+ return;
+ }
+
+- test = oil_test_new (klass);
++ klass->chosen_impl = klass->reference_impl;
++ klass->func = klass->reference_impl->func;
++/* test = oil_test_new (klass);
+ if (test == NULL) {
+ OIL_ERROR ("failed to test function class %s", klass->name);
+ return;
+@@ -385,7 +387,7 @@
+ klass->chosen_impl = min_impl;
+ klass->func = min_impl->func;
+
+- oil_test_free (test);
++ oil_test_free (test);*/
+ }
+
+ static void
diff --git a/yocto-poky/meta/recipes-support/liboil/liboil_0.3.17.bb b/yocto-poky/meta/recipes-support/liboil/liboil_0.3.17.bb
new file mode 100644
index 000000000..03b778521
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liboil/liboil_0.3.17.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Library of simple functions optimized for various CPUs"
+HOMEPAGE = "http://liboil.freedesktop.org/"
+BUGTRACKER = "https://bugs.freedesktop.org/"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=ad80780d9c5205d63481a0184e199a15 \
+ file://liboil/liboil.h;endline=28;md5=95c794a66b88800d949fed17e437d9fb \
+ file://liboil/liboilcpu.c;endline=28;md5=89da69a61d88eedcba066f42353fb75a \
+ file://examples/example1.c;endline=29;md5=9d4dad9fcbbdf0441ee063f8af5170c9 \
+ file://testsuite/trans.c;endline=29;md5=380ecd43121fe3dcc0d8d7e5984f283d"
+
+DEPENDS = "glib-2.0"
+PR = "r5"
+
+SRC_URI = "http://liboil.freedesktop.org/download/${BPN}-${PV}.tar.gz \
+ file://no-tests.patch \
+ file://fix-unaligned-whitelist.patch \
+ file://0001-Fix-enable-vfp-flag.patch \
+ file://liboil_fix_for_x32.patch \
+ "
+
+SRC_URI[md5sum] = "47dc734f82faeb2964d97771cfd2e701"
+SRC_URI[sha256sum] = "105f02079b0b50034c759db34b473ecb5704ffa20a5486b60a8b7698128bfc69"
+
+inherit autotools pkgconfig
+
+ARM_INSTRUCTION_SET = "arm"
diff --git a/yocto-poky/meta/recipes-support/libpcre/libpcre/Makefile b/yocto-poky/meta/recipes-support/libpcre/libpcre/Makefile
new file mode 100644
index 000000000..708d807d0
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch b/yocto-poky/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch
new file mode 100644
index 000000000..89b44f6aa
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch b/yocto-poky/meta/recipes-support/libpcre/libpcre/pcre-cross.patch
new file mode 100644
index 000000000..83880f709
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/libpcre/libpcre/run-ptest b/yocto-poky/meta/recipes-support/libpcre/libpcre/run-ptest
new file mode 100644
index 000000000..990d4a12a
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libpcre/libpcre/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make check-TESTS
diff --git a/yocto-poky/meta/recipes-support/libpcre/libpcre_8.37.bb b/yocto-poky/meta/recipes-support/libpcre/libpcre_8.37.bb
new file mode 100644
index 000000000..bcfc9e9af
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libpcre/libpcre_8.37.bb
@@ -0,0 +1,73 @@
+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=7e4937814aee14758c1c95b59c80c44d"
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/pcre/pcre/${PV}/pcre-${PV}.tar.bz2 \
+ file://pcre-cross.patch \
+ file://fix-pcre-name-collision.patch \
+ file://run-ptest \
+ file://Makefile \
+"
+
+SRC_URI[md5sum] = "ed91be292cb01d21bc7e526816c26981"
+SRC_URI[sha256sum] = "51679ea8006ce31379fb0860e46dd86665d864b5020fc9cd19e71260eef4789d"
+
+S = "${WORKDIR}/pcre-${PV}"
+
+PROVIDES += "pcre"
+DEPENDS += "bzip2 zlib"
+
+PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
+
+BINCONFIG = "${bindir}/pcre-config"
+
+inherit autotools binconfig-disabled ptest
+
+EXTRA_OECONF = "\
+ --enable-newline-is-lf \
+ --enable-rebuild-chartables \
+ --enable-utf8 \
+ --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++"
+
+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
+}
diff --git a/yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch b/yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch
new file mode 100644
index 000000000..5ae52f2d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libproxy/libproxy/0001-test-Include-sys-select.h-for-select.patch
@@ -0,0 +1,37 @@
+From f5f2c2289eb35eb804c1c35e46ca41b58e4cae01 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 14:13:49 -0700
+Subject: [PATCH] test: Include <sys/select.h> for select()
+
+As per posix we need to include this file otherwise we end up with errors like
+
+/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp: In member function 'bool TestServer::loop()':
+/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp:80:4: error: 'fd_set' was not declared in this scope
+ fd_set fds;
+ ^
+/home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/mips32r2-oe-linux-musl/libproxy/0.4.11-r0/libproxy-0.4.11/libproxy/test/get-pac-test.cpp:89:14: error: 'fds' was not declared in this scope
+ FD_ZERO (&fds);
+<JIRA TICKET #1>, <JIRA TICKET #2>, <JIRA TICKET #n> : <one line summary of change>
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libproxy/test/get-pac-test.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libproxy/test/get-pac-test.cpp b/libproxy/test/get-pac-test.cpp
+index a61fc4b..bda4646 100644
+--- a/libproxy/test/get-pac-test.cpp
++++ b/libproxy/test/get-pac-test.cpp
+@@ -3,6 +3,7 @@
+ #include <sstream>
+ #include <string>
+
++#include <sys/select.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+--
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb b/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb
new file mode 100644
index 000000000..06d0b9ba9
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Library providing automatic proxy configuration management"
+HOMEPAGE = "http://code.google.com/p/libproxy/"
+BUGTRACKER = "http://code.google.com/p/libproxy/issues/list"
+SECTION = "libs"
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+ file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
+
+DEPENDS = "gconf glib-2.0"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/libp/${BPN}/${BPN}_${PV}.orig.tar.gz \
+ file://0001-test-Include-sys-select.h-for-select.patch \
+ "
+SRC_URI[md5sum] = "3cd1ae2a4abecf44b3f24d6639d2cd84"
+SRC_URI[sha256sum] = "dc3f33de54163718f82b3e7c496a7de97f8862578414b8ecaad3cbfe4821864b"
+
+inherit cmake pkgconfig
+
+EXTRA_OECMAKE = "-DWITH_WEBKIT=no -DWITH_GNOME=yes -DWITH_KDE4=no \
+ -DWITH_PYTHON=no -DWITH_PERL=no -DWITH_MOZJS=no -DWITH_NM=no -DLIB_INSTALL_DIR=${libdir} -DLIBEXEC_INSTALL_DIR=${libexecdir}"
+
+FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
+FILES_${PN}-dev += "${datadir}/cmake"
+FILES_${PN}-dbg += "${libdir}/${BPN}/${PV}/plugins/.debug/ ${libdir}/${BPN}/${PV}/modules/.debug/"
+
+do_configure_prepend() {
+ export HOST_SYS=${HOST_SYS}
+ export BUILD_SYS=${BUILD_SYS}
+}
+
+python() {
+ if incompatible_license_contains("GPLv3", "x", "", d) == "x" or bb.utils.contains("DISTRO_FEATURES", "x11", "x", "", d) == "":
+ d.setVar("EXTRA_OECMAKE", d.getVar("EXTRA_OECMAKE", False).replace("-DWITH_GNOME=yes", "-DWITH_GNOME=no"))
+ d.setVar("DEPENDS", " ".join(i for i in d.getVar("DEPENDS", False).split() if i != "gconf"))
+}
diff --git a/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.50.0.bb b/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.50.0.bb
new file mode 100644
index 000000000..044db31f4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.50.0.bb
@@ -0,0 +1,28 @@
+SUMMARY = "An HTTP library implementation in C"
+HOMEPAGE = "http://www.gnome.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+SECTION = "x11/gnome/libs"
+
+DEPENDS = "glib-2.0 gnutls libxml2 sqlite3 intltool-native"
+
+# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Enable
+# by default but let it be easily disabled.
+PACKAGECONFIG ??= "gnome"
+PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
+
+SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
+SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "9a84d66e1b7ccd3bd340574b11eccc15"
+SRC_URI[sha256sum] = "1e01365ac4af3817187ea847f9d3588c27eee01fc519a5a7cb212bb78b0f667b"
+
+S = "${WORKDIR}/libsoup-${PV}"
+
+inherit autotools gettext pkgconfig
+
+# glib-networking is needed for SSL, proxies, etc.
+RRECOMMENDS_${PN} = "glib-networking"
diff --git a/yocto-poky/meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch b/yocto-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/yocto-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/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
new file mode 100644
index 000000000..d4489165b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch
@@ -0,0 +1,40 @@
+From 8d99a368615656a835f5502326afd31cec2cebfe Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Mon, 16 Sep 2013 18:16:12 +0800
+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 | 11 -----------
+ 1 files changed, 0 insertions(+), 11 deletions(-)
+
+Index: libunistring-0.9.4/gnulib-m4/iconv.m4
+===================================================================
+--- libunistring-0.9.4.orig/gnulib-m4/iconv.m4 2014-11-03 17:41:29.755011917 +0000
++++ libunistring-0.9.4/gnulib-m4/iconv.m4 2014-11-03 17:43:03.795014480 +0000
+@@ -159,17 +159,6 @@
+ }
+ }
+ #endif
+- /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+- provided. */
+- if (/* Try standardized names. */
+- iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+- /* Try IRIX, OSF/1 names. */
+- && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+- /* Try AIX names. */
+- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+- /* Try HP-UX names. */
+- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+- result |= 16;
+ return result;
+ }]])],
+ [am_cv_func_iconv_works=yes],
diff --git a/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.5.bb b/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.5.bb
new file mode 100644
index 000000000..45cf63330
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.5.bb
@@ -0,0 +1,28 @@
+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 = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+ file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+
+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] = "1a705bcdcb83799d544137617b377cfd"
+SRC_URI[sha256sum] = "1a8c0772467850bef7197318a95f44abbb678ea83cbf119a3500cc7848276a17"
+
+inherit autotools texinfo
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch
new file mode 100644
index 000000000..af972f84e
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch
@@ -0,0 +1,29 @@
+From 396b6c7ab737e2bff244d640601c436a26260ca1 Mon Sep 17 00:00:00 2001
+From: Arun Sharma <arun@sharma-home.net>
+Date: Fri, 19 Jun 2015 19:47:22 -0700
+Subject: [PATCH] Invalid dwarf opcodes can cause references beyond the end of
+ the array.
+
+Upstream-Status: backport
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ include/dwarf_i.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/dwarf_i.h b/include/dwarf_i.h
+index 1e6231e..4a02a7d 100644
+--- a/include/dwarf_i.h
++++ b/include/dwarf_i.h
+@@ -20,7 +20,7 @@
+ extern const uint8_t dwarf_to_unw_regnum_map[DWARF_REGNUM_MAP_LENGTH];
+ /* REG is evaluated multiple times; it better be side-effects free! */
+ # define dwarf_to_unw_regnum(reg) \
+- (((reg) <= DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
++ (((reg) < DWARF_REGNUM_MAP_LENGTH) ? dwarf_to_unw_regnum_map[reg] : 0)
+ #endif
+
+ #ifdef UNW_LOCAL_ONLY
+--
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch
new file mode 100644
index 000000000..228ec322d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch
@@ -0,0 +1,2529 @@
+From ac6c0a6535975f1dc2da6e4e2766614baac2a14a Mon Sep 17 00:00:00 2001
+From: Yvan Roux <yvan.roux@linaro.org>
+Date: Sat, 11 May 2013 09:18:23 -0600
+Subject: [PATCH] AArch64 port.
+
+Upstream-Status: Backport
+
+---
+ Makefile.am | 6
+ README | 1
+ configure.ac | 6
+ include/libunwind-aarch64.h | 187 ++++++++++++++++++++++
+ include/libunwind.h.in | 4
+ include/tdep-aarch64/dwarf-config.h | 52 ++++++
+ include/tdep-aarch64/jmpbuf.h | 33 +++
+ include/tdep-aarch64/libunwind_i.h | 294 +++++++++++++++++++++++++++++++++++
+ include/tdep/dwarf-config.h | 4
+ include/tdep/jmpbuf.h | 2
+ include/tdep/libunwind_i.h.in | 4
+ src/Makefile.am | 39 ++++
+ src/aarch64/Gcreate_addr_space.c | 60 +++++++
+ src/aarch64/Gget_proc_info.c | 39 ++++
+ src/aarch64/Gget_save_loc.c | 100 +++++++++++
+ src/aarch64/Gglobal.c | 57 ++++++
+ src/aarch64/Ginit.c | 187 ++++++++++++++++++++++
+ src/aarch64/Ginit_local.c | 55 ++++++
+ src/aarch64/Ginit_remote.c | 45 +++++
+ src/aarch64/Gis_signal_frame.c | 64 +++++++
+ src/aarch64/Gregs.c | 113 +++++++++++++
+ src/aarch64/Gresume.c | 177 +++++++++++++++++++++
+ src/aarch64/Gstep.c | 129 +++++++++++++++
+ src/aarch64/Lcreate_addr_space.c | 5
+ src/aarch64/Lget_proc_info.c | 5
+ src/aarch64/Lget_save_loc.c | 5
+ src/aarch64/Lglobal.c | 5
+ src/aarch64/Linit.c | 5
+ src/aarch64/Linit_local.c | 5
+ src/aarch64/Linit_remote.c | 5
+ src/aarch64/Lis_signal_frame.c | 5
+ src/aarch64/Lregs.c | 5
+ src/aarch64/Lresume.c | 5
+ src/aarch64/Lstep.c | 5
+ src/aarch64/gen-offsets.c | 68 ++++++++
+ src/aarch64/init.h | 127 +++++++++++++++
+ src/aarch64/is_fpreg.c | 32 +++
+ src/aarch64/offsets.h | 49 +++++
+ src/aarch64/regname.c | 106 ++++++++++++
+ src/aarch64/siglongjmp.S | 12 +
+ src/aarch64/unwind_i.h | 43 +++++
+ src/coredump/_UCD_access_reg_linux.c | 5
+ src/ptrace/_UPT_reg_offset.c | 36 ++++
+ 43 files changed, 2184 insertions(+), 7 deletions(-)
+ create mode 100644 include/libunwind-aarch64.h
+ create mode 100644 include/tdep-aarch64/dwarf-config.h
+ create mode 100644 include/tdep-aarch64/jmpbuf.h
+ create mode 100644 include/tdep-aarch64/libunwind_i.h
+ create mode 100644 src/aarch64/Gcreate_addr_space.c
+ create mode 100644 src/aarch64/Gget_proc_info.c
+ create mode 100644 src/aarch64/Gget_save_loc.c
+ create mode 100644 src/aarch64/Gglobal.c
+ create mode 100644 src/aarch64/Ginit.c
+ create mode 100644 src/aarch64/Ginit_local.c
+ create mode 100644 src/aarch64/Ginit_remote.c
+ create mode 100644 src/aarch64/Gis_signal_frame.c
+ create mode 100644 src/aarch64/Gregs.c
+ create mode 100644 src/aarch64/Gresume.c
+ create mode 100644 src/aarch64/Gstep.c
+ create mode 100644 src/aarch64/Lcreate_addr_space.c
+ create mode 100644 src/aarch64/Lget_proc_info.c
+ create mode 100644 src/aarch64/Lget_save_loc.c
+ create mode 100644 src/aarch64/Lglobal.c
+ create mode 100644 src/aarch64/Linit.c
+ create mode 100644 src/aarch64/Linit_local.c
+ create mode 100644 src/aarch64/Linit_remote.c
+ create mode 100644 src/aarch64/Lis_signal_frame.c
+ create mode 100644 src/aarch64/Lregs.c
+ create mode 100644 src/aarch64/Lresume.c
+ create mode 100644 src/aarch64/Lstep.c
+ create mode 100644 src/aarch64/gen-offsets.c
+ create mode 100644 src/aarch64/init.h
+ create mode 100644 src/aarch64/is_fpreg.c
+ create mode 100644 src/aarch64/offsets.h
+ create mode 100644 src/aarch64/regname.c
+ create mode 100644 src/aarch64/siglongjmp.S
+ create mode 100644 src/aarch64/unwind_i.h
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,6 +2,9 @@ include_HEADERS = include/libunwind-dyna
+ include/libunwind-ptrace.h \
+ include/libunwind-coredump.h
+
++if ARCH_AARCH64
++include_HEADERS += include/libunwind-aarch64.h
++endif
+ if ARCH_ARM
+ include_HEADERS += include/libunwind-arm.h
+ endif
+@@ -41,6 +44,9 @@ SUBDIRS = src tests doc
+ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \
+ include/compiler.h include/libunwind_i.h include/mempool.h \
+ include/remote.h \
++ include/tdep-aarch64/dwarf-config.h \
++ include/tdep-aarch64/jmpbuf.h \
++ include/tdep-aarch64/libunwind_i.h \
+ include/tdep-arm/dwarf-config.h include/tdep-arm/ex_tables.h \
+ include/tdep-arm/jmpbuf.h include/tdep-arm/libunwind_i.h \
+ include/tdep-ia64/jmpbuf.h include/tdep-ia64/rse.h \
+--- a/README
++++ b/README
+@@ -9,6 +9,7 @@ several architecture/operating-system co
+ Linux/IA-64: Fully tested and supported.
+ Linux/PARISC: Works well, but C library missing unwind-info.
+ HP-UX/IA-64: Mostly works but known to have some serious limitations.
++ Linux/AArch64: Newly added.
+ Linux/PPC64: Newly added.
+ Linux/SuperH: Newly added.
+ FreeBSD/i386: Newly added.
+--- a/configure.ac
++++ b/configure.ac
+@@ -104,7 +104,7 @@ SET_ARCH([$target_cpu],[target_arch])
+
+ AC_ARG_ENABLE(coredump,
+ AS_HELP_STRING([--enable-coredump],[building libunwind-coredump library]),,
+- [AS_CASE([$host_arch], [arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])]
++ [AS_CASE([$host_arch], [aarch64*|arm*|mips*|sh*|x86*], [enable_coredump=yes], [enable_coredump=no])]
+ )
+
+ AC_MSG_CHECKING([if we should build libunwind-coredump])
+@@ -121,6 +121,7 @@ AC_MSG_RESULT([$target_os])
+
+ AM_CONDITIONAL(BUILD_COREDUMP, test x$enable_coredump = xyes)
+ AM_CONDITIONAL(REMOTE_ONLY, test x$target_arch != x$host_arch)
++AM_CONDITIONAL(ARCH_AARCH64, test x$target_arch = xaarch64)
+ AM_CONDITIONAL(ARCH_ARM, test x$target_arch = xarm)
+ AM_CONDITIONAL(ARCH_IA64, test x$target_arch = xia64)
+ AM_CONDITIONAL(ARCH_HPPA, test x$target_arch = xhppa)
+@@ -137,7 +138,7 @@ AM_CONDITIONAL(OS_FREEBSD, expr x$target
+ AC_MSG_CHECKING([for ELF helper width])
+ case "${target_arch}" in
+ (arm|hppa|ppc32|x86|sh) use_elf32=yes; AC_MSG_RESULT([32]);;
+-(ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
++(aarch64|ia64|ppc64|x86_64) use_elf64=yes; AC_MSG_RESULT([64]);;
+ (mips) use_elfxx=yes; AC_MSG_RESULT([xx]);;
+ *) AC_MSG_ERROR([Unknown ELF target: ${target_arch}])
+ esac
+@@ -186,6 +187,7 @@ AS_HELP_STRING([--enable-cxx-exceptions]
+ # C++ exception handling doesn't work too well on x86
+ case $target_arch in
+ x86*) enable_cxx_exceptions=no;;
++ aarch64*) enable_cxx_exceptions=no;;
+ arm*) enable_cxx_exceptions=no;;
+ mips*) enable_cxx_exceptions=no;;
+ *) enable_cxx_exceptions=yes;;
+--- /dev/null
++++ b/include/libunwind-aarch64.h
+@@ -0,0 +1,187 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2001-2004 Hewlett-Packard Co
++ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#ifndef LIBUNWIND_H
++#define LIBUNWIND_H
++
++#if defined(__cplusplus) || defined(c_plusplus)
++extern "C" {
++#endif
++
++#include <inttypes.h>
++#include <stddef.h>
++#include <ucontext.h>
++
++#define UNW_TARGET aarch64
++#define UNW_TARGET_AARCH64 1
++
++#define _U_TDEP_QP_TRUE 0 /* see libunwind-dynamic.h */
++
++/* This needs to be big enough to accommodate "struct cursor", while
++ leaving some slack for future expansion. Changing this value will
++ require recompiling all users of this library. Stack allocation is
++ relatively cheap and unwind-state copying is relatively rare, so we
++ want to err on making it rather too big than too small. */
++
++#define UNW_TDEP_CURSOR_LEN 4096
++
++typedef uint64_t unw_word_t;
++typedef int64_t unw_sword_t;
++
++typedef long double unw_tdep_fpreg_t;
++
++typedef struct
++ {
++ /* no aarch64-specific auxiliary proc-info */
++ }
++unw_tdep_proc_info_t;
++
++typedef enum
++ {
++ /* 64-bit general registers. */
++ UNW_AARCH64_X0,
++ UNW_AARCH64_X1,
++ UNW_AARCH64_X2,
++ UNW_AARCH64_X3,
++ UNW_AARCH64_X4,
++ UNW_AARCH64_X5,
++ UNW_AARCH64_X6,
++ UNW_AARCH64_X7,
++ UNW_AARCH64_X8,
++
++ /* Temporary registers. */
++ UNW_AARCH64_X9,
++ UNW_AARCH64_X10,
++ UNW_AARCH64_X11,
++ UNW_AARCH64_X12,
++ UNW_AARCH64_X13,
++ UNW_AARCH64_X14,
++ UNW_AARCH64_X15,
++
++ /* Intra-procedure-call temporary registers. */
++ UNW_AARCH64_X16,
++ UNW_AARCH64_X17,
++
++ /* Callee-saved registers. */
++ UNW_AARCH64_X18,
++ UNW_AARCH64_X19,
++ UNW_AARCH64_X20,
++ UNW_AARCH64_X21,
++ UNW_AARCH64_X22,
++ UNW_AARCH64_X23,
++ UNW_AARCH64_X24,
++ UNW_AARCH64_X25,
++ UNW_AARCH64_X26,
++ UNW_AARCH64_X27,
++ UNW_AARCH64_X28,
++
++ /* 64-bit frame pointer. */
++ UNW_AARCH64_X29,
++
++ /* 64-bit link register. */
++ UNW_AARCH64_X30,
++
++ /* 64-bit stack pointer. */
++ UNW_AARCH64_SP = 31,
++ UNW_AARCH64_PC,
++ UNW_AARCH64_PSTATE,
++
++ /* 128-bit FP/Advanced SIMD registers. */
++ UNW_AARCH64_V0 = 64,
++ UNW_AARCH64_V1,
++ UNW_AARCH64_V2,
++ UNW_AARCH64_V3,
++ UNW_AARCH64_V4,
++ UNW_AARCH64_V5,
++ UNW_AARCH64_V6,
++ UNW_AARCH64_V7,
++ UNW_AARCH64_V8,
++ UNW_AARCH64_V9,
++ UNW_AARCH64_V10,
++ UNW_AARCH64_V11,
++ UNW_AARCH64_V12,
++ UNW_AARCH64_V13,
++ UNW_AARCH64_V14,
++ UNW_AARCH64_V15,
++ UNW_AARCH64_V16,
++ UNW_AARCH64_V17,
++ UNW_AARCH64_V18,
++ UNW_AARCH64_V19,
++ UNW_AARCH64_V20,
++ UNW_AARCH64_V21,
++ UNW_AARCH64_V22,
++ UNW_AARCH64_V23,
++ UNW_AARCH64_V24,
++ UNW_AARCH64_V25,
++ UNW_AARCH64_V26,
++ UNW_AARCH64_V27,
++ UNW_AARCH64_V28,
++ UNW_AARCH64_V29,
++ UNW_AARCH64_V30,
++ UNW_AARCH64_V31,
++
++ UNW_AARCH64_FPSR,
++ UNW_AARCH64_FPCR,
++
++ /* For AArch64, the CFA is the value of SP (x31) at the call site of the
++ previous frame. */
++ UNW_AARCH64_CFA = UNW_AARCH64_SP,
++
++ UNW_TDEP_LAST_REG = UNW_AARCH64_FPCR,
++
++ UNW_TDEP_IP = UNW_AARCH64_X30,
++ UNW_TDEP_SP = UNW_AARCH64_SP,
++ UNW_TDEP_EH = UNW_AARCH64_X0,
++
++ }
++aarch64_regnum_t;
++
++/* Use R0 through R3 to pass exception handling information. */
++#define UNW_TDEP_NUM_EH_REGS 4
++
++typedef struct unw_tdep_save_loc
++ {
++ /* Additional target-dependent info on a save location. */
++ }
++unw_tdep_save_loc_t;
++
++
++/* On AArch64, we can directly use ucontext_t as the unwind context. */
++typedef ucontext_t unw_tdep_context_t;
++
++#include "libunwind-common.h"
++#include "libunwind-dynamic.h"
++
++#define unw_tdep_getcontext(uc) (getcontext (uc), 0)
++#define unw_tdep_is_fpreg UNW_ARCH_OBJ(is_fpreg)
++
++extern int unw_tdep_is_fpreg (int);
++
++#if defined(__cplusplus) || defined(c_plusplus)
++}
++#endif
++
++#endif /* LIBUNWIND_H */
+--- a/include/libunwind.h.in
++++ b/include/libunwind.h.in
+@@ -3,7 +3,9 @@
+
+ #ifndef UNW_REMOTE_ONLY
+
+-#if defined __arm__
++#if defined __aarch64__
++#include "libunwind-aarch64.h"
++#elif defined __arm__
+ # include "libunwind-arm.h"
+ #elif defined __hppa__
+ # include "libunwind-hppa.h"
+--- /dev/null
++++ b/include/tdep-aarch64/dwarf-config.h
+@@ -0,0 +1,52 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#ifndef dwarf_config_h
++#define dwarf_config_h
++
++/* This matches the value udes by GCC (see
++ gcc/config/aarch64/aarch64.h:DWARF_FRAME_REGISTERS. */
++#define DWARF_NUM_PRESERVED_REGS 97
++
++/* Return TRUE if the ADDR_SPACE uses big-endian byte-order. */
++#define dwarf_is_big_endian(addr_space) 0
++
++#define dwarf_to_unw_regnum(reg) (((reg) <= UNW_AARCH64_V31) ? (reg) : 0)
++
++/* Convert a pointer to a dwarf_cursor structure to a pointer to
++ unw_cursor_t. */
++#define dwarf_to_cursor(c) ((unw_cursor_t *) (c))
++
++typedef struct dwarf_loc
++ {
++ unw_word_t val;
++#ifndef UNW_LOCAL_ONLY
++ unw_word_t type; /* see DWARF_LOC_TYPE_* macros. */
++#endif
++ }
++dwarf_loc_t;
++
++#endif /* dwarf_config_h */
+--- /dev/null
++++ b/include/tdep-aarch64/jmpbuf.h
+@@ -0,0 +1,33 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++/* Use glibc's jump-buffer indices; NPTL peeks at SP: */
++
++/* FIXME for AArch64 */
++
++#define JB_SP 13
++#define JB_RP 14
++#define JB_MASK_SAVED 15
++#define JB_MASK 16
+--- /dev/null
++++ b/include/tdep-aarch64/libunwind_i.h
+@@ -0,0 +1,294 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2001-2005 Hewlett-Packard Co
++ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#ifndef AARCH64_LIBUNWIND_I_H
++#define AARCH64_LIBUNWIND_I_H
++
++/* Target-dependent definitions that are internal to libunwind but need
++ to be shared with target-independent code. */
++
++#include <stdlib.h>
++#include <libunwind.h>
++
++#include "elf64.h"
++#include "mempool.h"
++#include "dwarf.h"
++
++typedef struct
++ {
++ /* no aarch64-specific fast trace */
++ }
++unw_tdep_frame_t;
++
++#ifdef UNW_LOCAL_ONLY
++
++typedef unw_word_t aarch64_loc_t;
++
++#else /* !UNW_LOCAL_ONLY */
++
++typedef struct aarch64_loc
++ {
++ unw_word_t w0, w1;
++ }
++aarch64_loc_t;
++
++#endif /* !UNW_LOCAL_ONLY */
++
++struct unw_addr_space
++ {
++ struct unw_accessors acc;
++ int big_endian;
++ unw_caching_policy_t caching_policy;
++#ifdef HAVE_ATOMIC_OPS_H
++ AO_t cache_generation;
++#else
++ uint32_t cache_generation;
++#endif
++ unw_word_t dyn_generation; /* see dyn-common.h */
++ unw_word_t dyn_info_list_addr; /* (cached) dyn_info_list_addr */
++ struct dwarf_rs_cache global_cache;
++ struct unw_debug_frame_list *debug_frames;
++ };
++
++struct cursor
++ {
++ struct dwarf_cursor dwarf; /* must be first */
++ enum
++ {
++ AARCH64_SCF_NONE,
++ AARCH64_SCF_LINUX_RT_SIGFRAME,
++ }
++ sigcontext_format;
++ unw_word_t sigcontext_addr;
++ unw_word_t sigcontext_sp;
++ unw_word_t sigcontext_pc;
++ };
++
++#define DWARF_GET_LOC(l) ((l).val)
++
++#ifdef UNW_LOCAL_ONLY
++# define DWARF_NULL_LOC DWARF_LOC (0, 0)
++# define DWARF_IS_NULL_LOC(l) (DWARF_GET_LOC (l) == 0)
++# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r) })
++# define DWARF_IS_REG_LOC(l) 0
++# define DWARF_REG_LOC(c,r) (DWARF_LOC((unw_word_t) \
++ tdep_uc_addr((c)->as_arg, (r)), 0))
++# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0)
++# define DWARF_FPREG_LOC(c,r) (DWARF_LOC((unw_word_t) \
++ tdep_uc_addr((c)->as_arg, (r)), 0))
++
++static inline int
++dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *val = *(unw_fpreg_t *) DWARF_GET_LOC (loc);
++ return 0;
++}
++
++static inline int
++dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *(unw_fpreg_t *) DWARF_GET_LOC (loc) = val;
++ return 0;
++}
++
++static inline int
++dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *val = *(unw_word_t *) DWARF_GET_LOC (loc);
++ return 0;
++}
++
++static inline int
++dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
++{
++ if (!DWARF_GET_LOC (loc))
++ return -1;
++ *(unw_word_t *) DWARF_GET_LOC (loc) = val;
++ return 0;
++}
++
++#else /* !UNW_LOCAL_ONLY */
++# define DWARF_LOC_TYPE_FP (1 << 0)
++# define DWARF_LOC_TYPE_REG (1 << 1)
++# define DWARF_NULL_LOC DWARF_LOC (0, 0)
++# define DWARF_IS_NULL_LOC(l) \
++ ({ dwarf_loc_t _l = (l); _l.val == 0 && _l.type == 0; })
++# define DWARF_LOC(r, t) ((dwarf_loc_t) { .val = (r), .type = (t) })
++# define DWARF_IS_REG_LOC(l) (((l).type & DWARF_LOC_TYPE_REG) != 0)
++# define DWARF_IS_FP_LOC(l) (((l).type & DWARF_LOC_TYPE_FP) != 0)
++# define DWARF_REG_LOC(c,r) DWARF_LOC((r), DWARF_LOC_TYPE_REG)
++# define DWARF_MEM_LOC(c,m) DWARF_LOC ((m), 0)
++# define DWARF_FPREG_LOC(c,r) DWARF_LOC((r), (DWARF_LOC_TYPE_REG \
++ | DWARF_LOC_TYPE_FP))
++
++static inline int
++dwarf_getfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t *val)
++{
++ char *valp = (char *) &val;
++ unw_word_t addr;
++ int ret;
++
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc),
++ val, 0, c->as_arg);
++
++ addr = DWARF_GET_LOC (loc);
++ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp,
++ 0, c->as_arg)) < 0)
++ return ret;
++
++ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1, 0,
++ c->as_arg);
++}
++
++static inline int
++dwarf_putfp (struct dwarf_cursor *c, dwarf_loc_t loc, unw_fpreg_t val)
++{
++ char *valp = (char *) &val;
++ unw_word_t addr;
++ int ret;
++
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_fpreg) (c->as, DWARF_GET_LOC (loc),
++ &val, 1, c->as_arg);
++
++ addr = DWARF_GET_LOC (loc);
++ if ((ret = (*c->as->acc.access_mem) (c->as, addr + 0, (unw_word_t *) valp,
++ 1, c->as_arg)) < 0)
++ return ret;
++
++ return (*c->as->acc.access_mem) (c->as, addr + 4, (unw_word_t *) valp + 1,
++ 1, c->as_arg);
++}
++
++static inline int
++dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val)
++{
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ /* If a code-generator were to save a value of type unw_word_t in a
++ floating-point register, we would have to support this case. I
++ suppose it could happen with MMX registers, but does it really
++ happen? */
++ assert (!DWARF_IS_FP_LOC (loc));
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), val,
++ 0, c->as_arg);
++ else
++ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), val,
++ 0, c->as_arg);
++}
++
++static inline int
++dwarf_put (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t val)
++{
++ if (DWARF_IS_NULL_LOC (loc))
++ return -UNW_EBADREG;
++
++ /* If a code-generator were to save a value of type unw_word_t in a
++ floating-point register, we would have to support this case. I
++ suppose it could happen with MMX registers, but does it really
++ happen? */
++ assert (!DWARF_IS_FP_LOC (loc));
++
++ if (DWARF_IS_REG_LOC (loc))
++ return (*c->as->acc.access_reg) (c->as, DWARF_GET_LOC (loc), &val,
++ 1, c->as_arg);
++ else
++ return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), &val,
++ 1, c->as_arg);
++}
++
++#endif /* !UNW_LOCAL_ONLY */
++
++
++
++#define tdep_getcontext_trace unw_getcontext
++#define tdep_init_done UNW_OBJ(init_done)
++#define tdep_init UNW_OBJ(init)
++/* Platforms that support UNW_INFO_FORMAT_TABLE need to define
++ tdep_search_unwind_table. */
++#define tdep_search_unwind_table dwarf_search_unwind_table
++#define tdep_find_unwind_table dwarf_find_unwind_table
++#define tdep_uc_addr UNW_OBJ(uc_addr)
++#define tdep_get_elf_image UNW_ARCH_OBJ(get_elf_image)
++#define tdep_access_reg UNW_OBJ(access_reg)
++#define tdep_access_fpreg UNW_OBJ(access_fpreg)
++#define tdep_fetch_frame(c,ip,n) do {} while(0)
++#define tdep_cache_frame(c,rs) do {} while(0)
++#define tdep_reuse_frame(c,rs) do {} while(0)
++#define tdep_stash_frame(c,rs) do {} while(0)
++#define tdep_trace(cur,addr,n) (-UNW_ENOINFO)
++
++#ifdef UNW_LOCAL_ONLY
++# define tdep_find_proc_info(c,ip,n) \
++ dwarf_find_proc_info((c)->as, (ip), &(c)->pi, (n), \
++ (c)->as_arg)
++# define tdep_put_unwind_info(as,pi,arg) \
++ dwarf_put_unwind_info((as), (pi), (arg))
++#else
++# define tdep_find_proc_info(c,ip,n) \
++ (*(c)->as->acc.find_proc_info)((c)->as, (ip), &(c)->pi, (n), \
++ (c)->as_arg)
++# define tdep_put_unwind_info(as,pi,arg) \
++ (*(as)->acc.put_unwind_info)((as), (pi), (arg))
++#endif
++
++#define tdep_get_as(c) ((c)->dwarf.as)
++#define tdep_get_as_arg(c) ((c)->dwarf.as_arg)
++#define tdep_get_ip(c) ((c)->dwarf.ip)
++#define tdep_big_endian(as) ((as)->big_endian)
++
++extern int tdep_init_done;
++
++extern void tdep_init (void);
++extern int tdep_search_unwind_table (unw_addr_space_t as, unw_word_t ip,
++ unw_dyn_info_t *di, unw_proc_info_t *pi,
++ int need_unwind_info, void *arg);
++extern void *tdep_uc_addr (unw_tdep_context_t *uc, int reg);
++extern int tdep_get_elf_image (struct elf_image *ei, pid_t pid, unw_word_t ip,
++ unsigned long *segbase, unsigned long *mapoff,
++ char *path, size_t pathlen);
++extern int tdep_access_reg (struct cursor *c, unw_regnum_t reg,
++ unw_word_t *valp, int write);
++extern int tdep_access_fpreg (struct cursor *c, unw_regnum_t reg,
++ unw_fpreg_t *valp, int write);
++
++#endif /* AARCH64_LIBUNWIND_I_H */
+--- a/include/tdep/dwarf-config.h
++++ b/include/tdep/dwarf-config.h
+@@ -1,7 +1,9 @@
+ /* Provide a real file - not a symlink - as it would cause multiarch conflicts
+ when multiple different arch releases are installed simultaneously. */
+
+-#if defined __arm__
++#if defined __aarch64__
++# include "tdep-aarch64/dwarf-config.h"
++#elif defined __arm__
+ # include "tdep-arm/dwarf-config.h"
+ #elif defined __hppa__
+ # include "tdep-hppa/dwarf-config.h"
+--- a/include/tdep/jmpbuf.h
++++ b/include/tdep/jmpbuf.h
+@@ -3,6 +3,8 @@
+
+ #ifndef UNW_REMOTE_ONLY
+
++#if defined __aarch64__
++# include "tdep-aarch64/jmpbuf.h"
+ #if defined __arm__
+ # include "tdep-arm/jmpbuf.h"
+ #elif defined __hppa__
+--- a/include/tdep/libunwind_i.h.in
++++ b/include/tdep/libunwind_i.h.in
+@@ -3,7 +3,9 @@
+
+ #ifndef UNW_REMOTE_ONLY
+
+-#if defined __arm__
++#if defined __aarch64__
++# include "tdep-aarch64/libunwind_i.h"
++#elif defined __arm__
+ # include "tdep-arm/libunwind_i.h"
+ #elif defined __hppa__
+ # include "tdep-hppa/libunwind_i.h"
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -170,6 +170,28 @@ libunwind_elfxx_la_SOURCES = elfxx.c
+ noinst_LTLIBRARIES += $(LIBUNWIND_ELF)
+ libunwind_la_LIBADD += $(LIBUNWIND_ELF)
+
++# The list of files that go into libunwind and libunwind-aarch64:
++noinst_HEADERS += aarch64/init.h aarch64/offsets.h aarch64/unwind_i.h
++libunwind_la_SOURCES_aarch64_common = $(libunwind_la_SOURCES_common) \
++ aarch64/is_fpreg.c aarch64/regname.c
++
++# The list of files that go into libunwind:
++libunwind_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \
++ $(libunwind_la_SOURCES_local) \
++ aarch64/Lcreate_addr_space.c aarch64/Lget_proc_info.c \
++ aarch64/Lget_save_loc.c aarch64/Lglobal.c aarch64/Linit.c \
++ aarch64/Linit_local.c aarch64/Linit_remote.c \
++ aarch64/Lis_signal_frame.c aarch64/Lregs.c aarch64/Lresume.c \
++ aarch64/Lstep.c
++
++libunwind_aarch64_la_SOURCES_aarch64 = $(libunwind_la_SOURCES_aarch64_common) \
++ $(libunwind_la_SOURCES_generic) \
++ aarch64/Gcreate_addr_space.c aarch64/Gget_proc_info.c \
++ aarch64/Gget_save_loc.c aarch64/Gglobal.c aarch64/Ginit.c \
++ aarch64/Ginit_local.c aarch64/Ginit_remote.c \
++ aarch64/Gis_signal_frame.c aarch64/Gregs.c aarch64/Gresume.c \
++ aarch64/Gstep.c
++
+ # The list of files that go into libunwind and libunwind-arm:
+ noinst_HEADERS += arm/init.h arm/offsets.h arm/unwind_i.h
+ libunwind_la_SOURCES_arm_common = $(libunwind_la_SOURCES_common) \
+@@ -418,6 +440,18 @@ if OS_FREEBSD
+ libunwind_coredump_la_SOURCES += coredump/_UCD_access_reg_freebsd.c
+ endif
+
++if ARCH_AARCH64
++ lib_LTLIBRARIES += libunwind-aarch64.la
++ libunwind_la_SOURCES = $(libunwind_la_SOURCES_aarch64)
++ libunwind_aarch64_la_SOURCES = $(libunwind_aarch64_la_SOURCES_aarch64)
++ libunwind_aarch64_la_LDFLAGS = $(COMMON_SO_LDFLAGS) -version-info $(SOVERSION)
++ libunwind_aarch64_la_LIBADD = libunwind-dwarf-generic.la
++ libunwind_aarch64_la_LIBADD += libunwind-elf64.la
++if !REMOTE_ONLY
++ libunwind_aarch64_la_LIBADD += libunwind.la -lc
++endif
++ libunwind_setjmp_la_SOURCES += aarch64/siglongjmp.S
++else
+ if ARCH_ARM
+ lib_LTLIBRARIES += libunwind-arm.la
+ libunwind_la_SOURCES = $(libunwind_la_SOURCES_arm)
+@@ -545,6 +579,7 @@ endif # ARCH_MIPS
+ endif # ARCH_HPPA
+ endif # ARCH_IA64
+ endif # ARCH_ARM
++endif # ARCH_AARCH64
+
+ # libunwind-setjmp depends on libunwind-$(arch). Therefore must be added
+ # at the end.
+@@ -567,7 +602,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I
+ AM_CCASFLAGS = $(AM_CPPFLAGS)
+ noinst_HEADERS += unwind/unwind-internal.h
+
+-EXTRA_DIST = $(libunwind_la_SOURCES_arm) \
++EXTRA_DIST = $(libunwind_la_SOURCES_aarch64) \
++ $(libunwind_la_SOURCES_arm) \
+ $(libunwind_la_SOURCES_hppa) \
+ $(libunwind_la_SOURCES_ia64) \
+ $(libunwind_la_SOURCES_mips) \
+@@ -579,6 +615,7 @@ EXTRA_DIST = $(libunwind_la_SOURCES_arm)
+ $(libunwind_la_SOURCES_common) \
+ $(libunwind_la_SOURCES_local) \
+ $(libunwind_la_SOURCES_generic) \
++ $(libunwind_aarch64_la_SOURCES_aarch64) \
+ $(libunwind_arm_la_SOURCES_arm) \
+ $(libunwind_hppa_la_SOURCES_hppa) \
+ $(libunwind_ia64_la_SOURCES_ia64) \
+--- /dev/null
++++ b/src/aarch64/Gcreate_addr_space.c
+@@ -0,0 +1,60 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include <string.h>
++#include <stdlib.h>
++
++#include "unwind_i.h"
++
++PROTECTED unw_addr_space_t
++unw_create_addr_space (unw_accessors_t *a, int byte_order)
++{
++#ifdef UNW_LOCAL_ONLY
++ return NULL;
++#else
++ unw_addr_space_t as;
++
++ /* AArch64 supports little-endian and big-endian. */
++ if (byte_order != 0 && byte_order != __LITTLE_ENDIAN
++ && byte_order != __BIG_ENDIAN)
++ return NULL;
++
++ as = malloc (sizeof (*as));
++ if (!as)
++ return NULL;
++
++ memset (as, 0, sizeof (*as));
++
++ as->acc = *a;
++
++ /* Default to little-endian for AArch64. */
++ if (byte_order == 0 || byte_order == __LITTLE_ENDIAN)
++ as->big_endian = 0;
++ else
++ as->big_endian = 1;
++
++ return as;
++#endif
++}
+--- /dev/null
++++ b/src/aarch64/Gget_proc_info.c
+@@ -0,0 +1,39 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++PROTECTED int
++unw_get_proc_info (unw_cursor_t *cursor, unw_proc_info_t *pi)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ int ret;
++
++ ret = dwarf_make_proc_info (&c->dwarf);
++ if (ret < 0)
++ return ret;
++
++ *pi = c->dwarf.pi;
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/Gget_save_loc.c
+@@ -0,0 +1,100 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++PROTECTED int
++unw_get_save_loc (unw_cursor_t *cursor, int reg, unw_save_loc_t *sloc)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ dwarf_loc_t loc;
++
++ switch (reg)
++ {
++ case UNW_AARCH64_X0:
++ case UNW_AARCH64_X1:
++ case UNW_AARCH64_X2:
++ case UNW_AARCH64_X3:
++ case UNW_AARCH64_X4:
++ case UNW_AARCH64_X5:
++ case UNW_AARCH64_X6:
++ case UNW_AARCH64_X7:
++ case UNW_AARCH64_X8:
++ case UNW_AARCH64_X9:
++ case UNW_AARCH64_X10:
++ case UNW_AARCH64_X11:
++ case UNW_AARCH64_X12:
++ case UNW_AARCH64_X13:
++ case UNW_AARCH64_X14:
++ case UNW_AARCH64_X15:
++ case UNW_AARCH64_X16:
++ case UNW_AARCH64_X17:
++ case UNW_AARCH64_X18:
++ case UNW_AARCH64_X19:
++ case UNW_AARCH64_X20:
++ case UNW_AARCH64_X21:
++ case UNW_AARCH64_X22:
++ case UNW_AARCH64_X23:
++ case UNW_AARCH64_X24:
++ case UNW_AARCH64_X25:
++ case UNW_AARCH64_X26:
++ case UNW_AARCH64_X27:
++ case UNW_AARCH64_X28:
++ case UNW_AARCH64_X29:
++ case UNW_AARCH64_X30:
++ case UNW_AARCH64_SP:
++ case UNW_AARCH64_PC:
++ case UNW_AARCH64_PSTATE:
++ loc = c->dwarf.loc[reg];
++ break;
++
++ default:
++ loc = DWARF_NULL_LOC; /* default to "not saved" */
++ break;
++ }
++
++ memset (sloc, 0, sizeof (*sloc));
++
++ if (DWARF_IS_NULL_LOC (loc))
++ {
++ sloc->type = UNW_SLT_NONE;
++ return 0;
++ }
++
++#if !defined(UNW_LOCAL_ONLY)
++ if (DWARF_IS_REG_LOC (loc))
++ {
++ sloc->type = UNW_SLT_REG;
++ sloc->u.regnum = DWARF_GET_LOC (loc);
++ }
++ else
++#endif
++ {
++ sloc->type = UNW_SLT_MEMORY;
++ sloc->u.addr = DWARF_GET_LOC (loc);
++ }
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/Gglobal.c
+@@ -0,0 +1,57 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++#include "dwarf_i.h"
++
++HIDDEN define_lock (aarch64_lock);
++HIDDEN int tdep_init_done;
++
++HIDDEN void
++tdep_init (void)
++{
++ intrmask_t saved_mask;
++
++ sigfillset (&unwi_full_mask);
++
++ lock_acquire (&aarch64_lock, saved_mask);
++ {
++ if (tdep_init_done)
++ /* another thread else beat us to it... */
++ goto out;
++
++ mi_init ();
++
++ dwarf_init ();
++
++#ifndef UNW_REMOTE_ONLY
++ aarch64_local_addr_space_init ();
++#endif
++ tdep_init_done = 1; /* signal that we're initialized... */
++ }
++ out:
++ lock_release (&aarch64_lock, saved_mask);
++}
+--- /dev/null
++++ b/src/aarch64/Ginit.c
+@@ -0,0 +1,187 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include "unwind_i.h"
++
++#ifdef UNW_REMOTE_ONLY
++
++/* unw_local_addr_space is a NULL pointer in this case. */
++PROTECTED unw_addr_space_t unw_local_addr_space;
++
++#else /* !UNW_REMOTE_ONLY */
++
++static struct unw_addr_space local_addr_space;
++
++PROTECTED unw_addr_space_t unw_local_addr_space = &local_addr_space;
++
++static inline void *
++uc_addr (ucontext_t *uc, int reg)
++{
++ if (reg >= UNW_AARCH64_X0 && reg <= UNW_AARCH64_V31)
++ return &uc->uc_mcontext.regs[reg];
++ else
++ return NULL;
++}
++
++# ifdef UNW_LOCAL_ONLY
++
++HIDDEN void *
++tdep_uc_addr (ucontext_t *uc, int reg)
++{
++ return uc_addr (uc, reg);
++}
++
++# endif /* UNW_LOCAL_ONLY */
++
++HIDDEN unw_dyn_info_list_t _U_dyn_info_list;
++
++/* XXX fix me: there is currently no way to locate the dyn-info list
++ by a remote unwinder. On ia64, this is done via a special
++ unwind-table entry. Perhaps something similar can be done with
++ DWARF2 unwind info. */
++
++static void
++put_unwind_info (unw_addr_space_t as, unw_proc_info_t *proc_info, void *arg)
++{
++ /* it's a no-op */
++}
++
++static int
++get_dyn_info_list_addr (unw_addr_space_t as, unw_word_t *dyn_info_list_addr,
++ void *arg)
++{
++ *dyn_info_list_addr = (unw_word_t) &_U_dyn_info_list;
++ return 0;
++}
++
++static int
++access_mem (unw_addr_space_t as, unw_word_t addr, unw_word_t *val, int write,
++ void *arg)
++{
++ if (write)
++ {
++ Debug (16, "mem[%lx] <- %lx\n", addr, *val);
++ *(unw_word_t *) addr = *val;
++ }
++ else
++ {
++ *val = *(unw_word_t *) addr;
++ Debug (16, "mem[%lx] -> %lx\n", addr, *val);
++ }
++ return 0;
++}
++
++static int
++access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val, int write,
++ void *arg)
++{
++ unw_word_t *addr;
++ ucontext_t *uc = arg;
++
++ if (unw_is_fpreg (reg))
++ goto badreg;
++
++ if (!(addr = uc_addr (uc, reg)))
++ goto badreg;
++
++ if (write)
++ {
++ *(unw_word_t *) addr = *val;
++ Debug (12, "%s <- %lx\n", unw_regname (reg), *val);
++ }
++ else
++ {
++ *val = *(unw_word_t *) addr;
++ Debug (12, "%s -> %lx\n", unw_regname (reg), *val);
++ }
++ return 0;
++
++ badreg:
++ Debug (1, "bad register number %u\n", reg);
++ return -UNW_EBADREG;
++}
++
++static int
++access_fpreg (unw_addr_space_t as, unw_regnum_t reg, unw_fpreg_t *val,
++ int write, void *arg)
++{
++ ucontext_t *uc = arg;
++ unw_fpreg_t *addr;
++
++ if (!unw_is_fpreg (reg))
++ goto badreg;
++
++ if (!(addr = uc_addr (uc, reg)))
++ goto badreg;
++
++ if (write)
++ {
++ Debug (12, "%s <- %08lx.%08lx.%08lx\n", unw_regname (reg),
++ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
++ *(unw_fpreg_t *) addr = *val;
++ }
++ else
++ {
++ *val = *(unw_fpreg_t *) addr;
++ Debug (12, "%s -> %08lx.%08lx.%08lx\n", unw_regname (reg),
++ ((long *)val)[0], ((long *)val)[1], ((long *)val)[2]);
++ }
++ return 0;
++
++ badreg:
++ Debug (1, "bad register number %u\n", reg);
++ /* attempt to access a non-preserved register */
++ return -UNW_EBADREG;
++}
++
++static int
++get_static_proc_name (unw_addr_space_t as, unw_word_t ip,
++ char *buf, size_t buf_len, unw_word_t *offp,
++ void *arg)
++{
++ return _Uelf64_get_proc_name (as, getpid (), ip, buf, buf_len, offp);
++}
++
++HIDDEN void
++aarch64_local_addr_space_init (void)
++{
++ memset (&local_addr_space, 0, sizeof (local_addr_space));
++ local_addr_space.caching_policy = UNW_CACHE_GLOBAL;
++ local_addr_space.acc.find_proc_info = dwarf_find_proc_info;
++ local_addr_space.acc.put_unwind_info = put_unwind_info;
++ local_addr_space.acc.get_dyn_info_list_addr = get_dyn_info_list_addr;
++ local_addr_space.acc.access_mem = access_mem;
++ local_addr_space.acc.access_reg = access_reg;
++ local_addr_space.acc.access_fpreg = access_fpreg;
++ local_addr_space.acc.resume = aarch64_local_resume;
++ local_addr_space.acc.get_proc_name = get_static_proc_name;
++ unw_flush_cache (&local_addr_space, 0, 0);
++}
++
++#endif /* !UNW_REMOTE_ONLY */
+--- /dev/null
++++ b/src/aarch64/Ginit_local.c
+@@ -0,0 +1,55 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2011-2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++#include "init.h"
++
++#ifdef UNW_REMOTE_ONLY
++
++PROTECTED int
++unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
++{
++ return -UNW_EINVAL;
++}
++
++#else /* !UNW_REMOTE_ONLY */
++
++PROTECTED int
++unw_init_local (unw_cursor_t *cursor, unw_context_t *uc)
++{
++ struct cursor *c = (struct cursor *) cursor;
++
++ if (!tdep_init_done)
++ tdep_init ();
++
++ Debug (1, "(cursor=%p)\n", c);
++
++ c->dwarf.as = unw_local_addr_space;
++ c->dwarf.as_arg = uc;
++
++ return common_init (c, 1);
++}
++
++#endif /* !UNW_REMOTE_ONLY */
+--- /dev/null
++++ b/src/aarch64/Ginit_remote.c
+@@ -0,0 +1,45 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "init.h"
++#include "unwind_i.h"
++
++PROTECTED int
++unw_init_remote (unw_cursor_t *cursor, unw_addr_space_t as, void *as_arg)
++{
++#ifdef UNW_LOCAL_ONLY
++ return -UNW_EINVAL;
++#else /* !UNW_LOCAL_ONLY */
++ struct cursor *c = (struct cursor *) cursor;
++
++ if (!tdep_init_done)
++ tdep_init ();
++
++ Debug (1, "(cursor=%p)\n", c);
++
++ c->dwarf.as = as;
++ c->dwarf.as_arg = as_arg;
++ return common_init (c, 0);
++#endif /* !UNW_LOCAL_ONLY */
++}
+--- /dev/null
++++ b/src/aarch64/Gis_signal_frame.c
+@@ -0,0 +1,64 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++/* The restorer stub will always have the form:
++
++ d2801168 movz x8, #0x8b
++ d4000001 svc #0x0
++*/
++
++PROTECTED int
++unw_is_signal_frame (unw_cursor_t *cursor)
++{
++#ifdef __linux__
++ struct cursor *c = (struct cursor *) cursor;
++ unw_word_t w0, ip;
++ unw_addr_space_t as;
++ unw_accessors_t *a;
++ void *arg;
++ int ret;
++
++ as = c->dwarf.as;
++ a = unw_get_accessors (as);
++ arg = c->dwarf.as_arg;
++
++ ip = c->dwarf.ip;
++
++ ret = (*a->access_mem) (as, ip, &w0, 0, arg);
++ if (ret < 0)
++ return ret;
++
++ /* FIXME: distinguish 32bit insn vs 64bit registers. */
++ if (w0 != 0xd4000001d2801168)
++ return 0;
++
++ return 1;
++
++#else
++ return -UNW_ENOINFO;
++#endif
++}
+--- /dev/null
++++ b/src/aarch64/Gregs.c
+@@ -0,0 +1,113 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++HIDDEN int
++tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
++ int write)
++{
++ dwarf_loc_t loc = DWARF_NULL_LOC;
++ unsigned int mask;
++
++ switch (reg)
++ {
++ case UNW_AARCH64_X0:
++ case UNW_AARCH64_X1:
++ case UNW_AARCH64_X2:
++ case UNW_AARCH64_X3:
++ mask = 1 << reg;
++ if (write)
++ {
++ c->dwarf.eh_args[reg] = *valp;
++ c->dwarf.eh_valid_mask |= mask;
++ return 0;
++ }
++ else if ((c->dwarf.eh_valid_mask & mask) != 0)
++ {
++ *valp = c->dwarf.eh_args[reg];
++ return 0;
++ }
++ else
++ loc = c->dwarf.loc[reg];
++ break;
++
++ case UNW_AARCH64_X4:
++ case UNW_AARCH64_X5:
++ case UNW_AARCH64_X6:
++ case UNW_AARCH64_X7:
++ case UNW_AARCH64_X8:
++ case UNW_AARCH64_X9:
++ case UNW_AARCH64_X10:
++ case UNW_AARCH64_X11:
++ case UNW_AARCH64_X12:
++ case UNW_AARCH64_X13:
++ case UNW_AARCH64_X14:
++ case UNW_AARCH64_X15:
++ case UNW_AARCH64_X16:
++ case UNW_AARCH64_X17:
++ case UNW_AARCH64_X18:
++ case UNW_AARCH64_X19:
++ case UNW_AARCH64_X20:
++ case UNW_AARCH64_X21:
++ case UNW_AARCH64_X22:
++ case UNW_AARCH64_X23:
++ case UNW_AARCH64_X24:
++ case UNW_AARCH64_X25:
++ case UNW_AARCH64_X26:
++ case UNW_AARCH64_X27:
++ case UNW_AARCH64_X28:
++ case UNW_AARCH64_X29:
++ case UNW_AARCH64_X30:
++ case UNW_AARCH64_PC:
++ case UNW_AARCH64_PSTATE:
++ loc = c->dwarf.loc[reg];
++ break;
++
++ case UNW_AARCH64_SP:
++ if (write)
++ return -UNW_EREADONLYREG;
++ *valp = c->dwarf.cfa;
++ return 0;
++
++ default:
++ Debug (1, "bad register number %u\n", reg);
++ return -UNW_EBADREG;
++ }
++
++ if (write)
++ return dwarf_put (&c->dwarf, loc, *valp);
++ else
++ return dwarf_get (&c->dwarf, loc, valp);
++}
++
++HIDDEN int
++tdep_access_fpreg (struct cursor *c, unw_regnum_t reg, unw_fpreg_t *valp,
++ int write)
++{
++ Debug (1, "bad register number %u\n", reg);
++ return -UNW_EBADREG;
++}
+--- /dev/null
++++ b/src/aarch64/Gresume.c
+@@ -0,0 +1,177 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2011-2013 Linaro Limited
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++#include "offsets.h"
++
++#ifndef UNW_REMOTE_ONLY
++
++HIDDEN inline int
++aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
++{
++#ifdef __linux__
++ struct cursor *c = (struct cursor *) cursor;
++ unw_tdep_context_t *uc = c->dwarf.as_arg;
++
++ if (c->sigcontext_format == AARCH64_SCF_NONE)
++ {
++ /* Since there are no signals involved here we restore the non scratch
++ registers only. */
++ unsigned long regs[11];
++ regs[0] = uc->uc_mcontext.regs[19];
++ regs[1] = uc->uc_mcontext.regs[20];
++ regs[2] = uc->uc_mcontext.regs[21];
++ regs[3] = uc->uc_mcontext.regs[22];
++ regs[4] = uc->uc_mcontext.regs[23];
++ regs[5] = uc->uc_mcontext.regs[24];
++ regs[6] = uc->uc_mcontext.regs[25];
++ regs[7] = uc->uc_mcontext.regs[26];
++ regs[8] = uc->uc_mcontext.regs[27];
++ regs[9] = uc->uc_mcontext.regs[28];
++ regs[10] = uc->uc_mcontext.regs[30]; /* LR */
++ unsigned long sp = uc->uc_mcontext.sp;
++
++ struct regs_overlay {
++ char x[sizeof(regs)];
++ };
++
++ asm volatile (
++ "ldp x19, x20, [%0]\n"
++ "ldp x21, x22, [%0,16]\n"
++ "ldp x23, x24, [%0,32]\n"
++ "ldp x25, x26, [%0,48]\n"
++ "ldp x27, x28, [%0,64]\n"
++ "ldr x30, [%0,80]\n"
++ "mov sp, %1\n"
++ "ret \n"
++ :
++ : "r" (regs),
++ "r" (sp),
++ "m" (*(struct regs_overlay *)regs)
++ );
++ }
++ else
++ {
++ struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
++
++ if (c->dwarf.eh_valid_mask & 0x1) sc->regs[0] = c->dwarf.eh_args[0];
++ if (c->dwarf.eh_valid_mask & 0x2) sc->regs[1] = c->dwarf.eh_args[1];
++ if (c->dwarf.eh_valid_mask & 0x4) sc->regs[2] = c->dwarf.eh_args[2];
++ if (c->dwarf.eh_valid_mask & 0x8) sc->regs[3] = c->dwarf.eh_args[3];
++
++ sc->regs[4] = uc->uc_mcontext.regs[4];
++ sc->regs[5] = uc->uc_mcontext.regs[5];
++ sc->regs[6] = uc->uc_mcontext.regs[6];
++ sc->regs[7] = uc->uc_mcontext.regs[7];
++ sc->regs[8] = uc->uc_mcontext.regs[8];
++ sc->regs[9] = uc->uc_mcontext.regs[9];
++ sc->regs[10] = uc->uc_mcontext.regs[10];
++ sc->regs[11] = uc->uc_mcontext.regs[11];
++ sc->regs[12] = uc->uc_mcontext.regs[12];
++ sc->regs[13] = uc->uc_mcontext.regs[13];
++ sc->regs[14] = uc->uc_mcontext.regs[14];
++ sc->regs[15] = uc->uc_mcontext.regs[15];
++ sc->regs[16] = uc->uc_mcontext.regs[16];
++ sc->regs[17] = uc->uc_mcontext.regs[17];
++ sc->regs[18] = uc->uc_mcontext.regs[18];
++ sc->regs[19] = uc->uc_mcontext.regs[19];
++ sc->regs[20] = uc->uc_mcontext.regs[20];
++ sc->regs[21] = uc->uc_mcontext.regs[21];
++ sc->regs[22] = uc->uc_mcontext.regs[22];
++ sc->regs[23] = uc->uc_mcontext.regs[23];
++ sc->regs[24] = uc->uc_mcontext.regs[24];
++ sc->regs[25] = uc->uc_mcontext.regs[25];
++ sc->regs[26] = uc->uc_mcontext.regs[26];
++ sc->regs[27] = uc->uc_mcontext.regs[27];
++ sc->regs[28] = uc->uc_mcontext.regs[28];
++ sc->regs[29] = uc->uc_mcontext.regs[29];
++ sc->regs[30] = uc->uc_mcontext.regs[30];
++ sc->sp = uc->uc_mcontext.sp;
++ sc->pc = uc->uc_mcontext.pc;
++ sc->pstate = uc->uc_mcontext.pstate;
++
++ asm volatile (
++ "mov sp, %0\n"
++ "ret %1\n"
++ : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
++ );
++ }
++ unreachable();
++#else
++ printf ("%s: implement me\n", __FUNCTION__);
++#endif
++ return -UNW_EINVAL;
++}
++
++#endif /* !UNW_REMOTE_ONLY */
++
++static inline void
++establish_machine_state (struct cursor *c)
++{
++ unw_addr_space_t as = c->dwarf.as;
++ void *arg = c->dwarf.as_arg;
++ unw_fpreg_t fpval;
++ unw_word_t val;
++ int reg;
++
++ Debug (8, "copying out cursor state\n");
++
++ for (reg = 0; reg <= UNW_AARCH64_PSTATE; ++reg)
++ {
++ Debug (16, "copying %s %d\n", unw_regname (reg), reg);
++ if (unw_is_fpreg (reg))
++ {
++ if (tdep_access_fpreg (c, reg, &fpval, 0) >= 0)
++ as->acc.access_fpreg (as, reg, &fpval, 1, arg);
++ }
++ else
++ {
++ if (tdep_access_reg (c, reg, &val, 0) >= 0)
++ as->acc.access_reg (as, reg, &val, 1, arg);
++ }
++ }
++}
++
++PROTECTED int
++unw_resume (unw_cursor_t *cursor)
++{
++ struct cursor *c = (struct cursor *) cursor;
++
++ Debug (1, "(cursor=%p)\n", c);
++
++ if (!c->dwarf.ip)
++ {
++ /* This can happen easily when the frame-chain gets truncated
++ due to bad or missing unwind-info. */
++ Debug (1, "refusing to resume execution at address 0\n");
++ return -UNW_EINVAL;
++ }
++
++ establish_machine_state (c);
++
++ return (*c->dwarf.as->acc.resume) (c->dwarf.as, (unw_cursor_t *) c,
++ c->dwarf.as_arg);
++}
+--- /dev/null
++++ b/src/aarch64/Gstep.c
+@@ -0,0 +1,129 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2011-2013 Linaro Limited
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++#include "offsets.h"
++
++PROTECTED int
++unw_handle_signal_frame (unw_cursor_t *cursor)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ int ret;
++ unw_word_t sc_addr, sp, sp_addr = c->dwarf.cfa;
++ struct dwarf_loc sp_loc = DWARF_LOC (sp_addr, 0);
++
++ if ((ret = dwarf_get (&c->dwarf, sp_loc, &sp)) < 0)
++ return -UNW_EUNSPEC;
++
++ ret = unw_is_signal_frame (cursor);
++ Debug(1, "unw_is_signal_frame()=%d\n", ret);
++
++ /* Save the SP and PC to be able to return execution at this point
++ later in time (unw_resume). */
++ c->sigcontext_sp = c->dwarf.cfa;
++ c->sigcontext_pc = c->dwarf.ip;
++
++ if (ret)
++ {
++ c->sigcontext_format = AARCH64_SCF_LINUX_RT_SIGFRAME;
++ sc_addr = sp_addr + sizeof (siginfo_t) + LINUX_UC_MCONTEXT_OFF;
++ }
++ else
++ return -UNW_EUNSPEC;
++
++ c->sigcontext_addr = sc_addr;
++
++ /* Update the dwarf cursor.
++ Set the location of the registers to the corresponding addresses of the
++ uc_mcontext / sigcontext structure contents. */
++ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_LOC (sc_addr + LINUX_SC_X0_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_LOC (sc_addr + LINUX_SC_X1_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_LOC (sc_addr + LINUX_SC_X2_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_LOC (sc_addr + LINUX_SC_X3_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_LOC (sc_addr + LINUX_SC_X4_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_LOC (sc_addr + LINUX_SC_X5_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_LOC (sc_addr + LINUX_SC_X6_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_LOC (sc_addr + LINUX_SC_X7_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_LOC (sc_addr + LINUX_SC_X8_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_LOC (sc_addr + LINUX_SC_X9_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_LOC (sc_addr + LINUX_SC_X10_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_LOC (sc_addr + LINUX_SC_X11_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_LOC (sc_addr + LINUX_SC_X12_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_LOC (sc_addr + LINUX_SC_X13_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_LOC (sc_addr + LINUX_SC_X14_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_LOC (sc_addr + LINUX_SC_X15_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_LOC (sc_addr + LINUX_SC_X16_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_LOC (sc_addr + LINUX_SC_X17_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_LOC (sc_addr + LINUX_SC_X18_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_LOC (sc_addr + LINUX_SC_X19_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_LOC (sc_addr + LINUX_SC_X20_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_LOC (sc_addr + LINUX_SC_X21_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_LOC (sc_addr + LINUX_SC_X22_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_LOC (sc_addr + LINUX_SC_X23_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_LOC (sc_addr + LINUX_SC_X24_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_LOC (sc_addr + LINUX_SC_X25_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_LOC (sc_addr + LINUX_SC_X26_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_LOC (sc_addr + LINUX_SC_X27_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_LOC (sc_addr + LINUX_SC_X28_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_LOC (sc_addr + LINUX_SC_X29_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_LOC (sc_addr + LINUX_SC_X30_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_LOC (sc_addr + LINUX_SC_SP_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_LOC (sc_addr + LINUX_SC_PC_OFF, 0);
++ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_LOC (sc_addr + LINUX_SC_PSTATE_OFF, 0);
++
++ /* Set SP/CFA and PC/IP. */
++ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa);
++ dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip);
++
++ c->dwarf.pi_valid = 0;
++
++ return 1;
++}
++
++PROTECTED int
++unw_step (unw_cursor_t *cursor)
++{
++ struct cursor *c = (struct cursor *) cursor;
++ int ret;
++
++ Debug (1, "(cursor=%p, ip=0x%016lx, cfa=0x%016lx))\n",
++ c, c->dwarf.ip, c->dwarf.cfa);
++
++ /* Check if this is a signal frame. */
++ if (unw_is_signal_frame (cursor))
++ return unw_handle_signal_frame (cursor);
++
++ ret = dwarf_step (&c->dwarf);
++ Debug(1, "dwarf_step()=%d\n", ret);
++
++ if (unlikely (ret == -UNW_ESTOPUNWIND))
++ return ret;
++
++ if (unlikely (ret < 0))
++ return 0;
++
++ return (c->dwarf.ip == 0) ? 0 : 1;
++}
+--- /dev/null
++++ b/src/aarch64/Lcreate_addr_space.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gcreate_addr_space.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lget_proc_info.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gget_proc_info.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lget_save_loc.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gget_save_loc.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lglobal.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gglobal.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Linit.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Ginit.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Linit_local.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Ginit_local.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Linit_remote.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Ginit_remote.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lis_signal_frame.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gis_signal_frame.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lregs.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gregs.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lresume.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gresume.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/Lstep.c
+@@ -0,0 +1,5 @@
++#define UNW_LOCAL_ONLY
++#include <libunwind.h>
++#if defined(UNW_LOCAL_ONLY) && !defined(UNW_REMOTE_ONLY)
++#include "Gstep.c"
++#endif
+--- /dev/null
++++ b/src/aarch64/gen-offsets.c
+@@ -0,0 +1,68 @@
++#include <stdio.h>
++#include <stddef.h>
++#include <ucontext.h>
++#include <asm/sigcontext.h>
++
++#define UC(N,X) \
++ printf ("#define LINUX_UC_" N "_OFF\t0x%X\n", offsetof (ucontext_t, X))
++
++#define SC(N,X) \
++ printf ("#define LINUX_SC_" N "_OFF\t0x%X\n", offsetof (struct sigcontext, X))
++
++int
++main (void)
++{
++ printf (
++"/* Linux-specific definitions: */\n\n"
++
++"/* Define various structure offsets to simplify cross-compilation. */\n\n"
++
++"/* Offsets for AArch64 Linux \"ucontext_t\": */\n\n");
++
++ UC ("FLAGS", uc_flags);
++ UC ("LINK", uc_link);
++ UC ("STACK", uc_stack);
++ UC ("MCONTEXT", uc_mcontext);
++ UC ("SIGMASK", uc_sigmask);
++
++ printf ("\n/* Offsets for AArch64 Linux \"struct sigcontext\": */\n\n");
++
++ SC ("R0", regs[0]);
++ SC ("R1", regs[1]);
++ SC ("R2", regs[2]);
++ SC ("R3", regs[3]);
++ SC ("R4", regs[4]);
++ SC ("R5", regs[5]);
++ SC ("R6", regs[6]);
++ SC ("R7", regs[7]);
++ SC ("R8", regs[8]);
++ SC ("R9", regs[9]);
++ SC ("R10", regs[10]);
++ SC ("R11", regs[11]);
++ SC ("R12", regs[12]);
++ SC ("R13", regs[13]);
++ SC ("R14", regs[14]);
++ SC ("R15", regs[15]);
++ SC ("R16", regs[16]);
++ SC ("R17", regs[17]);
++ SC ("R18", regs[18]);
++ SC ("R19", regs[19]);
++ SC ("R20", regs[20]);
++ SC ("R21", regs[21]);
++ SC ("R22", regs[22]);
++ SC ("R23", regs[23]);
++ SC ("R24", regs[24]);
++ SC ("R25", regs[25]);
++ SC ("R26", regs[26]);
++ SC ("R27", regs[27]);
++ SC ("R28", regs[28]);
++ SC ("R29", regs[29]);
++ SC ("R30", regs[30]);
++ SC ("R31", regs[31]);
++
++ SC ("PC", pc);
++ SC ("SP", sp);
++ SC ("Fault", fault_address);
++ SC ("state", pstate);
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/init.h
+@@ -0,0 +1,127 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++static inline int
++common_init (struct cursor *c, unsigned use_prev_instr)
++{
++ int ret, i;
++
++ c->dwarf.loc[UNW_AARCH64_X0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X0);
++ c->dwarf.loc[UNW_AARCH64_X1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X1);
++ c->dwarf.loc[UNW_AARCH64_X2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X2);
++ c->dwarf.loc[UNW_AARCH64_X3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X3);
++ c->dwarf.loc[UNW_AARCH64_X4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X4);
++ c->dwarf.loc[UNW_AARCH64_X5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X5);
++ c->dwarf.loc[UNW_AARCH64_X6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X6);
++ c->dwarf.loc[UNW_AARCH64_X7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X7);
++ c->dwarf.loc[UNW_AARCH64_X8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X8);
++ c->dwarf.loc[UNW_AARCH64_X9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X9);
++ c->dwarf.loc[UNW_AARCH64_X10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X10);
++ c->dwarf.loc[UNW_AARCH64_X11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X11);
++ c->dwarf.loc[UNW_AARCH64_X12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X12);
++ c->dwarf.loc[UNW_AARCH64_X13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X13);
++ c->dwarf.loc[UNW_AARCH64_X14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X14);
++ c->dwarf.loc[UNW_AARCH64_X15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X15);
++ c->dwarf.loc[UNW_AARCH64_X16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X16);
++ c->dwarf.loc[UNW_AARCH64_X17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X17);
++ c->dwarf.loc[UNW_AARCH64_X18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X18);
++ c->dwarf.loc[UNW_AARCH64_X19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X19);
++ c->dwarf.loc[UNW_AARCH64_X20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X20);
++ c->dwarf.loc[UNW_AARCH64_X21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X21);
++ c->dwarf.loc[UNW_AARCH64_X22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X22);
++ c->dwarf.loc[UNW_AARCH64_X23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X23);
++ c->dwarf.loc[UNW_AARCH64_X24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X24);
++ c->dwarf.loc[UNW_AARCH64_X25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X25);
++ c->dwarf.loc[UNW_AARCH64_X26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X26);
++ c->dwarf.loc[UNW_AARCH64_X27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X27);
++ c->dwarf.loc[UNW_AARCH64_X28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X28);
++ c->dwarf.loc[UNW_AARCH64_X29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X29);
++ c->dwarf.loc[UNW_AARCH64_X30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_X30);
++ c->dwarf.loc[UNW_AARCH64_SP] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_SP);
++ c->dwarf.loc[UNW_AARCH64_PC] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_PC);
++ c->dwarf.loc[UNW_AARCH64_PSTATE] = DWARF_REG_LOC (&c->dwarf,
++ UNW_AARCH64_PSTATE);
++ c->dwarf.loc[UNW_AARCH64_V0] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V0);
++ c->dwarf.loc[UNW_AARCH64_V1] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V1);
++ c->dwarf.loc[UNW_AARCH64_V2] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V2);
++ c->dwarf.loc[UNW_AARCH64_V3] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V3);
++ c->dwarf.loc[UNW_AARCH64_V4] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V4);
++ c->dwarf.loc[UNW_AARCH64_V5] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V5);
++ c->dwarf.loc[UNW_AARCH64_V6] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V6);
++ c->dwarf.loc[UNW_AARCH64_V7] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V7);
++ c->dwarf.loc[UNW_AARCH64_V8] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V8);
++ c->dwarf.loc[UNW_AARCH64_V9] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V9);
++ c->dwarf.loc[UNW_AARCH64_V10] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V10);
++ c->dwarf.loc[UNW_AARCH64_V11] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V11);
++ c->dwarf.loc[UNW_AARCH64_V12] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V12);
++ c->dwarf.loc[UNW_AARCH64_V13] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V13);
++ c->dwarf.loc[UNW_AARCH64_V14] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V14);
++ c->dwarf.loc[UNW_AARCH64_V15] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V15);
++ c->dwarf.loc[UNW_AARCH64_V16] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V16);
++ c->dwarf.loc[UNW_AARCH64_V17] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V17);
++ c->dwarf.loc[UNW_AARCH64_V18] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V18);
++ c->dwarf.loc[UNW_AARCH64_V19] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V19);
++ c->dwarf.loc[UNW_AARCH64_V20] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V20);
++ c->dwarf.loc[UNW_AARCH64_V21] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V21);
++ c->dwarf.loc[UNW_AARCH64_V22] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V22);
++ c->dwarf.loc[UNW_AARCH64_V23] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V23);
++ c->dwarf.loc[UNW_AARCH64_V24] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V24);
++ c->dwarf.loc[UNW_AARCH64_V25] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V25);
++ c->dwarf.loc[UNW_AARCH64_V26] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V26);
++ c->dwarf.loc[UNW_AARCH64_V27] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V27);
++ c->dwarf.loc[UNW_AARCH64_V28] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V28);
++ c->dwarf.loc[UNW_AARCH64_V29] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V29);
++ c->dwarf.loc[UNW_AARCH64_V30] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V30);
++ c->dwarf.loc[UNW_AARCH64_V31] = DWARF_REG_LOC (&c->dwarf, UNW_AARCH64_V31);
++
++ for (i = UNW_AARCH64_PSTATE + 1; i < UNW_AARCH64_V0; ++i)
++ c->dwarf.loc[i] = DWARF_NULL_LOC;
++
++ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_PC], &c->dwarf.ip);
++ if (ret < 0)
++ return ret;
++
++ ret = dwarf_get (&c->dwarf, c->dwarf.loc[UNW_AARCH64_SP], &c->dwarf.cfa);
++ if (ret < 0)
++ return ret;
++
++ c->sigcontext_format = AARCH64_SCF_NONE;
++ c->sigcontext_addr = 0;
++ c->sigcontext_sp = 0;
++ c->sigcontext_pc = 0;
++
++ c->dwarf.args_size = 0;
++ c->dwarf.ret_addr_column = 0;
++ c->dwarf.stash_frames = 0;
++ c->dwarf.use_prev_instr = use_prev_instr;
++ c->dwarf.pi_valid = 0;
++ c->dwarf.pi_is_dynamic = 0;
++ c->dwarf.hint = 0;
++ c->dwarf.prev_rs = 0;
++
++ return 0;
++}
+--- /dev/null
++++ b/src/aarch64/is_fpreg.c
+@@ -0,0 +1,32 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "libunwind_i.h"
++
++PROTECTED int
++unw_is_fpreg (int regnum)
++{
++ return (regnum >= UNW_AARCH64_V0 && regnum <= UNW_AARCH64_V31);
++}
+--- /dev/null
++++ b/src/aarch64/offsets.h
+@@ -0,0 +1,49 @@
++/* Linux-specific definitions: */
++
++/* Define various structure offsets to simplify cross-compilation. */
++
++/* Offsets for AArch64 Linux "ucontext_t": */
++
++#define LINUX_UC_FLAGS_OFF 0x0
++#define LINUX_UC_LINK_OFF 0x8
++#define LINUX_UC_STACK_OFF 0x10
++#define LINUX_UC_SIGMASK_OFF 0x28
++#define LINUX_UC_MCONTEXT_OFF 0xb0
++
++/* Offsets for AArch64 Linux "struct sigcontext": */
++
++#define LINUX_SC_FAULTADDRESS_OFF 0x00
++#define LINUX_SC_X0_OFF 0x008
++#define LINUX_SC_X1_OFF 0x010
++#define LINUX_SC_X2_OFF 0x018
++#define LINUX_SC_X3_OFF 0x020
++#define LINUX_SC_X4_OFF 0x028
++#define LINUX_SC_X5_OFF 0x030
++#define LINUX_SC_X6_OFF 0x038
++#define LINUX_SC_X7_OFF 0x040
++#define LINUX_SC_X8_OFF 0x048
++#define LINUX_SC_X9_OFF 0x050
++#define LINUX_SC_X10_OFF 0x058
++#define LINUX_SC_X11_OFF 0x060
++#define LINUX_SC_X12_OFF 0x068
++#define LINUX_SC_X13_OFF 0x070
++#define LINUX_SC_X14_OFF 0x078
++#define LINUX_SC_X15_OFF 0x080
++#define LINUX_SC_X16_OFF 0x088
++#define LINUX_SC_X17_OFF 0x090
++#define LINUX_SC_X18_OFF 0x098
++#define LINUX_SC_X19_OFF 0x0a0
++#define LINUX_SC_X20_OFF 0x0a8
++#define LINUX_SC_X21_OFF 0x0b0
++#define LINUX_SC_X22_OFF 0x0b8
++#define LINUX_SC_X23_OFF 0x0c0
++#define LINUX_SC_X24_OFF 0x0c8
++#define LINUX_SC_X25_OFF 0x0d0
++#define LINUX_SC_X26_OFF 0x0d8
++#define LINUX_SC_X27_OFF 0x0e0
++#define LINUX_SC_X28_OFF 0x0e8
++#define LINUX_SC_X29_OFF 0x0f0
++#define LINUX_SC_X30_OFF 0x0f8
++#define LINUX_SC_SP_OFF 0x100
++#define LINUX_SC_PC_OFF 0x108
++#define LINUX_SC_PSTATE_OFF 0x110
+--- /dev/null
++++ b/src/aarch64/regname.c
+@@ -0,0 +1,106 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2012 Tommi Rantala <tt.rantala@gmail.com>
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#include "unwind_i.h"
++
++static const char *const regname[] =
++ {
++ [UNW_AARCH64_X0] = "x0",
++ [UNW_AARCH64_X1] = "x1",
++ [UNW_AARCH64_X2] = "x2",
++ [UNW_AARCH64_X3] = "x3",
++ [UNW_AARCH64_X4] = "x4",
++ [UNW_AARCH64_X5] = "x5",
++ [UNW_AARCH64_X6] = "x6",
++ [UNW_AARCH64_X7] = "x7",
++ [UNW_AARCH64_X8] = "x8",
++ [UNW_AARCH64_X9] = "x9",
++ [UNW_AARCH64_X10] = "x10",
++ [UNW_AARCH64_X11] = "x11",
++ [UNW_AARCH64_X12] = "x12",
++ [UNW_AARCH64_X13] = "x13",
++ [UNW_AARCH64_X14] = "x14",
++ [UNW_AARCH64_X15] = "x15",
++ [UNW_AARCH64_X16] = "ip0",
++ [UNW_AARCH64_X17] = "ip1",
++ [UNW_AARCH64_X18] = "x18",
++ [UNW_AARCH64_X19] = "x19",
++ [UNW_AARCH64_X20] = "x20",
++ [UNW_AARCH64_X21] = "x21",
++ [UNW_AARCH64_X22] = "x22",
++ [UNW_AARCH64_X23] = "x23",
++ [UNW_AARCH64_X24] = "x24",
++ [UNW_AARCH64_X25] = "x25",
++ [UNW_AARCH64_X26] = "x26",
++ [UNW_AARCH64_X27] = "x27",
++ [UNW_AARCH64_X28] = "x28",
++ [UNW_AARCH64_X29] = "fp",
++ [UNW_AARCH64_X30] = "lr",
++ [UNW_AARCH64_SP] = "sp",
++ [UNW_AARCH64_PC] = "pc",
++ [UNW_AARCH64_V0] = "v0",
++ [UNW_AARCH64_V1] = "v1",
++ [UNW_AARCH64_V2] = "v2",
++ [UNW_AARCH64_V3] = "v3",
++ [UNW_AARCH64_V4] = "v4",
++ [UNW_AARCH64_V5] = "v5",
++ [UNW_AARCH64_V6] = "v6",
++ [UNW_AARCH64_V7] = "v7",
++ [UNW_AARCH64_V8] = "v8",
++ [UNW_AARCH64_V9] = "v9",
++ [UNW_AARCH64_V10] = "v10",
++ [UNW_AARCH64_V11] = "v11",
++ [UNW_AARCH64_V12] = "v12",
++ [UNW_AARCH64_V13] = "v13",
++ [UNW_AARCH64_V14] = "v14",
++ [UNW_AARCH64_V15] = "v15",
++ [UNW_AARCH64_V16] = "v16",
++ [UNW_AARCH64_V17] = "v17",
++ [UNW_AARCH64_V18] = "v18",
++ [UNW_AARCH64_V19] = "v19",
++ [UNW_AARCH64_V20] = "v20",
++ [UNW_AARCH64_V21] = "v21",
++ [UNW_AARCH64_V22] = "v22",
++ [UNW_AARCH64_V23] = "v23",
++ [UNW_AARCH64_V24] = "v24",
++ [UNW_AARCH64_V25] = "v25",
++ [UNW_AARCH64_V26] = "v26",
++ [UNW_AARCH64_V27] = "v27",
++ [UNW_AARCH64_V28] = "v28",
++ [UNW_AARCH64_V29] = "v29",
++ [UNW_AARCH64_V30] = "v30",
++ [UNW_AARCH64_V31] = "v31",
++ [UNW_AARCH64_FPSR] = "fpsr",
++ [UNW_AARCH64_FPCR] = "fpcr",
++ };
++
++PROTECTED const char *
++unw_regname (unw_regnum_t reg)
++{
++ if (reg < (unw_regnum_t) ARRAY_SIZE (regname) && regname[reg] != NULL)
++ return regname[reg];
++ else
++ return "???";
++}
+--- /dev/null
++++ b/src/aarch64/siglongjmp.S
+@@ -0,0 +1,12 @@
++ /* Dummy implementation for now. */
++
++ .global _UI_siglongjmp_cont
++ .global _UI_longjmp_cont
++
++_UI_siglongjmp_cont:
++_UI_longjmp_cont:
++ ret
++#ifdef __linux__
++ /* We do not need executable stack. */
++ .section .note.GNU-stack,"",%progbits
++#endif
+--- /dev/null
++++ b/src/aarch64/unwind_i.h
+@@ -0,0 +1,43 @@
++/* libunwind - a platform-independent unwind library
++ Copyright (C) 2008 CodeSourcery
++ Copyright (C) 2013 Linaro Limited
++
++This file is part of libunwind.
++
++Permission is hereby granted, free of charge, to any person obtaining
++a copy of this software and associated documentation files (the
++"Software"), to deal in the Software without restriction, including
++without limitation the rights to use, copy, modify, merge, publish,
++distribute, sublicense, and/or sell copies of the Software, and to
++permit persons to whom the Software is furnished to do so, subject to
++the following conditions:
++
++The above copyright notice and this permission notice shall be
++included in all copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
++LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
++
++#ifndef unwind_i_h
++#define unwind_i_h
++
++#include <stdint.h>
++
++#include <libunwind-aarch64.h>
++
++#include "libunwind_i.h"
++
++#define aarch64_lock UNW_OBJ(lock)
++#define aarch64_local_resume UNW_OBJ(local_resume)
++#define aarch64_local_addr_space_init UNW_OBJ(local_addr_space_init)
++
++extern void aarch64_local_addr_space_init (void);
++extern int aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor,
++ void *arg);
++
++#endif /* unwind_i_h */
+--- a/src/coredump/_UCD_access_reg_linux.c
++++ b/src/coredump/_UCD_access_reg_linux.c
+@@ -39,7 +39,10 @@ _UCD_access_reg (unw_addr_space_t as,
+ return -UNW_EINVAL;
+ }
+
+-#if defined(UNW_TARGET_ARM)
++#if defined(UNW_TARGET_AARCH64)
++ if (regnum < 0 || regnum >= UNW_AARCH64_FPCR)
++ goto badreg;
++#elif defined(UNW_TARGET_ARM)
+ if (regnum < 0 || regnum >= 16)
+ goto badreg;
+ #elif defined(UNW_TARGET_SH)
+--- a/src/ptrace/_UPT_reg_offset.c
++++ b/src/ptrace/_UPT_reg_offset.c
+@@ -1,6 +1,7 @@
+ /* libunwind - a platform-independent unwind library
+ Copyright (C) 2003-2004 Hewlett-Packard Co
+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
++ Copyright (C) 2013 Linaro Limited
+
+ This file is part of libunwind.
+
+@@ -501,6 +502,41 @@ const int _UPT_reg_offset[UNW_REG_LAST +
+ [UNW_ARM_R15] = 0x3c,
+ #elif defined(UNW_TARGET_MIPS)
+ #elif defined(UNW_TARGET_SH)
++#elif defined(UNW_TARGET_AARCH64)
++ [UNW_AARCH64_X0] = 0x00,
++ [UNW_AARCH64_X1] = 0x08,
++ [UNW_AARCH64_X2] = 0x10,
++ [UNW_AARCH64_X3] = 0x18,
++ [UNW_AARCH64_X4] = 0x20,
++ [UNW_AARCH64_X5] = 0x28,
++ [UNW_AARCH64_X6] = 0x30,
++ [UNW_AARCH64_X7] = 0x38,
++ [UNW_AARCH64_X8] = 0x40,
++ [UNW_AARCH64_X9] = 0x48,
++ [UNW_AARCH64_X10] = 0x50,
++ [UNW_AARCH64_X11] = 0x58,
++ [UNW_AARCH64_X12] = 0x60,
++ [UNW_AARCH64_X13] = 0x68,
++ [UNW_AARCH64_X14] = 0x70,
++ [UNW_AARCH64_X15] = 0x78,
++ [UNW_AARCH64_X16] = 0x80,
++ [UNW_AARCH64_X17] = 0x88,
++ [UNW_AARCH64_X18] = 0x90,
++ [UNW_AARCH64_X19] = 0x98,
++ [UNW_AARCH64_X20] = 0xa0,
++ [UNW_AARCH64_X21] = 0xa8,
++ [UNW_AARCH64_X22] = 0xb0,
++ [UNW_AARCH64_X23] = 0xb8,
++ [UNW_AARCH64_X24] = 0xc0,
++ [UNW_AARCH64_X25] = 0xc8,
++ [UNW_AARCH64_X26] = 0xd0,
++ [UNW_AARCH64_X27] = 0xd8,
++ [UNW_AARCH64_X28] = 0xe0,
++ [UNW_AARCH64_X29] = 0xe8,
++ [UNW_AARCH64_X30] = 0xf0,
++ [UNW_AARCH64_SP] = 0xf8,
++ [UNW_AARCH64_PC] = 0x100,
++ [UNW_AARCH64_PSTATE] = 0x108
+ #else
+ # error Fix me.
+ #endif
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch
new file mode 100644
index 000000000..dc0f5c1b4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch
@@ -0,0 +1,28 @@
+Fix test case link failure on PowerPC systems with Altivec
+
+Upstream-Status:backport
+
+On systems where the system compiler supports Altivec by default,
+the libunwind Makefile will attempt to build an extra test case
+ppc64-test-altivec. Unfortunately, the link step will fail since
+the Makefile does not actually link against the libunwind library.
+
+Fixed by adding the appropriate LDADD macro.
+
+Signed-off-by: Ulrich Weigand <address@hidden>
+---
+ tests/Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 0e30536..9c76628 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -201,3 +201,4 @@ Lia64_test_rbs_LDADD = $(LIBUNWIND_local)
+ Lia64_test_readonly_LDADD = $(LIBUNWIND_local)
+ ia64_test_dyn1_LDADD = $(LIBUNWIND)
+ ia64_test_sig_LDADD = $(LIBUNWIND)
++ppc64_test_altivec_LDADD = $(LIBUNWIND)
+--
+1.8.5
+
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
new file mode 100644
index 000000000..0e55c91b8
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
@@ -0,0 +1,42 @@
+From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001
+From: Thierry Reding <treding@nvidia.com>
+Date: Fri, 27 Jun 2014 08:40:33 +0200
+Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc
+
+For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for
+example, libgcc_s.so.1 contains some symbols needed by libunwind which
+are not present in libgcc.
+
+This causes the following link error when building the X.Org X server
+with libunwind support:
+
+ CCLD Xorg
+ /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0'
+ /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1'
+
+Linking against libgcc_s explicitly solves this problem.
+
+Upstream-Status: Backport
+
+Signed-off-by: Thierry Reding <treding@nvidia.com>
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index cffe19b..3beb5f2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -258,7 +258,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __INTEL_COMPILER
+
+ if test x$GCC = xyes -a x$intel_compiler != xyes; then
+ CFLAGS="${CFLAGS} -fexceptions -Wall -Wsign-compare"
+- LIBCRTS="-lgcc"
++ LIBCRTS="-lgcc_s"
+ fi
+ AC_MSG_RESULT([$intel_compiler])
+
+--
+2.3.2
+
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
new file mode 100644
index 000000000..268b702dc
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch
@@ -0,0 +1,72 @@
+From 10b064ffe902d5af31bb49bd8e4f03c545f8d462 Mon Sep 17 00:00:00 2001
+From: Ladislav Michl <ladis@linux-mips.org>
+Date: Tue, 13 Nov 2012 11:19:47 +0100
+Subject: [PATCH] Support building with older compilers.
+
+Add a check for __builtin_unreachable.
+
+Upstream-Status: Pending
+---
+ configure.ac | 11 +++++++++++
+ include/libunwind_i.h | 6 ++++++
+ src/arm/Gresume.c | 2 +-
+ src/sh/Gresume.c | 2 +-
+ 4 files changed, 19 insertions(+), 2 deletions(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -285,6 +285,17 @@ if test x$have__builtin___clear_cache =
+ fi
+ AC_MSG_RESULT([$have__builtin___clear_cache])
+
++AC_MSG_CHECKING([for __builtin_unreachable])
++AC_LINK_IFELSE(
++ [AC_LANG_PROGRAM([[]], [[__builtin_unreachable()]])],
++ [have__builtin_unreachable=yes],
++ [have__builtin_unreachable=no])
++if test x$have__builtin_unreachable = xyes; then
++ AC_DEFINE([HAVE__BUILTIN_UNREACHABLE], [1],
++ [Defined if __builtin_unreachable() is available])
++fi
++AC_MSG_RESULT([$have__builtin_unreachable])
++
+ AC_MSG_CHECKING([for __sync atomics])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[
+--- a/include/libunwind_i.h
++++ b/include/libunwind_i.h
+@@ -72,6 +72,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
+ # endif
+ #endif
+
++#if defined(HAVE__BUILTIN_UNREACHABLE)
++# define unreachable() __builtin_unreachable()
++#else
++# define unreachable() do { } while (1)
++#endif
++
+ #ifdef DEBUG
+ # define UNW_DEBUG 1
+ #else
+--- a/src/arm/Gresume.c
++++ b/src/arm/Gresume.c
+@@ -96,7 +96,7 @@ arm_local_resume (unw_addr_space_t as, u
+ : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc)
+ );
+ }
+- __builtin_unreachable();
++ unreachable();
+ #else
+ printf ("%s: implement me\n", __FUNCTION__);
+ #endif
+--- a/src/sh/Gresume.c
++++ b/src/sh/Gresume.c
+@@ -109,7 +109,7 @@ sh_local_resume (unw_addr_space_t as, un
+ "r" (c->sigcontext_pc)
+ );
+ }
+- __builtin_unreachable();
++ unreachable();
+ #endif
+ return -UNW_EINVAL;
+ }
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind.inc b/yocto-poky/meta/recipes-support/libunwind/libunwind.inc
new file mode 100644
index 000000000..6660af22c
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind.inc
@@ -0,0 +1,31 @@
+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://LICENSE;md5=3fced11d6df719b47505837a51c16ae5"
+DEPENDS += "libatomic-ops"
+
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+
+inherit autotools
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
+
+EXTRA_OECONF_arm = "--enable-debug-frame"
+EXTRA_OECONF_aarch64 = "--enable-debug-frame"
+
+CFLAGS += "${ATOMICOPS}"
+ATOMICOPS_armv5 = "-DAO_USE_PTHREAD_DEFS=1"
+ATOMICOPS_armv4 = "-DAO_USE_PTHREAD_DEFS=1"
+ATOMICOPS ?= ""
+
+LDFLAGS_append_x86 = " -fuse-ld=gold"
+LDFLAGS_append_x86-64 = " -fuse-ld=gold"
+
+LDFLAGS_append_arm = " -fuse-ld=gold"
+LDFLAGS_append_aarch64 = " -fuse-ld=gold"
+
+LDFLAGS_append_powerpc = " -fuse-ld=gold"
+LDFLAGS_append_powerpc64 = " -fuse-ld=gold"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb b/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb
new file mode 100644
index 000000000..8282c1b71
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb
@@ -0,0 +1,12 @@
+require libunwind.inc
+
+SRC_URI += "\
+ file://Support-building-with-older-compilers.patch \
+ file://AArch64-port.patch \
+ file://Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch \
+ file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \
+ file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \
+"
+
+SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
+SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a"
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu/0001-uatomic-Specify-complete-types-for-atomic-function-c.patch b/yocto-poky/meta/recipes-support/liburcu/liburcu/0001-uatomic-Specify-complete-types-for-atomic-function-c.patch
new file mode 100644
index 000000000..5ad0bbd15
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liburcu/liburcu/0001-uatomic-Specify-complete-types-for-atomic-function-c.patch
@@ -0,0 +1,158 @@
+From 6af790818d074c103c4797f1ce764896f183e028 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Aug 2015 21:35:03 -0700
+Subject: [PATCH] uatomic: Specify complete types for atomic function calls
+
+This was unearthed by clang compiler where it complained about parameter
+mismatch, gcc doesnt notice this
+
+urcu/uatomic/generic.h:190:10: error: address argument to atomic builtin
+must be a pointer to integer or pointer ('void *' invalid)
+ return __sync_add_and_fetch_4(addr, val);
+
+Fixed all instances thusly
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ urcu/uatomic/generic.h | 40 ++++++++++++++++++++--------------------
+ 1 file changed, 20 insertions(+), 20 deletions(-)
+
+diff --git a/urcu/uatomic/generic.h b/urcu/uatomic/generic.h
+index 37f59cc..0046ffd 100644
+--- a/urcu/uatomic/generic.h
++++ b/urcu/uatomic/generic.h
+@@ -65,17 +65,17 @@ unsigned long _uatomic_cmpxchg(void *addr, unsigned long old,
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- return __sync_val_compare_and_swap_1(addr, old, _new);
++ return __sync_val_compare_and_swap_1((unsigned char *)addr, old, _new);
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- return __sync_val_compare_and_swap_2(addr, old, _new);
++ return __sync_val_compare_and_swap_2((unsigned short int *)addr, old, _new);
+ #endif
+ case 4:
+- return __sync_val_compare_and_swap_4(addr, old, _new);
++ return __sync_val_compare_and_swap_4((unsigned int *)addr, old, _new);
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- return __sync_val_compare_and_swap_8(addr, old, _new);
++ return __sync_val_compare_and_swap_8((unsigned long *)addr, old, _new);
+ #endif
+ }
+ _uatomic_link_error();
+@@ -100,20 +100,20 @@ void _uatomic_and(void *addr, unsigned long val,
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- __sync_and_and_fetch_1(addr, val);
++ __sync_and_and_fetch_1((unsigned char *)addr, val);
+ return;
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- __sync_and_and_fetch_2(addr, val);
++ __sync_and_and_fetch_2((unsigned short int *)addr, val);
+ return;
+ #endif
+ case 4:
+- __sync_and_and_fetch_4(addr, val);
++ __sync_and_and_fetch_4((unsigned int *)addr, val);
+ return;
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- __sync_and_and_fetch_8(addr, val);
++ __sync_and_and_fetch_8((unsigned long *)addr, val);
+ return;
+ #endif
+ }
+@@ -139,20 +139,20 @@ void _uatomic_or(void *addr, unsigned long val,
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- __sync_or_and_fetch_1(addr, val);
++ __sync_or_and_fetch_1((unsigned char *)addr, val);
+ return;
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- __sync_or_and_fetch_2(addr, val);
++ __sync_or_and_fetch_2((unsigned short int *)addr, val);
+ return;
+ #endif
+ case 4:
+- __sync_or_and_fetch_4(addr, val);
++ __sync_or_and_fetch_4((unsigned int *)addr, val);
+ return;
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- __sync_or_and_fetch_8(addr, val);
++ __sync_or_and_fetch_8((unsigned long *)addr, val);
+ return;
+ #endif
+ }
+@@ -180,17 +180,17 @@ unsigned long _uatomic_add_return(void *addr, unsigned long val,
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- return __sync_add_and_fetch_1(addr, val);
++ return __sync_add_and_fetch_1((unsigned char *)addr, val);
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- return __sync_add_and_fetch_2(addr, val);
++ return __sync_add_and_fetch_2((unsigned short int *)addr, val);
+ #endif
+ case 4:
+- return __sync_add_and_fetch_4(addr, val);
++ return __sync_add_and_fetch_4((unsigned int *)addr, val);
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- return __sync_add_and_fetch_8(addr, val);
++ return __sync_add_and_fetch_8((unsigned long *)addr, val);
+ #endif
+ }
+ _uatomic_link_error();
+@@ -218,7 +218,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
+
+ do {
+ old = uatomic_read((unsigned char *)addr);
+- } while (!__sync_bool_compare_and_swap_1(addr, old, val));
++ } while (!__sync_bool_compare_and_swap_1((unsigned char *)addr, old, val));
+
+ return old;
+ }
+@@ -230,7 +230,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
+
+ do {
+ old = uatomic_read((unsigned short *)addr);
+- } while (!__sync_bool_compare_and_swap_2(addr, old, val));
++ } while (!__sync_bool_compare_and_swap_2((unsigned short int *)addr, old, val));
+
+ return old;
+ }
+@@ -241,7 +241,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
+
+ do {
+ old = uatomic_read((unsigned int *)addr);
+- } while (!__sync_bool_compare_and_swap_4(addr, old, val));
++ } while (!__sync_bool_compare_and_swap_4((unsigned int *)addr, old, val));
+
+ return old;
+ }
+@@ -252,7 +252,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
+
+ do {
+ old = uatomic_read((unsigned long *)addr);
+- } while (!__sync_bool_compare_and_swap_8(addr, old, val));
++ } while (!__sync_bool_compare_and_swap_8((unsigned long *)addr, old, val));
+
+ return old;
+ }
+--
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch b/yocto-poky/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch
new file mode 100644
index 000000000..535a7384c
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch
@@ -0,0 +1,47 @@
+From 7b3df100346128d780f218b881d563d1fd12e310 Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Mon, 20 Oct 2014 13:46:10 +1100
+Subject: [PATCH] Revert "Blacklist ARM gcc 4.8.0, 4.8.1, 4.8.2"
+
+This reverts commit 4b79310aa3d408ba30fee02cc497a68072d38a99.
+OE-Core is using a patched GCC 4.8.2 which is able to compile liburcu
+properly.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ urcu/compiler.h | 19 -------------------
+ 1 file changed, 19 deletions(-)
+
+diff --git a/urcu/compiler.h b/urcu/compiler.h
+index 1e30903..19534f0 100644
+--- a/urcu/compiler.h
++++ b/urcu/compiler.h
+@@ -108,23 +108,4 @@
+
+ #define CAA_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+-/*
+- * Don't allow compiling with buggy compiler.
+- */
+-
+-#ifdef __GNUC__
+-# define URCU_GCC_VERSION (__GNUC__ * 10000 \
+- + __GNUC_MINOR__ * 100 \
+- + __GNUC_PATCHLEVEL__)
+-
+-/*
+- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
+- */
+-# ifdef __ARMEL__
+-# if URCU_GCC_VERSION >= 40800 && URCU_GCC_VERSION <= 40802
+-# error Your gcc version produces clobbered frame accesses
+-# endif
+-# endif
+-#endif
+-
+ #endif /* _URCU_COMPILER_H */
+--
+2.1.2
+
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu/aarch64.patch b/yocto-poky/meta/recipes-support/liburcu/liburcu/aarch64.patch
new file mode 100644
index 000000000..c6cc8c2fd
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liburcu/liburcu/aarch64.patch
@@ -0,0 +1,19 @@
+libucru: recognize aarch64
+
+Make the same as "arm" internally.
+
+Upstream-Status: Pending
+
+Signed-off-by: joe.slater@windriver.com
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -77,6 +77,7 @@ AS_CASE([$host_cpu],
+ [alpha*], [ARCHTYPE="alpha"],
+ [ia64], [ARCHTYPE="gcc"],
+ [arm*], [ARCHTYPE="arm"],
++ [aarch64], [ARCHTYPE="arm"],
+ [mips*], [ARCHTYPE="mips"],
+ [tile*], [ARCHTYPE="gcc"],
+ [ARCHTYPE="unknown"]
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu_0.8.7.bb b/yocto-poky/meta/recipes-support/liburcu/liburcu_0.8.7.bb
new file mode 100644
index 000000000..a7f4f51b5
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liburcu/liburcu_0.8.7.bb
@@ -0,0 +1,21 @@
+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=0f060c30a27922ce9c0d557a639b4fa3 \
+ file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
+ file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=220552f72c55b102f2ee35929734ef42"
+
+SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
+ file://Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch \
+ file://aarch64.patch \
+ file://0001-uatomic-Specify-complete-types-for-atomic-function-c.patch \
+ "
+
+SRC_URI[md5sum] = "7a6ee17871d31226db3f618e28351d22"
+SRC_URI[sha256sum] = "b523f22c4726ca6bb77a77d258e76d8c33c89724433bd65313024b98e55c4295"
+
+S = "${WORKDIR}/userspace-rcu-${PV}"
+CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
+inherit autotools
diff --git a/yocto-poky/meta/recipes-support/libusb/libusb-compat/0001-usb.h-Include-sys-types.h.patch b/yocto-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/yocto-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/yocto-poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb b/yocto-poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
new file mode 100644
index 000000000..646872cb9
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
@@ -0,0 +1,39 @@
+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"
+
+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/yocto-poky/meta/recipes-support/libusb/libusb1_1.0.19.bb b/yocto-poky/meta/recipes-support/libusb/libusb1_1.0.19.bb
new file mode 100644
index 000000000..a20e1fcdb
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libusb/libusb1_1.0.19.bb
@@ -0,0 +1,34 @@
+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 \
+ "
+
+SRC_URI[md5sum] = "f9e2bb5879968467e5ca756cb4e1fa7e"
+SRC_URI[sha256sum] = "6c502c816002f90d4f76050a6429c3a7e0d84204222cbff2dce95dd773ba6840"
+
+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/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig.patch b/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig.patch
new file mode 100644
index 000000000..89d14c944
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig.patch
@@ -0,0 +1,118 @@
+Use pkg-config to find gcrypt and libxml2.
+
+Upstream-Status: Pending [libxml2 is upstreamable]
+
+RP 2014/5/22
+
+Index: libxslt-1.1.28/configure.in
+===================================================================
+--- libxslt-1.1.28.orig/configure.in 2014-05-13 16:46:02.278474967 +0000
++++ libxslt-1.1.28/configure.in 2014-05-13 16:53:56.510472561 +0000
+@@ -376,6 +376,8 @@
+ AC_SUBST(PYTHON_SUBDIR)
+ AC_SUBST(PYTHON_LIBS)
+
++PKG_PROG_PKG_CONFIG
++
+ AC_ARG_WITH(crypto, [ --with-crypto Add crypto support to exslt (on)])
+ WITH_CRYPTO=0
+ if test "$with_crypto" = "no" ; then
+@@ -391,26 +393,13 @@
+ WITH_CRYPTO=1
+ ;;
+ *)
+- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
+- if test "$LIBGCRYPT_CONFIG" != "no" ; then
+- LIBGCRYPT_VERSION=`$LIBGCRYPT_CONFIG --version`
+- if test VERSION_TO_NUMBER(echo $LIBGCRYPT_VERSION) -lt VERSION_TO_NUMBER(echo "1.1.42")
+- then
+- LIBGCRYPT_CFLAGS=""
+- LIBGCRYPT_LIBS=""
+- echo 'gcrypt library version < 1.1.42 - Crypto extensions will not be available.'
+- else
+- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --cflags`
+- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG $libgcrypt_config_args --libs`
+- AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
+- echo 'Crypto extensions will be available.'
++ PKG_CHECK_MODULES(LIBGCRYPT, [libgcrypt >= 1.1.42], [
++ AC_DEFINE(HAVE_GCRYPT, 1, [Define if gcrypt library is available.])
++ echo 'Crypto extensions will be available.'
+ WITH_CRYPTO=1
+- fi
+- else
+- LIBGCRYPT_CFLAGS=""
+- LIBGCRYPT_LIBS=""
+- echo 'Crypto extensions will not be available. Install libgcrypt and reconfigure to make available.'
+- fi
++ ], [
++ echo 'Crypto extensions will not be available. Install libgcrypt >= 1.1.42 and reconfigure to make available.'
++ ])
+ esac
+ fi
+ AC_SUBST(WITH_CRYPTO)
+@@ -471,24 +460,8 @@
+ dnl some tweaking - David Härdeman 30/10/2001
+ dnl
+
+-LIBXML_CONFIG_PREFIX=""
+ LIBXML_SRC=""
+
+-AC_ARG_WITH(libxml-prefix,
+- [ --with-libxml-prefix=[PFX] Specify location of libxml config],
+- LIBXML_CONFIG_PREFIX=$withval
+-)
+-
+-AC_ARG_WITH(libxml-include-prefix,
+- [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers],
+- LIBXML_CFLAGS="-I$withval"
+-)
+-
+-AC_ARG_WITH(libxml-libs-prefix,
+- [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs],
+- LIBXML_LIBS="-L$withval"
+-)
+-
+ AC_ARG_WITH(libxml-src,
+ [ --with-libxml-src=[DIR] For libxml thats not installed yet (sets all three above)],
+ LIBXML_SRC="$withval"
+@@ -551,28 +524,9 @@
+ fi
+ fi
+
+-dnl
+-dnl make sure xml2-config is executable,
+-dnl test version and init our variables
+-dnl
+-
+-if ${XML_CONFIG} --libs print > /dev/null 2>&1
+-then
+- XMLVERS=`$XML_CONFIG --version`
+- if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
+- then
+- AC_MSG_RESULT($XMLVERS found)
+- else
+- AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
+- fi
+- LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`"
+- if test "x$LIBXML_SRC" = "x"; then
+- LIBXML_CFLAGS="$LIBXML_CFLAGS `$XML_CONFIG --cflags`"
+- fi
+-else
+- AC_MSG_ERROR([Could not find libxml2 anywhere, check ftp://xmlsoft.org/.])
+-fi
+-
++PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],,
++ [AC_MSG_ERROR([Could not find libxml-2.0 >= $LIBXML_REQUIRED_VERSION anywhere, check ftp://xmlsoft.org/.])]
++)
+
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CPPFLAGS)
+@@ -597,7 +551,7 @@
+
+ if test "$with_plugins" = "yes" ; then
+ AC_MSG_CHECKING([libxml2 module support])
+- WITH_MODULES="`$XML_CONFIG --modules`"
++ WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
+ if test "${WITH_MODULES}" = "1"; then
+ AC_MSG_RESULT(yes)
+ else
diff --git a/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch b/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch
new file mode 100644
index 000000000..16a801010
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch
@@ -0,0 +1,24 @@
+Upstream-Status: Inappropriate [configuration]
+
+Index: libxslt-1.1.27/libexslt.pc.in
+===================================================================
+--- libxslt-1.1.27.orig/libexslt.pc.in
++++ libxslt-1.1.27/libexslt.pc.in
+@@ -8,5 +8,5 @@ Name: libexslt
+ Version: @LIBEXSLT_VERSION@
+ Description: EXSLT Extension library
+ Requires: libxml-2.0
+-Libs: @EXSLT_LIBDIR@ @EXSLT_LIBS@
++Libs: -lexslt @EXSLT_LIBDIR@ @EXSLT_LIBS@
+ Cflags: @EXSLT_INCLUDEDIR@
+Index: libxslt-1.1.27/libxslt.pc.in
+===================================================================
+--- libxslt-1.1.27.orig/libxslt.pc.in
++++ libxslt-1.1.27/libxslt.pc.in
+@@ -8,5 +8,5 @@ Name: libxslt
+ Version: @VERSION@
+ Description: XSLT library version 2.
+ Requires: libxml-2.0
+-Libs: @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@
++Libs: -lxslt @XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@
+ Cflags: @XSLT_INCLUDEDIR@
diff --git a/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb b/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb
new file mode 100644
index 000000000..166bcd86e
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.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 = "ftp://xmlsoft.org/libxslt//libxslt-${PV}.tar.gz \
+ file://pkgconfig_fix.patch \
+ file://pkgconfig.patch"
+
+SRC_URI[md5sum] = "9667bf6f9310b957254fdcf6596600b7"
+SRC_URI[sha256sum] = "5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c"
+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.in
+
+ # 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/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch b/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch
new file mode 100644
index 000000000..3c4a00ef3
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch
@@ -0,0 +1,32 @@
+# HG changeset patch
+# User Kirill Simonov <xi@resolvent.net>
+# Date 1417197312 21600
+# Node ID 2b9156756423e967cfd09a61d125d883fca6f4f2
+# Parent 053f53a381ff6adbbc93a31ab7fdee06a16c8a33
+Removed invalid simple key assertion (thank to Jonathan Gray).
+
+The patch comes from
+
+https://bitbucket.org/xi/libyaml/commits/2b9156756423e967cfd09a61d125d883fca6f4f2
+
+Upstream-Status: Backport
+
+Signed-off-by: Yue Tao <yue.tao@windriver.com>
+
+diff -r 053f53a381ff -r 2b9156756423 src/scanner.c
+--- a/src/scanner.c Wed Mar 26 13:55:54 2014 -0500
++++ b/src/scanner.c Fri Nov 28 11:55:12 2014 -0600
+@@ -1106,13 +1106,6 @@
+ && parser->indent == (ptrdiff_t)parser->mark.column);
+
+ /*
+- * A simple key is required only when it is the first token in the current
+- * line. Therefore it is always allowed. But we add a check anyway.
+- */
+-
+- assert(parser->simple_key_allowed || !required); /* Impossible. */
+-
+- /*
+ * If the current position may start a simple key, save it.
+ */
+
diff --git a/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.6.bb b/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.6.bb
new file mode 100644
index 000000000..b0155774d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libyaml/libyaml_0.1.6.bb
@@ -0,0 +1,21 @@
+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 \
+ file://libyaml-CVE-2014-9130.patch \
+ "
+
+SRC_URI[md5sum] = "5fe00cda18ca5daeb43762b80c38e06e"
+SRC_URI[sha256sum] = "7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749"
+
+S = "${WORKDIR}/yaml-${PV}"
+
+inherit autotools
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/lz4/lz4.bb b/yocto-poky/meta/recipes-support/lz4/lz4.bb
new file mode 100644
index 000000000..18e56d04c
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/lz4/lz4.bb
@@ -0,0 +1,21 @@
+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"
+LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=0b0d063f37a4477b54af2459477dcafd"
+
+SRCREV = "d86dc916771c126afb797637dda9f6421c0cb998"
+
+PV = "131+git${SRCPV}"
+
+SRC_URI = "git://github.com/Cyan4973/lz4.git"
+
+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/yocto-poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch b/yocto-poky/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch
new file mode 100644
index 000000000..db3a70e80
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/lzo/lzo/acinclude.m4 b/yocto-poky/meta/recipes-support/lzo/lzo/acinclude.m4
new file mode 100644
index 000000000..c4d2ccd5b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/lzo/lzo/acinclude.m4
@@ -0,0 +1,358 @@
+
+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
+])#
+
diff --git a/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest b/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest
new file mode 100644
index 000000000..2ea7745f7
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/lzo/lzo/run-ptest
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+./lzotest -mavail -n10 -q /etc/services
+LZOTEST=./lzotest /bin/sh -e "./check.sh" "/etc"
+./align
+./chksum
+./simple
+./testmini
diff --git a/yocto-poky/meta/recipes-support/lzo/lzo_2.09.bb b/yocto-poky/meta/recipes-support/lzo/lzo_2.09.bb
new file mode 100644
index 000000000..2978617bb
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/lzo/lzo_2.09.bb
@@ -0,0 +1,35 @@
+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=355023835a9b9eeb70ab895395e951ff"
+
+SRC_URI = "http://www.oberhumer.com/opensource/lzo/download/lzo-${PV}.tar.gz \
+ file://0001-Use-memcpy-instead-of-reinventing-it.patch \
+ file://acinclude.m4 \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "c7ffc9a103afe2d1bba0b015e7aa887f"
+SRC_URI[sha256sum] = "f294a7ced313063c057c504257f437c8335c41bfeed23531ee4e6a2b87bcb34c"
+
+inherit autotools ptest
+
+EXTRA_OECONF = "--enable-shared"
+
+do_configure_prepend () {
+ cp ${WORKDIR}/acinclude.m4 ${S}/
+}
+
+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/yocto-poky/meta/recipes-support/lzop/lzop/0001-use-static-inlines-as-the-external-inline-definition.patch b/yocto-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/yocto-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/yocto-poky/meta/recipes-support/lzop/lzop/acinclude.m4 b/yocto-poky/meta/recipes-support/lzop/lzop/acinclude.m4
new file mode 100644
index 000000000..0029c19c7
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch b/yocto-poky/meta/recipes-support/lzop/lzop/x32_abi_miniacc_h.patch
new file mode 100644
index 000000000..739be8231
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb b/yocto-poky/meta/recipes-support/lzop/lzop_1.03.bb
new file mode 100644
index 000000000..07d628908
--- /dev/null
+++ b/yocto-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 \
+ "
+SRC_URI[md5sum] = "006c5e27fb78cdd14a628fdfa5aa1905"
+SRC_URI[sha256sum] = "c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9"
+
+inherit autotools
+
+do_configure () {
+ ln -sf ../acinclude.m4 ${S}/acinclude.m4
+ autotools_do_configure
+}
+
+BBCLASSEXTEND += "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/mpfr/mpfr-3.1.3/long-long-thumb.patch b/yocto-poky/meta/recipes-support/mpfr/mpfr-3.1.3/long-long-thumb.patch
new file mode 100644
index 000000000..ca7100eb2
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/mpfr/mpfr-3.1.3/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/yocto-poky/meta/recipes-support/mpfr/mpfr.inc b/yocto-poky/meta/recipes-support/mpfr/mpfr.inc
new file mode 100644
index 000000000..7f3f9175d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/mpfr/mpfr.inc
@@ -0,0 +1,6 @@
+SUMMARY = "C library for multiple-precision floating-point computations with exact rounding"
+HOMEPAGE = "http://www.mpfr.org/"
+LICENSE = "LGPLv3+"
+SECTION = "devel"
+
+inherit autotools texinfo
diff --git a/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb b/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb
new file mode 100644
index 000000000..af19b5451
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb
@@ -0,0 +1,17 @@
+require mpfr.inc
+
+LICENSE = "GPLv3 & LGPLv3"
+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] = "6969398cd2fbc56a6af570b5273c56a9"
+SRC_URI[sha256sum] = "6835a08bd992c8257641791e9a6a2b35b02336c8de26d0a8577953747e514a16"
+
+S = "${WORKDIR}/mpfr-${PV}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch b/yocto-poky/meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch
new file mode 100644
index 000000000..459f5e385
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch
@@ -0,0 +1,68 @@
+replace deprecated GnuTLS functions with newer ones if available
+
+Upstream-Status: Pending
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: neon-0.30.1/macros/neon.m4
+===================================================================
+--- neon-0.30.1.orig/macros/neon.m4
++++ neon-0.30.1/macros/neon.m4
+@@ -987,6 +987,10 @@ gnutls)
+ gnutls_certificate_get_x509_cas \
+ gnutls_x509_crt_sign2])
+
++ # gnutls 4.3 check
++ AC_CHECK_LIB(gnutls, gnutls_global_init)
++ AC_CHECK_FUNCS(gnutls_certificate_set_retrieve_function,,)
++
+ # fail if gnutls_x509_crt_sign2 is not found (it was introduced in 1.2.0, which is required)
+ if test x${ac_cv_func_gnutls_x509_crt_sign2} != xyes; then
+ AC_MSG_ERROR([GnuTLS version predates gnutls_x509_crt_sign2, newer version required (at least 1.2.0)])
+Index: neon-0.30.1/src/ne_gnutls.c
+===================================================================
+--- neon-0.30.1.orig/src/ne_gnutls.c
++++ neon-0.30.1/src/ne_gnutls.c
+@@ -553,7 +553,13 @@ dup_error:
+ static int provide_client_cert(gnutls_session_t session,
+ const gnutls_datum_t *req_ca_rdn, int nreqs,
+ const gnutls_pk_algorithm_t *sign_algos,
+- int sign_algos_length, gnutls_retr_st *st)
++ int sign_algos_length,
++#if HAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION
++ gnutls_retr2_st* st
++#else
++ gnutls_retr_st *st
++#endif
++ )
+ {
+ ne_session *sess = gnutls_session_get_ptr(session);
+
+@@ -617,8 +623,11 @@ static int provide_client_cert(gnutls_se
+ #endif
+ ) {
+ NE_DEBUG(NE_DBG_SSL, "Supplying client certificate.\n");
+-
++#if HAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION
++ st->cert_type = type;
++#else
+ st->type = type;
++#endif
+ st->ncerts = 1;
+ st->cert.x509 = &sess->client_cert->cert.subject;
+ st->key.x509 = sess->client_cert->pkey;
+@@ -649,8 +658,14 @@ ne_ssl_context *ne_ssl_context_create(in
+ ne_ssl_context *ctx = ne_calloc(sizeof *ctx);
+ gnutls_certificate_allocate_credentials(&ctx->cred);
+ if (flags == NE_SSL_CTX_CLIENT) {
++
++#if HAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION
++ gnutls_certificate_set_retrieve_function(ctx->cred,
++ provide_client_cert);
++#else
+ gnutls_certificate_client_set_retrieve_function(ctx->cred,
+ provide_client_cert);
++#endif
+ }
+ gnutls_certificate_set_verify_flags(ctx->cred,
+ GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
diff --git a/yocto-poky/meta/recipes-support/neon/neon/pkgconfig.patch b/yocto-poky/meta/recipes-support/neon/neon/pkgconfig.patch
new file mode 100644
index 000000000..239dba8e2
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/neon/neon/pkgconfig.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [configuration]
+
+---
+ neon.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- neon-0.30.1.orig/neon.pc.in
++++ neon-0.30.1/neon.pc.in
+@@ -7,5 +7,5 @@ Name: neon
+ Description: HTTP/WebDAV client library
+ Version: @NEON_VERSION@
+ Libs: -L${libdir} -lneon @NEON_PC_LIBS@
+-Libs.private: @NEON_LIBS@
++Libs.private: -L${libdir} -lz -lgcrypt -lgpg-error -lexpat -lgnutls
+ Cflags: -I${includedir}/neon @NEON_CFLAGS@
diff --git a/yocto-poky/meta/recipes-support/neon/neon_0.30.1.bb b/yocto-poky/meta/recipes-support/neon/neon_0.30.1.bb
new file mode 100644
index 000000000..0244314a6
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/neon/neon_0.30.1.bb
@@ -0,0 +1,27 @@
+SUMMARY = "An HTTP and WebDAV client library with a C interface"
+HOMEPAGE = "http://www.webdav.org/neon/"
+SECTION = "libs"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
+ file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
+DEPENDS = "zlib libxml2 expat time gnutls libproxy"
+DEPENDS_class-native = "zlib-native libxml2-native expat-native gnutls-native"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI = "http://www.webdav.org/${BPN}/${BPN}-${PV}.tar.gz \
+ file://pkgconfig.patch \
+ file://gnutls_4.3_fixup.patch"
+SRC_URI[md5sum] = "231adebe5c2f78fded3e3df6e958878e"
+SRC_URI[sha256sum] = "00c626c0dc18d094ab374dbd9a354915bfe4776433289386ed489c2ec0845cdd"
+
+BINCONFIG = "${bindir}/neon-config"
+
+inherit autotools binconfig-disabled lib_package pkgconfig
+
+EXTRA_OECONF = "--with-ssl=gnutls --with-libxml2 --with-expat --enable-shared"
+EXTRA_OECONF += "--without-gssapi"
+
+do_compile_append() {
+ oe_runmake -C test
+}
diff --git a/yocto-poky/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch b/yocto-poky/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch
new file mode 100644
index 000000000..23da77792
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nettle/files/Add-target-to-only-build-tests-not-run-them.patch
@@ -0,0 +1,46 @@
+From 46edf01cc98db9f9feec984897836dfdd26bdc8d Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 12 Aug 2015 23:27:27 +0300
+Subject: [PATCH] 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>
+---
+ Makefile.in | 3 +++
+ testsuite/Makefile.in | 2 ++
+ 2 files changed, 5 insertions(+)
+
+diff --git a/Makefile.in b/Makefile.in
+index 08efb7d..7909342 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -55,6 +55,9 @@ clean distclean mostlyclean maintainer-clean tags:
+ echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done
+ $(MAKE) $@-here
+
++buildtest:
++ echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@)
++
+ check-here:
+ true
+
+diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
+index 6bc1907..bb65bf0 100644
+--- a/testsuite/Makefile.in
++++ b/testsuite/Makefile.in
+@@ -116,6 +116,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
+ # 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 locating dlls on w*ndows.
+ check: $(TS_ALL)
+ LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \
+--
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-support/nettle/files/run-ptest b/yocto-poky/meta/recipes-support/nettle/files/run-ptest
new file mode 100644
index 000000000..b90bed66d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nettle/files/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/yocto-poky/meta/recipes-support/nettle/nettle.inc b/yocto-poky/meta/recipes-support/nettle/nettle.inc
new file mode 100644
index 000000000..fafff6d8d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nettle/nettle.inc
@@ -0,0 +1,43 @@
+SUMMARY = "A low level cryptographic library"
+HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
+SECTION = "libs"
+
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://serpent-decrypt.c;beginline=53;endline=67;md5=bcfd4745d53ca57f82907089898e390d \
+ file://serpent-set-key.c;beginline=56;endline=70;md5=bcfd4745d53ca57f82907089898e390d"
+
+DEPENDS += "gmp"
+
+SRC_URI = "http://www.lysator.liu.se/~nisse/archive/${BP}.tar.gz \
+ file://Add-target-to-only-build-tests-not-run-them.patch \
+ file://run-ptest \
+ "
+
+SRC_URI[md5sum] = "003d5147911317931dd453520eb234a5"
+SRC_URI[sha256sum] = "bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40"
+
+EXTRA_OECONF = "--disable-openssl"
+
+inherit autotools ptest
+
+do_configure_prepend() {
+ if [ ! -e ${S}/acinclude.m4 -a -e ${S}/aclocal.m4 ]; then
+ cp ${S}/aclocal.m4 ${S}/acinclude.m4
+ fi
+}
+
+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/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb b/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
new file mode 100644
index 000000000..ae2574a23
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
@@ -0,0 +1,12 @@
+require nettle.inc
+
+LICENSE = "LGPLv2.1 & GPLv2"
+LICENSE_${PN} = "LGPLv2.1+"
+
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+ file://serpent-decrypt.c;beginline=53;endline=67;md5=bcfd4745d53ca57f82907089898e390d \
+ file://serpent-set-key.c;beginline=56;endline=70;md5=bcfd4745d53ca57f82907089898e390d"
+
+SRC_URI[md5sum] = "003d5147911317931dd453520eb234a5"
+SRC_URI[sha256sum] = "bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40"
+
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle_3.1.1.bb b/yocto-poky/meta/recipes-support/nettle/nettle_3.1.1.bb
new file mode 100644
index 000000000..7d7134f19
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nettle/nettle_3.1.1.bb
@@ -0,0 +1,11 @@
+require nettle.inc
+
+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"
+
+SRC_URI[md5sum] = "b40fa88dc32f37a182b6b42092ebb144"
+SRC_URI[sha256sum] = "5fd4d25d64d8ddcb85d0d897572af73b05b4d163c6cc49438a5bfbb8ff293d4c"
diff --git a/yocto-poky/meta/recipes-support/npth/npth/pkgconfig.patch b/yocto-poky/meta/recipes-support/npth/npth/pkgconfig.patch
new file mode 100644
index 000000000..b6a12e730
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/npth/npth_1.2.bb b/yocto-poky/meta/recipes-support/npth/npth_1.2.bb
new file mode 100644
index 000000000..1b3962e64
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/npth/npth_1.2.bb
@@ -0,0 +1,21 @@
+SUMMARY = "New GNU Portable Threads library"
+HOMEPAGE = "http://www.gnupg.org/software/pth/"
+SECTION = "libs"
+LICENSE = "LGPLv3+ & GPLv2+"
+LIC_FILES_CHKSUM = "\
+ file://COPYING;md5=751419260aa954499f7abaabaa882bbe\
+ file://COPYING.LESSER;md5=6a6a8e020838b23406c81b19c1d46df6\
+ "
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/npth/npth-${PV}.tar.bz2 \
+ file://pkgconfig.patch \
+ "
+
+SRC_URI[md5sum] = "226bac7374b9466c6ec26b1c34dab844"
+SRC_URI[sha256sum] = "6ddbdddb2cf49a4723f9d1ad6563c480d6760dcb63cb7726b8fc3bc2e1b6c08a"
+
+BINCONFIG = "${bindir}/npth-config"
+
+inherit autotools binconfig-disabled
+
+FILES_${PN} = "${libdir}/libnpth.so.*"
+FILES_${PN}-dev += "${bindir}/npth-config"
diff --git a/yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/yocto-poky/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch
new file mode 100644
index 000000000..c2b7258e5
--- /dev/null
+++ b/yocto-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
+ ;;
+ m68k)
diff --git a/yocto-poky/meta/recipes-support/nspr/nspr/nspr.pc.in b/yocto-poky/meta/recipes-support/nspr/nspr/nspr.pc.in
new file mode 100644
index 000000000..c37d0bcbd
--- /dev/null
+++ b/yocto-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: 4.9.5
+Libs: -L${libdir} -lplds4 -lplc4 -lnspr4 -lpthread -ldl
+Cflags:
diff --git a/yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/yocto-poky/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch
new file mode 100644
index 000000000..a7e7853de
--- /dev/null
+++ b/yocto-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-4.8.9/mozilla/nsprpub/pr/tests/Makefile.in
+===================================================================
+--- nsprpub.orig/pr/tests/Makefile.in 2012-02-11 00:01:10.476220505 +0200
++++ nsprpub/pr/tests/Makefile.in 2012-02-10 23:57:40.000000000 +0200
+@@ -379,7 +379,7 @@
+ endif
+
+ 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/yocto-poky/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch b/yocto-poky/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
new file mode 100644
index 000000000..bde715c5d
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/nspr/nspr_4.10.8.bb b/yocto-poky/meta/recipes-support/nspr/nspr_4.10.8.bb
new file mode 100644
index 000000000..944994e17
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nspr/nspr_4.10.8.bb
@@ -0,0 +1,176 @@
+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 = "ftp://ftp.mozilla.org/pub/mozilla.org/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 \
+ "
+
+SRC_URI += "file://nspr.pc.in"
+
+SRC_URI[md5sum] = "8d7c5bd0a5b0a7d0e705be66479030a0"
+SRC_URI[sha256sum] = "507ea57c525c0c524dae4857a642b4ef5c9d795518754c7f83422d22fe544a15"
+
+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"
+
+PR = "r1"
+
+inherit autotools
+
+do_compile_prepend() {
+ oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -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 s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
+ sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nspr.pc
+ sed -i s:OEINCDIR:${includedir}:g ${D}${libdir}/pkgconfig/nspr.pc
+ sed -i 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/* "
+FILES_${PN}-dbg += "${libdir}/nspr/tests/.debug/*"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb b/yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
new file mode 100644
index 000000000..bbce9e9af
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
@@ -0,0 +1,29 @@
+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"
+
+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/yocto-poky/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch b/yocto-poky/meta/recipes-support/nss/nss/nss-fix-incorrect-shebang-of-perl.patch
new file mode 100644
index 000000000..547594d5b
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch b/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
new file mode 100644
index 000000000..866de07ea
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nss/nss/nss-fix-nsinstall-build.patch
@@ -0,0 +1,35 @@
+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>
+===================================================
+diff --git a/nss/coreconf/nsinstall/Makefile b/nss/coreconf/nsinstall/Makefile
+index 1850bcb..5aee84f 100644
+--- a/nss/coreconf/nsinstall/Makefile
++++ b/nss/coreconf/nsinstall/Makefile
+@@ -18,6 +18,12 @@ 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 =
++
+ ifeq (,$(filter-out OS2 WIN%,$(OS_TARGET)))
+ PROGRAM =
+ else
diff --git a/yocto-poky/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch b/yocto-poky/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch
new file mode 100644
index 000000000..f0b3550bf
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nss/nss/nss-fix-support-cross-compiling.patch
@@ -0,0 +1,71 @@
+nss: fix support cross compiling
+
+Let some make variables be assigned from outside makefile.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Upstream-Status: Inappropriate [configuration]
+---
+ nss/coreconf/Linux.mk | 12 +++++++++++-
+ nss/coreconf/arch.mk | 2 +-
+ nss/lib/freebl/Makefile | 6 ++++++
+ 3 files changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk
+--- a/nss/coreconf/Linux.mk
++++ b/nss/coreconf/Linux.mk
+@@ -16,11 +16,21 @@ ifeq ($(USE_PTHREADS),1)
+ IMPL_STRATEGY = _PTH
+ endif
+
++ifndef CC
+ CC = gcc
++endif
++
++ifdef CXX
++CCC = $(CXX)
++else
+ CCC = g++
++endif
++
++ifndef RANLIB
+ RANLIB = ranlib
++endif
+
+-DEFAULT_COMPILER = gcc
++DEFAULT_COMPILER = $(CC)
+
+ ifeq ($(OS_TARGET),Android)
+ ifndef ANDROID_NDK
+diff --git a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk
+index 6557348..b722412 100644
+--- a/nss/coreconf/arch.mk
++++ b/nss/coreconf/arch.mk
+@@ -37,7 +37,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 0d293f1..678f506 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
+--
+1.8.1.2
+
diff --git a/yocto-poky/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch b/yocto-poky/meta/recipes-support/nss/nss/nss-no-rpath-for-cross-compiling.patch
new file mode 100644
index 000000000..7661dc93a
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/nss/nss/nss.pc.in b/yocto-poky/meta/recipes-support/nss/nss/nss.pc.in
new file mode 100644
index 000000000..200f635c6
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/nss/nss/signlibs.sh b/yocto-poky/meta/recipes-support/nss/nss/signlibs.sh
new file mode 100644
index 000000000..a74e499f8
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/nss/nss_3.19.2.bb b/yocto-poky/meta/recipes-support/nss/nss_3.19.2.bb
new file mode 100644
index 000000000..23a4a1f8d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nss/nss_3.19.2.bb
@@ -0,0 +1,223 @@
+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"
+
+SRC_URI = "\
+ http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_2_RTM/src/${BP}.tar.gz \
+ file://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://nss.pc.in \
+ file://signlibs.sh \
+"
+
+SRC_URI[md5sum] = "b02ffd1e8e8ef5f8512fa02d8ca9db3d"
+SRC_URI[sha256sum] = "1306663e8f61d8449ad8cbcffab743a604dcd9f6f34232c210847c51dce2c9ae"
+
+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_compile_prepend_class-native() {
+ export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
+ export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
+}
+
+do_compile_prepend_class-nativesdk() {
+ export LDFLAGS=""
+}
+
+do_compile() {
+ export CROSS_COMPILE=1
+ export NATIVE_CC="gcc"
+ 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
+
+ # 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!
+ #
+ export CC="${CC} -g"
+ make -C ./nss CCC="${CXX} -g" \
+ OS_TEST=${OS_TEST}
+}
+
+
+do_install_prepend_class-nativesdk() {
+ export LDFLAGS=""
+}
+
+do_install() {
+ export CROSS_COMPILE=1
+ export NATIVE_CC="gcc"
+ 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
+
+ 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_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
+}
+
+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
+ exit 0
+ fi
+ signlibs.sh
+}
+
+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}/* \
+ "
+# FILES_${PN}-dbg is populated automatically
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb b/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
new file mode 100644
index 000000000..7ad9626e1
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Provides a way to load and enumerate PKCS#11 modules"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50"
+
+inherit autotools gettext pkgconfig
+
+DEPENDS = "libtasn1 libffi"
+
+SRC_URI = "http://p11-glue.freedesktop.org/releases/${BP}.tar.gz"
+SRC_URI[md5sum] = "4e9bea1106628ffb820bdad24a819fac"
+SRC_URI[sha256sum] = "ef3a339fcf6aa0e32c8c23f79ba7191e57312be2bda8b24e6d121c2670539a5c"
+
+FILES_${PN}-dev += " \
+ ${libdir}/p11-kit-proxy.so \
+ ${libdir}/pkcs11/p11-kit-trust.so \
+"
+FILES_${PN}-dev += "${libdir}/pkcs11/*.la"
+FILES_${PN}-dbg += "${libdir}/pkcs11/.debug"
diff --git a/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb b/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb
new file mode 100644
index 000000000..c836ca4b8
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/pinentry/pinentry_0.9.2.bb
@@ -0,0 +1,31 @@
+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
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "f51d454f921111b5156a2291cbf70278"
+SRC_URI[sha256sum] = "fd8bc1592ceb22bb492b07cb29b1b140bb882c859e6503b974254c0a4b4134d1"
+
+EXTRA_OECONF = "--disable-rpath \
+ --disable-dependency-tracking \
+ "
+
+PACKAGECONFIG ??= "ncurses libcap"
+
+PACKAGECONFIG[ncurses] = "--enable-ncurses --with-ncurses-include-dir=${STAGING_INCDIR}, --disable-ncurses, ncurses"
+PACKAGECONFIG[libcap] = "--with-libcap, --without-libcap, libcap"
+PACKAGECONFIG[qt4] = "--enable-pinentry-qt4, --disable-pinentry-qt4, qt4-x11"
+PACKAGECONFIG[qt4_clipboard] = "--enable-pinentry-qt4-clipboard --enable-pinentry-qt4, --disable-pinentry-qt4-clipboard, 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"
diff --git a/yocto-poky/meta/recipes-support/popt/popt/disable_tests.patch b/yocto-poky/meta/recipes-support/popt/popt/disable_tests.patch
new file mode 100644
index 000000000..016cf66a2
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/popt/popt/pkgconfig_fix.patch b/yocto-poky/meta/recipes-support/popt/popt/pkgconfig_fix.patch
new file mode 100644
index 000000000..0bddbf8c9
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch b/yocto-poky/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch
new file mode 100644
index 000000000..91bca96a5
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/popt/popt_1.16.bb b/yocto-poky/meta/recipes-support/popt/popt_1.16.bb
new file mode 100644
index 000000000..cb13a815e
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/popt/popt_1.16.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Library for parsing command line options"
+HOMEPAGE = "http://rpm5.org/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cb0613c30af2a8249b8dcc67d3edb06d"
+PR = "r3"
+
+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/yocto-poky/meta/recipes-support/ptest-runner/files/ptest-runner b/yocto-poky/meta/recipes-support/ptest-runner/files/ptest-runner
new file mode 100644
index 000000000..c618f1148
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/ptest-runner/files/ptest-runner
@@ -0,0 +1,27 @@
+#!/bin/sh
+ANYFAILED=no
+echo "START: $0"
+
+for libdir in /usr/lib*
+do
+
+ [ ! -d "$libdir" ] && continue
+
+ for x in `ls -d $libdir/*/ptest 2>/dev/null`
+ do
+ [ ! -f $x/run-ptest ] && continue
+ [ -h `dirname $x` ] && continue
+
+ date "+%Y-%m-%dT%H:%M"
+ echo "BEGIN: $x"
+ cd "$x"
+ ./run-ptest || ANYFAILED=yes
+ echo "END: $x"
+ date "+%Y-%m-%dT%H:%M"
+ done
+done
+echo "STOP: $0"
+if [ "$ANYFAILED" = "yes" ]; then
+ exit 1
+fi
+exit 0
diff --git a/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb b/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
new file mode 100644
index 000000000..bc1b0a4d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
@@ -0,0 +1,24 @@
+SUMMARY = "A simple shell script to run all installed ptests"
+DESCRIPTION = "The ptest-runner package installs a ptest-runner \
+shell script which loops through all installed ptest test suites and \
+runs them in sequence."
+HOMEPAGE = "https://wiki.yoctoproject.org/wiki/Ptest"
+SRC_URI += "file://ptest-runner"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+S = "${WORKDIR}"
+
+do_install () {
+ mkdir -p ${D}${bindir}
+ install -m 0755 ${WORKDIR}/ptest-runner ${D}${bindir}
+}
+
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_build[noexec] = "1"
diff --git a/yocto-poky/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch b/yocto-poky/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch
new file mode 100644
index 000000000..67a28ab77
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch
@@ -0,0 +1,105 @@
+Upstream-Status: Pending
+
+Add pkgconfig support to pth.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+
+Index: Makefile.in
+===========================================================
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -47,6 +47,9 @@ datadir = @datadir@
+
+ DESTDIR =
+
++pkgconfigdir = ${libdir}/pkgconfig
++pkgconfig_DATA = pth.pc
++
+ ##
+ ## ____ TOOL DEFINITIONS ___________________________________________
+ ##
+@@ -216,7 +219,7 @@ test_pthread: test_pthread.o test_common.o libpthread.la
+
+ # install the package
+ install: all-for-install
+- @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@
++ @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@ install-pkgconfigDATA
+ @touch .done-install >/dev/null 2>&1 || $(TRUE)
+ @$(MAKE) $(MKFLAGS) what-next
+ install-dirs:
+@@ -227,6 +230,7 @@ install-dirs:
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3
+ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir)/aclocal
++ $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(pkgconfigdir)
+ install-pth:
+ $(SHTOOL) install -c -m 755 pth-config $(DESTDIR)$(bindir)/pth-config
+ $(SHTOOL) install -c -m 644 $(S)pth-config.1 $(DESTDIR)$(mandir)/man1/pth-config.1
+@@ -242,12 +246,16 @@ install-pthread:
+ $(SHTOOL) install -c -m 644 $(S)pthread.3 $(DESTDIR)$(mandir)/man3/pthread.3
+ @umask 022; $(LIBTOOL) --mode=install \
+ $(SHTOOL) install -c libpthread.la $(DESTDIR)$(libdir)/libpthread.la
++install-pkgconfigDATA: $(pkgconfig_DATA)
++ $(SHTOOL) install -c -m 644 $(pkgconfig_DATA) $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA)
+
+ # uninstall the package
+ uninstall:
+- @$(MAKE) $(MKFLAGS) @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs
++ @$(MAKE) $(MKFLAGS) uninstall-pkgconfigDATA @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs
+ @touch .done-uninstall >/dev/null 2>&1 || $(TRUE)
+ @$(MAKE) $(MKFLAGS) what-next
++uninstall-pkgconfigDATA:
++ $(RM) $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA)
+ uninstall-pthread:
+ $(RM) $(DESTDIR)$(bindir)/pthread-config
+ $(RM) $(DESTDIR)$(mandir)/man1/pthread-config.1
+@@ -271,6 +279,7 @@ uninstall-dirs:
+ -$(RMDIR) $(DESTDIR)$(includedir) >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE)
+ -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE)
++ -$(RMDIR) $(DESTDIR)$(pkgconfigdir) > /dev/null 2>&1 ||$(TRUE)
+
+ # strip down the source tree to its minimum
+ striptease:
+Index: configure.ac
+===========================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -656,6 +656,13 @@ pth_acmac.h dnl
+ chmod +rx pthread-config
+ chmod +rx pth-config
+ )dnl
++
++PTH_VERSION=`echo $PTH_VERSION_STR | cut -d' ' -f1`
++AC_SUBST(PTH_VERSION)
++
++AC_CONFIG_FILES([pth.pc])
++AC_OUTPUT
++
+ if test ".$enable_pthread" = .no; then
+ rm -f pthread-config
+ rm -f pthread.h
+Index: pth.pc.in
+===========================================================
+--- /dev/null
++++ b/pth.pc.in
+@@ -0,0 +1,16 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++bindir=@bindir@
++mandir=@mandir@
++datadir=@datadir@
++acdir=@datadir@/aclocal
++
++Name: pth
++Description: GNU Portable Threads
++Requires:
++Version: @PTH_VERSION@
++Libs: -L${libdir} -lpth
++Libs.private:
++Cflags: -I${includedir}
+--
+1.7.5.4
+
diff --git a/yocto-poky/meta/recipes-support/pth/files/pth-fix-parallel.patch b/yocto-poky/meta/recipes-support/pth/files/pth-fix-parallel.patch
new file mode 100644
index 000000000..08edaff15
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/pth/files/pth-fix-parallel.patch
@@ -0,0 +1,48 @@
+From df06b8170745eac347acb95f9f374f257621254f Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 29 Jan 2015 18:11:00 -0800
+Subject: [PATCH] Makefile.in: fix for parallel build
+
+Fixed:
+* do_compile
+ pth_uctx.c:31:19: fatal error: pth_p.h: No such file or directory
+ #include "pth_p.h"
+ ^
+compilation terminated.
+make: *** [pth_uctx.lo] Error 1
+
+* do_install:
+ cp: cannot create regular file `image/usr/lib/pkgconfig/#INST@15507#': No such file or directory
+
+Upstream-Status: Pending
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ Makefile.in | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index de0390d..381a0ee 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -219,7 +219,8 @@ test_pthread: test_pthread.o test_common.o libpthread.la
+
+ # install the package
+ install: all-for-install
+- @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@ install-pkgconfigDATA
++ @$(MAKE) $(MKFLAGS) install-dirs
++ @$(MAKE) $(MKFLAGS) install-pth @INSTALL_PTHREAD@ install-pkgconfigDATA
+ @touch .done-install >/dev/null 2>&1 || $(TRUE)
+ @$(MAKE) $(MKFLAGS) what-next
+ install-dirs:
+@@ -432,7 +433,7 @@ TAGS:
+ ## (AUTOMATICALLY UPDATED - DO NOT EDIT)
+ ##
+
+-$(LOBJS): Makefile
++$(LOBJS): Makefile pth_p.h
+
+ # DO NOT REMOVE
+ pth_attr.lo: pth_attr.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h
+--
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-support/pth/pth_2.0.7.bb b/yocto-poky/meta/recipes-support/pth/pth_2.0.7.bb
new file mode 100644
index 000000000..9037769b7
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/pth/pth_2.0.7.bb
@@ -0,0 +1,31 @@
+SUMMARY = "GNU Portable Threads library"
+HOMEPAGE = "http://www.gnu.org/software/pth/"
+SECTION = "libs"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=12;endline=15;md5=a48af114a80c222cafd37f24370a77b1"
+PR = "r3"
+
+python __anonymous () {
+ import re
+ uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', True)) != None)
+ if uc_os:
+ raise bb.parse.SkipPackage("incompatible with uClibc")
+}
+
+SRC_URI = "${GNU_MIRROR}/pth/pth-${PV}.tar.gz \
+ file://pth-add-pkgconfig-support.patch \
+ file://pth-fix-parallel.patch \
+ "
+
+SRC_URI[md5sum] = "9cb4a25331a4c4db866a31cbe507c793"
+SRC_URI[sha256sum] = "72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232"
+
+BINCONFIG = "${bindir}/pth-config"
+
+inherit autotools binconfig-disabled pkgconfig
+
+do_configure() {
+ ( cd ${S}; gnu-configize )
+ ( cd ${S}; autoconf )
+ oe_runconf
+}
diff --git a/yocto-poky/meta/recipes-support/serf/serf/env.patch b/yocto-poky/meta/recipes-support/serf/serf/env.patch
new file mode 100644
index 000000000..9d073e9ab
--- /dev/null
+++ b/yocto-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/yocto-poky/meta/recipes-support/serf/serf/norpath.patch b/yocto-poky/meta/recipes-support/serf/serf/norpath.patch
new file mode 100644
index 000000000..380f5d00d
--- /dev/null
+++ b/yocto-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.6/SConstruct
+===================================================================
+--- serf-1.3.6.orig/SConstruct 2014-07-17 19:57:57.724389150 +0000
++++ serf-1.3.6/SConstruct 2014-07-17 20:04:21.784399616 +0000
+@@ -218,8 +218,7 @@
+ else:
+ LIBNAMESTATIC = 'serf-${MAJOR}'
+
+-env.Append(RPATH=libdir,
+- PDB='${TARGET.filebase}.pdb')
++env.Append(PDB='${TARGET.filebase}.pdb')
+
+ #for i in env:
+ # print(str(env[i]))
+@@ -371,12 +370,6 @@
+ 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'),
+@@ -446,7 +439,6 @@
+ ENV={'PATH' : os.environ['PATH']}))
+
+ # Find the (dynamic) library in this directory
+-tenv.Replace(RPATH=thisdir)
+ tenv.Prepend(LIBS=[LIBNAMESTATIC, ],
+ LIBPATH=[thisdir, ])
+
diff --git a/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb b/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb
new file mode 100644
index 000000000..b5059d546
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/serf/serf_1.3.8.bb
@@ -0,0 +1,26 @@
+SUMMARY = "High-Performance Asynchronous HTTP Client Library"
+SRC_URI = "${DEBIAN_MIRROR}/main/s/${BPN}/${BPN}_${PV}.orig.tar.gz \
+ file://norpath.patch \
+ file://env.patch"
+
+SRC_URI[md5sum] = "713beaf05d7f3329de121e218e2fcb93"
+SRC_URI[sha256sum] = "77134cd5010664ca023585bce50978bd4005906ed280ff889f591f86df7c59e4"
+
+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/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info.inc b/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info.inc
new file mode 100644
index 000000000..6eedb6d3f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info.inc
@@ -0,0 +1,36 @@
+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"
+DEPENDS_class-native = "libxml2-native intltool-native glib-2.0-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"
diff --git a/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch b/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
new file mode 100644
index 000000000..3c9f1ea43
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch
@@ -0,0 +1,23 @@
+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>
+
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -44,7 +44,9 @@ $(pkgconfig_DATA): config.status
+ @INTLTOOL_XML_RULE@
+ @INTLTOOL_DESKTOP_RULE@
+
+-install-data-hook: install-binPROGRAMS
++# do NOT make this dependent on anything!
++#
++install-data-hook:
+ if ENABLE_UPDATE_MIMEDB
+ $(DESTDIR)"$(bindir)/update-mime-database" -V "$(DESTDIR)$(datadir)/mime"
+ endif
diff --git a/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch b/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch
new file mode 100644
index 000000000..84c4d0373
--- /dev/null
+++ b/yocto-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.0/Makefile.am
+===================================================================
+--- shared-mime-info-1.0.orig/Makefile.am
++++ shared-mime-info-1.0/Makefile.am
+@@ -1,5 +1,3 @@
+-SUBDIRS=. po
+-
+ AM_CPPFLAGS = $(ALL_CFLAGS)
+
+ packagesdir = $(datadir)/mime/packages
+@@ -72,8 +70,7 @@ uninstall-hook:
+
+ all: $(defaultmakedeps)
+
+-create-pot:
+- $(AM_V_GEN) $(MAKE) -C po shared-mime-info.pot
++create-pot: po
+
+ check: create-pot freedesktop.org.xml update-mime-database check-translations
+ if test -e $(top_builddir)/freedesktop.org.xml; then \
diff --git a/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.4.bb b/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.4.bb
new file mode 100644
index 000000000..8c4fde806
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.4.bb
@@ -0,0 +1,7 @@
+require shared-mime-info.inc
+
+SRC_URI += "file://parallelmake.patch \
+ file://install-data-hook.patch"
+
+SRC_URI[md5sum] = "16c02f7b658fff2a9c207406d388ea31"
+SRC_URI[sha256sum] = "bbc0bd023f497dfd75e1ca73441cbbb5a63617d9e14f2790b868361cc055b5b1"
diff --git a/yocto-poky/meta/recipes-support/sqlite/files/0001-using-the-dynamic-library.patch b/yocto-poky/meta/recipes-support/sqlite/files/0001-using-the-dynamic-library.patch
new file mode 100644
index 000000000..e3bfd5f65
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/sqlite/files/0001-using-the-dynamic-library.patch
@@ -0,0 +1,30 @@
+[PATCH] using the dynamic library
+
+Upstream-Status: Inappropriate [configuration]
+
+building statically-linked sqlite3 failed since sqlite3.o is generated in
+different dir, even if link successes, the size of sqlite3 is become larger,
+so use the dynamic link, ref: http://patchwork.openembedded.org/patch/93293/
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 88bc23d..fe50f20 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -7,7 +7,8 @@ libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
+
+ bin_PROGRAMS = sqlite3
+ sqlite3_SOURCES = shell.c sqlite3.h
+-sqlite3_LDADD = sqlite3.$(OBJEXT) @READLINE_LIBS@
++sqlite3_LDADD = @READLINE_LIBS@ libsqlite3.la
++
+
+ include_HEADERS = sqlite3.h sqlite3ext.h
+
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc b/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc
new file mode 100644
index 000000000..2e3791bfc
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc
@@ -0,0 +1,34 @@
+SUMMARY = "Embeddable SQL database engine"
+HOMEPAGE = "http://www.sqlite.org"
+SECTION = "libs"
+DEPENDS = "readline ncurses"
+DEPENDS_class-native = ""
+LICENSE = "PD"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--enable-shared --enable-threadsafe"
+EXTRA_OECONF_class-native = "--enable-shared --enable-threadsafe --disable-readline"
+export config_BUILD_CC = "${BUILD_CC}"
+export config_BUILD_CFLAGS = "${BUILD_CFLAGS}"
+export config_BUILD_LIBS = "${BUILD_LDFLAGS}"
+export config_TARGET_CC = "${CC}"
+export config_TARGET_LINK = "${CCLD}"
+export config_TARGET_CFLAGS = "${CFLAGS}"
+export config_TARGET_LFLAGS = "${LDFLAGS}"
+
+# pread() is in POSIX.1-2001 so any reasonable system must surely support it
+BUILD_CFLAGS += "-DUSE_PREAD"
+TARGET_CFLAGS += "-DUSE_PREAD"
+
+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/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.8.10.2.bb b/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.8.10.2.bb
new file mode 100644
index 000000000..c72ad50f6
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.8.10.2.bb
@@ -0,0 +1,23 @@
+require sqlite3.inc
+
+LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0"
+
+def sqlite_download_version(d):
+ pvsplit = d.getVar('PV', True).split('.')
+ return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
+
+PE = "3"
+SQLITE_PV = "${@sqlite_download_version(d)}"
+SRC_URI = "http://www.sqlite.org/2015/sqlite-autoconf-${SQLITE_PV}.tar.gz \
+ file://0001-using-the-dynamic-library.patch \
+"
+
+SRC_URI[md5sum] = "a18bfc015cd49a1e7a961b7b77bc3b37"
+SRC_URI[sha256sum] = "8382e55a4e7d853c93038562ca3dd00307937fccf1c6b65ddd813e503a56d626"
+
+S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
+
+# Provide column meta-data API
+BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+TARGET_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+
diff --git a/yocto-poky/meta/recipes-support/taglib/taglib_1.9.1.bb b/yocto-poky/meta/recipes-support/taglib/taglib_1.9.1.bb
new file mode 100644
index 000000000..1f278144e
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/taglib/taglib_1.9.1.bb
@@ -0,0 +1,30 @@
+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"
+SRC_URI[md5sum] = "0d35df96822bbd564c5504cb3c2e4d86"
+SRC_URI[sha256sum] = "72d371cd1419a87ae200447a53bff2be219283071e80fd12337928cc967dc71a"
+
+BINCONFIG = "${bindir}/taglib-config"
+
+inherit cmake pkgconfig binconfig-disabled
+
+PACKAGES =+ "${PN}-c"
+FILES_${PN}-c = "${libdir}/libtag_c.so.*"
+
+EXTRA_OECMAKE = "-DLIB_SUFFIX=${@d.getVar('baselib', True).replace('lib', '')}"
+
+do_configure_prepend () {
+ rm -f ${S}/admin/ltmain.sh
+ rm -f ${S}/admin/libtool.m4.in
+ # Don't have a floating dependeny on boost
+ sed -i -e "s/atomic.hpp/atomic-not-exist.hpp/" ${S}/ConfigureChecks.cmake ${S}/taglib/toolkit/trefcounter.cpp
+}
+
diff --git a/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb b/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb
new file mode 100644
index 000000000..77ba97dbf
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/user-creation/xuser-account_0.1.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Creates an 'xuser' account used for running X11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = ""
+
+inherit allarch useradd
+
+do_configure() {
+ :
+}
+
+do_compile() {
+ :
+}
+
+do_install() {
+ :
+}
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system shutdown"
+USERADD_PARAM_${PN} = "--create-home \
+ --groups video,tty,audio,input,shutdown,disk \
+ --user-group xuser"
+
+ALLOW_EMPTY_${PN} = "1"
diff --git a/yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch b/yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch
new file mode 100644
index 000000000..6763d3754
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch
@@ -0,0 +1,14 @@
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=691545]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd vte-0.28.2/gnome-pty-helper/configure.in vte-0.28.2/gnome-pty-helper/configure.in
+--- vte-0.28.2/gnome-pty-helper/configure.in 2010-07-15 20:08:44.000000000 +0300
++++ vte-0.28.2/gnome-pty-helper/configure.in 2013-01-11 14:50:34.971027440 +0200
+@@ -8,7 +8,6 @@
+ AC_ISC_POSIX
+ AC_PROG_CC
+ AC_STDC_HEADERS
+-AM_PROG_CC_STDC
+
+ if test -z "$enable_maintainer_mode"; then
+ enable_maintainer_mode=yes
diff --git a/yocto-poky/meta/recipes-support/vte/vte.inc b/yocto-poky/meta/recipes-support/vte/vte.inc
new file mode 100644
index 000000000..874062adb
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/vte/vte.inc
@@ -0,0 +1,16 @@
+SUMMARY = "Virtual terminal emulator GTK+ widget library"
+BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
+LICENSE = "LGPLv2.0"
+DEPENDS = " glib-2.0 gtk+ intltool-native ncurses gobject-introspection-stub"
+RDEPENDS_libvte = "vte-termcap"
+
+inherit gnome gtk-doc
+
+EXTRA_OECONF = "--disable-python --disable-introspection"
+
+PACKAGES =+ "libvte vte-termcap"
+FILES_libvte = "${libdir}/*.so.* ${libexecdir}/gnome-pty-helper"
+FILES_${PN}-dbg =+ "${libexecdir}/.debug ${prefix}/src ${bindir}/.debug \
+ ${libdir}/.debug"
+FILES_vte-termcap = "${datadir}/vte/termcap-0.0"
+
diff --git a/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb b/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb
new file mode 100644
index 000000000..b1025cb0e
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb
@@ -0,0 +1,14 @@
+require vte.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
+
+PR = "r6"
+
+SRC_URI += "file://obsolete_automake_macros.patch"
+
+CFLAGS += "-D_GNU_SOURCE"
+
+SRC_URI[archive.md5sum] = "497f26e457308649e6ece32b3bb142ff"
+SRC_URI[archive.sha256sum] = "86cf0b81aa023fa93ed415653d51c96767f20b2d7334c893caba71e42654b0ae"
+
+RECIPE_NO_UPDATE_REASON = "matchbox-terminal needs to be ported over to new vte first"