From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- meta/recipes-support/apr/apr-util/configfix.patch | 51 + .../apr/apr-util/configure_fixes.patch | 31 + meta/recipes-support/apr/apr-util/run-ptest | 6 + meta/recipes-support/apr/apr-util_1.5.3.bb | 67 + meta/recipes-support/apr/apr/cleanup.patch | 43 + meta/recipes-support/apr/apr/configfix.patch | 53 + meta/recipes-support/apr/apr/configure_fixes.patch | 68 + meta/recipes-support/apr/apr/run-ptest | 6 + .../apr/apr/upgrade-and-fix-1.5.1.patch | 48 + meta/recipes-support/apr/apr_1.5.1.bb | 95 + meta/recipes-support/aspell/aspell_0.60.6.1.bb | 28 + meta/recipes-support/atk/at-spi2-atk_2.12.1.bb | 19 + meta/recipes-support/atk/at-spi2-core_2.12.0.bb | 20 + meta/recipes-support/atk/atk_2.12.0.bb | 23 + .../atk/files/core_acinclude_m4.patch | 40 + meta/recipes-support/attr/acl.inc | 39 + ...x-the-order-of-expected-output-of-getfacl.patch | 198 + .../attr/acl/add-missing-configure.ac.patch | 59 + meta/recipes-support/attr/acl/run-ptest | 7 + meta/recipes-support/attr/acl_2.2.52.bb | 9 + meta/recipes-support/attr/attr.inc | 39 + meta/recipes-support/attr/attr_2.4.47.bb | 10 + meta/recipes-support/attr/ea-acl.inc | 58 + .../attr/files/attr-Missing-configure.ac.patch | 63 + .../attr/files/relative-libdir.patch | 25 + meta/recipes-support/attr/files/run-ptest | 5 + meta/recipes-support/bdwgc/bdwgc_7.4.2.bb | 41 + .../beecrypt/beecrypt/add-option-dev-dsp.patch | 34 + .../beecrypt/beecrypt-enable-ptest-support.patch | 37 + .../beecrypt/beecrypt/disable-icu-check.patch | 43 + .../beecrypt/beecrypt/fix-for-gcc-4.7.patch | 39 + .../beecrypt/beecrypt/fix-security.patch | 47 + meta/recipes-support/beecrypt/beecrypt/run-ptest | 5 + meta/recipes-support/beecrypt/beecrypt_4.2.1.bb | 48 + meta/recipes-support/boost/bjam-native_1.56.0.bb | 15 + meta/recipes-support/boost/boost-1.56.0.inc | 19 + meta/recipes-support/boost/boost.inc | 182 + ...rt-for-extending-operations-to-GCC-atomic.patch | 412 ++ .../boost/boost/arm-intrinsics.patch | 55 + meta/recipes-support/boost/boost_1.56.0.bb | 7 + ...date-mozilla-certdata.txt-to-version-1.98.patch | 227 + ...01-update-ca-certificates-remove-c-rehash.patch | 46 + .../0002-update-ca-certificates-use-SYSROOT.patch | 55 + .../ca-certificates/default-sysroot.patch | 55 + .../ca-certificates/ca-certificates/sbindir.patch | 20 + .../ca-certificates/ca-certificates_20140325.bb | 77 + .../consolekit/add-polkit-configure-argument.patch | 33 + .../consolekit/consolekit/sepbuildfix.patch | 19 + .../recipes-support/consolekit/consolekit_0.4.6.bb | 49 + .../createrepo/createrepo/createrepo-rpm549.patch | 22 + .../createrepo/createrepo/fix-native-install.patch | 163 + ...n-scripts-should-use-interpreter-from-env.patch | 47 + .../createrepo/createrepo/recommends.patch | 71 + .../createrepo/createrepo/rpm-createsolvedb.py | 64 + .../createrepo/createrepo_0.4.11.bb | 46 + meta/recipes-support/curl/curl/CVE-2014-3613.patch | 269 ++ meta/recipes-support/curl/curl/CVE-2014-3620.patch | 69 + meta/recipes-support/curl/curl/CVE-2014-3707.patch | 416 ++ meta/recipes-support/curl/curl/CVE-2014-8150.patch | 29 + meta/recipes-support/curl/curl/CVE-2015-3143.patch | 38 + meta/recipes-support/curl/curl/CVE-2015-3144.patch | 45 + meta/recipes-support/curl/curl/CVE-2015-3145.patch | 70 + meta/recipes-support/curl/curl/CVE-2015-3153.patch | 90 + meta/recipes-support/curl/curl/configure_ac.patch | 13 + meta/recipes-support/curl/curl/pkgconfig_fix.patch | 32 + meta/recipes-support/curl/curl_7.37.1.bb | 66 + .../db/db/arm-thumb-mutex_db5.patch | 48 + .../recipes-support/db/db/fix-parallel-build.patch | 19 + meta/recipes-support/db/db_5.3.28.bb | 116 + meta/recipes-support/db/db_6.0.30.bb | 115 + meta/recipes-support/enchant/enchant_1.6.0.bb | 32 + meta/recipes-support/gdbm/files/ptest.patch | 36 + meta/recipes-support/gdbm/files/run-ptest | 7 + meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch | 22 + .../gdbm/gdbm-1.8.3/libtool-mode.patch | 22 + .../recipes-support/gdbm/gdbm-1.8.3/makefile.patch | 60 + meta/recipes-support/gdbm/gdbm_1.11.bb | 43 + meta/recipes-support/gdbm/gdbm_1.8.3.bb | 19 + meta/recipes-support/gmp/gmp.inc | 29 + meta/recipes-support/gmp/gmp/amd64.patch | 18 + .../gmp/gmp/append_user_provided_flags.patch | 52 + meta/recipes-support/gmp/gmp/configure.patch | 222 + meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch | 26 + meta/recipes-support/gmp/gmp/use-includedir.patch | 15 + meta/recipes-support/gmp/gmp_6.0.0.bb | 14 + ...process.c-Enable-GNU-extensions-in-system.patch | 35 + .../gnome-desktop-testing_2014.1.bb | 19 + .../gnupg/gnupg-1.4.7/CVE-2013-4242.patch | 62 + .../gnupg/gnupg-1.4.7/CVE-2013-4351.patch | 44 + .../gnupg/gnupg-1.4.7/CVE-2013-4576.patch | 153 + .../gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch | 63 + .../gnupg/gnupg-1.4.7/configure.patch | 17 + .../gnupg-1.4.7/curl_typeof_fix_backport.patch | 27 + .../gnupg/gnupg-1.4.7/long-long-thumb.patch | 19 + .../gnupg/gnupg-1.4.7/mips_gcc4.4.patch | 50 + meta/recipes-support/gnupg/gnupg/pkgconfig.patch | 86 + meta/recipes-support/gnupg/gnupg_1.4.7.bb | 102 + meta/recipes-support/gnupg/gnupg_2.0.26.bb | 39 + meta/recipes-support/gnutls/gnutls.inc | 49 + .../better-fix-for-double-free-CVE-2015-3308.patch | 65 + .../correct_rpl_gettimeofday_signature.patch | 67 + .../eliminated-double-free-CVE-2015-3308.patch | 33 + meta/recipes-support/gnutls/gnutls_3.3.5.bb | 9 + .../gnutls/libtasn1/dont-depend-on-help2man.patch | 14 + .../gnutls/libtasn1/libtasn1-CVE-2015-3622.patch | 44 + .../libtasn1/libtasn1_fix_for_automake_1.12.patch | 28 + meta/recipes-support/gnutls/libtasn1_4.0.bb | 22 + .../gpgme/gpgme-1.4.3/disable_gpgconf_check.patch | 39 + .../gpgme-1.4.3/gpgme-fix-CVE-2014-3564.patch | 56 + meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc | 10 + meta/recipes-support/gpgme/gpgme_1.4.3.bb | 42 + meta/recipes-support/icu/icu.inc | 59 + .../icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch | 28 + .../icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch | 49 + .../icu/icu/icu-pkgdata-large-cmd.patch | 29 + meta/recipes-support/icu/icu_53.1.bb | 22 + .../libassuan-add-pkgconfig-support.patch | 158 + meta/recipes-support/libassuan/libassuan_2.1.2.bb | 26 + meta/recipes-support/libbsd/libbsd_0.7.0.bb | 21 + meta/recipes-support/libcap/libcap.inc | 70 + .../libcap/libcap/fix-CAP_LAST_CAP.patch | 39 + meta/recipes-support/libcap/libcap_2.22.bb | 6 + meta/recipes-support/libcheck/libcheck_0.9.14.bb | 24 + meta/recipes-support/libcroco/libcroco_0.6.8.bb | 23 + meta/recipes-support/libdaemon/libdaemon_0.14.bb | 16 + meta/recipes-support/libevdev/libevdev_1.2.2.bb | 13 + .../libevent/libevent-2.0.21/disable_tests.patch | 15 + .../libevent-2.0.21/obsolete_automake_macros.patch | 15 + meta/recipes-support/libevent/libevent_2.0.21.bb | 26 + meta/recipes-support/libexif/libexif_0.6.21.bb | 17 + .../libfm-1.1.2.2/fix-make-parallelism-issue.patch | 31 + .../libfm-1.1.2.2/ignore_automake_warnings.patch | 14 + meta/recipes-support/libfm/libfm_1.1.2.2.bb | 25 + .../libgcrypt/files/add-pkgconfig-support.patch | 151 + ...x-ICE-failure-on-mips-with-option-O-and-g.patch | 71 + ...ibgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch | 169 + ...ix-building-error-with-O2-in-sysroot-path.patch | 32 + meta/recipes-support/libgcrypt/libgcrypt.inc | 40 + meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb | 6 + .../libgpg-error/libgpg-error-1.12/pkgconfig.patch | 132 + .../libgpg-error/libgpg-error_1.12.bb | 31 + meta/recipes-support/libical/libical_1.0.0.bb | 13 + .../libiconv/libiconv-1.11.1/autoconf.patch | 50 + .../shared_preloadable_libiconv_linux.patch | 26 + .../libiconv-1.14/add-relocatable-module.patch | 5008 ++++++++++++++++++++ .../libiconv/libiconv-1.14/autoconf.patch | 50 + meta/recipes-support/libiconv/libiconv_1.11.1.bb | 34 + meta/recipes-support/libiconv/libiconv_1.14.bb | 51 + .../libksba/ksba-add-pkgconfig-support.patch | 152 + meta/recipes-support/libksba/libksba_1.3.0.bb | 26 + meta/recipes-support/libmpc/libmpc.inc | 7 + meta/recipes-support/libmpc/libmpc_1.0.2.bb | 13 + meta/recipes-support/libnl/libnl/fix-pc-file.patch | 17 + .../libnl/libnl/fix-pktloc_syntax_h-race.patch | 36 + meta/recipes-support/libnl/libnl_3.2.25.bb | 43 + .../liboil-0.3.17/0001-Fix-enable-vfp-flag.patch | 41 + .../liboil-0.3.17/fix-unaligned-whitelist.patch | 19 + .../liboil/liboil-0.3.17/liboil_fix_for_x32.patch | 222 + .../liboil/liboil-0.3.17/no-tests.patch | 24 + meta/recipes-support/liboil/liboil_0.3.17.bb | 27 + meta/recipes-support/libpcre/libpcre/Makefile | 183 + .../libpcre/libpcre/fix-pcre-name-collision.patch | 41 + .../libpcre/libpcre/pcre-cross.patch | 48 + meta/recipes-support/libpcre/libpcre/run-ptest | 3 + meta/recipes-support/libpcre/libpcre_8.35.bb | 75 + meta/recipes-support/libproxy/libproxy_0.4.11.bb | 35 + meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb | 29 + ...conv-m4-remove-the-test-to-convert-euc-jp.patch | 42 + .../libunistring_fix_for_automake_1.12.patch | 81 + .../libunistring/libunistring/parallelmake.patch | 26 + .../libunistring/libunistring_0.9.3.bb | 32 + .../libunwind/libunwind-1.1/AArch64-port.patch | 2529 ++++++++++ ...k-failure-on-PowerPC-systems-with-Altivec.patch | 28 + ...-libunwind-to-libgcc_s-rather-than-libgcc.patch | 42 + .../Support-building-with-older-compilers.patch | 72 + meta/recipes-support/libunwind/libunwind.inc | 31 + meta/recipes-support/libunwind/libunwind_1.1.bb | 11 + ...evert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch | 47 + ...ch-to-support-aarch64-builds-using-gcc-at.patch | 11 + meta/recipes-support/liburcu/liburcu_0.8.4.bb | 20 + meta/recipes-support/libusb/libusb-compat_0.1.5.bb | 37 + meta/recipes-support/libusb/libusb1_1.0.19.bb | 34 + .../libxslt/libxslt/pkgconfig.patch | 118 + .../libxslt/libxslt/pkgconfig_fix.patch | 24 + meta/recipes-support/libxslt/libxslt_1.1.28.bb | 46 + meta/recipes-support/lz4/lz4_svn.bb | 22 + ...0001-Use-memcpy-instead-of-reinventing-it.patch | 70 + meta/recipes-support/lzo/lzo/acinclude.m4 | 358 ++ meta/recipes-support/lzo/lzo_2.08.bb | 24 + meta/recipes-support/lzop/lzop/acinclude.m4 | 390 ++ meta/recipes-support/lzop/lzop_1.03.bb | 26 + .../mpfr/mpfr-3.1.2/long-long-thumb.patch | 39 + meta/recipes-support/mpfr/mpfr.inc | 6 + meta/recipes-support/mpfr/mpfr_3.1.2.bb | 17 + .../neon/neon-0.30.0/pkgconfig.patch | 18 + meta/recipes-support/neon/neon_0.30.0.bb | 22 + meta/recipes-support/nettle/nettle_2.7.1.bb | 26 + meta/recipes-support/npth/npth_0.91.bb | 19 + .../nspr/nspr/fix-build-on-x86_64.patch | 52 + .../nspr/nspr/nspr-CVE-2014-1545.patch | 67 + meta/recipes-support/nspr/nspr/nspr.pc.in | 11 + .../nspr/nspr/remove-rpath-from-tests.patch | 26 + .../nspr/remove-srcdir-from-configure-in.patch | 19 + meta/recipes-support/nspr/nspr_4.10.7.bb | 172 + .../nss-myhostname/nss-myhostname_0.3.bb | 29 + .../nss/files/nss-3.15.1-fix-CVE-2013-1739.patch | 81 + .../nss/files/nss-3.15.1-fix-CVE-2013-1741.patch | 92 + .../nss/files/nss-3.15.1-fix-CVE-2013-5605.patch | 18 + .../nss/files/nss-CVE-2013-1740.patch | 916 ++++ .../nss/files/nss-CVE-2013-5606.patch | 48 + .../nss/files/nss-CVE-2014-1492.patch | 68 + .../nss/files/nss-CVE-2014-1544.patch | 41 + .../nss/files/nss-CVE-2014-1568.patch | 670 +++ .../files/nss-fix-incorrect-shebang-of-perl.patch | 110 + .../files/nss-fix-support-cross-compiling.patch | 71 + .../files/nss-no-rpath-for-cross-compiling.patch | 26 + meta/recipes-support/nss/files/nss.pc.in | 11 + meta/recipes-support/nss/files/signlibs.sh | 20 + meta/recipes-support/nss/nss.inc | 215 + meta/recipes-support/nss/nss_3.15.1.bb | 9 + .../ntp/files/ntp-4.2.4_p6-nano.patch | 17 + meta/recipes-support/ntp/files/ntp.conf | 14 + meta/recipes-support/ntp/files/ntpd | 62 + meta/recipes-support/ntp/files/ntpdate | 54 + meta/recipes-support/ntp/files/ntpdate.default | 7 + meta/recipes-support/ntp/files/openssl-check.patch | 59 + meta/recipes-support/ntp/files/tickadj.c.patch | 32 + meta/recipes-support/ntp/ntp.inc | 93 + meta/recipes-support/ntp/ntp_4.2.6p5.bb | 7 + meta/recipes-support/pinentry/pinentry_0.8.4.bb | 31 + meta/recipes-support/popt/popt/disable_tests.patch | 21 + meta/recipes-support/popt/popt/pkgconfig_fix.patch | 15 + .../popt/popt/popt_fix_for_automake-1.12.patch | 21 + meta/recipes-support/popt/popt_1.16.bb | 20 + .../ptest-runner/files/ptest-runner | 27 + .../ptest-runner/ptest-runner_1.0.bb | 22 + .../pth/files/pth-add-pkgconfig-support.patch | 105 + meta/recipes-support/pth/pth_2.0.7.bb | 31 + meta/recipes-support/serf/serf/env.patch | 28 + meta/recipes-support/serf/serf/norpath.patch | 42 + meta/recipes-support/serf/serf_1.3.7.bb | 25 + .../shared-mime-info/shared-mime-info.inc | 36 + .../shared-mime-info/install-data-hook.patch | 23 + .../shared-mime-info/parallelmake.patch | 33 + .../shared-mime-info/shared-mime-info_1.3.bb | 7 + meta/recipes-support/sqlite/sqlite3.inc | 34 + meta/recipes-support/sqlite/sqlite3_3.8.6.0.bb | 21 + meta/recipes-support/taglib/taglib_1.9.1.bb | 32 + .../user-creation/xuser-account_0.1.bb | 27 + .../vte/vte-0.28.2/obsolete_automake_macros.patch | 14 + meta/recipes-support/vte/vte.inc | 16 + meta/recipes-support/vte/vte_0.28.2.bb | 10 + 252 files changed, 21991 insertions(+) create mode 100644 meta/recipes-support/apr/apr-util/configfix.patch create mode 100644 meta/recipes-support/apr/apr-util/configure_fixes.patch create mode 100644 meta/recipes-support/apr/apr-util/run-ptest create mode 100644 meta/recipes-support/apr/apr-util_1.5.3.bb create mode 100644 meta/recipes-support/apr/apr/cleanup.patch create mode 100644 meta/recipes-support/apr/apr/configfix.patch create mode 100644 meta/recipes-support/apr/apr/configure_fixes.patch create mode 100644 meta/recipes-support/apr/apr/run-ptest create mode 100644 meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch create mode 100644 meta/recipes-support/apr/apr_1.5.1.bb create mode 100644 meta/recipes-support/aspell/aspell_0.60.6.1.bb create mode 100644 meta/recipes-support/atk/at-spi2-atk_2.12.1.bb create mode 100644 meta/recipes-support/atk/at-spi2-core_2.12.0.bb create mode 100644 meta/recipes-support/atk/atk_2.12.0.bb create mode 100644 meta/recipes-support/atk/files/core_acinclude_m4.patch create mode 100644 meta/recipes-support/attr/acl.inc create mode 100644 meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch create mode 100644 meta/recipes-support/attr/acl/add-missing-configure.ac.patch create mode 100644 meta/recipes-support/attr/acl/run-ptest create mode 100644 meta/recipes-support/attr/acl_2.2.52.bb create mode 100644 meta/recipes-support/attr/attr.inc create mode 100644 meta/recipes-support/attr/attr_2.4.47.bb create mode 100644 meta/recipes-support/attr/ea-acl.inc create mode 100644 meta/recipes-support/attr/files/attr-Missing-configure.ac.patch create mode 100644 meta/recipes-support/attr/files/relative-libdir.patch create mode 100644 meta/recipes-support/attr/files/run-ptest create mode 100644 meta/recipes-support/bdwgc/bdwgc_7.4.2.bb create mode 100644 meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch create mode 100644 meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch create mode 100644 meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch create mode 100644 meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch create mode 100644 meta/recipes-support/beecrypt/beecrypt/fix-security.patch create mode 100644 meta/recipes-support/beecrypt/beecrypt/run-ptest create mode 100644 meta/recipes-support/beecrypt/beecrypt_4.2.1.bb create mode 100644 meta/recipes-support/boost/bjam-native_1.56.0.bb create mode 100644 meta/recipes-support/boost/boost-1.56.0.inc create mode 100644 meta/recipes-support/boost/boost.inc create mode 100644 meta/recipes-support/boost/boost/0001-Added-support-for-extending-operations-to-GCC-atomic.patch create mode 100644 meta/recipes-support/boost/boost/arm-intrinsics.patch create mode 100644 meta/recipes-support/boost/boost_1.56.0.bb create mode 100644 meta/recipes-support/ca-certificates/ca-certificates/0001-Update-mozilla-certdata.txt-to-version-1.98.patch create mode 100644 meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch create mode 100644 meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch create mode 100644 meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch create mode 100644 meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch create mode 100644 meta/recipes-support/ca-certificates/ca-certificates_20140325.bb create mode 100644 meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch create mode 100644 meta/recipes-support/consolekit/consolekit/sepbuildfix.patch create mode 100644 meta/recipes-support/consolekit/consolekit_0.4.6.bb create mode 100644 meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch create mode 100644 meta/recipes-support/createrepo/createrepo/fix-native-install.patch create mode 100644 meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch create mode 100644 meta/recipes-support/createrepo/createrepo/recommends.patch create mode 100755 meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py create mode 100644 meta/recipes-support/createrepo/createrepo_0.4.11.bb create mode 100644 meta/recipes-support/curl/curl/CVE-2014-3613.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2014-3620.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2014-3707.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2014-8150.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2015-3143.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2015-3144.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2015-3145.patch create mode 100644 meta/recipes-support/curl/curl/CVE-2015-3153.patch create mode 100644 meta/recipes-support/curl/curl/configure_ac.patch create mode 100644 meta/recipes-support/curl/curl/pkgconfig_fix.patch create mode 100644 meta/recipes-support/curl/curl_7.37.1.bb create mode 100644 meta/recipes-support/db/db/arm-thumb-mutex_db5.patch create mode 100644 meta/recipes-support/db/db/fix-parallel-build.patch create mode 100644 meta/recipes-support/db/db_5.3.28.bb create mode 100644 meta/recipes-support/db/db_6.0.30.bb create mode 100644 meta/recipes-support/enchant/enchant_1.6.0.bb create mode 100644 meta/recipes-support/gdbm/files/ptest.patch create mode 100755 meta/recipes-support/gdbm/files/run-ptest create mode 100644 meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch create mode 100644 meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch create mode 100644 meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch create mode 100644 meta/recipes-support/gdbm/gdbm_1.11.bb create mode 100644 meta/recipes-support/gdbm/gdbm_1.8.3.bb create mode 100644 meta/recipes-support/gmp/gmp.inc create mode 100644 meta/recipes-support/gmp/gmp/amd64.patch create mode 100644 meta/recipes-support/gmp/gmp/append_user_provided_flags.patch create mode 100644 meta/recipes-support/gmp/gmp/configure.patch create mode 100644 meta/recipes-support/gmp/gmp/gmp-6.0.0-ppc64.patch create mode 100644 meta/recipes-support/gmp/gmp/use-includedir.patch create mode 100644 meta/recipes-support/gmp/gmp_6.0.0.bb create mode 100644 meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch create mode 100644 meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb create mode 100644 meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch create mode 100644 meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch create mode 100644 meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch create mode 100644 meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch create mode 100644 meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch create mode 100644 meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch create mode 100644 meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch create mode 100644 meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch create mode 100644 meta/recipes-support/gnupg/gnupg/pkgconfig.patch create mode 100644 meta/recipes-support/gnupg/gnupg_1.4.7.bb create mode 100644 meta/recipes-support/gnupg/gnupg_2.0.26.bb create mode 100644 meta/recipes-support/gnutls/gnutls.inc create mode 100644 meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch create mode 100644 meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch create mode 100644 meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch create mode 100644 meta/recipes-support/gnutls/gnutls_3.3.5.bb create mode 100644 meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch create mode 100644 meta/recipes-support/gnutls/libtasn1/libtasn1-CVE-2015-3622.patch create mode 100644 meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch create mode 100644 meta/recipes-support/gnutls/libtasn1_4.0.bb create mode 100644 meta/recipes-support/gpgme/gpgme-1.4.3/disable_gpgconf_check.patch create mode 100644 meta/recipes-support/gpgme/gpgme-1.4.3/gpgme-fix-CVE-2014-3564.patch create mode 100644 meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc create mode 100644 meta/recipes-support/gpgme/gpgme_1.4.3.bb create mode 100644 meta/recipes-support/icu/icu.inc create mode 100644 meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch create mode 100644 meta/recipes-support/icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch create mode 100644 meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch create mode 100644 meta/recipes-support/icu/icu_53.1.bb create mode 100644 meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch create mode 100644 meta/recipes-support/libassuan/libassuan_2.1.2.bb create mode 100644 meta/recipes-support/libbsd/libbsd_0.7.0.bb create mode 100644 meta/recipes-support/libcap/libcap.inc create mode 100644 meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch create mode 100644 meta/recipes-support/libcap/libcap_2.22.bb create mode 100644 meta/recipes-support/libcheck/libcheck_0.9.14.bb create mode 100644 meta/recipes-support/libcroco/libcroco_0.6.8.bb create mode 100644 meta/recipes-support/libdaemon/libdaemon_0.14.bb create mode 100644 meta/recipes-support/libevdev/libevdev_1.2.2.bb create mode 100644 meta/recipes-support/libevent/libevent-2.0.21/disable_tests.patch create mode 100644 meta/recipes-support/libevent/libevent-2.0.21/obsolete_automake_macros.patch create mode 100644 meta/recipes-support/libevent/libevent_2.0.21.bb create mode 100644 meta/recipes-support/libexif/libexif_0.6.21.bb create mode 100644 meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch create mode 100644 meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch create mode 100644 meta/recipes-support/libfm/libfm_1.1.2.2.bb create mode 100644 meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch create mode 100644 meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch create mode 100644 meta/recipes-support/libgcrypt/files/libgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch create mode 100644 meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch create mode 100644 meta/recipes-support/libgcrypt/libgcrypt.inc create mode 100644 meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb create mode 100644 meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch create mode 100644 meta/recipes-support/libgpg-error/libgpg-error_1.12.bb create mode 100644 meta/recipes-support/libical/libical_1.0.0.bb create mode 100644 meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch create mode 100644 meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch create mode 100644 meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch create mode 100644 meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch create mode 100644 meta/recipes-support/libiconv/libiconv_1.11.1.bb create mode 100644 meta/recipes-support/libiconv/libiconv_1.14.bb create mode 100644 meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch create mode 100644 meta/recipes-support/libksba/libksba_1.3.0.bb create mode 100644 meta/recipes-support/libmpc/libmpc.inc create mode 100644 meta/recipes-support/libmpc/libmpc_1.0.2.bb create mode 100644 meta/recipes-support/libnl/libnl/fix-pc-file.patch create mode 100644 meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch create mode 100644 meta/recipes-support/libnl/libnl_3.2.25.bb create mode 100644 meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch create mode 100644 meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch create mode 100644 meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch create mode 100644 meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch create mode 100644 meta/recipes-support/liboil/liboil_0.3.17.bb create mode 100644 meta/recipes-support/libpcre/libpcre/Makefile create mode 100644 meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch create mode 100644 meta/recipes-support/libpcre/libpcre/pcre-cross.patch create mode 100644 meta/recipes-support/libpcre/libpcre/run-ptest create mode 100644 meta/recipes-support/libpcre/libpcre_8.35.bb create mode 100644 meta/recipes-support/libproxy/libproxy_0.4.11.bb create mode 100644 meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb create mode 100644 meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch create mode 100644 meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch create mode 100644 meta/recipes-support/libunistring/libunistring/parallelmake.patch create mode 100644 meta/recipes-support/libunistring/libunistring_0.9.3.bb create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch create mode 100644 meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch create mode 100644 meta/recipes-support/libunwind/libunwind.inc create mode 100644 meta/recipes-support/libunwind/libunwind_1.1.bb create mode 100644 meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch create mode 100644 meta/recipes-support/liburcu/liburcu/patch-to-support-aarch64-builds-using-gcc-at.patch create mode 100644 meta/recipes-support/liburcu/liburcu_0.8.4.bb create mode 100644 meta/recipes-support/libusb/libusb-compat_0.1.5.bb create mode 100644 meta/recipes-support/libusb/libusb1_1.0.19.bb create mode 100644 meta/recipes-support/libxslt/libxslt/pkgconfig.patch create mode 100644 meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch create mode 100644 meta/recipes-support/libxslt/libxslt_1.1.28.bb create mode 100644 meta/recipes-support/lz4/lz4_svn.bb create mode 100644 meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch create mode 100644 meta/recipes-support/lzo/lzo/acinclude.m4 create mode 100644 meta/recipes-support/lzo/lzo_2.08.bb create mode 100644 meta/recipes-support/lzop/lzop/acinclude.m4 create mode 100644 meta/recipes-support/lzop/lzop_1.03.bb create mode 100644 meta/recipes-support/mpfr/mpfr-3.1.2/long-long-thumb.patch create mode 100644 meta/recipes-support/mpfr/mpfr.inc create mode 100644 meta/recipes-support/mpfr/mpfr_3.1.2.bb create mode 100644 meta/recipes-support/neon/neon-0.30.0/pkgconfig.patch create mode 100644 meta/recipes-support/neon/neon_0.30.0.bb create mode 100644 meta/recipes-support/nettle/nettle_2.7.1.bb create mode 100644 meta/recipes-support/npth/npth_0.91.bb create mode 100644 meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch create mode 100644 meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch create mode 100644 meta/recipes-support/nspr/nspr/nspr.pc.in create mode 100644 meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch create mode 100644 meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch create mode 100644 meta/recipes-support/nspr/nspr_4.10.7.bb create mode 100644 meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb create mode 100644 meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch create mode 100644 meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch create mode 100644 meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch create mode 100644 meta/recipes-support/nss/files/nss-CVE-2013-1740.patch create mode 100644 meta/recipes-support/nss/files/nss-CVE-2013-5606.patch create mode 100644 meta/recipes-support/nss/files/nss-CVE-2014-1492.patch create mode 100644 meta/recipes-support/nss/files/nss-CVE-2014-1544.patch create mode 100644 meta/recipes-support/nss/files/nss-CVE-2014-1568.patch create mode 100644 meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch create mode 100644 meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch create mode 100644 meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch create mode 100644 meta/recipes-support/nss/files/nss.pc.in create mode 100644 meta/recipes-support/nss/files/signlibs.sh create mode 100644 meta/recipes-support/nss/nss.inc create mode 100644 meta/recipes-support/nss/nss_3.15.1.bb create mode 100644 meta/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch create mode 100644 meta/recipes-support/ntp/files/ntp.conf create mode 100755 meta/recipes-support/ntp/files/ntpd create mode 100755 meta/recipes-support/ntp/files/ntpdate create mode 100644 meta/recipes-support/ntp/files/ntpdate.default create mode 100644 meta/recipes-support/ntp/files/openssl-check.patch create mode 100644 meta/recipes-support/ntp/files/tickadj.c.patch create mode 100644 meta/recipes-support/ntp/ntp.inc create mode 100644 meta/recipes-support/ntp/ntp_4.2.6p5.bb create mode 100644 meta/recipes-support/pinentry/pinentry_0.8.4.bb create mode 100644 meta/recipes-support/popt/popt/disable_tests.patch create mode 100644 meta/recipes-support/popt/popt/pkgconfig_fix.patch create mode 100644 meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch create mode 100644 meta/recipes-support/popt/popt_1.16.bb create mode 100644 meta/recipes-support/ptest-runner/files/ptest-runner create mode 100644 meta/recipes-support/ptest-runner/ptest-runner_1.0.bb create mode 100644 meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch create mode 100644 meta/recipes-support/pth/pth_2.0.7.bb create mode 100644 meta/recipes-support/serf/serf/env.patch create mode 100644 meta/recipes-support/serf/serf/norpath.patch create mode 100644 meta/recipes-support/serf/serf_1.3.7.bb create mode 100644 meta/recipes-support/shared-mime-info/shared-mime-info.inc create mode 100644 meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch create mode 100644 meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch create mode 100644 meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb create mode 100644 meta/recipes-support/sqlite/sqlite3.inc create mode 100644 meta/recipes-support/sqlite/sqlite3_3.8.6.0.bb create mode 100644 meta/recipes-support/taglib/taglib_1.9.1.bb create mode 100644 meta/recipes-support/user-creation/xuser-account_0.1.bb create mode 100644 meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch create mode 100644 meta/recipes-support/vte/vte.inc create mode 100644 meta/recipes-support/vte/vte_0.28.2.bb (limited to 'meta/recipes-support') diff --git a/meta/recipes-support/apr/apr-util/configfix.patch b/meta/recipes-support/apr/apr-util/configfix.patch new file mode 100644 index 0000000000..dbb1148809 --- /dev/null +++ b/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/meta/recipes-support/apr/apr-util/configure_fixes.patch b/meta/recipes-support/apr/apr-util/configure_fixes.patch new file mode 100644 index 0000000000..91e244ce2c --- /dev/null +++ b/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/meta/recipes-support/apr/apr-util/run-ptest b/meta/recipes-support/apr/apr-util/run-ptest new file mode 100644 index 0000000000..ae19a1d11b --- /dev/null +++ b/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/meta/recipes-support/apr/apr-util_1.5.3.bb b/meta/recipes-support/apr/apr-util_1.5.3.bb new file mode 100644 index 0000000000..063a787396 --- /dev/null +++ b/meta/recipes-support/apr/apr-util_1.5.3.bb @@ -0,0 +1,67 @@ +SUMMARY = "Apache Portable Runtime (APR) companion library" +HOMEPAGE = "http://apr.apache.org/" +SECTION = "libs" +DEPENDS = "apr expat gdbm" + +BBCLASSEXTEND = "native" + +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] = "71a11d037240b292f824ba1eb537b4e3" +SRC_URI[sha256sum] = "76db34cb508e346e3bf69347c29ed1500bf0b71bcc48d54271ad9d1c25703743" + +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-brokensep lib_package binconfig + +OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" + +do_configure_append() { + if [ "${CLASSOVERRIDE}" = "class-target" ]; then + cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk + fi +} +do_configure_prepend_class-native() { + cp ${STAGING_DATADIR_NATIVE}/apr/apr_rules.mk ${S}/build/rules.mk +} +do_configure_append_class-native() { + sed -i "s#LIBTOOL=\$(SHELL) \$(apr_builddir)#LIBTOOL=\$(SHELL) ${STAGING_BINDIR_NATIVE}#" ${S}/build/rules.mk + # sometimes there isn't SHELL + sed -i "s#LIBTOOL=\$(apr_builddir)#LIBTOOL=${STAGING_BINDIR_NATIVE}#" ${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 ${S}/test + oe_runmake +} + +do_install_ptest() { + t=${D}${PTEST_PATH}/test + mkdir $t + for i in testall data; do \ + cp -r ${S}/test/$i $t; \ + done +} diff --git a/meta/recipes-support/apr/apr/cleanup.patch b/meta/recipes-support/apr/apr/cleanup.patch new file mode 100644 index 0000000000..b6784e015d --- /dev/null +++ b/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/meta/recipes-support/apr/apr/configfix.patch b/meta/recipes-support/apr/apr/configfix.patch new file mode 100644 index 0000000000..605c4f632c --- /dev/null +++ b/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/meta/recipes-support/apr/apr/configure_fixes.patch b/meta/recipes-support/apr/apr/configure_fixes.patch new file mode 100644 index 0000000000..0514000599 --- /dev/null +++ b/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 +-#include +-#include +-#ifdef HAVE_SYS_MMAN_H +-#include +-#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 +-#include ],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 ++##include ],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/meta/recipes-support/apr/apr/run-ptest b/meta/recipes-support/apr/apr/run-ptest new file mode 100644 index 0000000000..ae19a1d11b --- /dev/null +++ b/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/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch b/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch new file mode 100644 index 0000000000..4bca38494b --- /dev/null +++ b/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch @@ -0,0 +1,48 @@ +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 +--- + Makefile.in | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 6f99733..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]'` + +-make_tools_dir: +- $(APR_MKDIR) tools +- +-OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) +-tools/gen_test_char.lo: make_tools_dir +-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 +-- +1.8.1.2 + diff --git a/meta/recipes-support/apr/apr_1.5.1.bb b/meta/recipes-support/apr/apr_1.5.1.bb new file mode 100644 index 0000000000..a27b2338d1 --- /dev/null +++ b/meta/recipes-support/apr/apr_1.5.1.bb @@ -0,0 +1,95 @@ +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" + +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 \ +" + +SRC_URI[md5sum] = "5486180ec5a23efb5cae6d4292b300ab" +SRC_URI[sha256sum] = "e94abe431d4da48425fcccdb27b469bd0f8151488f82e5630a56f26590e198ac" + +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/meta/recipes-support/aspell/aspell_0.60.6.1.bb b/meta/recipes-support/aspell/aspell_0.60.6.1.bb new file mode 100644 index 0000000000..a4f0e140b2 --- /dev/null +++ b/meta/recipes-support/aspell/aspell_0.60.6.1.bb @@ -0,0 +1,28 @@ +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 libpspell-dev 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_libpspell-dev = "${libdir}/libpspell* ${bindir}/pspell-config ${includedir}/pspell" + +ARM_INSTRUCTION_SET = "arm" +inherit autotools-brokensep gettext texinfo diff --git a/meta/recipes-support/atk/at-spi2-atk_2.12.1.bb b/meta/recipes-support/atk/at-spi2-atk_2.12.1.bb new file mode 100644 index 0000000000..4431c3d9eb --- /dev/null +++ b/meta/recipes-support/atk/at-spi2-atk_2.12.1.bb @@ -0,0 +1,19 @@ +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] = "ae11df528f1f038987797f39c8357f81" +SRC_URI[sha256sum] = "5fa9c527bdec028e06797563cd52d49bcf06f638549df983424d88db89bb1336" + +DEPENDS = "dbus glib-2.0 atk at-spi2-core" + +inherit autotools pkgconfig + +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/meta/recipes-support/atk/at-spi2-core_2.12.0.bb b/meta/recipes-support/atk/at-spi2-core_2.12.0.bb new file mode 100644 index 0000000000..e67155ccbd --- /dev/null +++ b/meta/recipes-support/atk/at-spi2-core_2.12.0.bb @@ -0,0 +1,20 @@ +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://core_acinclude_m4.patch \ + " + +SRC_URI[md5sum] = "b12ad0e0924706f5e7f51216241068ef" +SRC_URI[sha256sum] = "db550edd98e53b4252521459c2dcaf0f3b060a9bad52489b9dbadbaedad3fb89" + +DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native" + +inherit autotools gtk-doc pkgconfig + +EXTRA_OECONF = "--disable-introspection --disable-xevie" + +FILES_${PN} += "${datadir}/dbus-1/services/*.service" diff --git a/meta/recipes-support/atk/atk_2.12.0.bb b/meta/recipes-support/atk/atk_2.12.0.bb new file mode 100644 index 0000000000..9112bbb6c2 --- /dev/null +++ b/meta/recipes-support/atk/atk_2.12.0.bb @@ -0,0 +1,23 @@ +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=20;md5=db21b0bdbef9da4dc6eb122debc9f9bc \ + file://atk/atk.h;endline=20;md5=c58238d688c24387376d6c69d06248a7" + +DEPENDS = "glib-2.0" + +inherit gnomebase gtk-doc + +GNOME_COMPRESS_TYPE = "xz" + +SRC_URI[archive.md5sum] = "930238dec55fdbf8eda9975b44f07b76" +SRC_URI[archive.sha256sum] = "48a8431974639c5a59c24fcd3ece1a19709872d5dfe78907524d9f5e9993f18f" + +BBCLASSEXTEND = "native" + +EXTRA_OECONF = "--disable-glibtest \ + --disable-introspection" diff --git a/meta/recipes-support/atk/files/core_acinclude_m4.patch b/meta/recipes-support/atk/files/core_acinclude_m4.patch new file mode 100644 index 0000000000..29c538e2c3 --- /dev/null +++ b/meta/recipes-support/atk/files/core_acinclude_m4.patch @@ -0,0 +1,40 @@ +at-spi2-core: fix alignof m4 macro + +DBIND_CHECK_ALIGNOF does not work when cross-compiling, so we modify +it to use AC_CHECK_ALIGNOF. + +Upstream-Status: Pending + +Signed-off-by: joe.slater@windriver.com + + +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -2,7 +2,26 @@ + # type alignment test # + ####################### + +-AC_DEFUN([DBIND_CHECK_ALIGNOF], ++AC_DEFUN([DBIND_CHECK_ALIGNOF],[ ++AC_CHECK_ALIGNOF($1,[ ++#include ++#include ++#define DBUS_API_SUBJECT_TO_CHANGE ++#include ++typedef struct {char s1;} dbind_struct; ++typedef void *dbind_pointer; ++]) ++ ++dnl Note that we substitute for names like @DBIND_ALIGNOF_DBIND_STRUCT@, but ++dnl we #define names like ALIGNOF_DBIND_STRUCT in config.h! ++dnl ++AC_SUBST(translit(dbind_alignof_$1, [a-z *], [A-Z_P]),[$ac_cv_alignof_$1]) ++ ++]) ++ ++dnl The following does not work for cross-compilation. ++dnl ++AC_DEFUN([xDBIND_CHECK_ALIGNOF], + [changequote(<<, >>)dnl + dnl The name to #define. + define(<>, diff --git a/meta/recipes-support/attr/acl.inc b/meta/recipes-support/attr/acl.inc new file mode 100644 index 0000000000..bc9fd6dda3 --- /dev/null +++ b/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 = "bash coreutils perl perl-module-filehandle perl-module-getopt-std perl-module-posix shadow" diff --git a/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch b/meta/recipes-support/attr/acl/acl-fix-the-order-of-expected-output-of-getfacl.patch new file mode 100644 index 0000000000..cf765fdbb8 --- /dev/null +++ b/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 +--- + 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/meta/recipes-support/attr/acl/add-missing-configure.ac.patch b/meta/recipes-support/attr/acl/add-missing-configure.ac.patch new file mode 100644 index 0000000000..eb6979fa3c --- /dev/null +++ b/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 + +Index: acl-2.2.52/configure.ac +=================================================================== +--- /dev/null ++++ acl-2.2.52/configure.ac +@@ -0,0 +1,50 @@ ++ ++# Copyright (C) 2009 Andreas Gruenbacher ++# ++# 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 . ++# ++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/meta/recipes-support/attr/acl/run-ptest b/meta/recipes-support/attr/acl/run-ptest new file mode 100644 index 0000000000..3b31cc99af --- /dev/null +++ b/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/meta/recipes-support/attr/acl_2.2.52.bb b/meta/recipes-support/attr/acl_2.2.52.bb new file mode 100644 index 0000000000..ecdbdb6b79 --- /dev/null +++ b/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/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc new file mode 100644 index 0000000000..28c750f987 --- /dev/null +++ b/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/meta/recipes-support/attr/attr_2.4.47.bb b/meta/recipes-support/attr/attr_2.4.47.bb new file mode 100644 index 0000000000..ad40c9b72a --- /dev/null +++ b/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/meta/recipes-support/attr/ea-acl.inc b/meta/recipes-support/attr/ea-acl.inc new file mode 100644 index 0000000000..72f623e593 --- /dev/null +++ b/meta/recipes-support/attr/ea-acl.inc @@ -0,0 +1,58 @@ +# 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 +export AUTOHEADER = "true" +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} lib${BPN}-dev lib${BPN}-staticdev lib${BPN}-doc" + +FILES_lib${BPN} = "${base_libdir}/lib*${SOLIBS}" + +FILES_lib${BPN}-dev = "${includedir} \ + ${libdir}/lib*${SOLIBSDEV} \ + ${libdir}/lib*.la \ + ${base_libdir}/lib*${SOLIBSDEV} \ + ${base_libdir}/lib*.la" + +FILES_lib${BPN}-staticdev = "${libdir}/*.a ${base_libdir}/*.a" + +FILES_lib${BPN}-doc = "${mandir}/man2 \ + ${mandir}/man3" + +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 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/meta/recipes-support/attr/files/attr-Missing-configure.ac.patch b/meta/recipes-support/attr/files/attr-Missing-configure.ac.patch new file mode 100644 index 0000000000..20fcc3cee7 --- /dev/null +++ b/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 +--- + 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 ++# ++# 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 . ++# ++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/meta/recipes-support/attr/files/relative-libdir.patch b/meta/recipes-support/attr/files/relative-libdir.patch new file mode 100644 index 0000000000..b72bf184d6 --- /dev/null +++ b/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 + +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/meta/recipes-support/attr/files/run-ptest b/meta/recipes-support/attr/files/run-ptest new file mode 100644 index 0000000000..a6c6867f2d --- /dev/null +++ b/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/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb b/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb new file mode 100644 index 0000000000..23ec95419c --- /dev/null +++ b/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb @@ -0,0 +1,41 @@ +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" + +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,libatomics-ops" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch b/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch new file mode 100644 index 0000000000..4737d9c430 --- /dev/null +++ b/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 +--- +--- 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/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch b/meta/recipes-support/beecrypt/beecrypt/beecrypt-enable-ptest-support.patch new file mode 100644 index 0000000000..3e5513fce9 --- /dev/null +++ b/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 +--- + 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/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch b/meta/recipes-support/beecrypt/beecrypt/disable-icu-check.patch new file mode 100644 index 0000000000..91b1fa6ef5 --- /dev/null +++ b/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 ]],[[ +- #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/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch b/meta/recipes-support/beecrypt/beecrypt/fix-for-gcc-4.7.patch new file mode 100644 index 0000000000..8144e39be0 --- /dev/null +++ b/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 + + +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/meta/recipes-support/beecrypt/beecrypt/fix-security.patch b/meta/recipes-support/beecrypt/beecrypt/fix-security.patch new file mode 100644 index 0000000000..6cb0c00205 --- /dev/null +++ b/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/meta/recipes-support/beecrypt/beecrypt/run-ptest b/meta/recipes-support/beecrypt/beecrypt/run-ptest new file mode 100644 index 0000000000..2ee294d991 --- /dev/null +++ b/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/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb b/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb new file mode 100644 index 0000000000..1e626f154c --- /dev/null +++ b/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/meta/recipes-support/boost/bjam-native_1.56.0.bb b/meta/recipes-support/boost/bjam-native_1.56.0.bb new file mode 100644 index 0000000000..d85d1a96cb --- /dev/null +++ b/meta/recipes-support/boost/bjam-native_1.56.0.bb @@ -0,0 +1,15 @@ +include boost-${PV}.inc + +SUMMARY = "Portable Boost.Jam build tool for boost" +SECTION = "devel" + +inherit native + +do_compile() { + ./bootstrap.sh --with-toolset=gcc +} + +do_install() { + install -d ${D}${bindir}/ + install -c -m 755 bjam ${D}${bindir}/ +} diff --git a/meta/recipes-support/boost/boost-1.56.0.inc b/meta/recipes-support/boost/boost-1.56.0.inc new file mode 100644 index 0000000000..24c32b4c6f --- /dev/null +++ b/meta/recipes-support/boost/boost-1.56.0.inc @@ -0,0 +1,19 @@ +# 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" + +SRC_URI[md5sum] = "a744cf167b05d72335f27c88115f211d" +SRC_URI[sha256sum] = "134732acaf3a6e7eba85988118d943f0fa6b7f0850f65131fff89823ad30ff1d" + +S = "${WORKDIR}/${BOOST_P}" diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc new file mode 100644 index 0000000000..069b1c8eab --- /dev/null +++ b/meta/recipes-support/boost/boost.inc @@ -0,0 +1,182 @@ +SUMMARY = "Free peer-reviewed portable C++ source libraries" +SECTION = "libs" +DEPENDS = "bjam-native zlib bzip2" + +ARM_INSTRUCTION_SET = "arm" + +BOOST_LIBS = "\ + date_time \ + filesystem \ + graph \ + iostreams \ + program_options \ + regex \ + serialization \ + signals \ + system \ + test \ + thread \ + " + +# optional boost-python library +PACKAGECONFIG ??= "" +PACKAGECONFIG[python] = ",,python" +BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', 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( ): + pkg = "boost-%s" % lib.replace("_", "-") + extras.append("--with-%s" % lib) + packages.append(pkg) + 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 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 space multi on off' \ + '-sPYTHON_VERSION=${PYTHON_BASEVERSION}' \ + '-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. + if ! grep -qe "^using gcc : 4.3.1" ${S}/tools/build/example/user-config.jam + then + echo 'using gcc : 4.3.1 : ${CXX} : "${CFLAGS}" "${CXXFLAGS}" "${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam + fi + + echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${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 +} + +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" diff --git a/meta/recipes-support/boost/boost/0001-Added-support-for-extending-operations-to-GCC-atomic.patch b/meta/recipes-support/boost/boost/0001-Added-support-for-extending-operations-to-GCC-atomic.patch new file mode 100644 index 0000000000..feece81532 --- /dev/null +++ b/meta/recipes-support/boost/boost/0001-Added-support-for-extending-operations-to-GCC-atomic.patch @@ -0,0 +1,412 @@ +From 415db7054723291042e4ff1ffa8fdd5bc8b07163 Mon Sep 17 00:00:00 2001 +From: Andrey Semashev +Date: Sat, 27 Sep 2014 20:40:09 +0400 +Subject: [PATCH] Added support for extending operations to GCC atomic backend. + +Fix for #10446. Some platforms (e.g. Raspberry Pi) only support atomic ops of some particular size but not less. Use extending arithmetic operations for these platforms. Also, make sure bools are always treated as 8-bit values, even if the actual type is larger. This makes its use in atomic<>, atomic_flag and lock pool more consistent. + +Upstream-Status: Backport [https://svn.boost.org/trac/boost/ticket/10446] +Signed-off-by: Peter A. Bigot + +--- + include/boost/atomic/capabilities.hpp | 1 + + include/boost/atomic/detail/atomic_template.hpp | 2 +- + include/boost/atomic/detail/caps_gcc_atomic.hpp | 82 +++++------ + include/boost/atomic/detail/ops_gcc_atomic.hpp | 184 +++++++++++++++++++++--- + 4 files changed, 206 insertions(+), 63 deletions(-) + +diff --git a/include/boost/atomic/capabilities.hpp b/include/boost/atomic/capabilities.hpp +index 658dd22..05bbb0f 100644 +--- a/include/boost/atomic/capabilities.hpp ++++ b/include/boost/atomic/capabilities.hpp +@@ -142,6 +142,7 @@ + #define BOOST_ATOMIC_ADDRESS_LOCK_FREE BOOST_ATOMIC_POINTER_LOCK_FREE + + #ifndef BOOST_ATOMIC_BOOL_LOCK_FREE ++// We store bools in 1-byte storage in all backends + #define BOOST_ATOMIC_BOOL_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE + #endif + +diff --git a/include/boost/atomic/detail/atomic_template.hpp b/include/boost/atomic/detail/atomic_template.hpp +index 4fd6d79..bc3922a 100644 +--- a/include/boost/atomic/detail/atomic_template.hpp ++++ b/include/boost/atomic/detail/atomic_template.hpp +@@ -234,7 +234,7 @@ class base_atomic< bool, int > + { + private: + typedef bool value_type; +- typedef atomics::detail::operations< storage_size_of< value_type >::value, false > operations; ++ typedef atomics::detail::operations< 1u, false > operations; + + protected: + typedef value_type value_arg_type; +diff --git a/include/boost/atomic/detail/caps_gcc_atomic.hpp b/include/boost/atomic/detail/caps_gcc_atomic.hpp +index 8299ad0..f4e7a70 100644 +--- a/include/boost/atomic/detail/caps_gcc_atomic.hpp ++++ b/include/boost/atomic/detail/caps_gcc_atomic.hpp +@@ -29,66 +29,48 @@ + #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1 + #endif + +-#if __GCC_ATOMIC_BOOL_LOCK_FREE == 2 +-#define BOOST_ATOMIC_FLAG_LOCK_FREE 2 +-#else +-#define BOOST_ATOMIC_FLAG_LOCK_FREE 0 +-#endif +-#if __GCC_ATOMIC_CHAR_LOCK_FREE == 2 +-#define BOOST_ATOMIC_CHAR_LOCK_FREE 2 +-#else +-#define BOOST_ATOMIC_CHAR_LOCK_FREE 0 +-#endif +-#if __GCC_ATOMIC_CHAR16_T_LOCK_FREE == 2 +-#define BOOST_ATOMIC_CHAR16_T_LOCK_FREE 2 +-#else +-#define BOOST_ATOMIC_CHAR16_T_LOCK_FREE 0 +-#endif +-#if __GCC_ATOMIC_CHAR32_T_LOCK_FREE == 2 +-#define BOOST_ATOMIC_CHAR32_T_LOCK_FREE 2 ++#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) && (defined(BOOST_HAS_INT128) || !defined(BOOST_NO_ALIGNMENT)) ++#define BOOST_ATOMIC_INT128_LOCK_FREE 2 + #else +-#define BOOST_ATOMIC_CHAR32_T_LOCK_FREE 0 ++#define BOOST_ATOMIC_INT128_LOCK_FREE 0 + #endif +-#if __GCC_ATOMIC_WCHAR_T_LOCK_FREE == 2 +-#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 2 ++ ++#if __GCC_ATOMIC_LLONG_LOCK_FREE == 2 ++#define BOOST_ATOMIC_LLONG_LOCK_FREE 2 + #else +-#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 0 ++#define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT128_LOCK_FREE + #endif +-#if __GCC_ATOMIC_SHORT_LOCK_FREE == 2 +-#define BOOST_ATOMIC_SHORT_LOCK_FREE 2 ++ ++#if __GCC_ATOMIC_LONG_LOCK_FREE == 2 ++#define BOOST_ATOMIC_LONG_LOCK_FREE 2 + #else +-#define BOOST_ATOMIC_SHORT_LOCK_FREE 0 ++#define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_LLONG_LOCK_FREE + #endif ++ + #if __GCC_ATOMIC_INT_LOCK_FREE == 2 + #define BOOST_ATOMIC_INT_LOCK_FREE 2 + #else +-#define BOOST_ATOMIC_INT_LOCK_FREE 0 +-#endif +-#if __GCC_ATOMIC_LONG_LOCK_FREE == 2 +-#define BOOST_ATOMIC_LONG_LOCK_FREE 2 +-#else +-#define BOOST_ATOMIC_LONG_LOCK_FREE 0 ++#define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_LONG_LOCK_FREE + #endif +-#if __GCC_ATOMIC_LLONG_LOCK_FREE == 2 +-#define BOOST_ATOMIC_LLONG_LOCK_FREE 2 ++ ++#if __GCC_ATOMIC_SHORT_LOCK_FREE == 2 ++#define BOOST_ATOMIC_SHORT_LOCK_FREE 2 + #else +-#define BOOST_ATOMIC_LLONG_LOCK_FREE 0 ++#define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT_LOCK_FREE + #endif +-#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) && (defined(BOOST_HAS_INT128) || !defined(BOOST_NO_ALIGNMENT)) +-#define BOOST_ATOMIC_INT128_LOCK_FREE 2 ++ ++#if __GCC_ATOMIC_CHAR_LOCK_FREE == 2 ++#define BOOST_ATOMIC_CHAR_LOCK_FREE 2 + #else +-#define BOOST_ATOMIC_INT128_LOCK_FREE 0 ++#define BOOST_ATOMIC_CHAR_LOCK_FREE BOOST_ATOMIC_SHORT_LOCK_FREE + #endif ++ + #if __GCC_ATOMIC_POINTER_LOCK_FREE == 2 + #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 + #else + #define BOOST_ATOMIC_POINTER_LOCK_FREE 0 + #endif +-#if __GCC_ATOMIC_BOOL_LOCK_FREE == 2 +-#define BOOST_ATOMIC_BOOL_LOCK_FREE 2 +-#else +-#define BOOST_ATOMIC_BOOL_LOCK_FREE 0 +-#endif ++ + + #define BOOST_ATOMIC_INT8_LOCK_FREE BOOST_ATOMIC_CHAR_LOCK_FREE + +@@ -128,6 +110,24 @@ + #define BOOST_ATOMIC_INT64_LOCK_FREE 0 + #endif + ++ ++#if __GCC_ATOMIC_WCHAR_T_LOCK_FREE == 2 ++#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 2 ++#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8 ++#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE ++#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4 ++#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE ++#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2 ++#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE ++#elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1 ++#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE ++#else ++#define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 0 ++#endif ++ ++#define BOOST_ATOMIC_CHAR32_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE ++#define BOOST_ATOMIC_CHAR16_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE ++ + #define BOOST_ATOMIC_THREAD_FENCE 2 + #define BOOST_ATOMIC_SIGNAL_FENCE 2 + +diff --git a/include/boost/atomic/detail/ops_gcc_atomic.hpp b/include/boost/atomic/detail/ops_gcc_atomic.hpp +index 2297791..2e4c37b 100644 +--- a/include/boost/atomic/detail/ops_gcc_atomic.hpp ++++ b/include/boost/atomic/detail/ops_gcc_atomic.hpp +@@ -24,6 +24,15 @@ + #include + #endif + ++#if __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE || __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE ||\ ++ __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE || __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE ||\ ++ __GCC_ATOMIC_CHAR_LOCK_FREE != BOOST_ATOMIC_CHAR_LOCK_FREE || __GCC_ATOMIC_BOOL_LOCK_FREE != BOOST_ATOMIC_BOOL_LOCK_FREE ||\ ++ __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE ++// There are platforms where we need to use larger storage types ++#include ++#include ++#endif ++ + #ifdef BOOST_HAS_PRAGMA_ONCE + #pragma once + #endif +@@ -154,73 +163,206 @@ struct gcc_atomic_operations + } + }; + +-#if BOOST_ATOMIC_INT8_LOCK_FREE > 0 ++#if BOOST_ATOMIC_INT128_LOCK_FREE > 0 ++#if defined(__clang__) && defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) ++ ++// Workaround for clang bug: http://llvm.org/bugs/show_bug.cgi?id=19149 ++// Clang 3.4 does not implement 128-bit __atomic* intrinsics even though it defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 + template< bool Signed > +-struct operations< 1u, Signed > : +- public gcc_atomic_operations< typename make_storage_type< 1u, Signed >::type > ++struct operations< 16u, Signed > : ++ public cas_based_operations< gcc_dcas_x86_64< Signed > > + { + }; ++ ++#else ++ ++template< bool Signed > ++struct operations< 16u, Signed > : ++ public gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type > ++{ ++}; ++ ++#endif + #endif + +-#if BOOST_ATOMIC_INT16_LOCK_FREE > 0 ++ ++#if BOOST_ATOMIC_INT64_LOCK_FREE > 0 ++#if defined(__clang__) && defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) ++ ++// Workaround for clang bug http://llvm.org/bugs/show_bug.cgi?id=19355 + template< bool Signed > +-struct operations< 2u, Signed > : +- public gcc_atomic_operations< typename make_storage_type< 2u, Signed >::type > ++struct operations< 8u, Signed > : ++ public cas_based_operations< gcc_dcas_x86< Signed > > ++{ ++}; ++ ++#elif (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 8 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 8 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 8 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 8 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE) ++ ++#define BOOST_ATOMIC_DETAIL_INT64_EXTENDED ++ ++template< bool Signed > ++struct operations< 8u, Signed > : ++ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 8u, Signed > + { + }; ++ ++#else ++ ++template< bool Signed > ++struct operations< 8u, Signed > : ++ public gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type > ++{ ++}; ++ ++#endif + #endif + + #if BOOST_ATOMIC_INT32_LOCK_FREE > 0 ++#if (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 4 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 4 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 4 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 4 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE) ++ ++#define BOOST_ATOMIC_DETAIL_INT32_EXTENDED ++ ++#if !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED) ++ ++template< bool Signed > ++struct operations< 4u, Signed > : ++ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >, 4u, Signed > ++{ ++}; ++ ++#else // !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED) ++ ++template< bool Signed > ++struct operations< 4u, Signed > : ++ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 4u, Signed > ++{ ++}; ++ ++#endif // !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED) ++ ++#else ++ + template< bool Signed > + struct operations< 4u, Signed > : + public gcc_atomic_operations< typename make_storage_type< 4u, Signed >::type > + { + }; ++ ++#endif + #endif + +-#if BOOST_ATOMIC_INT64_LOCK_FREE > 0 +-#if defined(__clang__) && defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) ++#if BOOST_ATOMIC_INT16_LOCK_FREE > 0 ++#if (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 2 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 2 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 2 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 2 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE) ++ ++#define BOOST_ATOMIC_DETAIL_INT16_EXTENDED ++ ++#if !defined(BOOST_ATOMIC_DETAIL_INT32_EXTENDED) + +-// Workaround for clang bug http://llvm.org/bugs/show_bug.cgi?id=19355 + template< bool Signed > +-struct operations< 8u, Signed > : +- public cas_based_operations< gcc_dcas_x86< Signed > > ++struct operations< 2u, Signed > : ++ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 4u, Signed >::type >, 2u, Signed > ++{ ++}; ++ ++#elif !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED) ++ ++template< bool Signed > ++struct operations< 2u, Signed > : ++ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >, 2u, Signed > + { + }; + + #else + + template< bool Signed > +-struct operations< 8u, Signed > : +- public gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type > ++struct operations< 2u, Signed > : ++ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 2u, Signed > ++{ ++}; ++ ++#endif ++ ++#else ++ ++template< bool Signed > ++struct operations< 2u, Signed > : ++ public gcc_atomic_operations< typename make_storage_type< 2u, Signed >::type > + { + }; + + #endif + #endif + +-#if BOOST_ATOMIC_INT128_LOCK_FREE > 0 +-#if defined(__clang__) && defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) ++#if BOOST_ATOMIC_INT8_LOCK_FREE > 0 ++#if (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 1 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 1 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 1 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 1 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\ ++ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE) ||\ ++ (__GCC_ATOMIC_CHAR_LOCK_FREE != BOOST_ATOMIC_CHAR_LOCK_FREE) ||\ ++ (__GCC_ATOMIC_BOOL_LOCK_FREE != BOOST_ATOMIC_BOOL_LOCK_FREE) ++ ++#if !defined(BOOST_ATOMIC_DETAIL_INT16_EXTENDED) + +-// Workaround for clang bug: http://llvm.org/bugs/show_bug.cgi?id=19149 +-// Clang 3.4 does not implement 128-bit __atomic* intrinsics even though it defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 + template< bool Signed > +-struct operations< 16u, Signed > : +- public cas_based_operations< gcc_dcas_x86_64< Signed > > ++struct operations< 1u, Signed > : ++ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 2u, Signed >::type >, 1u, Signed > ++{ ++}; ++ ++#elif !defined(BOOST_ATOMIC_DETAIL_INT32_EXTENDED) ++ ++template< bool Signed > ++struct operations< 1u, Signed > : ++ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 4u, Signed >::type >, 1u, Signed > ++{ ++}; ++ ++#elif !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED) ++ ++template< bool Signed > ++struct operations< 1u, Signed > : ++ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >, 1u, Signed > + { + }; + + #else + + template< bool Signed > +-struct operations< 16u, Signed > : +- public gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type > ++struct operations< 1u, Signed > : ++ public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 1u, Signed > ++{ ++}; ++ ++#endif ++ ++#else ++ ++template< bool Signed > ++struct operations< 1u, Signed > : ++ public gcc_atomic_operations< typename make_storage_type< 1u, Signed >::type > + { + }; + + #endif + #endif + ++#undef BOOST_ATOMIC_DETAIL_INT16_EXTENDED ++#undef BOOST_ATOMIC_DETAIL_INT32_EXTENDED ++#undef BOOST_ATOMIC_DETAIL_INT64_EXTENDED ++ + BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT + { + __atomic_thread_fence(atomics::detail::convert_memory_order_to_gcc(order)); +-- +1.8.5.5 + diff --git a/meta/recipes-support/boost/boost/arm-intrinsics.patch b/meta/recipes-support/boost/boost/arm-intrinsics.patch new file mode 100644 index 0000000000..fe85c69a82 --- /dev/null +++ b/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 + +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/meta/recipes-support/boost/boost_1.56.0.bb b/meta/recipes-support/boost/boost_1.56.0.bb new file mode 100644 index 0000000000..dcc77bb87e --- /dev/null +++ b/meta/recipes-support/boost/boost_1.56.0.bb @@ -0,0 +1,7 @@ +include boost-${PV}.inc +include boost.inc + +SRC_URI += "\ + file://arm-intrinsics.patch \ + file://0001-Added-support-for-extending-operations-to-GCC-atomic.patch;striplevel=2 \ +" diff --git a/meta/recipes-support/ca-certificates/ca-certificates/0001-Update-mozilla-certdata.txt-to-version-1.98.patch b/meta/recipes-support/ca-certificates/ca-certificates/0001-Update-mozilla-certdata.txt-to-version-1.98.patch new file mode 100644 index 0000000000..19fa6bf654 --- /dev/null +++ b/meta/recipes-support/ca-certificates/ca-certificates/0001-Update-mozilla-certdata.txt-to-version-1.98.patch @@ -0,0 +1,227 @@ +From 9d9b795cf1066eb62db3cb5bb5cf56bdf7159b98 Mon Sep 17 00:00:00 2001 +From: Michael Shuler +Date: Sat, 12 Apr 2014 07:56:56 -0500 +Subject: [PATCH] Update mozilla/certdata.txt to version 1.98 + +This update only removes an untrusted cert for "Bogus kuix.de", which was +used for testing by mozilla. + +Upstream-Status: Backport +Signed-off-by: Saul Wold + +--- + mozilla/certdata.txt | 182 --------------------------------------------------- + mozilla/nssckbi.h | 4 +- + 2 files changed, 2 insertions(+), 184 deletions(-) + +diff --git a/mozilla/certdata.txt b/mozilla/certdata.txt +index ae9cbc7..ca4c66b 100644 +--- a/mozilla/certdata.txt ++++ b/mozilla/certdata.txt +@@ -21686,188 +21686,6 @@ CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED + CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + + # +-# Certificate "Bogus kuix.de" +-# +-# Issuer: CN=UTN-USERFirst-Hardware,OU=http://www.usertrust.com,O=The USERTRUST Network,L=Salt Lake City,ST=UT,C=US +-# Serial Number:72:03:21:05:c5:0c:08:57:3d:8e:a5:30:4e:fe:e8:b0 +-# Subject: CN=kuix.de,OU=Comodo Trial SSL,OU=TEST USE ONLY - NO WARRANTY ATTACHED,OU=For Testing Purposes Only,O=Kai Engert,STREET=Test Street,L=Test City,ST=Test State,postalCode=12345,C=DE +-# Not Valid Before: Thu Mar 17 00:00:00 2011 +-# Not Valid After : Sat Apr 16 23:59:59 2011 +-# Fingerprint (MD5): F7:5F:98:BC:D8:64:0C:16:E5:AE:EE:AA:00:F6:1F:07 +-# Fingerprint (SHA1): 82:61:4B:EC:97:48:15:DE:CC:9A:CC:6E:84:21:71:79:B2:64:20:40 +-CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE +-CKA_TOKEN CK_BBOOL CK_TRUE +-CKA_PRIVATE CK_BBOOL CK_FALSE +-CKA_MODIFIABLE CK_BBOOL CK_FALSE +-CKA_LABEL UTF8 "Bogus kuix.de" +-CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 +-CKA_SUBJECT MULTILINE_OCTAL +-\060\201\361\061\013\060\011\006\003\125\004\006\023\002\104\105 +-\061\016\060\014\006\003\125\004\021\023\005\061\062\063\064\065 +-\061\023\060\021\006\003\125\004\010\023\012\124\145\163\164\040 +-\123\164\141\164\145\061\022\060\020\006\003\125\004\007\023\011 +-\124\145\163\164\040\103\151\164\171\061\024\060\022\006\003\125 +-\004\011\023\013\124\145\163\164\040\123\164\162\145\145\164\061 +-\023\060\021\006\003\125\004\012\023\012\113\141\151\040\105\156 +-\147\145\162\164\061\042\060\040\006\003\125\004\013\023\031\106 +-\157\162\040\124\145\163\164\151\156\147\040\120\165\162\160\157 +-\163\145\163\040\117\156\154\171\061\055\060\053\006\003\125\004 +-\013\023\044\124\105\123\124\040\125\123\105\040\117\116\114\131 +-\040\055\040\116\117\040\127\101\122\122\101\116\124\131\040\101 +-\124\124\101\103\110\105\104\061\031\060\027\006\003\125\004\013 +-\023\020\103\157\155\157\144\157\040\124\162\151\141\154\040\123 +-\123\114\061\020\060\016\006\003\125\004\003\023\007\153\165\151 +-\170\056\144\145 +-END +-CKA_ID UTF8 "0" +-CKA_ISSUER MULTILINE_OCTAL +-\060\201\227\061\013\060\011\006\003\125\004\006\023\002\125\123 +-\061\013\060\011\006\003\125\004\010\023\002\125\124\061\027\060 +-\025\006\003\125\004\007\023\016\123\141\154\164\040\114\141\153 +-\145\040\103\151\164\171\061\036\060\034\006\003\125\004\012\023 +-\025\124\150\145\040\125\123\105\122\124\122\125\123\124\040\116 +-\145\164\167\157\162\153\061\041\060\037\006\003\125\004\013\023 +-\030\150\164\164\160\072\057\057\167\167\167\056\165\163\145\162 +-\164\162\165\163\164\056\143\157\155\061\037\060\035\006\003\125 +-\004\003\023\026\125\124\116\055\125\123\105\122\106\151\162\163 +-\164\055\110\141\162\144\167\141\162\145 +-END +-CKA_SERIAL_NUMBER MULTILINE_OCTAL +-\002\020\162\003\041\005\305\014\010\127\075\216\245\060\116\376 +-\350\260 +-END +-CKA_VALUE MULTILINE_OCTAL +-\060\202\005\154\060\202\004\124\240\003\002\001\002\002\020\162 +-\003\041\005\305\014\010\127\075\216\245\060\116\376\350\260\060 +-\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060\201 +-\227\061\013\060\011\006\003\125\004\006\023\002\125\123\061\013 +-\060\011\006\003\125\004\010\023\002\125\124\061\027\060\025\006 +-\003\125\004\007\023\016\123\141\154\164\040\114\141\153\145\040 +-\103\151\164\171\061\036\060\034\006\003\125\004\012\023\025\124 +-\150\145\040\125\123\105\122\124\122\125\123\124\040\116\145\164 +-\167\157\162\153\061\041\060\037\006\003\125\004\013\023\030\150 +-\164\164\160\072\057\057\167\167\167\056\165\163\145\162\164\162 +-\165\163\164\056\143\157\155\061\037\060\035\006\003\125\004\003 +-\023\026\125\124\116\055\125\123\105\122\106\151\162\163\164\055 +-\110\141\162\144\167\141\162\145\060\036\027\015\061\061\060\063 +-\061\067\060\060\060\060\060\060\132\027\015\061\061\060\064\061 +-\066\062\063\065\071\065\071\132\060\201\361\061\013\060\011\006 +-\003\125\004\006\023\002\104\105\061\016\060\014\006\003\125\004 +-\021\023\005\061\062\063\064\065\061\023\060\021\006\003\125\004 +-\010\023\012\124\145\163\164\040\123\164\141\164\145\061\022\060 +-\020\006\003\125\004\007\023\011\124\145\163\164\040\103\151\164 +-\171\061\024\060\022\006\003\125\004\011\023\013\124\145\163\164 +-\040\123\164\162\145\145\164\061\023\060\021\006\003\125\004\012 +-\023\012\113\141\151\040\105\156\147\145\162\164\061\042\060\040 +-\006\003\125\004\013\023\031\106\157\162\040\124\145\163\164\151 +-\156\147\040\120\165\162\160\157\163\145\163\040\117\156\154\171 +-\061\055\060\053\006\003\125\004\013\023\044\124\105\123\124\040 +-\125\123\105\040\117\116\114\131\040\055\040\116\117\040\127\101 +-\122\122\101\116\124\131\040\101\124\124\101\103\110\105\104\061 +-\031\060\027\006\003\125\004\013\023\020\103\157\155\157\144\157 +-\040\124\162\151\141\154\040\123\123\114\061\020\060\016\006\003 +-\125\004\003\023\007\153\165\151\170\056\144\145\060\201\237\060 +-\015\006\011\052\206\110\206\367\015\001\001\001\005\000\003\201 +-\215\000\060\201\211\002\201\201\000\270\252\216\365\227\107\007 +-\137\345\170\166\156\223\153\216\337\113\074\333\231\057\161\123 +-\051\156\245\363\044\117\110\045\043\100\001\354\012\025\013\354 +-\156\310\236\046\043\146\373\351\333\330\050\205\041\117\036\337 +-\173\114\345\143\301\013\262\142\126\224\123\313\277\234\241\115 +-\331\207\305\151\110\074\261\277\245\150\122\041\035\172\334\224 +-\117\104\156\107\045\035\237\234\222\322\067\035\371\133\133\262 +-\335\076\030\327\363\207\146\255\243\364\316\217\321\157\360\271 +-\264\357\261\352\025\143\012\316\201\002\003\001\000\001\243\202 +-\001\332\060\202\001\326\060\037\006\003\125\035\043\004\030\060 +-\026\200\024\241\162\137\046\033\050\230\103\225\135\007\067\325 +-\205\226\235\113\322\303\105\060\035\006\003\125\035\016\004\026 +-\004\024\100\217\071\046\234\114\206\043\231\306\121\011\246\346 +-\362\301\376\247\366\267\060\016\006\003\125\035\017\001\001\377 +-\004\004\003\002\005\240\060\014\006\003\125\035\023\001\001\377 +-\004\002\060\000\060\035\006\003\125\035\045\004\026\060\024\006 +-\010\053\006\001\005\005\007\003\001\006\010\053\006\001\005\005 +-\007\003\002\060\106\006\003\125\035\040\004\077\060\075\060\073 +-\006\014\053\006\001\004\001\262\061\001\002\001\003\004\060\053 +-\060\051\006\010\053\006\001\005\005\007\002\001\026\035\150\164 +-\164\160\163\072\057\057\163\145\143\165\162\145\056\143\157\155 +-\157\144\157\056\143\157\155\057\103\120\123\060\173\006\003\125 +-\035\037\004\164\060\162\060\070\240\066\240\064\206\062\150\164 +-\164\160\072\057\057\143\162\154\056\143\157\155\157\144\157\143 +-\141\056\143\157\155\057\125\124\116\055\125\123\105\122\106\151 +-\162\163\164\055\110\141\162\144\167\141\162\145\056\143\162\154 +-\060\066\240\064\240\062\206\060\150\164\164\160\072\057\057\143 +-\162\154\056\143\157\155\157\144\157\056\156\145\164\057\125\124 +-\116\055\125\123\105\122\106\151\162\163\164\055\110\141\162\144 +-\167\141\162\145\056\143\162\154\060\161\006\010\053\006\001\005 +-\005\007\001\001\004\145\060\143\060\073\006\010\053\006\001\005 +-\005\007\060\002\206\057\150\164\164\160\072\057\057\143\162\164 +-\056\143\157\155\157\144\157\143\141\056\143\157\155\057\125\124 +-\116\101\144\144\124\162\165\163\164\123\145\162\166\145\162\103 +-\101\056\143\162\164\060\044\006\010\053\006\001\005\005\007\060 +-\001\206\030\150\164\164\160\072\057\057\157\143\163\160\056\143 +-\157\155\157\144\157\143\141\056\143\157\155\060\037\006\003\125 +-\035\021\004\030\060\026\202\007\153\165\151\170\056\144\145\202 +-\013\167\167\167\056\153\165\151\170\056\144\145\060\015\006\011 +-\052\206\110\206\367\015\001\001\005\005\000\003\202\001\001\000 +-\216\141\036\046\036\242\331\031\320\360\324\275\211\371\352\222 +-\021\171\152\136\173\174\237\176\071\163\011\126\121\346\206\124 +-\307\155\106\166\122\312\152\250\064\300\140\076\003\316\263\311 +-\110\227\321\237\246\241\152\017\376\167\321\036\020\263\127\200 +-\251\006\046\204\246\373\172\067\023\316\204\314\167\171\011\056 +-\342\104\276\037\254\167\156\167\106\101\333\260\262\151\221\164 +-\321\200\226\141\061\014\057\012\317\265\320\334\010\055\353\366 +-\165\202\336\212\056\272\075\007\220\140\071\126\203\341\202\312 +-\043\254\337\343\317\115\160\127\301\270\267\223\232\355\334\213 +-\336\112\240\125\050\002\253\103\014\124\227\150\030\242\353\071 +-\341\271\374\277\163\200\144\063\022\173\207\140\002\347\076\160 +-\311\207\312\251\066\074\005\361\006\136\161\012\016\012\066\231 +-\260\207\347\151\132\261\240\060\116\175\141\130\313\306\250\226 +-\200\136\175\301\052\377\233\112\112\353\051\147\212\017\157\346 +-\031\355\202\317\201\127\341\044\255\242\321\372\332\024\227\260 +-\154\174\107\306\327\224\021\041\354\326\132\322\335\217\177\221 +-END +- +-# Trust for Certificate "Bogus kuix.de" +-# Issuer: CN=UTN-USERFirst-Hardware,OU=http://www.usertrust.com,O=The USERTRUST Network,L=Salt Lake City,ST=UT,C=US +-# Serial Number:72:03:21:05:c5:0c:08:57:3d:8e:a5:30:4e:fe:e8:b0 +-# Subject: CN=kuix.de,OU=Comodo Trial SSL,OU=TEST USE ONLY - NO WARRANTY ATTACHED,OU=For Testing Purposes Only,O=Kai Engert,STREET=Test Street,L=Test City,ST=Test State,postalCode=12345,C=DE +-# Not Valid Before: Thu Mar 17 00:00:00 2011 +-# Not Valid After : Sat Apr 16 23:59:59 2011 +-# Fingerprint (MD5): F7:5F:98:BC:D8:64:0C:16:E5:AE:EE:AA:00:F6:1F:07 +-# Fingerprint (SHA1): 82:61:4B:EC:97:48:15:DE:CC:9A:CC:6E:84:21:71:79:B2:64:20:40 +-CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST +-CKA_TOKEN CK_BBOOL CK_TRUE +-CKA_PRIVATE CK_BBOOL CK_FALSE +-CKA_MODIFIABLE CK_BBOOL CK_FALSE +-CKA_LABEL UTF8 "Bogus kuix.de" +-CKA_CERT_SHA1_HASH MULTILINE_OCTAL +-\202\141\113\354\227\110\025\336\314\232\314\156\204\041\161\171 +-\262\144\040\100 +-END +-CKA_CERT_MD5_HASH MULTILINE_OCTAL +-\367\137\230\274\330\144\014\026\345\256\356\252\000\366\037\007 +-END +-CKA_ISSUER MULTILINE_OCTAL +-\060\201\227\061\013\060\011\006\003\125\004\006\023\002\125\123 +-\061\013\060\011\006\003\125\004\010\023\002\125\124\061\027\060 +-\025\006\003\125\004\007\023\016\123\141\154\164\040\114\141\153 +-\145\040\103\151\164\171\061\036\060\034\006\003\125\004\012\023 +-\025\124\150\145\040\125\123\105\122\124\122\125\123\124\040\116 +-\145\164\167\157\162\153\061\041\060\037\006\003\125\004\013\023 +-\030\150\164\164\160\072\057\057\167\167\167\056\165\163\145\162 +-\164\162\165\163\164\056\143\157\155\061\037\060\035\006\003\125 +-\004\003\023\026\125\124\116\055\125\123\105\122\106\151\162\163 +-\164\055\110\141\162\144\167\141\162\145 +-END +-CKA_SERIAL_NUMBER MULTILINE_OCTAL +-\002\020\162\003\041\005\305\014\010\127\075\216\245\060\116\376 +-\350\260 +-END +-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_NOT_TRUSTED +-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_NOT_TRUSTED +-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED +-CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE +- +-# + # Certificate "Go Daddy Root Certificate Authority - G2" + # + # Issuer: CN=Go Daddy Root Certificate Authority - G2,O="GoDaddy.com, Inc.",L=Scottsdale,ST=Arizona,C=US +diff --git a/mozilla/nssckbi.h b/mozilla/nssckbi.h +index fe89ed3..ba43e70 100644 +--- a/mozilla/nssckbi.h ++++ b/mozilla/nssckbi.h +@@ -45,8 +45,8 @@ + * of the comment in the CK_VERSION type definition. + */ + #define NSS_BUILTINS_LIBRARY_VERSION_MAJOR 1 +-#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 97 +-#define NSS_BUILTINS_LIBRARY_VERSION "1.97" ++#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 98 ++#define NSS_BUILTINS_LIBRARY_VERSION "1.98" + + /* These version numbers detail the semantic changes to the ckfw engine. */ + #define NSS_BUILTINS_HARDWARE_VERSION_MAJOR 1 +-- +1.8.3.1 + diff --git a/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch b/meta/recipes-support/ca-certificates/ca-certificates/0001-update-ca-certificates-remove-c-rehash.patch new file mode 100644 index 0000000000..bf027233d1 --- /dev/null +++ b/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 +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 +--- + 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/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch b/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch new file mode 100644 index 0000000000..f4c84fea44 --- /dev/null +++ b/meta/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch @@ -0,0 +1,55 @@ +Upstream-Status: Pending + +From 724cb153ca0f607fb38b3a8db3ebb2742601cd81 Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter +Date: Tue, 19 Mar 2013 17:14:33 +0100 +Subject: [PATCH 2/2] update-ca-certificates: use $SYSROOT + +Signed-off-by: Andreas Oberritter +--- + sbin/update-ca-certificates | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates +index c567e3d..923b68a 100755 +--- a/sbin/update-ca-certificates ++++ b/sbin/update-ca-certificates +@@ -37,11 +37,11 @@ do + shift + done + +-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 ++ETCCERTSDIR=$SYSROOT/etc/ssl/certs + + cleanup() { + rm -f "$TEMPBUNDLE" +@@ -64,9 +64,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 + cat "$CERT" >> "$TEMPBUNDLE" +@@ -148,7 +148,7 @@ mv -f "$TEMPBUNDLE" "$CERTBUNDLE" + + echo "$ADDED_CNT added, $REMOVED_CNT removed; done." + +-HOOKSDIR=/etc/ca-certificates/update.d ++HOOKSDIR=$SYSROOT/etc/ca-certificates/update.d + echo -n "Running hooks in $HOOKSDIR...." + VERBOSE_ARG= + [ "$verbose" = 0 ] || VERBOSE_ARG=--verbose +-- +1.7.10.4 diff --git a/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch b/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch new file mode 100644 index 0000000000..7e0ee4cd24 --- /dev/null +++ b/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch @@ -0,0 +1,55 @@ +Upstream-Status: Pending + +update-ca-certificates: find SYSROOT relative to its own location + +This makes the script relocatable. + +--- ca-certificates-20130119.orig/sbin/update-ca-certificates ++++ ca-certificates-20130119/sbin/update-ca-certificates +@@ -37,11 +37,44 @@ do + shift + done + +-CERTSCONF=$SYSROOT/etc/ca-certificates.conf ++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 ++ + CERTSDIR=$SYSROOT/usr/share/ca-certificates ++CERTSCONF=$SYSROOT/etc/ca-certificates.conf ++ETCCERTSDIR=$SYSROOT/etc/ssl/certs + LOCALCERTSDIR=$SYSROOT/usr/local/share/ca-certificates + CERTBUNDLE=ca-certificates.crt +-ETCCERTSDIR=$SYSROOT/etc/ssl/certs + + cleanup() { + rm -f "$TEMPBUNDLE" diff --git a/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch b/meta/recipes-support/ca-certificates/ca-certificates/sbindir.patch new file mode 100644 index 0000000000..a113fa8b15 --- /dev/null +++ b/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/meta/recipes-support/ca-certificates/ca-certificates_20140325.bb b/meta/recipes-support/ca-certificates/ca-certificates_20140325.bb new file mode 100644 index 0000000000..a277036cfb --- /dev/null +++ b/meta/recipes-support/ca-certificates/ca-certificates_20140325.bb @@ -0,0 +1,77 @@ +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=0ee6c253e6406c76bfe261deaf5a60b5" + +# This is needed to ensure we can run the postinst at image creation time +DEPENDS = "ca-certificates-native" +DEPENDS_class-native = "" + +# tag: debian/20140325 + 2 +SRCREV = "1ce8e63dcfea6b9258da356dc023895e6f694144" + +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://default-sysroot.patch \ + file://sbindir.patch" + +SRC_URI += "file://0001-Update-mozilla-certdata.txt-to-version-1.98.patch" + +S = "${WORKDIR}/git" + +inherit allarch + +EXTRA_OEMAKE = "\ + 'CERTSDIR=${datadir}/ca-certificates' \ + 'SBINDIR=${sbindir}' \ +" + +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/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch b/meta/recipes-support/consolekit/consolekit/add-polkit-configure-argument.patch new file mode 100644 index 0000000000..ad879d466b --- /dev/null +++ b/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/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch b/meta/recipes-support/consolekit/consolekit/sepbuildfix.patch new file mode 100644 index 0000000000..f2f9b9c682 --- /dev/null +++ b/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/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/meta/recipes-support/consolekit/consolekit_0.4.6.bb new file mode 100644 index 0000000000..dfbd11c2d1 --- /dev/null +++ b/meta/recipes-support/consolekit/consolekit_0.4.6.bb @@ -0,0 +1,49 @@ +SUMMARY = "Framework for defining and tracking users, login sessions, and seats" +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/ConsoleKit" +BUGTRACKER = "https://bugs.freedesktop.org/buglist.cgi?query_format=specific&product=ConsoleKit" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://src/main.c;endline=21;md5=0a994e09769780220163255d8f9071c3" + +DEPENDS = "glib-2.0 glib-2.0-native dbus dbus-glib virtual/libx11" +RDEPENDS_${PN} += "base-files" + +inherit autotools pkgconfig + +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/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch b/meta/recipes-support/createrepo/createrepo/createrepo-rpm549.patch new file mode 100644 index 0000000000..bc7200d072 --- /dev/null +++ b/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 + +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/meta/recipes-support/createrepo/createrepo/fix-native-install.patch b/meta/recipes-support/createrepo/createrepo/fix-native-install.patch new file mode 100644 index 0000000000..d8202a4f7c --- /dev/null +++ b/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 + +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/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch b/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch new file mode 100644 index 0000000000..80205a1507 --- /dev/null +++ b/meta/recipes-support/createrepo/createrepo/python-scripts-should-use-interpreter-from-env.patch @@ -0,0 +1,47 @@ +Author: Andrei Gherzan + +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/meta/recipes-support/createrepo/createrepo/recommends.patch b/meta/recipes-support/createrepo/createrepo/recommends.patch new file mode 100644 index 0000000000..dc5de2b5b0 --- /dev/null +++ b/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 + +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/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py b/meta/recipes-support/createrepo/createrepo/rpm-createsolvedb.py new file mode 100755 index 0000000000..a5b61bade7 --- /dev/null +++ b/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/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/meta/recipes-support/createrepo/createrepo_0.4.11.bb new file mode 100644 index 0000000000..49b45fc3b8 --- /dev/null +++ b/meta/recipes-support/createrepo/createrepo_0.4.11.bb @@ -0,0 +1,46 @@ +SUMMARY = "Creates metadata indexes for RPM package repositories" +HOMEPAGE = "http://createrepo.baseurl.org/" + +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://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/meta/recipes-support/curl/curl/CVE-2014-3613.patch b/meta/recipes-support/curl/curl/CVE-2014-3613.patch new file mode 100644 index 0000000000..3e2fee0413 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2014-3613.patch @@ -0,0 +1,269 @@ +From 545e322cc8c383ccdfb4ad85a1634c2b719a1adf Mon Sep 17 00:00:00 2001 +From: Tim Ruehsen +Date: Tue, 19 Aug 2014 21:01:28 +0200 +Subject: [PATCH] cookies: only use full host matches for hosts used as IP + address + +By not detecting and rejecting domain names for partial literal IP +addresses properly when parsing received HTTP cookies, libcurl can be +fooled to both send cookies to wrong sites and to allow arbitrary sites +to set cookies for others. + +CVE-2014-3613 + +Bug: http://curl.haxx.se/docs/adv_20140910A.html + +Upstream-Status: Backport + +Signed-off-by: Chong Lu +--- + lib/cookie.c | 50 ++++++++++++++++++++++++++++++++++++++---------- + tests/data/test1105 | 3 +-- + tests/data/test31 | 55 +++++++++++++++++++++++++++-------------------------- + tests/data/test8 | 3 ++- + 4 files changed, 71 insertions(+), 40 deletions(-) + +diff --git a/lib/cookie.c b/lib/cookie.c +index 0590643..46904ac 100644 +--- a/lib/cookie.c ++++ b/lib/cookie.c +@@ -93,10 +93,11 @@ Example set of cookies: + #include "curl_memory.h" + #include "share.h" + #include "strtoofft.h" + #include "rawstr.h" + #include "curl_memrchr.h" ++#include "inet_pton.h" + + /* The last #include file should be: */ + #include "memdebug.h" + + static void freecookie(struct Cookie *co) +@@ -317,10 +318,32 @@ static void remove_expired(struct CookieInfo *cookies) + } + co = nx; + } + } + ++/* ++ * Return true if the given string is an IP(v4|v6) address. ++ */ ++static bool isip(const char *domain) ++{ ++ struct in_addr addr; ++#ifdef ENABLE_IPV6 ++ struct in6_addr addr6; ++#endif ++ ++ if(Curl_inet_pton(AF_INET, domain, &addr) ++#ifdef ENABLE_IPV6 ++ || Curl_inet_pton(AF_INET6, domain, &addr6) ++#endif ++ ) { ++ /* domain name given as IP address */ ++ return TRUE; ++ } ++ ++ return FALSE; ++} ++ + /**************************************************************************** + * + * Curl_cookie_add() + * + * Add a single cookie line to the cookie keeping object. +@@ -437,28 +460,31 @@ Curl_cookie_add(struct SessionHandle *data, + badcookie = TRUE; /* out of memory bad */ + break; + } + } + else if(Curl_raw_equal("domain", name)) { ++ bool is_ip; ++ + /* Now, we make sure that our host is within the given domain, + or the given domain is not valid and thus cannot be set. */ + + if('.' == whatptr[0]) + whatptr++; /* ignore preceding dot */ + +- if(!domain || tailmatch(whatptr, domain)) { +- const char *tailptr=whatptr; +- if(tailptr[0] == '.') +- tailptr++; +- strstore(&co->domain, tailptr); /* don't prefix w/dots +- internally */ ++ is_ip = isip(domain ? domain : whatptr); ++ ++ if(!domain ++ || (is_ip && !strcmp(whatptr, domain)) ++ || (!is_ip && tailmatch(whatptr, domain))) { ++ strstore(&co->domain, whatptr); + if(!co->domain) { + badcookie = TRUE; + break; + } +- co->tailmatch=TRUE; /* we always do that if the domain name was +- given */ ++ if(!is_ip) ++ co->tailmatch=TRUE; /* we always do that if the domain name was ++ given */ + } + else { + /* we did not get a tailmatch and then the attempted set domain + is not a domain to which the current host belongs. Mark as + bad. */ +@@ -966,17 +992,21 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, + struct Cookie *newco; + struct Cookie *co; + time_t now = time(NULL); + struct Cookie *mainco=NULL; + size_t matches = 0; ++ bool is_ip; + + if(!c || !c->cookies) + return NULL; /* no cookie struct or no cookies in the struct */ + + /* at first, remove expired cookies */ + remove_expired(c); + ++ /* check if host is an IP(v4|v6) address */ ++ is_ip = isip(host); ++ + co = c->cookies; + + while(co) { + /* only process this cookie if it is not expired or had no expire + date AND that if the cookie requires we're secure we must only +@@ -984,12 +1014,12 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c, + if((!co->expires || (co->expires > now)) && + (co->secure?secure:TRUE)) { + + /* now check if the domain is correct */ + if(!co->domain || +- (co->tailmatch && tailmatch(co->domain, host)) || +- (!co->tailmatch && Curl_raw_equal(host, co->domain)) ) { ++ (co->tailmatch && !is_ip && tailmatch(co->domain, host)) || ++ ((!co->tailmatch || is_ip) && Curl_raw_equal(host, co->domain)) ) { + /* the right part of the host matches the domain stuff in the + cookie data */ + + /* now check the left part of the path with the cookies path + requirement */ +diff --git a/tests/data/test1105 b/tests/data/test1105 +index 25f194c..9564775 100644 +--- a/tests/data/test1105 ++++ b/tests/data/test1105 +@@ -57,10 +57,9 @@ userid=myname&password=mypassword + # Netscape HTTP Cookie File + # http://curl.haxx.se/docs/http-cookies.html + # This file was generated by libcurl! Edit at your own risk. + + 127.0.0.1 FALSE /we/want/ FALSE 0 foobar name +-.127.0.0.1 TRUE "/silly/" FALSE 0 mismatch this +-.0.0.1 TRUE / FALSE 0 partmatch present ++127.0.0.1 FALSE "/silly/" FALSE 0 mismatch this + + + +diff --git a/tests/data/test31 b/tests/data/test31 +index 38af83b..dfcac04 100644 +--- a/tests/data/test31 ++++ b/tests/data/test31 +@@ -49,11 +49,12 @@ Set-Cookie: nodomainnovalue + Set-Cookie: nodomain=value; expires=Fri Feb 2 11:56:27 GMT 2035 + Set-Cookie: novalue; domain=reallysilly + Set-Cookie: test=yes; domain=foo.com; expires=Sat Feb 2 11:56:27 GMT 2030 + Set-Cookie: test2=yes; domain=se; expires=Sat Feb 2 11:56:27 GMT 2030 + Set-Cookie: magic=yessir; path=/silly/; HttpOnly +-Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad; ++Set-Cookie: blexp=yesyes; domain=127.0.0.1; domain=127.0.0.1; expiry=totally bad; ++Set-Cookie: partialip=nono; domain=.0.0.1; + + boo + + + +@@ -93,36 +94,36 @@ Accept: */* + + # Netscape HTTP Cookie File + # http://curl.haxx.se/docs/http-cookies.html + # This file was generated by libcurl! Edit at your own risk. + +-.127.0.0.1 TRUE /silly/ FALSE 0 ismatch this +-.127.0.0.1 TRUE /overwrite FALSE 0 overwrite this2 +-.127.0.0.1 TRUE /secure1/ TRUE 0 sec1value secure1 +-.127.0.0.1 TRUE /secure2/ TRUE 0 sec2value secure2 +-.127.0.0.1 TRUE /secure3/ TRUE 0 sec3value secure3 +-.127.0.0.1 TRUE /secure4/ TRUE 0 sec4value secure4 +-.127.0.0.1 TRUE /secure5/ TRUE 0 sec5value secure5 +-.127.0.0.1 TRUE /secure6/ TRUE 0 sec6value secure6 +-.127.0.0.1 TRUE /secure7/ TRUE 0 sec7value secure7 +-.127.0.0.1 TRUE /secure8/ TRUE 0 sec8value secure8 +-.127.0.0.1 TRUE /secure9/ TRUE 0 secure very1 +-#HttpOnly_.127.0.0.1 TRUE /p1/ FALSE 0 httpo1 value1 +-#HttpOnly_.127.0.0.1 TRUE /p2/ FALSE 0 httpo2 value2 +-#HttpOnly_.127.0.0.1 TRUE /p3/ FALSE 0 httpo3 value3 +-#HttpOnly_.127.0.0.1 TRUE /p4/ FALSE 0 httpo4 value4 +-#HttpOnly_.127.0.0.1 TRUE /p4/ FALSE 0 httponly myvalue1 +-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec myvalue2 +-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec2 myvalue3 +-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec3 myvalue4 +-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec4 myvalue5 +-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec5 myvalue6 +-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec6 myvalue7 +-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec7 myvalue8 +-#HttpOnly_.127.0.0.1 TRUE /p4/ TRUE 0 httpandsec8 myvalue9 +-.127.0.0.1 TRUE / FALSE 0 partmatch present ++127.0.0.1 FALSE /silly/ FALSE 0 ismatch this ++127.0.0.1 FALSE /overwrite FALSE 0 overwrite this2 ++127.0.0.1 FALSE /secure1/ TRUE 0 sec1value secure1 ++127.0.0.1 FALSE /secure2/ TRUE 0 sec2value secure2 ++127.0.0.1 FALSE /secure3/ TRUE 0 sec3value secure3 ++127.0.0.1 FALSE /secure4/ TRUE 0 sec4value secure4 ++127.0.0.1 FALSE /secure5/ TRUE 0 sec5value secure5 ++127.0.0.1 FALSE /secure6/ TRUE 0 sec6value secure6 ++127.0.0.1 FALSE /secure7/ TRUE 0 sec7value secure7 ++127.0.0.1 FALSE /secure8/ TRUE 0 sec8value secure8 ++127.0.0.1 FALSE /secure9/ TRUE 0 secure very1 ++#HttpOnly_127.0.0.1 FALSE /p1/ FALSE 0 httpo1 value1 ++#HttpOnly_127.0.0.1 FALSE /p2/ FALSE 0 httpo2 value2 ++#HttpOnly_127.0.0.1 FALSE /p3/ FALSE 0 httpo3 value3 ++#HttpOnly_127.0.0.1 FALSE /p4/ FALSE 0 httpo4 value4 ++#HttpOnly_127.0.0.1 FALSE /p4/ FALSE 0 httponly myvalue1 ++#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec myvalue2 ++#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec2 myvalue3 ++#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec3 myvalue4 ++#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec4 myvalue5 ++#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec5 myvalue6 ++#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec6 myvalue7 ++#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec7 myvalue8 ++#HttpOnly_127.0.0.1 FALSE /p4/ TRUE 0 httpandsec8 myvalue9 ++127.0.0.1 FALSE / FALSE 0 partmatch present + 127.0.0.1 FALSE /we/want/ FALSE 2054030187 nodomain value + #HttpOnly_127.0.0.1 FALSE /silly/ FALSE 0 magic yessir +-.0.0.1 TRUE /we/want/ FALSE 0 blexp yesyes ++127.0.0.1 FALSE /we/want/ FALSE 0 blexp yesyes + + + +diff --git a/tests/data/test8 b/tests/data/test8 +index 4d54541..030fd55 100644 +--- a/tests/data/test8 ++++ b/tests/data/test8 +@@ -40,11 +40,12 @@ Set-Cookie: mismatch=this; domain=%HOSTIP; path="/silly/"; + Set-Cookie: partmatch=present; domain=.0.0.1; path=/w; + Set-Cookie: duplicate=test; domain=.0.0.1; domain=.0.0.1; path=/donkey; + Set-Cookie: cookie=yes; path=/we; + Set-Cookie: cookie=perhaps; path=/we/want; + Set-Cookie: nocookie=yes; path=/WE; +-Set-Cookie: blexp=yesyes; domain=.0.0.1; domain=.0.0.1; expiry=totally bad; ++Set-Cookie: blexp=yesyes; domain=%HOSTIP; domain=%HOSTIP; expiry=totally bad; ++Set-Cookie: partialip=nono; domain=.0.0.1; + + + + perl -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}' + +-- +2.1.0 + diff --git a/meta/recipes-support/curl/curl/CVE-2014-3620.patch b/meta/recipes-support/curl/curl/CVE-2014-3620.patch new file mode 100644 index 0000000000..d11f1908af --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2014-3620.patch @@ -0,0 +1,69 @@ +From fd7ae600adf23a9a1ed619165c5058bdec216e9c Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Tue, 19 Aug 2014 21:11:20 +0200 +Subject: [PATCH] cookies: reject incoming cookies set for TLDs + +Test 61 was modified to verify this. + +CVE-2014-3620 + +Reported-by: Tim Ruehsen +URL: http://curl.haxx.se/docs/adv_20140910B.html + +Upstream-Status: Backport + +Signed-off-by: Chong Lu +--- + lib/cookie.c | 6 ++++++ + tests/data/test61 | 1 + + 2 files changed, 7 insertions(+) + +diff --git a/lib/cookie.c b/lib/cookie.c +index 46904ac..375485f 100644 +--- a/lib/cookie.c ++++ b/lib/cookie.c +@@ -461,19 +461,25 @@ Curl_cookie_add(struct SessionHandle *data, + break; + } + } + else if(Curl_raw_equal("domain", name)) { + bool is_ip; ++ const char *dotp; + + /* Now, we make sure that our host is within the given domain, + or the given domain is not valid and thus cannot be set. */ + + if('.' == whatptr[0]) + whatptr++; /* ignore preceding dot */ + + is_ip = isip(domain ? domain : whatptr); + ++ /* check for more dots */ ++ dotp = strchr(whatptr, '.'); ++ if(!dotp) ++ domain=":"; ++ + if(!domain + || (is_ip && !strcmp(whatptr, domain)) + || (!is_ip && tailmatch(whatptr, domain))) { + strstore(&co->domain, whatptr); + if(!co->domain) { +diff --git a/tests/data/test61 b/tests/data/test61 +index d2de279..e6dbbb9 100644 +--- a/tests/data/test61 ++++ b/tests/data/test61 +@@ -21,10 +21,11 @@ Set-Cookie: test=yes; httponly; domain=foo.com; expires=Fri Feb 2 11:56:27 GMT 2 + SET-COOKIE: test2=yes; domain=host.foo.com; expires=Fri Feb 2 11:56:27 GMT 2035 + Set-Cookie: test3=maybe; domain=foo.com; path=/moo; secure + Set-Cookie: test4=no; domain=nope.foo.com; path=/moo; secure + Set-Cookie: test5=name; domain=anything.com; path=/ ; secure + Set-Cookie: fake=fooledyou; domain=..com; path=/; ++Set-Cookie: supercookie=fooledyou; domain=.com; path=/;^M + Content-Length: 4 + + boo + + +-- +2.1.0 + diff --git a/meta/recipes-support/curl/curl/CVE-2014-3707.patch b/meta/recipes-support/curl/curl/CVE-2014-3707.patch new file mode 100644 index 0000000000..7ff38a65e8 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2014-3707.patch @@ -0,0 +1,416 @@ +From 3696fc1ba79d9b34660c44150be5e93ecf87dd9e Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Fri, 17 Oct 2014 12:59:32 +0200 +Subject: [PATCH] curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of + bounds + +When duplicating a handle, the data to post was duplicated using +strdup() when it could be binary and contain zeroes and it was not even +zero terminated! This caused read out of bounds crashes/segfaults. + +Since the lib/strdup.c file no longer is easily shared with the curl +tool with this change, it now uses its own version instead. + +Bug: http://curl.haxx.se/docs/adv_20141105.html +CVE: CVE-2014-3707 +Reported-By: Symeon Paraschoudis +--- + lib/formdata.c | 52 +++++++++------------------------------------------- + lib/strdup.c | 32 +++++++++++++++++++++++++++----- + lib/strdup.h | 3 ++- + lib/url.c | 22 +++++++++++++++++----- + lib/urldata.h | 11 +++++++++-- + src/Makefile.inc | 4 ++-- + src/tool_setup.h | 5 ++--- + src/tool_strdup.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ + src/tool_strdup.h | 30 ++++++++++++++++++++++++++++++ + 9 files changed, 145 insertions(+), 61 deletions(-) + create mode 100644 src/tool_strdup.c + create mode 100644 src/tool_strdup.h + +Index: curl-7.37.1/lib/formdata.c +=================================================================== +--- curl-7.37.1.orig/lib/formdata.c ++++ curl-7.37.1/lib/formdata.c +@@ -36,6 +36,7 @@ + #include "strequal.h" + #include "curl_memory.h" + #include "sendf.h" ++#include "strdup.h" + + #define _MPRINTF_REPLACE /* use our functions only */ + #include +@@ -214,46 +215,6 @@ static const char *ContentTypeForFilenam + + /*************************************************************************** + * +- * memdup() +- * +- * Copies the 'source' data to a newly allocated buffer buffer (that is +- * returned). Uses buffer_length if not null, else uses strlen to determine +- * the length of the buffer to be copied +- * +- * Returns the new pointer or NULL on failure. +- * +- ***************************************************************************/ +-static char *memdup(const char *src, size_t buffer_length) +-{ +- size_t length; +- bool add = FALSE; +- char *buffer; +- +- if(buffer_length) +- length = buffer_length; +- else if(src) { +- length = strlen(src); +- add = TRUE; +- } +- else +- /* no length and a NULL src pointer! */ +- return strdup(""); +- +- buffer = malloc(length+add); +- if(!buffer) +- return NULL; /* fail */ +- +- memcpy(buffer, src, length); +- +- /* if length unknown do null termination */ +- if(add) +- buffer[length] = '\0'; +- +- return buffer; +-} +- +-/*************************************************************************** +- * + * FormAdd() + * + * Stores a formpost parameter and builds the appropriate linked list. +@@ -682,9 +643,12 @@ CURLFORMcode FormAdd(struct curl_httppos + (form == first_form) ) { + /* Note that there's small risk that form->name is NULL here if the + app passed in a bad combo, so we better check for that first. */ +- if(form->name) ++ if(form->name) { + /* copy name (without strdup; possibly contains null characters) */ +- form->name = memdup(form->name, form->namelength); ++ form->name = Curl_memdup(form->name, form->namelength? ++ form->namelength: ++ strlen(form->name)+1); ++ } + if(!form->name) { + return_value = CURL_FORMADD_MEMORY; + break; +@@ -695,7 +659,7 @@ CURLFORMcode FormAdd(struct curl_httppos + HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER | + HTTPPOST_CALLBACK)) ) { + /* copy value (without strdup; possibly contains null characters) */ +- form->value = memdup(form->value, form->contentslength); ++ form->value = Curl_memdup(form->value, form->contentslength); + if(!form->value) { + return_value = CURL_FORMADD_MEMORY; + break; +Index: curl-7.37.1/lib/strdup.c +=================================================================== +--- curl-7.37.1.orig/lib/strdup.c ++++ curl-7.37.1/lib/strdup.c +@@ -5,7 +5,7 @@ + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * +- * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. ++ * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms +@@ -19,12 +19,12 @@ + * KIND, either express or implied. + * + ***************************************************************************/ +-/* +- * This file is 'mem-include-scan' clean. See test 1132. +- */ + #include "curl_setup.h" +- + #include "strdup.h" ++#include "curl_memory.h" ++ ++/* The last #include file should be: */ ++#include "memdebug.h" + + #ifndef HAVE_STRDUP + char *curlx_strdup(const char *str) +@@ -50,3 +50,25 @@ char *curlx_strdup(const char *str) + + } + #endif ++ ++/*************************************************************************** ++ * ++ * Curl_memdup(source, length) ++ * ++ * Copies the 'source' data to a newly allocated buffer (that is ++ * returned). Copies 'length' bytes. ++ * ++ * Returns the new pointer or NULL on failure. ++ * ++ ***************************************************************************/ ++char *Curl_memdup(const char *src, size_t length) ++{ ++ char *buffer = malloc(length); ++ if(!buffer) ++ return NULL; /* fail */ ++ ++ memcpy(buffer, src, length); ++ ++ /* if length unknown do null termination */ ++ return buffer; ++} +Index: curl-7.37.1/lib/strdup.h +=================================================================== +--- curl-7.37.1.orig/lib/strdup.h ++++ curl-7.37.1/lib/strdup.h +@@ -7,7 +7,7 @@ + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * +- * Copyright (C) 1998 - 2010, Daniel Stenberg, , et al. ++ * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms +@@ -26,5 +26,6 @@ + #ifndef HAVE_STRDUP + extern char *curlx_strdup(const char *str); + #endif ++char *Curl_memdup(const char *src, size_t buffer_length); + + #endif /* HEADER_CURL_STRDUP_H */ +Index: curl-7.37.1/lib/url.c +=================================================================== +--- curl-7.37.1.orig/lib/url.c ++++ curl-7.37.1/lib/url.c +@@ -125,6 +125,7 @@ int curl_win32_idn_to_ascii(const char * + #include "multihandle.h" + #include "pipeline.h" + #include "dotdot.h" ++#include "strdup.h" + + #define _MPRINTF_REPLACE /* use our functions only */ + #include +@@ -270,8 +271,9 @@ void Curl_freeset(struct SessionHandle * + { + /* Free all dynamic strings stored in the data->set substructure. */ + enum dupstring i; +- for(i=(enum dupstring)0; i < STRING_LAST; i++) ++ for(i=(enum dupstring)0; i < STRING_LAST; i++) { + Curl_safefree(data->set.str[i]); ++ } + + if(data->change.referer_alloc) { + Curl_safefree(data->change.referer); +@@ -356,14 +358,24 @@ CURLcode Curl_dupset(struct SessionHandl + memset(dst->set.str, 0, STRING_LAST * sizeof(char *)); + + /* duplicate all strings */ +- for(i=(enum dupstring)0; i< STRING_LAST; i++) { ++ for(i=(enum dupstring)0; i< STRING_LASTZEROTERMINATED; i++) { + r = setstropt(&dst->set.str[i], src->set.str[i]); + if(r != CURLE_OK) +- break; ++ return r; + } + +- /* If a failure occurred, freeing has to be performed externally. */ +- return r; ++ /* duplicate memory areas pointed to */ ++ i = STRING_COPYPOSTFIELDS; ++ if(src->set.postfieldsize && src->set.str[i]) { ++ /* postfieldsize is curl_off_t, Curl_memdup() takes a size_t ... */ ++ dst->set.str[i] = Curl_memdup(src->set.str[i], src->set.postfieldsize); ++ if(!dst->set.str[i]) ++ return CURLE_OUT_OF_MEMORY; ++ /* point to the new copy */ ++ dst->set.postfields = dst->set.str[i]; ++ } ++ ++ return CURLE_OK; + } + + /* +Index: curl-7.37.1/lib/urldata.h +=================================================================== +--- curl-7.37.1.orig/lib/urldata.h ++++ curl-7.37.1/lib/urldata.h +@@ -1359,7 +1359,6 @@ enum dupstring { + STRING_KRB_LEVEL, /* krb security level */ + STRING_NETRC_FILE, /* if not NULL, use this instead of trying to find + $HOME/.netrc */ +- STRING_COPYPOSTFIELDS, /* if POST, set the fields' values here */ + STRING_PROXY, /* proxy to use */ + STRING_SET_RANGE, /* range, if used */ + STRING_SET_REFERER, /* custom string for the HTTP referer field */ +@@ -1401,7 +1400,15 @@ enum dupstring { + + STRING_BEARER, /* , if used */ + +- /* -- end of strings -- */ ++ /* -- end of zero-terminated strings -- */ ++ ++ STRING_LASTZEROTERMINATED, ++ ++ /* -- below this are pointers to binary data that cannot be strdup'ed. ++ Each such pointer must be added manually to Curl_dupset() --- */ ++ ++ STRING_COPYPOSTFIELDS, /* if POST, set the fields' values here */ ++ + STRING_LAST /* not used, just an end-of-list marker */ + }; + +Index: curl-7.37.1/src/Makefile.inc +=================================================================== +--- curl-7.37.1.orig/src/Makefile.inc ++++ curl-7.37.1/src/Makefile.inc +@@ -11,7 +11,6 @@ + # the official API, but we re-use the code here to avoid duplication. + CURLX_CFILES = \ + ../lib/strtoofft.c \ +- ../lib/strdup.c \ + ../lib/rawstr.c \ + ../lib/nonblock.c \ + ../lib/warnless.c +@@ -19,7 +18,6 @@ CURLX_CFILES = \ + CURLX_HFILES = \ + ../lib/curl_setup.h \ + ../lib/strtoofft.h \ +- ../lib/strdup.h \ + ../lib/rawstr.h \ + ../lib/nonblock.h \ + ../lib/warnless.h +@@ -55,6 +53,7 @@ CURL_CFILES = \ + tool_panykey.c \ + tool_paramhlp.c \ + tool_parsecfg.c \ ++ tool_strdup.c \ + tool_setopt.c \ + tool_sleep.c \ + tool_urlglob.c \ +@@ -99,6 +98,7 @@ CURL_HFILES = \ + tool_setopt.h \ + tool_setup.h \ + tool_sleep.h \ ++ tool_strdup.h \ + tool_urlglob.h \ + tool_util.h \ + tool_version.h \ +Index: curl-7.37.1/src/tool_setup.h +=================================================================== +--- curl-7.37.1.orig/src/tool_setup.h ++++ curl-7.37.1/src/tool_setup.h +@@ -7,7 +7,7 @@ + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * +- * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. ++ * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms +@@ -67,8 +67,7 @@ + #endif + + #ifndef HAVE_STRDUP +-# include "strdup.h" +-# define strdup(ptr) curlx_strdup(ptr) ++# include "tool_strdup.h" + #endif + + #endif /* HEADER_CURL_TOOL_SETUP_H */ +Index: curl-7.37.1/src/tool_strdup.c +=================================================================== +--- /dev/null ++++ curl-7.37.1/src/tool_strdup.c +@@ -0,0 +1,47 @@ ++/*************************************************************************** ++ * _ _ ____ _ ++ * Project ___| | | | _ \| | ++ * / __| | | | |_) | | ++ * | (__| |_| | _ <| |___ ++ * \___|\___/|_| \_\_____| ++ * ++ * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. ++ * ++ * This software is licensed as described in the file COPYING, which ++ * you should have received as part of this distribution. The terms ++ * are also available at http://curl.haxx.se/docs/copyright.html. ++ * ++ * You may opt to use, copy, modify, merge, publish, distribute and/or sell ++ * copies of the Software, and permit persons to whom the Software is ++ * furnished to do so, under the terms of the COPYING file. ++ * ++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY ++ * KIND, either express or implied. ++ * ++ ***************************************************************************/ ++#include "strdup.h" ++ ++#ifndef HAVE_STRDUP ++char *strdup(const char *str) ++{ ++ size_t len; ++ char *newstr; ++ ++ if(!str) ++ return (char *)NULL; ++ ++ len = strlen(str); ++ ++ if(len >= ((size_t)-1) / sizeof(char)) ++ return (char *)NULL; ++ ++ newstr = malloc((len+1)*sizeof(char)); ++ if(!newstr) ++ return (char *)NULL; ++ ++ memcpy(newstr,str,(len+1)*sizeof(char)); ++ ++ return newstr; ++ ++} ++#endif +Index: curl-7.37.1/src/tool_strdup.h +=================================================================== +--- /dev/null ++++ curl-7.37.1/src/tool_strdup.h +@@ -0,0 +1,30 @@ ++#ifndef HEADER_TOOL_STRDUP_H ++#define HEADER_TOOL_STRDUP_H ++/*************************************************************************** ++ * _ _ ____ _ ++ * Project ___| | | | _ \| | ++ * / __| | | | |_) | | ++ * | (__| |_| | _ <| |___ ++ * \___|\___/|_| \_\_____| ++ * ++ * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. ++ * ++ * This software is licensed as described in the file COPYING, which ++ * you should have received as part of this distribution. The terms ++ * are also available at http://curl.haxx.se/docs/copyright.html. ++ * ++ * You may opt to use, copy, modify, merge, publish, distribute and/or sell ++ * copies of the Software, and permit persons to whom the Software is ++ * furnished to do so, under the terms of the COPYING file. ++ * ++ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY ++ * KIND, either express or implied. ++ * ++ ***************************************************************************/ ++#include "tool_setup.h" ++ ++#ifndef HAVE_STRDUP ++extern char *strdup(const char *str); ++#endif ++ ++#endif /* HEADER_TOOL_STRDUP_H */ diff --git a/meta/recipes-support/curl/curl/CVE-2014-8150.patch b/meta/recipes-support/curl/curl/CVE-2014-8150.patch new file mode 100644 index 0000000000..9a0828076c --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2014-8150.patch @@ -0,0 +1,29 @@ +From 4e2ac2afa94f014a2a015c48c678e2367a63ae82 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Thu, 25 Dec 2014 23:55:03 +0100 +Subject: [PATCH] url-parsing: reject CRLFs within URLs + +Bug: http://curl.haxx.se/docs/adv_20150108B.html +Reported-by: Andrey Labunets +--- + lib/url.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +Index: curl-7.37.1/lib/url.c +=================================================================== +--- curl-7.37.1.orig/lib/url.c ++++ curl-7.37.1/lib/url.c +@@ -3756,6 +3756,13 @@ static CURLcode parseurlandfillconn(stru + + *prot_missing = FALSE; + ++ /* We might pass the entire URL into the request so we need to make sure ++ * there are no bad characters in there.*/ ++ if(strpbrk(data->change.url, "\r\n")) { ++ failf(data, "Illegal characters found in URL"); ++ return CURLE_URL_MALFORMAT; ++ } ++ + /************************************************************* + * Parse the URL. + * diff --git a/meta/recipes-support/curl/curl/CVE-2015-3143.patch b/meta/recipes-support/curl/curl/CVE-2015-3143.patch new file mode 100644 index 0000000000..745e9456f3 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2015-3143.patch @@ -0,0 +1,38 @@ +From d7d1bc8f08eea1a85ab0d794bc1561659462d937 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Thu, 16 Apr 2015 13:26:46 +0200 +Subject: [PATCH] ConnectionExists: for NTLM re-use, require credentials to + match + +Upstream-Status: Backport + +CVE-2015-3143 + +Bug: http://curl.haxx.se/docs/adv_20150422A.html +Reported-by: Paras Sethia +Signed-off-by: Daniel Stenberg +Signed-off-by: Maxin B. John +--- + lib/url.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/url.c b/lib/url.c +index 018bb88..ee3d176 100644 +--- a/lib/url.c ++++ b/lib/url.c +@@ -3207,11 +3207,11 @@ ConnectionExists(struct SessionHandle *data, + strcmp(check->localdev, needle->localdev)) + continue; + } + + if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) || +- wantNTLMhttp) { ++ (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)) { + /* This protocol requires credentials per connection or is HTTP+NTLM, + so verify that we're using the same name and password as well */ + if(!strequal(needle->user, check->user) || + !strequal(needle->passwd, check->passwd)) { + /* one of them was different */ +-- +2.1.4 + diff --git a/meta/recipes-support/curl/curl/CVE-2015-3144.patch b/meta/recipes-support/curl/curl/CVE-2015-3144.patch new file mode 100644 index 0000000000..ca6d7448a1 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2015-3144.patch @@ -0,0 +1,45 @@ +From 6218ded6001ea330e589f92b6b2fa12777752b5d Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Thu, 16 Apr 2015 23:52:04 +0200 +Subject: [PATCH] fix_hostname: zero length host name caused -1 index offset +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Backport + +If a URL is given with a zero-length host name, like in "http://:80" or +just ":80", `fix_hostname()` will index the host name pointer with a -1 +offset (as it blindly assumes a non-zero length) and both read and +assign that address. + +CVE-2015-3144 + +Bug: http://curl.haxx.se/docs/adv_20150422D.html +Reported-by: Hanno Böck +Signed-off-by: Daniel Stenberg +Signed-off-by: Maxin B. John +--- + lib/url.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/url.c b/lib/url.c +index ee3d176..f033dbc 100644 +--- a/lib/url.c ++++ b/lib/url.c +@@ -3625,11 +3625,11 @@ static void fix_hostname(struct SessionHandle *data, + + /* set the name we use to display the host name */ + host->dispname = host->name; + + len = strlen(host->name); +- if(host->name[len-1] == '.') ++ if(len && (host->name[len-1] == '.')) + /* strip off a single trailing dot if present, primarily for SNI but + there's no use for it */ + host->name[len-1]=0; + + if(!is_ASCII_name(host->name)) { +-- +2.1.4 + diff --git a/meta/recipes-support/curl/curl/CVE-2015-3145.patch b/meta/recipes-support/curl/curl/CVE-2015-3145.patch new file mode 100644 index 0000000000..15a998289e --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2015-3145.patch @@ -0,0 +1,70 @@ +From ea595c516bc936a514753597aa6c59fd6eb0765e Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Thu, 16 Apr 2015 16:37:40 +0200 +Subject: [PATCH] cookie: cookie parser out of boundary memory access +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Backport + +The internal libcurl function called sanitize_cookie_path() that cleans +up the path element as given to it from a remote site or when read from +a file, did not properly validate the input. If given a path that +consisted of a single double-quote, libcurl would index a newly +allocated memory area with index -1 and assign a zero to it, thus +destroying heap memory it wasn't supposed to. + +CVE-2015-3145 + +Bug: http://curl.haxx.se/docs/adv_20150422C.html +Reported-by: Hanno Böck +Signed-off-by: Daniel Stenberg +Signed-off-by: Maxin B. John +--- + lib/cookie.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/lib/cookie.c b/lib/cookie.c +index 0864f6b..0127926 100644 +--- a/lib/cookie.c ++++ b/lib/cookie.c +@@ -223,15 +223,18 @@ static char *sanitize_cookie_path(const char *cookie_path) + char *new_path = strdup(cookie_path); + if(!new_path) + return NULL; + + /* some stupid site sends path attribute with '"'. */ ++ len = strlen(new_path); + if(new_path[0] == '\"') { +- memmove((void *)new_path, (const void *)(new_path + 1), strlen(new_path)); ++ memmove((void *)new_path, (const void *)(new_path + 1), len); ++ len--; + } +- if(new_path[strlen(new_path) - 1] == '\"') { +- new_path[strlen(new_path) - 1] = 0x0; ++ if(len && (new_path[len - 1] == '\"')) { ++ new_path[len - 1] = 0x0; ++ len--; + } + + /* RFC6265 5.2.4 The Path Attribute */ + if(new_path[0] != '/') { + /* Let cookie-path be the default-path. */ +@@ -239,12 +242,11 @@ static char *sanitize_cookie_path(const char *cookie_path) + new_path = strdup("/"); + return new_path; + } + + /* convert /hoge/ to /hoge */ +- len = strlen(new_path); +- if(1 < len && new_path[len - 1] == '/') { ++ if(len && new_path[len - 1] == '/') { + new_path[len - 1] = 0x0; + } + + return new_path; + } +-- +2.1.4 + diff --git a/meta/recipes-support/curl/curl/CVE-2015-3153.patch b/meta/recipes-support/curl/curl/CVE-2015-3153.patch new file mode 100644 index 0000000000..089020a842 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2015-3153.patch @@ -0,0 +1,90 @@ +From 69a2e8d7ec581695a62527cb2252e7350f314ffa Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Thu, 23 Apr 2015 15:58:21 +0200 +Subject: [PATCH] CURLOPT_HEADEROPT: default to separate + +Make the HTTP headers separated by default for improved security and +reduced risk for information leakage. + +Bug: http://curl.haxx.se/docs/adv_20150429.html +Reported-by: Yehezkel Horowitz, Oren Souroujon +--- + docs/libcurl/opts/CURLOPT_HEADEROPT.3 | 12 ++++++------ + lib/url.c | 1 + + tests/data/test1527 | 2 +- + tests/data/test287 | 2 +- + tests/libtest/lib1527.c | 1 + + 5 files changed, 10 insertions(+), 8 deletions(-) + +Index: curl-7.37.1/docs/libcurl/opts/CURLOPT_HEADEROPT.3 +=================================================================== +--- curl-7.37.1.orig/docs/libcurl/opts/CURLOPT_HEADEROPT.3 ++++ curl-7.37.1/docs/libcurl/opts/CURLOPT_HEADEROPT.3 +@@ -5,7 +5,7 @@ + .\" * | (__| |_| | _ <| |___ + .\" * \___|\___/|_| \_\_____| + .\" * +-.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, , et al. ++.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, , et al. + .\" * + .\" * This software is licensed as described in the file COPYING, which + .\" * you should have received as part of this distribution. The terms +@@ -44,7 +44,7 @@ headers. When doing CONNECT, libcurl wil + headers only do the proxy and then \fICURLOPT_HTTPHEADER(3)\fP headers only to + the server. + .SH DEFAULT +-CURLHEADER_UNIFIED ++CURLHEADER_SEPARATE (changed in 7.42.1, ased CURLHEADER_UNIFIED before then) + .SH PROTOCOLS + HTTP + .SH EXAMPLE +Index: curl-7.37.1/tests/data/test1527 +=================================================================== +--- curl-7.37.1.orig/tests/data/test1527 ++++ curl-7.37.1/tests/data/test1527 +@@ -45,7 +45,7 @@ http-proxy + lib1527 + + +-Check same headers are generated without CURLOPT_PROXYHEADER ++Check same headers are generated with CURLOPT_HEADEROPT == CURLHEADER_UNIFIED + + + http://the.old.moo.1527:%HTTPPORT/1527 %HOSTIP:%PROXYPORT +Index: curl-7.37.1/tests/data/test287 +=================================================================== +--- curl-7.37.1.orig/tests/data/test287 ++++ curl-7.37.1/tests/data/test287 +@@ -28,7 +28,7 @@ http + HTTP proxy CONNECT with custom User-Agent header + + +-http://test.remote.example.com.287:%HTTPPORT/path/287 -H "User-Agent: looser/2007" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel ++http://test.remote.example.com.287:%HTTPPORT/path/287 -H "User-Agent: looser/2015" --proxy http://%HOSTIP:%HTTPPORT --proxytunnel --proxy-header "User-Agent: looser/2007" + + + +Index: curl-7.37.1/tests/libtest/lib1527.c +=================================================================== +--- curl-7.37.1.orig/tests/libtest/lib1527.c ++++ curl-7.37.1/tests/libtest/lib1527.c +@@ -83,6 +83,7 @@ int test(char *URL) + test_setopt(curl, CURLOPT_READFUNCTION, read_callback); + test_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1L); + test_setopt(curl, CURLOPT_INFILESIZE, strlen(data)); ++ test_setopt(curl, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED); + + res = curl_easy_perform(curl); + +Index: curl-7.37.1/lib/url.c +=================================================================== +--- curl-7.37.1.orig/lib/url.c ++++ curl-7.37.1/lib/url.c +@@ -584,6 +584,7 @@ CURLcode Curl_init_userdefined(struct Us + set->ssl_enable_alpn = TRUE; + + set->expect_100_timeout = 1000L; /* Wait for a second by default. */ ++ set->sep_headers = TRUE; /* separated header lists by default */ + return res; + } + diff --git a/meta/recipes-support/curl/curl/configure_ac.patch b/meta/recipes-support/curl/curl/configure_ac.patch new file mode 100644 index 0000000000..b8bd304d71 --- /dev/null +++ b/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/meta/recipes-support/curl/curl/pkgconfig_fix.patch b/meta/recipes-support/curl/curl/pkgconfig_fix.patch new file mode 100644 index 0000000000..5d8769d522 --- /dev/null +++ b/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/meta/recipes-support/curl/curl_7.37.1.bb b/meta/recipes-support/curl/curl_7.37.1.bb new file mode 100644 index 0000000000..2f4da9706c --- /dev/null +++ b/meta/recipes-support/curl/curl_7.37.1.bb @@ -0,0 +1,66 @@ +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 \ + file://CVE-2014-3613.patch \ + file://CVE-2014-3620.patch \ + file://CVE-2015-3143.patch \ + file://CVE-2015-3144.patch \ + file://CVE-2015-3145.patch \ + file://CVE-2014-3707.patch \ + file://CVE-2014-8150.patch \ + file://CVE-2015-3153.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] = "95c627abcf6494f5abe55effe7cd6a57" +SRC_URI[sha256sum] = "c3ef3cd148f3778ddbefb344117d7829db60656efe1031f9e3065fc0faa25136" + +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" + +EXTRA_OECONF = "--without-libidn \ + --enable-crypto-auth \ + --disable-ldap \ + --disable-ldaps \ + --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \ +" + +do_install_append() { + oe_multilib_header curl/curlbuild.h +} + +PACKAGES =+ "lib${BPN} lib${BPN}-dev lib${BPN}-staticdev lib${BPN}-doc" + +FILES_lib${BPN} = "${libdir}/lib*.so.*" +RRECOMMENDS_lib${BPN} += "ca-certificates" +FILES_lib${BPN}-dev = "${includedir} \ + ${libdir}/lib*.so \ + ${libdir}/lib*.la \ + ${libdir}/pkgconfig \ + ${datadir}/aclocal \ + ${bindir}/*-config" +FILES_lib${BPN}-staticdev = "${libdir}/lib*.a" +FILES_lib${BPN}-doc = "${mandir}/man3 \ + ${mandir}/man1/curl-config.1" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch b/meta/recipes-support/db/db/arm-thumb-mutex_db5.patch new file mode 100644 index 0000000000..34e8db84df --- /dev/null +++ b/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/meta/recipes-support/db/db/fix-parallel-build.patch b/meta/recipes-support/db/db/fix-parallel-build.patch new file mode 100644 index 0000000000..2c7f1e186b --- /dev/null +++ b/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 + +--- 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/meta/recipes-support/db/db_5.3.28.bb b/meta/recipes-support/db/db_5.3.28.bb new file mode 100644 index 0000000000..e8b814e06b --- /dev/null +++ b/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/meta/recipes-support/db/db_6.0.30.bb b/meta/recipes-support/db/db_6.0.30.bb new file mode 100644 index 0000000000..47fb296daa --- /dev/null +++ b/meta/recipes-support/db/db_6.0.30.bb @@ -0,0 +1,115 @@ +# 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" + +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] = "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/meta/recipes-support/enchant/enchant_1.6.0.bb b/meta/recipes-support/enchant/enchant_1.6.0.bb new file mode 100644 index 0000000000..97a47614cd --- /dev/null +++ b/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/meta/recipes-support/gdbm/files/ptest.patch b/meta/recipes-support/gdbm/files/ptest.patch new file mode 100644 index 0000000000..65236fb48b --- /dev/null +++ b/meta/recipes-support/gdbm/files/ptest.patch @@ -0,0 +1,36 @@ +Add install-ptest rules. + +Signed-off-by: Josep Puigdemont +Signed-off-by: Maxin B. John +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/meta/recipes-support/gdbm/files/run-ptest b/meta/recipes-support/gdbm/files/run-ptest new file mode 100755 index 0000000000..615da8444b --- /dev/null +++ b/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/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch new file mode 100644 index 0000000000..770d8f66b9 --- /dev/null +++ b/meta/recipes-support/gdbm/gdbm-1.8.3/ldflags.patch @@ -0,0 +1,22 @@ +Obey LDFLAGS + +Signed-off-by: Christopher Larson +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/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/libtool-mode.patch new file mode 100644 index 0000000000..0f9d04f4a1 --- /dev/null +++ b/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/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch b/meta/recipes-support/gdbm/gdbm-1.8.3/makefile.patch new file mode 100644 index 0000000000..369145c410 --- /dev/null +++ b/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/meta/recipes-support/gdbm/gdbm_1.11.bb b/meta/recipes-support/gdbm/gdbm_1.11.bb new file mode 100644 index 0000000000..adf8c5bd38 --- /dev/null +++ b/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/meta/recipes-support/gdbm/gdbm_1.8.3.bb b/meta/recipes-support/gdbm/gdbm_1.8.3.bb new file mode 100644 index 0000000000..2331d1df3a --- /dev/null +++ b/meta/recipes-support/gdbm/gdbm_1.8.3.bb @@ -0,0 +1,19 @@ +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" diff --git a/meta/recipes-support/gmp/gmp.inc b/meta/recipes-support/gmp/gmp.inc new file mode 100644 index 0000000000..6aedc85f58 --- /dev/null +++ b/meta/recipes-support/gmp/gmp.inc @@ -0,0 +1,29 @@ +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/" +LICENSE = "GPLv3 LGPLv3" + +REVISION = "" + +SRC_URI = "ftp://ftp.gmplib.org/pub/gmp-${PV}/gmp-${PV}${REVISION}.tar.bz2 \ + file://configure.patch \ + file://amd64.patch " + +inherit autotools texinfo + +ARM_INSTRUCTION_SET = "arm" + +acpaths = "" + +BBCLASSEXTEND = "native nativesdk" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline" + +EXTRA_OECONF += " --enable-cxx=detect" + +PACKAGES =+ "libgmpxx" +FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}" + +SSTATE_SCAN_FILES += "gmp.h" diff --git a/meta/recipes-support/gmp/gmp/amd64.patch b/meta/recipes-support/gmp/gmp/amd64.patch new file mode 100644 index 0000000000..564d12d42b --- /dev/null +++ b/meta/recipes-support/gmp/gmp/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/meta/recipes-support/gmp/gmp/append_user_provided_flags.patch b/meta/recipes-support/gmp/gmp/append_user_provided_flags.patch new file mode 100644 index 0000000000..ae1386c4c1 --- /dev/null +++ b/meta/recipes-support/gmp/gmp/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 + +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() < + +--- + 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(,<\`$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 <&AS_MESSAGE_LOG_FD() <&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 <&AS_MESSAGE_LOG_FD() < + +This patch with pulled from gmp. +https://gmplib.org/repo/gmp/rev/4a6d258b467f +Upstream-Status: Backport + +# HG changeset patch +# User Torbjorn Granlund +# 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/meta/recipes-support/gmp/gmp/use-includedir.patch b/meta/recipes-support/gmp/gmp/use-includedir.patch new file mode 100644 index 0000000000..74904a2530 --- /dev/null +++ b/meta/recipes-support/gmp/gmp/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/meta/recipes-support/gmp/gmp_6.0.0.bb b/meta/recipes-support/gmp/gmp_6.0.0.bb new file mode 100644 index 0000000000..6218491142 --- /dev/null +++ b/meta/recipes-support/gmp/gmp_6.0.0.bb @@ -0,0 +1,14 @@ +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_append = " 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" diff --git a/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch new file mode 100644 index 0000000000..840666f302 --- /dev/null +++ b/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 +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 + +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/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb new file mode 100644 index 0000000000..c688e9d1d7 --- /dev/null +++ b/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb @@ -0,0 +1,19 @@ +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-brokensep pkgconfig + +PACKAGECONFIG ??= "" +PACKAGECONFIG[journald] = "--with-systemd-journal,--without-systemd-journal,systemd,systemd" diff --git a/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch new file mode 100644 index 0000000000..c9addca28e --- /dev/null +++ b/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 +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 +-- + +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/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch new file mode 100644 index 0000000000..b29ede4233 --- /dev/null +++ b/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/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch new file mode 100644 index 0000000000..b1a22f5853 --- /dev/null +++ b/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/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch new file mode 100644 index 0000000000..8b5d9a1693 --- /dev/null +++ b/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch @@ -0,0 +1,63 @@ +commit f0b33b6fb8e0586e9584a7a409dcc31263776a67 +Author: Werner Koch +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 + +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/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch new file mode 100644 index 0000000000..e005ac658f --- /dev/null +++ b/meta/recipes-support/gnupg/gnupg-1.4.7/configure.patch @@ -0,0 +1,17 @@ + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Saul Wold + +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/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/curl_typeof_fix_backport.patch new file mode 100644 index 0000000000..e5fb24aa63 --- /dev/null +++ b/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 + +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/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/long-long-thumb.patch new file mode 100644 index 0000000000..2855cab24b --- /dev/null +++ b/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/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch b/meta/recipes-support/gnupg/gnupg-1.4.7/mips_gcc4.4.patch new file mode 100644 index 0000000000..9a03b2b705 --- /dev/null +++ b/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/meta/recipes-support/gnupg/gnupg/pkgconfig.patch b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch new file mode 100644 index 0000000000..ae92392dae --- /dev/null +++ b/meta/recipes-support/gnupg/gnupg/pkgconfig.patch @@ -0,0 +1,86 @@ +Use pkg-config to find pth instead of pth-config. + +Upstream-Status: Rejected +[not submitted but they've been clear they don't want a pkg-config dependency] + +RP 2014/5/22 + +Index: gnupg-2.0.22/m4/gnupg-pth.m4 +=================================================================== +--- gnupg-2.0.22.orig/m4/gnupg-pth.m4 2013-10-04 12:32:53.000000000 +0000 ++++ gnupg-2.0.22/m4/gnupg-pth.m4 2014-05-13 21:33:21.000000000 +0000 +@@ -17,33 +17,9 @@ + # 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 +29,9 @@ + _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_init ();]])], +@@ -81,23 +59,11 @@ + # + AC_DEFUN([GNUPG_PATH_PTH], ++[ +-[ AC_ARG_WITH(pth-prefix, +- AC_HELP_STRING([--with-pth-prefix=PFX], +- [prefix where GNU Pth is installed]), +- 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`" ++ 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/meta/recipes-support/gnupg/gnupg_1.4.7.bb b/meta/recipes-support/gnupg/gnupg_1.4.7.bb new file mode 100644 index 0000000000..aef515d534 --- /dev/null +++ b/meta/recipes-support/gnupg/gnupg_1.4.7.bb @@ -0,0 +1,102 @@ +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 \ + " + +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/meta/recipes-support/gnupg/gnupg_2.0.26.bb b/meta/recipes-support/gnupg/gnupg_2.0.26.bb new file mode 100644 index 0000000000..92dd3bd643 --- /dev/null +++ b/meta/recipes-support/gnupg/gnupg_2.0.26.bb @@ -0,0 +1,39 @@ +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 = "${PTH} libassuan libksba zlib bzip2 readline libgcrypt" +PTH = "pth" +PTH_libc-uclibc = "npth" + +inherit autotools gettext texinfo pkgconfig + +SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \ + file://pkgconfig.patch" + +SRC_URI[md5sum] = "fa7e704aad33eb114d1840164455aec1" +SRC_URI[sha256sum] = "7758e30dc382ae7a7167ed41b7f936aa50af5ea2d6fccdef663b5b750b65b8e0" + +EXTRA_OECONF = "--disable-ldap \ + --disable-ccid-driver \ + --without-libcurl \ + --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 +} diff --git a/meta/recipes-support/gnutls/gnutls.inc b/meta/recipes-support/gnutls/gnutls.inc new file mode 100644 index 0000000000..12b26cc97d --- /dev/null +++ b/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 = "zlib 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-brokensep texinfo binconfig pkgconfig gettext lib_package + +EXTRA_OECONF="--disable-rpath \ + --with-included-libtasn1 \ + --enable-local-libopts \ + --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \ + --with-libz-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 ??= "" +PACKAGECONFIG[tpm] = "--with-tpm, --without-tpm, trousers" + +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/meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch b/meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch new file mode 100644 index 0000000000..8824729d2f --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls/better-fix-for-double-free-CVE-2015-3308.patch @@ -0,0 +1,65 @@ +From 053ae65403216acdb0a4e78b25ad66ee9f444f02 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos +Date: Sat, 28 Mar 2015 22:41:03 +0100 +Subject: [PATCH] Better fix for the double free in dist point parsing + +Fixes CVE-2015-3308 +Upstream-Status: Backport + +Signed-off-by: Sona Sarmadi +--- + lib/x509/x509_ext.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c +index 2e69ed0..f974b02 100644 +--- a/lib/x509/x509_ext.c ++++ b/lib/x509/x509_ext.c +@@ -2287,7 +2287,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, + int len, ret; + uint8_t reasons[2]; + unsigned i, type, rflags, j; +- gnutls_datum_t san; ++ gnutls_datum_t san = {NULL, 0}; + + result = asn1_create_element + (_gnutls_get_pkix(), "PKIX1.CRLDistributionPoints", &c2); +@@ -2310,9 +2310,6 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, + + i = 0; + do { +- san.data = NULL; +- san.size = 0; +- + snprintf(name, sizeof(name), "?%u.reasons", (unsigned)i + 1); + + len = sizeof(reasons); +@@ -2337,6 +2334,9 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, + + j = 0; + do { ++ san.data = NULL; ++ san.size = 0; ++ + ret = + _gnutls_parse_general_name2(c2, name, j, &san, + &type, 0); +@@ -2351,6 +2351,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, + ret = crl_dist_points_set(cdp, type, &san, rflags); + if (ret < 0) + break; ++ san.data = NULL; /* it is now in cdp */ + + j++; + } while (ret >= 0); +@@ -2360,6 +2361,7 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, + + if (ret < 0 && ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { + gnutls_assert(); ++ gnutls_free(san.data); + goto cleanup; + } + +-- +1.9.1 + diff --git a/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch b/meta/recipes-support/gnutls/gnutls/correct_rpl_gettimeofday_signature.patch new file mode 100644 index 0000000000..5e452c52e7 --- /dev/null +++ b/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 +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 + +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/meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch b/meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch new file mode 100644 index 0000000000..628103ff6b --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls/eliminated-double-free-CVE-2015-3308.patch @@ -0,0 +1,33 @@ +From d6972be33264ecc49a86cd0958209cd7363af1e9 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos +Date: Mon, 23 Mar 2015 22:55:29 +0100 +Subject: [PATCH] eliminated double-free in the parsing of dist points +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Reported by Robert Święcki. + +Fixes CVE-2015-3308 +Upstream-Status: Backport + +Signed-off-by: Sona Sarmadi +--- + lib/x509/x509_ext.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c +index c8d5867..6f09438 100644 +--- a/lib/x509/x509_ext.c ++++ b/lib/x509/x509_ext.c +@@ -2360,7 +2360,6 @@ int gnutls_x509_ext_import_crl_dist_points(const gnutls_datum_t * ext, + + if (ret < 0 && ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { + gnutls_assert(); +- gnutls_free(san.data); + goto cleanup; + } + +-- +1.9.1 + diff --git a/meta/recipes-support/gnutls/gnutls_3.3.5.bb b/meta/recipes-support/gnutls/gnutls_3.3.5.bb new file mode 100644 index 0000000000..9f26470f41 --- /dev/null +++ b/meta/recipes-support/gnutls/gnutls_3.3.5.bb @@ -0,0 +1,9 @@ +require gnutls.inc + +SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \ + file://eliminated-double-free-CVE-2015-3308.patch \ + file://better-fix-for-double-free-CVE-2015-3308.patch \ + " + +SRC_URI[md5sum] = "1f396dcf3c14ea67de7243821006d1a2" +SRC_URI[sha256sum] = "48f34ae032692c498e782e9f1369506572be40ecf7f3f3604b0b00bad1b10477" diff --git a/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch b/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch new file mode 100644 index 0000000000..2ac89f3b32 --- /dev/null +++ b/meta/recipes-support/gnutls/libtasn1/dont-depend-on-help2man.patch @@ -0,0 +1,14 @@ +Upstream-Status: Inappropriate + +Signed-off-by: Marko Lindqvist +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/meta/recipes-support/gnutls/libtasn1/libtasn1-CVE-2015-3622.patch b/meta/recipes-support/gnutls/libtasn1/libtasn1-CVE-2015-3622.patch new file mode 100644 index 0000000000..0989ef6a21 --- /dev/null +++ b/meta/recipes-support/gnutls/libtasn1/libtasn1-CVE-2015-3622.patch @@ -0,0 +1,44 @@ +From f979435823a02f842c41d49cd41cc81f25b5d677 Mon Sep 17 00:00:00 2001 +From: Nikos Mavrogiannopoulos +Date: Mon, 20 Apr 2015 14:56:27 +0200 +Subject: [PATCH] _asn1_extract_der_octet: prevent past of boundary access + +Fixes CVE-2015-3622. +Upstream-Status: Backport + +Reported by Hanno Böck. +--- + lib/decoding.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/lib/decoding.c b/lib/decoding.c +index 7fbd931..42ddc6b 100644 +--- a/lib/decoding.c ++++ b/lib/decoding.c +@@ -732,6 +732,7 @@ _asn1_extract_der_octet (asn1_node node, const unsigned char *der, + return ASN1_DER_ERROR; + + counter = len3 + 1; ++ DECR_LEN(der_len, len3); + + if (len2 == -1) + counter_end = der_len - 2; +@@ -740,6 +741,7 @@ _asn1_extract_der_octet (asn1_node node, const unsigned char *der, + + while (counter < counter_end) + { ++ DECR_LEN(der_len, 1); + len2 = asn1_get_length_der (der + counter, der_len, &len3); + + if (IS_ERR(len2, flags)) +@@ -764,7 +766,6 @@ _asn1_extract_der_octet (asn1_node node, const unsigned char *der, + len2 = 0; + } + +- DECR_LEN(der_len, 1); + counter += len2 + len3 + 1; + } + +-- +1.7.2.5 + diff --git a/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch b/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch new file mode 100644 index 0000000000..5540bef940 --- /dev/null +++ b/meta/recipes-support/gnutls/libtasn1/libtasn1_fix_for_automake_1.12.patch @@ -0,0 +1,28 @@ +Upstream-Status: Pending + +This patch avoids following issues with automake 1.12: + +| automake: warnings are treated as errors +| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libtasn1.la': linking libtool libraries using a non-POSIX +| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac' + +Signed-Off-By: Nitin A Kamble +2012/05/02 + + +Index: libtasn1-2.11/configure.ac +=================================================================== +--- libtasn1-2.11.orig/configure.ac ++++ libtasn1-2.11/configure.ac +@@ -38,6 +38,11 @@ lgl_EARLY + AC_PROG_YACC + AC_PROG_LN_S + ++# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it ++m4_pattern_allow([AM_PROG_AR]) ++AM_PROG_AR ++ ++ + dnl Checks for programs. + AC_PROG_INSTALL + AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir) diff --git a/meta/recipes-support/gnutls/libtasn1_4.0.bb b/meta/recipes-support/gnutls/libtasn1_4.0.bb new file mode 100644 index 0000000000..16cf4d6812 --- /dev/null +++ b/meta/recipes-support/gnutls/libtasn1_4.0.bb @@ -0,0 +1,22 @@ +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://libtasn1_fix_for_automake_1.12.patch \ + file://dont-depend-on-help2man.patch \ + file://libtasn1-CVE-2015-3622.patch \ + " + +SRC_URI[md5sum] = "d3d2d9bce3b6668b9827a9df52635be1" +SRC_URI[sha256sum] = "41d044f7644bdd1c4f8a5c15ac1885ca1fcbf32f5f6dd4760a19278b979857fe" + +inherit autotools texinfo binconfig lib_package + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/disable_gpgconf_check.patch b/meta/recipes-support/gpgme/gpgme-1.4.3/disable_gpgconf_check.patch new file mode 100644 index 0000000000..df0953069c --- /dev/null +++ b/meta/recipes-support/gpgme/gpgme-1.4.3/disable_gpgconf_check.patch @@ -0,0 +1,39 @@ +From 1.2.0, gpgme will check if gpgconf & g13(from 1.3.0) exist, and cause +configure failure if not founding them in cross-compile environment. We can +add the gnupg-native to get them, but still have some issues: + +1. need add new package: libksba, update libassuan(not in sato), and extend + native support in some other packages(libgcrypt, libgpg-error, pth...) +2. Even we have gnupg, the g13 only exist in development branch, so that we + still have the g13 check failure in configure. + +I have searched the compile log, and found gpgconf/g13 are not used. So use a +simple method here, throw a warning mesg rather than an error here just like in +non-cross-compile environment. + +Signed-off-by: Zhai Edwin + +Upstream-Status: Inappropriate [embedded specific] + +Index: gpgme-1.3.0/configure.ac +=================================================================== +--- gpgme-1.3.0.orig/configure.ac 2010-07-21 09:38:09.000000000 +0800 ++++ gpgme-1.3.0/configure.ac 2010-07-21 09:39:19.000000000 +0800 +@@ -574,7 +574,7 @@ + *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it + ***]) + else +- AC_MSG_ERROR([ ++ AC_MSG_WARN([ + *** + *** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH + ***]) +@@ -670,7 +670,7 @@ + *** Could not find g13, install g13 or use --with-g13=PATH to enable it + ***]) + else +- AC_MSG_ERROR([ ++ AC_MSG_WARN([ + *** + *** Can not determine path to g13 when cross-compiling, use --with-g13=PATH + ***]) diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme-fix-CVE-2014-3564.patch b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme-fix-CVE-2014-3564.patch new file mode 100644 index 0000000000..c728f58658 --- /dev/null +++ b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme-fix-CVE-2014-3564.patch @@ -0,0 +1,56 @@ +Upstream-Status: Backport + +Backport patch to fix CVE-2014-3564. + +http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=2cbd76f7911fc215845e89b50d6af5ff4a83dd77 + +Signed-off-by: Kai Kang +--- +From 2cbd76f7911fc215845e89b50d6af5ff4a83dd77 Mon Sep 17 00:00:00 2001 +From: Werner Koch +Date: Wed, 30 Jul 2014 11:04:55 +0200 +Subject: [PATCH 1/1] Fix possible realloc overflow for gpgsm and uiserver + engines. + +After a realloc (realloc is also used for initial alloc) the allocated +size if the buffer is not correctly recorded. Thus an overflow can be +introduced by receiving data with different line lengths in a specific +order. This is not easy exploitable because libassuan constructs the +line. However a crash has been reported and thus it might be possible +to constructs an exploit. + +CVE-id: CVE-2014-3564 +Reported-by: Tomáš Trnka +--- + src/engine-gpgsm.c | 2 +- + src/engine-uiserver.c | 2 +- + 3 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/engine-gpgsm.c b/src/engine-gpgsm.c +index 8ec1598..3a83757 100644 +--- a/src/engine-gpgsm.c ++++ b/src/engine-gpgsm.c +@@ -836,7 +836,7 @@ status_handler (void *opaque, int fd) + else + { + *aline = newline; +- gpgsm->colon.attic.linesize += linelen + 1; ++ gpgsm->colon.attic.linesize = *alinelen + linelen + 1; + } + } + if (!err) +diff --git a/src/engine-uiserver.c b/src/engine-uiserver.c +index 2738c36..a7184b7 100644 +--- a/src/engine-uiserver.c ++++ b/src/engine-uiserver.c +@@ -698,7 +698,7 @@ status_handler (void *opaque, int fd) + else + { + *aline = newline; +- uiserver->colon.attic.linesize += linelen + 1; ++ uiserver->colon.attic.linesize = *alinelen + linelen + 1; + } + } + if (!err) +-- +2.1.4 diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc b/meta/recipes-support/gpgme/gpgme-1.4.3/gpgme.pc new file mode 100644 index 0000000000..30a4d56d6e --- /dev/null +++ b/meta/recipes-support/gpgme/gpgme-1.4.3/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/meta/recipes-support/gpgme/gpgme_1.4.3.bb b/meta/recipes-support/gpgme/gpgme_1.4.3.bb new file mode 100644 index 0000000000..f16677e96e --- /dev/null +++ b/meta/recipes-support/gpgme/gpgme_1.4.3.bb @@ -0,0 +1,42 @@ +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=dccb4bb624011e36513c61ef0422d054 \ + file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d" + +SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-${PV}.tar.bz2 \ + file://disable_gpgconf_check.patch \ + file://gpgme.pc \ + file://gpgme-fix-CVE-2014-3564.patch \ + " + +SRC_URI[md5sum] = "334e524cffa8af4e2f43ae8afe585672" +SRC_URI[sha256sum] = "2d1cc12411753752d9c5b9037e6fd3fd363517af720154768cc7b46b60120496" + +DEPENDS = "libgpg-error libassuan" + +EXTRA_OECONF = "--with-gpg=${bindir}/gpg --without-gpgsm" + +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/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc new file mode 100644 index 0000000000..15d002dbef --- /dev/null +++ b/meta/recipes-support/icu/icu.inc @@ -0,0 +1,59 @@ +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}" + +PARALLEL_MAKE = "" +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}" + +# ICU puts custom m4 autoconf functions in aclocal.m4. +# However, this file is deleted in our build system. +# To make it work, we copy aclocal.m4 to acinclude.m4. +# This is a bug of ICU. See bug reference: +# http://bugs.icu-project.org/trac/ticket/9790 +do_configure_prepend() { + [ -f ${S}/acinclude.m4 ] || cp ${S}/aclocal.m4 ${S}/acinclude.m4 +} + +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/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch b/meta/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch new file mode 100644 index 0000000000..2968d571bb --- /dev/null +++ b/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 +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 +--- + 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/meta/recipes-support/icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch b/meta/recipes-support/icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch new file mode 100644 index 0000000000..2460357f10 --- /dev/null +++ b/meta/recipes-support/icu/icu/icu-CVE-2014-8146-CVE-2014-8147.patch @@ -0,0 +1,49 @@ +icu: CVE-2014-8146-CVE-2014-8147 + +CVE-2014-8146 icu: heap overflow via incorrect isolateCount +CVE-2014-8147 icu: integer truncation in the resolveImplicitLevels function + +References: +[1] https://github.com/pedrib/PoC/raw/master/generic/i-c-u-fail.7z +[2] https://www.kb.cert.org/vuls/id/602540 +[3] http://bugs.icu-project.org/trac/changeset/37080 +[4] http://bugs.icu-project.org/trac/changeset/37162 + +Upstream-Status: Backport + +Signed-off-by: Sona Sarmadi +--- +diff -ruN a/common/ubidi.c b/common/ubidi.c +--- a/common/ubidi.c 2014-10-03 18:11:20.000000000 +0200 ++++ b/common/ubidi.c 2015-08-28 08:22:39.455906194 +0200 +@@ -2138,7 +2138,7 @@ + /* The isolates[] entries contain enough information to + resume the bidi algorithm in the same state as it was + when it was interrupted by an isolate sequence. */ +- if(dirProps[start]==PDI) { ++ if(dirProps[start]==PDI && pBiDi->isolateCount >= 0) { + levState.startON=pBiDi->isolates[pBiDi->isolateCount].startON; + start1=pBiDi->isolates[pBiDi->isolateCount].start1; + stateImp=pBiDi->isolates[pBiDi->isolateCount].stateImp; +diff -ruN a/common/ubidiimp.h b/common/ubidiimp.h +--- a/common/ubidiimp.h 2014-10-03 18:11:16.000000000 +0200 ++++ b/common/ubidiimp.h 2015-08-28 08:28:24.069163845 +0200 +@@ -1,7 +1,7 @@ + /* + ****************************************************************************** + * +-* Copyright (C) 1999-2014, International Business Machines ++* Copyright (C) 1999-2015, International Business Machines + * Corporation and others. All Rights Reserved. + * + ****************************************************************************** +@@ -184,8 +184,8 @@ + typedef struct Isolate { + int32_t startON; + int32_t start1; ++ int32_t state; + int16_t stateImp; +- int16_t state; + } Isolate; + + typedef struct Run { diff --git a/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch b/meta/recipes-support/icu/icu/icu-pkgdata-large-cmd.patch new file mode 100644 index 0000000000..6e40659227 --- /dev/null +++ b/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 +--- + 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/meta/recipes-support/icu/icu_53.1.bb b/meta/recipes-support/icu/icu_53.1.bb new file mode 100644 index 0000000000..2906e8f864 --- /dev/null +++ b/meta/recipes-support/icu/icu_53.1.bb @@ -0,0 +1,22 @@ +require icu.inc + +LIC_FILES_CHKSUM = "file://../license.html;md5=8b139ac5b93769623bd343318048238c" + +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 \ + file://icu-CVE-2014-8146-CVE-2014-8147.patch \ + " + +SRC_URI_append_class-target = "\ + file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \ + " + +SRC_URI[md5sum] = "b73baa6fbdfef197608d1f69300919b9" +SRC_URI[sha256sum] = "6fa74fb5aac070c23eaba1711a7178fe582c59867484c5ec07c49002787a9a28" diff --git a/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch b/meta/recipes-support/libassuan/libassuan/libassuan-add-pkgconfig-support.patch new file mode 100644 index 0000000000..f130d85652 --- /dev/null +++ b/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: Rejected +Signed-off-by: Chen Qi +Signed-off-by: Constantin Musca + +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/meta/recipes-support/libassuan/libassuan_2.1.2.bb b/meta/recipes-support/libassuan/libassuan_2.1.2.bb new file mode 100644 index 0000000000..97dec6a76a --- /dev/null +++ b/meta/recipes-support/libassuan/libassuan_2.1.2.bb @@ -0,0 +1,26 @@ +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] = "1dc4c3e1dbfb3939bfa2d72db8e136ba" +SRC_URI[sha256sum] = "39f8a7c9349aaaf7ccd937b90660153ec4d2d4df2465018754e5bcae5b1db77b" + +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 +} diff --git a/meta/recipes-support/libbsd/libbsd_0.7.0.bb b/meta/recipes-support/libbsd/libbsd_0.7.0.bb new file mode 100644 index 0000000000..902666da7f --- /dev/null +++ b/meta/recipes-support/libbsd/libbsd_0.7.0.bb @@ -0,0 +1,21 @@ +# Copyright (C) 2013 Khem Raj +# 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/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap.inc new file mode 100644 index 0000000000..0e28ea04a9 --- /dev/null +++ b/meta/recipes-support/libcap/libcap.inc @@ -0,0 +1,70 @@ +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 = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \ + file://fix-CAP_LAST_CAP.patch" + +PR = "r1" + +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 ??= "attr ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', 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 \ +" + +EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}" + +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}/* ${D}${base_libdir} + rmdir ${D}${libdir} + 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/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch b/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch new file mode 100644 index 0000000000..a5571883d3 --- /dev/null +++ b/meta/recipes-support/libcap/libcap/fix-CAP_LAST_CAP.patch @@ -0,0 +1,39 @@ +fix CAP_LAST_CAP + +Upstream-Status: pending + +Two new capability CAP_BLOCK_SUSPEND and CAP_WAKE_ALARM have been added into +kernel, but libcap did not update them. +Once libcap uses its capability.h (the default value of KERNEL_HEADERS), and +application always use capability.h from kernel, that will make cap_get_flag +return wrong value. + +Signed-off-by: Roy Li +--- + libcap/include/linux/capability.h | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/libcap/include/linux/capability.h b/libcap/include/linux/capability.h +index 4924f2a..57026be 100644 +--- a/libcap/include/linux/capability.h ++++ b/libcap/include/linux/capability.h +@@ -360,7 +360,15 @@ struct cpu_vfs_cap_data { + CAP_SYS_ADMIN is not acceptable anymore. */ + #define CAP_SYSLOG 34 + +-#define CAP_LAST_CAP CAP_SYSLOG ++/* Allow triggering something that will wake the system */ ++ ++#define CAP_WAKE_ALARM 35 ++ ++/* Allow preventing system suspends */ ++ ++#define CAP_BLOCK_SUSPEND 36 ++ ++#define CAP_LAST_CAP CAP_BLOCK_SUSPEND + + #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP) + +-- +1.7.10.4 + diff --git a/meta/recipes-support/libcap/libcap_2.22.bb b/meta/recipes-support/libcap/libcap_2.22.bb new file mode 100644 index 0000000000..a989bb6a6b --- /dev/null +++ b/meta/recipes-support/libcap/libcap_2.22.bb @@ -0,0 +1,6 @@ +require libcap.inc + +PR = "r6" + +SRC_URI[md5sum] = "b4896816b626bea445f0b3849bdd4077" +SRC_URI[sha256sum] = "e1cae65d8febf2579be37c255d2e058715785ead481a4e6a4357a06aff84721f" diff --git a/meta/recipes-support/libcheck/libcheck_0.9.14.bb b/meta/recipes-support/libcheck/libcheck_0.9.14.bb new file mode 100644 index 0000000000..2a69ff7733 --- /dev/null +++ b/meta/recipes-support/libcheck/libcheck_0.9.14.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] = "38263d115d784c17aa3b959ce94be8b8" +SRC_URI[sha256sum] = "c272624645b1b738cf57fd5d81a3e4d9b722b99d6133ee3f3c4007d4d279840a" + +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/meta/recipes-support/libcroco/libcroco_0.6.8.bb b/meta/recipes-support/libcroco/libcroco_0.6.8.bb new file mode 100644 index 0000000000..278934e68d --- /dev/null +++ b/meta/recipes-support/libcroco/libcroco_0.6.8.bb @@ -0,0 +1,23 @@ +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 = "r1" + +BINCONFIG = "${bindir}/croco-0.6-config" + +inherit autotools-brokensep pkgconfig gnomebase gtk-doc binconfig-disabled + +GNOME_COMPRESS_TYPE = "xz" + +SRC_URI[archive.md5sum] = "767e73c4174f75b99695d4530fd9bb80" +SRC_URI[archive.sha256sum] = "ea6e1b858c55219cefd7109756bff5bc1a774ba7a55f7d3ccd734d6b871b8570" diff --git a/meta/recipes-support/libdaemon/libdaemon_0.14.bb b/meta/recipes-support/libdaemon/libdaemon_0.14.bb new file mode 100644 index 0000000000..e928781a4d --- /dev/null +++ b/meta/recipes-support/libdaemon/libdaemon_0.14.bb @@ -0,0 +1,16 @@ +SUMMARY = "Lightweight C library which eases the writing of UNIX daemons" +SECTION = "libs" +AUTHOR = "Lennart Poettering " +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" + +SRC_URI[md5sum] = "509dc27107c21bcd9fbf2f95f5669563" +SRC_URI[sha256sum] = "fd23eb5f6f986dcc7e708307355ba3289abe03cc381fc47a80bca4a50aa6b834" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--disable-lynx" diff --git a/meta/recipes-support/libevdev/libevdev_1.2.2.bb b/meta/recipes-support/libevdev/libevdev_1.2.2.bb new file mode 100644 index 0000000000..db4ffc6a5e --- /dev/null +++ b/meta/recipes-support/libevdev/libevdev_1.2.2.bb @@ -0,0 +1,13 @@ +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] = "7c1ee9c2069489b2a25dfde6f8e2ff6a" +SRC_URI[sha256sum] = "860e9a1d5594393ff1f711cdeaf048efe354992019068408abbcfa4914ad6709" + +inherit autotools pkgconfig diff --git a/meta/recipes-support/libevent/libevent-2.0.21/disable_tests.patch b/meta/recipes-support/libevent/libevent-2.0.21/disable_tests.patch new file mode 100644 index 0000000000..5d2c69036b --- /dev/null +++ b/meta/recipes-support/libevent/libevent-2.0.21/disable_tests.patch @@ -0,0 +1,15 @@ +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Marko Lindqvist +diff -Nurd libevent-2.0.21-stable/test/Makefile.am libevent-2.0.21-stable/test/Makefile.am +--- libevent-2.0.21-stable/test/Makefile.am 2012-05-31 07:08:19.000000000 +0300 ++++ libevent-2.0.21-stable/test/Makefile.am 2013-02-08 02:06:20.227475872 +0200 +@@ -19,8 +19,6 @@ + EXTRA_PROGRAMS = regress + noinst_HEADERS = tinytest.h tinytest_macros.h regress.h tinytest_local.h + +-TESTS = $(top_srcdir)/test/test.sh +- + BUILT_SOURCES = + if BUILD_REGRESS + BUILT_SOURCES += regress.gen.c regress.gen.h diff --git a/meta/recipes-support/libevent/libevent-2.0.21/obsolete_automake_macros.patch b/meta/recipes-support/libevent/libevent-2.0.21/obsolete_automake_macros.patch new file mode 100644 index 0000000000..b55923220c --- /dev/null +++ b/meta/recipes-support/libevent/libevent-2.0.21/obsolete_automake_macros.patch @@ -0,0 +1,15 @@ +Upstream-Status: Submitted [https://sourceforge.net/tracker/?func=detail&aid=3603774&group_id=50884&atid=461322] + +Signed-off-by: Marko Lindqvist +diff -Nurd libevent-2.0.21-stable/configure.in libevent-2.0.21-stable/configure.in +--- libevent-2.0.21-stable/configure.in 2012-11-18 08:34:13.000000000 +0200 ++++ libevent-2.0.21-stable/configure.in 2013-02-08 02:03:58.403476183 +0200 +@@ -12,7 +12,7 @@ + AC_CONFIG_MACRO_DIR([m4]) + + AM_INIT_AUTOMAKE(libevent,2.0.21-stable) +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS(config.h) + AC_DEFINE(NUMERIC_VERSION, 0x02001500, [Numeric representation of the version]) + + dnl Initialize prefix. diff --git a/meta/recipes-support/libevent/libevent_2.0.21.bb b/meta/recipes-support/libevent/libevent_2.0.21.bb new file mode 100644 index 0000000000..5a1ff3b1b0 --- /dev/null +++ b/meta/recipes-support/libevent/libevent_2.0.21.bb @@ -0,0 +1,26 @@ +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" + +PR = "r1" + +SRC_URI = "http://github.com/downloads/libevent/libevent/${BPN}-${PV}-stable.tar.gz \ + file://obsolete_automake_macros.patch \ + file://disable_tests.patch \ +" + +SRC_URI[md5sum] = "b2405cc9ebf264aa47ff615d9de527a2" +SRC_URI[sha256sum] = "22a530a8a5ba1cb9c080cba033206b17dacd21437762155c6d30ee6469f574f5" + +S = "${WORKDIR}/${BPN}-${PV}-stable" + +EXTRA_OECONF = "--disable-openssl" + +inherit autotools + +# Needed for Debian packaging +LEAD_SONAME = "libevent-2.0.so" diff --git a/meta/recipes-support/libexif/libexif_0.6.21.bb b/meta/recipes-support/libexif/libexif_0.6.21.bb new file mode 100644 index 0000000000..cff4caede9 --- /dev/null +++ b/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/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch b/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch new file mode 100644 index 0000000000..5d39d1954d --- /dev/null +++ b/meta/recipes-support/libfm/libfm-1.1.2.2/fix-make-parallelism-issue.patch @@ -0,0 +1,31 @@ +Fix make parallelism issue + +- remove pkginclude_HEADERS ( LIBFM_INCLUDES and LIBFM_GTK_INCLUDES +variables are empty) +- if we don't remove it then we will have a race condition between the code +that tries to symlink ${includedir}/libfm-1.0 to ${includedir}/libfm and the +am autogenerated code from the pkginclude_HEADERS definition which +tries to create pkgincludedir (${includedir}/libfm); +- if pkgincludedir is created before the symlink the symlink will be created +in the ${includedir}/libfm dir and it will have libfm-1.0 as name which is +wrong (we need the ${includedir}/libfm symlink for pcmanfm) + +Upstream-Status: Pending +Signed-off-by: Constantin Musca + +Index: libfm-1.1.0/src/Makefile.am +=================================================================== +--- libfm-1.1.0.orig/src/Makefile.am ++++ libfm-1.1.0/src/Makefile.am +@@ -211,11 +211,6 @@ libfmgtkinclude_HEADERS = \ + gtk/fm-gtk-marshal.h \ + $(NULL) + +-pkginclude_HEADERS = \ +- $(LIBFM_INCLUDES) \ +- $(LIBFM_GTK_INCLUDES) \ +- $(NULL) +- + EXTRA_LTLIBRARIES = libfm-gtk.la libfm-gtk3.la + + lib_LTLIBRARIES = libfm.la @LIBFM_GTK_LTLIBRARIES@ diff --git a/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch b/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch new file mode 100644 index 0000000000..58a2f09d66 --- /dev/null +++ b/meta/recipes-support/libfm/libfm-1.1.2.2/ignore_automake_warnings.patch @@ -0,0 +1,14 @@ +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Marko Lindqvist +diff -Nurd libfm-1.1.2.2/configure.ac libfm-1.1.2.2/configure.ac +--- libfm-1.1.2.2/configure.ac 2013-08-22 23:16:09.000000000 +0300 ++++ libfm-1.1.2.2/configure.ac 2013-10-25 01:35:18.110323079 +0300 +@@ -3,7 +3,7 @@ + + AC_PREREQ([2.63]) + AC_INIT([libfm], [1.1.2.2], [http://pcmanfm.sourceforge.net/]) +-AM_INIT_AUTOMAKE([-Wall -Werror foreign]) ++AM_INIT_AUTOMAKE([-Wall foreign]) + AC_CONFIG_MACRO_DIR(m4) + AC_CONFIG_HEADERS([config.h]) diff --git a/meta/recipes-support/libfm/libfm_1.1.2.2.bb b/meta/recipes-support/libfm/libfm_1.1.2.2.bb new file mode 100644 index 0000000000..10f31d9911 --- /dev/null +++ b/meta/recipes-support/libfm/libfm_1.1.2.2.bb @@ -0,0 +1,25 @@ +SUMMARY = "Library for file management" +HOMEPAGE = "http://pcmanfm.sourceforge.net/" + +LICENSE = "GPLv2 & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://src/fm.h;endline=22;md5=e64555171770a551e3b51cc06fc62f1a \ + file://src/base/fm-config.h;endline=23;md5=ad0fc418c3cf041eea35ddb3daf37f17" + +SECTION = "x11/libs" +DEPENDS = "glib-2.0 pango gtk+ menu-cache intltool-native libexif" + +SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.gz \ + file://fix-make-parallelism-issue.patch \ + file://ignore_automake_warnings.patch \ + " + +SRC_URI[md5sum] = "ea3d09b23ef4c37cb84ae57ea16b8f08" +SRC_URI[sha256sum] = "158e2b6974350d2dab15932b496bb4d448553e60bbf7cdfe4d6e9bd99d19d682" + +inherit autotools-brokensep pkgconfig gtk-doc + +do_configure[dirs] =+ "${S}/m4" + +PACKAGES += "${PN}-mime" +FILES_${PN}-mime = "${datadir}/mime/" diff --git a/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch b/meta/recipes-support/libgcrypt/files/add-pkgconfig-support.patch new file mode 100644 index 0000000000..82c93bd44d --- /dev/null +++ b/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: Rejected [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/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch b/meta/recipes-support/libgcrypt/files/fix-ICE-failure-on-mips-with-option-O-and-g.patch new file mode 100644 index 0000000000..56c591f06e --- /dev/null +++ b/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 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: [oe specific] + +Signed-off-by: Hongxu Jia +--- + 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/meta/recipes-support/libgcrypt/files/libgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch b/meta/recipes-support/libgcrypt/files/libgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch new file mode 100644 index 0000000000..340087279d --- /dev/null +++ b/meta/recipes-support/libgcrypt/files/libgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch @@ -0,0 +1,169 @@ +Fix ARM assembly when building __PIC__ + +* cipher/camellia-arm.S (GET_DATA_POINTER): New. +(_gcry_camellia_arm_encrypt_block): Use GET_DATA_POINTER. +(_gcry_camellia_arm_decrypt_block): Ditto. +* cipher/cast5-arm.S (GET_DATA_POINTER): New. +(_gcry_cast5_arm_encrypt_block, _gcry_cast5_arm_decrypt_block) +(_gcry_cast5_arm_enc_blk2, _gcry_cast5_arm_dec_blk2): Use +GET_DATA_POINTER. +* cipher/rijndael-arm.S (GET_DATA_POINTER): New. +(_gcry_aes_arm_encrypt_block, _gcry_aes_arm_decrypt_block): Use +GET_DATA_POINTER. +-- + +Signed-off-by: Jussi Kivilinna + +Upstream-Status: Backport + +Signed-off-by: Jackie Huang +--- + cipher/camellia-arm.S | 17 +++++++++++++++-- + cipher/cast5-arm.S | 21 +++++++++++++++++---- + cipher/rijndael-arm.S | 17 +++++++++++++++-- + 3 files changed, 47 insertions(+), 8 deletions(-) + +diff --git a/cipher/camellia-arm.S b/cipher/camellia-arm.S +index c30d194..cdeaf8b 100644 +--- a/cipher/camellia-arm.S ++++ b/cipher/camellia-arm.S +@@ -28,6 +28,19 @@ + .syntax unified + .arm + ++#ifdef __PIC__ ++# define GET_DATA_POINTER(reg, name, rtmp) \ ++ ldr reg, 1f; \ ++ ldr rtmp, 2f; \ ++ b 3f; \ ++ 1: .word _GLOBAL_OFFSET_TABLE_-(3f+8); \ ++ 2: .word name(GOT); \ ++ 3: add reg, pc, reg; \ ++ ldr reg, [reg, rtmp]; ++#else ++# define GET_DATA_POINTER(reg, name, rtmp) ldr reg, =name ++#endif ++ + /* struct camellia_ctx: */ + #define key_table 0 + +@@ -261,7 +274,7 @@ _gcry_camellia_arm_encrypt_block: + */ + push {%r1, %r4-%r11, %ip, %lr}; + +- ldr RTAB1, =.Lcamellia_sp1110; ++ GET_DATA_POINTER(RTAB1, .Lcamellia_sp1110, RTAB3); + mov RMASK, #0xff; + add RTAB3, RTAB1, #(2 * 4); + push {%r3}; +@@ -309,7 +322,7 @@ _gcry_camellia_arm_decrypt_block: + */ + push {%r1, %r4-%r11, %ip, %lr}; + +- ldr RTAB1, =.Lcamellia_sp1110; ++ GET_DATA_POINTER(RTAB1, .Lcamellia_sp1110, RTAB3); + mov RMASK, #0xff; + add RTAB3, RTAB1, #(2 * 4); + mov RMASK, RMASK, lsl#4 /* byte mask */ +diff --git a/cipher/cast5-arm.S b/cipher/cast5-arm.S +index ce7fa93..db96db4 100644 +--- a/cipher/cast5-arm.S ++++ b/cipher/cast5-arm.S +@@ -30,6 +30,19 @@ + + .extern _gcry_cast5_s1to4; + ++#ifdef __PIC__ ++# define GET_DATA_POINTER(reg, name, rtmp) \ ++ ldr reg, 1f; \ ++ ldr rtmp, 2f; \ ++ b 3f; \ ++ 1: .word _GLOBAL_OFFSET_TABLE_-(3f+8); \ ++ 2: .word name(GOT); \ ++ 3: add reg, pc, reg; \ ++ ldr reg, [reg, rtmp]; ++#else ++# define GET_DATA_POINTER(reg, name, rtmp) ldr reg, =name ++#endif ++ + /* structure of crypto context */ + #define Km 0 + #define Kr (Km + (16 * 4)) +@@ -260,7 +273,7 @@ _gcry_cast5_arm_encrypt_block: + */ + push {%r1, %r4-%r11, %ip, %lr}; + +- ldr Rs1, =_gcry_cast5_s1to4; ++ GET_DATA_POINTER(Rs1, _gcry_cast5_s1to4, Rs2); + mov RMASK, #(0xff << 2); + add Rs2, Rs1, #(0x100*4); + add Rs3, Rs1, #(0x100*4*2); +@@ -306,7 +319,7 @@ _gcry_cast5_arm_decrypt_block: + */ + push {%r1, %r4-%r11, %ip, %lr}; + +- ldr Rs1, =_gcry_cast5_s1to4; ++ GET_DATA_POINTER(Rs1, _gcry_cast5_s1to4, Rs2); + mov RMASK, #(0xff << 2); + add Rs2, Rs1, #(0x100 * 4); + add Rs3, Rs1, #(0x100 * 4 * 2); +@@ -500,7 +513,7 @@ _gcry_cast5_arm_enc_blk2: + */ + push {%lr}; + +- ldr Rs1, =_gcry_cast5_s1to4; ++ GET_DATA_POINTER(Rs1, _gcry_cast5_s1to4, Rs2); + mov RMASK, #(0xff << 2); + add Rs2, Rs1, #(0x100 * 4); + +@@ -631,7 +644,7 @@ _gcry_cast5_arm_dec_blk2: + * [RR0, RL0], [RR1, RL1]: dst + */ + +- ldr Rs1, =_gcry_cast5_s1to4; ++ GET_DATA_POINTER(Rs1, _gcry_cast5_s1to4, Rs2); + mov RMASK, #(0xff << 2); + add Rs2, Rs1, #(0x100 * 4); + +diff --git a/cipher/rijndael-arm.S b/cipher/rijndael-arm.S +index 22c350c..421c3b4 100644 +--- a/cipher/rijndael-arm.S ++++ b/cipher/rijndael-arm.S +@@ -28,6 +28,19 @@ + .syntax unified + .arm + ++#ifdef __PIC__ ++# define GET_DATA_POINTER(reg, name, rtmp) \ ++ ldr reg, 1f; \ ++ ldr rtmp, 2f; \ ++ b 3f; \ ++ 1: .word _GLOBAL_OFFSET_TABLE_-(3f+8); \ ++ 2: .word name(GOT); \ ++ 3: add reg, pc, reg; \ ++ ldr reg, [reg, rtmp]; ++#else ++# define GET_DATA_POINTER(reg, name, rtmp) ldr reg, =name ++#endif ++ + /* register macros */ + #define CTX %r0 + #define RTAB %lr +@@ -249,7 +262,7 @@ _gcry_aes_arm_encrypt_block: + 2: + sub %sp, #16; + +- ldr RTAB, =.LtableE0; ++ GET_DATA_POINTER(RTAB, .LtableE0, RMASK); + + str %r1, [%sp, #4]; /* dst */ + mov RMASK, #0xff; +@@ -503,7 +516,7 @@ _gcry_aes_arm_decrypt_block: + 2: + sub %sp, #16; + +- ldr RTAB, =.LtableD0; ++ GET_DATA_POINTER(RTAB, .LtableD0, RMASK); + + mov RMASK, #0xff; + str %r1, [%sp, #4]; /* dst */ diff --git a/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/meta/recipes-support/libgcrypt/files/libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch new file mode 100644 index 0000000000..a3e540369c --- /dev/null +++ b/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 +--- + 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/meta/recipes-support/libgcrypt/libgcrypt.inc b/meta/recipes-support/libgcrypt/libgcrypt.inc new file mode 100644 index 0000000000..43e0291a7b --- /dev/null +++ b/meta/recipes-support/libgcrypt/libgcrypt.inc @@ -0,0 +1,40 @@ +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+" +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" + +inherit autotools-brokensep 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/ +} + +FILES_${PN}-dev += "${bindir}/dumpsexp ${bindir}/hmac256" + +ARM_INSTRUCTION_SET = "arm" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb new file mode 100644 index 0000000000..903ed661ed --- /dev/null +++ b/meta/recipes-support/libgcrypt/libgcrypt_1.6.1.bb @@ -0,0 +1,6 @@ +require libgcrypt.inc + +SRC_URI += "file://libgcrypt-1.6.1-make-arm-asm-fPIC-friendly.patch" + +SRC_URI[md5sum] = "d155aa1b06fa879175922ba28f6a6509" +SRC_URI[sha256sum] = "7c1007197bef49c3b8740cf6af8b4eb4eb74c7a69796ebcf555d928c287255de" diff --git a/meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch b/meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch new file mode 100644 index 0000000000..89c9d22bf2 --- /dev/null +++ b/meta/recipes-support/libgpg-error/libgpg-error-1.12/pkgconfig.patch @@ -0,0 +1,132 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +Upstream-Status: Pending + +Index: libgpg-error-1.12/configure.ac +=================================================================== +--- libgpg-error-1.12.orig/configure.ac 2014-05-13 21:14:26.846393236 +0000 ++++ libgpg-error-1.12/configure.ac 2014-05-13 21:14:26.926393236 +0000 +@@ -217,6 +217,7 @@ + AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd]) + AC_CONFIG_FILES([src/versioninfo.rc]) + 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.12/src/Makefile.am +=================================================================== +--- libgpg-error-1.12.orig/src/Makefile.am 2014-05-13 21:14:26.846393236 +0000 ++++ libgpg-error-1.12/src/Makefile.am 2014-05-13 21:14:26.934393236 +0000 +@@ -37,13 +37,15 @@ + 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 \ + mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \ + mkheader.awk 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.def.in versioninfo.rc.in ++ gpg-error.def.in versioninfo.rc.in gpg-error.pc.in + + BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \ + err-sources-sym.h err-codes-sym.h errnos-sym.h gpg-error.h \ +Index: libgpg-error-1.12/src/gpg-error.pc.in +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ libgpg-error-1.12/src/gpg-error.pc.in 2014-05-13 21:48:20.266382916 +0000 +@@ -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} +Index: libgpg-error-1.12/src/gpg-error.m4 +=================================================================== +--- libgpg-error-1.12.orig/src/gpg-error.m4 2014-05-13 21:45:02.038383922 +0000 ++++ libgpg-error-1.12/src/gpg-error.m4 2014-05-13 21:47:08.362383281 +0000 +@@ -15,58 +15,14 @@ + 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_prefix != x ; then +- if test x${GPG_ERROR_CONFIG+set} != xset ; then +- GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config +- fi +- fi ++ PKG_CHECK_MODULES(GPG_ERROR, [gpg-error >= $min_gpg_error_version], [ok=yes], [ok=no]) + +- AC_PATH_TOOL(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` +- 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([[ +@@ -80,9 +36,6 @@ + fi + fi + else +- GPG_ERROR_CFLAGS="" +- GPG_ERROR_LIBS="" +- AC_MSG_RESULT(no) + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GPG_ERROR_CFLAGS) diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb b/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb new file mode 100644 index 0000000000..af9574d8fd --- /dev/null +++ b/meta/recipes-support/libgpg-error/libgpg-error_1.12.bb @@ -0,0 +1,31 @@ +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=6ac0378874589a44d53512b3786b4bc0 \ + file://src/init.c;endline=20;md5=b69742f2a8827d494c6f6a4b1768416c" + + +SECTION = "libs" + +SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \ + file://pkgconfig.patch" + +SRC_URI[md5sum] = "8f0eb41a344d19ac2aa9bd101dfb9ce6" +SRC_URI[sha256sum] = "cafc9ed6a87c53a35175d5a1220a96ca386696eef2fa059cc0306211f246e55f" + +BINCONFIG = "${bindir}/gpg-error-config" + +inherit autotools binconfig-disabled pkgconfig gettext + +FILES_${PN}-dev += "${bindir}/gpg-error" + +do_install_append() { + # we don't have common lisp in OE + rm -rf "${D}${datadir}/common-lisp/" +} + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-support/libical/libical_1.0.0.bb b/meta/recipes-support/libical/libical_1.0.0.bb new file mode 100644 index 0000000000..07b549ecf2 --- /dev/null +++ b/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/${PN}/${PN}/archive/v${PV}.tar.gz" +SRC_URI[md5sum] = "f4b8e33ae5efb2f025eb43ce69682a36" +SRC_URI[sha256sum] = "0072e83834092315772e6719b85fc8b11530b1ff53f4d108315fb38cddbce8c2" + +inherit autotools diff --git a/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch b/meta/recipes-support/libiconv/libiconv-1.11.1/autoconf.patch new file mode 100644 index 0000000000..3cbf549d48 --- /dev/null +++ b/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 + +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/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch b/meta/recipes-support/libiconv/libiconv-1.11.1/shared_preloadable_libiconv_linux.patch new file mode 100644 index 0000000000..fb07f7366b --- /dev/null +++ b/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 + +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/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch b/meta/recipes-support/libiconv/libiconv-1.14/add-relocatable-module.patch new file mode 100644 index 0000000000..6af377b4cc --- /dev/null +++ b/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 + +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 . */ ++ ++/* _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 . */ ++ ++#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(::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(::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( \ ++ (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 , ++ 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 , ++ 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 . */ +- +-/* _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 . */ +- +-#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(::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(::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( \ +- (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 , +- 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 , +- 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 . */ +- +-/* _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 ]], +- [getline]) in configure.ac, which potentially defines +- HAVE_RAW_DECL_GETLINE +- - adding this code to a header that wraps the system : +- #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 . */ ++ ++/* _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 ]], ++ [getline]) in configure.ac, which potentially defines ++ HAVE_RAW_DECL_GETLINE ++ - adding this code to a header that wraps the system : ++ #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 + /* On some systems other than glibc, 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 +@@ -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 + +-/* 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 + . */ +-#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 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 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. +- +- 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 + + # include +@@ -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 +@@ -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 . */ + +-/* 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 + + #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 +- -> -> . +- 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 +- -> -> -> . +- 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 , but in . +- On Solaris 10, includes , which eventually includes +- us; so include now, before the second inclusion guard. */ +-#include ++#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 , not in . +- 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 +-#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 , but in . */ ++#include ++ + /* 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 + #include + #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 @@ + * + */ + +-#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 . + Include it before , since any "#include " + in 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 + + /* defines some of the stdint.h types as well, on glibc, + IRIX 6.5, and OpenBSD 3.8 (via ). +@@ -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 +@@ -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 +@@ -89,7 +89,11 @@ struct random_data + # include + #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 + +-/* Specification. */ + #include + +-#include +-#include +-#include +-#include ++#if REPLACE_STRERROR ++ ++# include ++# include ++ ++# if GNULIB_defined_ESOCK /* native Windows platforms */ ++# if HAVE_WINSOCK2_H ++# include ++# 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 . */ +- +-/* Written by Bruno Haible , 2010. */ +- +-#include +- +-#include "strerror-override.h" +- +-#include +- +-#if GNULIB_defined_ESOCK /* native Windows platforms */ +-# if HAVE_WINSOCK2_H +-# include +-# 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 . */ +- +-#ifndef _GL_STRERROR_OVERRIDE_H +-# define _GL_STRERROR_OVERRIDE_H +- +-# include +-# include +- +-/* 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 +@@ -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 +@@ -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 +@@ -117,77 +117,78 @@ + /* The definition of _GL_WARN_ON_USE is copied here. */ + + +-/* Hide some function declarations from . */ +- +-#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 "); +- _GL_WARN_ON_USE (connect, +- "connect() used without including "); +- _GL_WARN_ON_USE (accept, +- "accept() used without including "); +- _GL_WARN_ON_USE (bind, +- "bind() used without including "); +- _GL_WARN_ON_USE (getpeername, +- "getpeername() used without including "); +- _GL_WARN_ON_USE (getsockname, +- "getsockname() used without including "); +- _GL_WARN_ON_USE (getsockopt, +- "getsockopt() used without including "); +- _GL_WARN_ON_USE (listen, +- "listen() used without including "); +- _GL_WARN_ON_USE (recv, +- "recv() used without including "); +- _GL_WARN_ON_USE (send, +- "send() used without including "); +- _GL_WARN_ON_USE (recvfrom, +- "recvfrom() used without including "); +- _GL_WARN_ON_USE (sendto, +- "sendto() used without including "); +- _GL_WARN_ON_USE (setsockopt, +- "setsockopt() used without including "); +- _GL_WARN_ON_USE (shutdown, +- "shutdown() used without including "); ++#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 "); ++ _GL_WARN_ON_USE (connect, ++ "connect() used without including "); ++ _GL_WARN_ON_USE (accept, ++ "accept() used without including "); ++ _GL_WARN_ON_USE (bind, ++ "bind() used without including "); ++ _GL_WARN_ON_USE (getpeername, ++ "getpeername() used without including "); ++ _GL_WARN_ON_USE (getsockname, ++ "getsockname() used without including "); ++ _GL_WARN_ON_USE (getsockopt, ++ "getsockopt() used without including "); ++ _GL_WARN_ON_USE (listen, ++ "listen() used without including "); ++ _GL_WARN_ON_USE (recv, ++ "recv() used without including "); ++ _GL_WARN_ON_USE (send, ++ "send() used without including "); ++ _GL_WARN_ON_USE (recvfrom, ++ "recvfrom() used without including "); ++ _GL_WARN_ON_USE (sendto, ++ "sendto() used without including "); ++ _GL_WARN_ON_USE (setsockopt, ++ "setsockopt() used without including "); ++ _GL_WARN_ON_USE (shutdown, ++ "shutdown() used without including "); ++# 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 "); ++# 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 "); ++# endif + # endif + # endif + #endif +@@ -1061,7 +1062,6 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unport + specification . */ + # 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 + . */ + # 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 + 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 + # 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 + 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 ]) + AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include ]) + 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 +- /* 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" <> "$ac_file.tmp" < ++/* Mingw defines sigset_t not in , but in . */ ++#include ]) ++ 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 +- ]], [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 +- /* Mingw defines sigset_t not in , but in . */ +- #include +- ]]) +- 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 + ]], +- [[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 ++ ]], ++ [[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 , or any fix for strerror(0). Replace it. ++ dnl to . 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 +- #include +- ]], +- [[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 + ]], +- [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 is self-contained], +- [gl_cv_header_sys_socket_h_selfcontained], +- [ +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], +- [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, 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 defines the SHUT_* macros], +- [gl_cv_header_sys_socket_h_shut], +- [ +- AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM([[#include ]], +- [[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 +-#ifdef HAVE_SYS_SOCKET_H +-#include +-#endif +-#ifdef HAVE_WS2TCPIP_H +-#include +-#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 +- #ifdef HAVE_SYS_SOCKET_H +- #include +- #endif +- #ifdef HAVE_WS2TCPIP_H +- #include +- #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 +-#include +- ]], [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 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 replacement and of the +-# 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/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch b/meta/recipes-support/libiconv/libiconv-1.14/autoconf.patch new file mode 100644 index 0000000000..5d34ce7c0e --- /dev/null +++ b/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 + +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/meta/recipes-support/libiconv/libiconv_1.11.1.bb b/meta/recipes-support/libiconv/libiconv_1.11.1.bb new file mode 100644 index 0000000000..abf739bfa1 --- /dev/null +++ b/meta/recipes-support/libiconv/libiconv_1.11.1.bb @@ -0,0 +1,34 @@ +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 = "LGPL" +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 m4/libtool.m4 libcharset/m4/libtool.m4 +} diff --git a/meta/recipes-support/libiconv/libiconv_1.14.bb b/meta/recipes-support/libiconv/libiconv_1.14.bb new file mode 100644 index 0000000000..1b6fe09bb7 --- /dev/null +++ b/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/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch b/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch new file mode 100644 index 0000000000..0f136fd6a4 --- /dev/null +++ b/meta/recipes-support/libksba/libksba/ksba-add-pkgconfig-support.patch @@ -0,0 +1,152 @@ +Upstream-Status: Rejected + +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 + +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/meta/recipes-support/libksba/libksba_1.3.0.bb b/meta/recipes-support/libksba/libksba_1.3.0.bb new file mode 100644 index 0000000000..13ad437629 --- /dev/null +++ b/meta/recipes-support/libksba/libksba_1.3.0.bb @@ -0,0 +1,26 @@ +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 \ + " +PR = "r1" + +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] = "cd86fad9c9d360b2cf80449f8a4a4075" +SRC_URI[sha256sum] = "5a61eed50550d4d0dcb47457ce7b6a90f8e719d42a3b25f7e79333e8cd721971" + +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/meta/recipes-support/libmpc/libmpc.inc b/meta/recipes-support/libmpc/libmpc.inc new file mode 100644 index 0000000000..b3742543df --- /dev/null +++ b/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/meta/recipes-support/libmpc/libmpc_1.0.2.bb b/meta/recipes-support/libmpc/libmpc_1.0.2.bb new file mode 100644 index 0000000000..41177ebd9b --- /dev/null +++ b/meta/recipes-support/libmpc/libmpc_1.0.2.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] = "68fadff3358fb3e7976c7a398a0af4c3" +SRC_URI[sha256sum] = "b561f54d8a479cee3bc891ee52735f18ff86712ba30f036f8b8537bae380c488" + +S = "${WORKDIR}/mpc-${PV}" +BBCLASSEXTEND = "native nativesdk" + diff --git a/meta/recipes-support/libnl/libnl/fix-pc-file.patch b/meta/recipes-support/libnl/libnl/fix-pc-file.patch new file mode 100644 index 0000000000..fe8b833a1c --- /dev/null +++ b/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 +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/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch b/meta/recipes-support/libnl/libnl/fix-pktloc_syntax_h-race.patch new file mode 100644 index 0000000000..79aa0bdf11 --- /dev/null +++ b/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 + +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/meta/recipes-support/libnl/libnl_3.2.25.bb b/meta/recipes-support/libnl/libnl_3.2.25.bb new file mode 100644 index 0000000000..dcaa85d3af --- /dev/null +++ b/meta/recipes-support/libnl/libnl_3.2.25.bb @@ -0,0 +1,43 @@ +SUMMARY = "A library for applications dealing with netlink sockets" +HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" +SECTION = "libs/network" + +PE = "1" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" + +DEPENDS = "flex-native bison-native" + +SRC_URI = "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-brokensep 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/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch b/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch new file mode 100644 index 0000000000..aff1cb1842 --- /dev/null +++ b/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 +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/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch b/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch new file mode 100644 index 0000000000..c8e3c1f721 --- /dev/null +++ b/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/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch b/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch new file mode 100644 index 0000000000..473380e9fc --- /dev/null +++ b/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 +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/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch b/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch new file mode 100644 index 0000000000..892d441310 --- /dev/null +++ b/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/meta/recipes-support/liboil/liboil_0.3.17.bb b/meta/recipes-support/liboil/liboil_0.3.17.bb new file mode 100644 index 0000000000..03b7785215 --- /dev/null +++ b/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/meta/recipes-support/libpcre/libpcre/Makefile b/meta/recipes-support/libpcre/libpcre/Makefile new file mode 100644 index 0000000000..5419d71f7f --- /dev/null +++ b/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.34 +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/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch b/meta/recipes-support/libpcre/libpcre/fix-pcre-name-collision.patch new file mode 100644 index 0000000000..89b44f6aa6 --- /dev/null +++ b/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 " 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 +Signed-off-by: Saul Wold + +--- 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/meta/recipes-support/libpcre/libpcre/pcre-cross.patch b/meta/recipes-support/libpcre/libpcre/pcre-cross.patch new file mode 100644 index 0000000000..83880f7098 --- /dev/null +++ b/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/meta/recipes-support/libpcre/libpcre/run-ptest b/meta/recipes-support/libpcre/libpcre/run-ptest new file mode 100644 index 0000000000..990d4a12ad --- /dev/null +++ b/meta/recipes-support/libpcre/libpcre/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +make check-TESTS diff --git a/meta/recipes-support/libpcre/libpcre_8.35.bb b/meta/recipes-support/libpcre/libpcre_8.35.bb new file mode 100644 index 0000000000..92098c8c51 --- /dev/null +++ b/meta/recipes-support/libpcre/libpcre_8.35.bb @@ -0,0 +1,75 @@ +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=ded617e975f28e15952dc68b84a7ac1a" +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] = "6aacb23986adccd9b3bc626c00979958" +SRC_URI[sha256sum] = "a961c1c78befef263cc130756eeca7b674b4e73a81533293df44e4265236865b" + +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 + +PARALLEL_MAKE = "" + +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/meta/recipes-support/libproxy/libproxy_0.4.11.bb b/meta/recipes-support/libproxy/libproxy_0.4.11.bb new file mode 100644 index 0000000000..a53a197615 --- /dev/null +++ b/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 = "http://libproxy.googlecode.com/files/libproxy-${PV}.zip \ + " + +SRC_URI[md5sum] = "06be230b8b612e64997f8f15af6373aa" +SRC_URI[sha256sum] = "3175abcb49c0b37fd82c697927783bf7d53de3884a8559bc594e59caa09bdb04" + +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 bb.utils.contains("INCOMPATIBLE_LICENSE", "GPLv3", "x", "", d) == "x" or bb.utils.contains("DISTRO_FEATURES", "x11", "x", "", d) == "": + d.setVar("EXTRA_OECMAKE", d.getVar("EXTRA_OECMAKE").replace("-DWITH_GNOME=yes", "-DWITH_GNOME=no")) + d.setVar("DEPENDS", " ".join(i for i in d.getVar("DEPENDS").split() if i != "gconf")) +} diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb new file mode 100644 index 0000000000..81da911926 --- /dev/null +++ b/meta/recipes-support/libsoup/libsoup-2.4_2.46.0.bb @@ -0,0 +1,29 @@ +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] = "86765c0093efaf3006fa2960d170d097" +SRC_URI[sha256sum] = "fa3d5574c1a2df521242e2ca624a2b3057121798cab9f8f40525aa186a7b15a3" + +S = "${WORKDIR}/libsoup-${PV}" + +inherit autotools gettext pkgconfig + +# glib-networking is needed for SSL, proxies, etc. +RRECOMMENDS_${PN} = "glib-networking" diff --git a/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch b/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch new file mode 100644 index 0000000000..a330c73412 --- /dev/null +++ b/meta/recipes-support/libunistring/libunistring/iconv-m4-remove-the-test-to-convert-euc-jp.patch @@ -0,0 +1,42 @@ +From 8d99a368615656a835f5502326afd31cec2cebfe Mon Sep 17 00:00:00 2001 +From: Jackie Huang +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 +--- + gnulib-m4/iconv.m4 | 11 ----------- + 1 files changed, 0 insertions(+), 11 deletions(-) + +diff --git a/gnulib-m4/iconv.m4 b/gnulib-m4/iconv.m4 +index f46ff14..de0a5e9 100644 +--- a/gnulib-m4/iconv.m4 ++++ b/gnulib-m4/iconv.m4 +@@ -126,17 +126,6 @@ int main () + } + } + #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)) +- return 1; + return 0; + }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], + [case "$host_os" in +-- +1.7.4 diff --git a/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch b/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch new file mode 100644 index 0000000000..5d831d5491 --- /dev/null +++ b/meta/recipes-support/libunistring/libunistring/libunistring_fix_for_automake_1.12.patch @@ -0,0 +1,81 @@ +Upstream-Status: Pending + +automake 1.12 has deprecated use of mkdir_p, and it recommends +use of MKDIR_P instead. Changed the code to avoid these kind +of warning-errors. + +| make[2]: /build/tmp/work/x86_64-linux/libunistring-native-0.9.3-r2/image/srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/share/doc/libunistring: Command not found +| make[2]: *** [install-html-split] Error 127 + +Signed-Off-By: Nitin A Kamble +2012/07/10 + +Index: libunistring-0.9.3/doc/Makefile.am +=================================================================== +--- libunistring-0.9.3.orig/doc/Makefile.am ++++ libunistring-0.9.3/doc/Makefile.am +@@ -87,7 +87,7 @@ TEXI2DVI = @TEXI2DVI@ $(TEXINCLUDES) + # The install-dvi target is already defined by automake. + + installdirs-dvi: +- $(mkdir_p) $(DESTDIR)$(dvidir) ++ $(MKDIR_P) $(DESTDIR)$(dvidir) + + uninstall-dvi: + $(RM) $(DESTDIR)$(dvidir)/libunistring.dvi +@@ -105,7 +105,7 @@ libunistring.ps: libunistring.dvi + # The install-ps target is already defined by automake. + + installdirs-ps: +- $(mkdir_p) $(DESTDIR)$(psdir) ++ $(MKDIR_P) $(DESTDIR)$(psdir) + + uninstall-ps: + $(RM) $(DESTDIR)$(psdir)/libunistring.ps +@@ -120,7 +120,7 @@ TEXI2PDF = @TEXI2DVI@ --pdf $(TEXINCLUDE + # The install-pdf target is already defined by automake. + + installdirs-pdf: +- $(mkdir_p) $(DESTDIR)$(pdfdir) ++ $(MKDIR_P) $(DESTDIR)$(pdfdir) + + uninstall-pdf: + $(RM) $(DESTDIR)$(pdfdir)/libunistring.pdf +@@ -151,17 +151,17 @@ libunistring_toc.html: libunistring.texi + } + + install-html-monolithic: libunistring.html +- $(mkdir_p) $(DESTDIR)$(htmldir) ++ $(MKDIR_P) $(DESTDIR)$(htmldir) + $(INSTALL_DATA) `if test -f libunistring.html; then echo .; else echo $(srcdir); fi`/libunistring.html $(DESTDIR)$(htmldir)/libunistring.html + + install-html-split: libunistring_toc.html +- $(mkdir_p) $(DESTDIR)$(htmldir) ++ $(MKDIR_P) $(DESTDIR)$(htmldir) + for file in `if test -f libunistring_toc.html; then echo .; else echo $(srcdir); fi`/libunistring_*.html; do \ + $(INSTALL_DATA) $$file $(DESTDIR)$(htmldir)/`basename $$file`; \ + done + + installdirs-html: +- $(mkdir_p) $(DESTDIR)$(htmldir) ++ $(MKDIR_P) $(DESTDIR)$(htmldir) + + uninstall-html-monolithic: + $(RM) $(DESTDIR)$(htmldir)/libunistring.html +@@ -170,14 +170,14 @@ uninstall-html-split: + $(RM) $(DESTDIR)$(htmldir)/libunistring_*.html + + dist-html-monolithic: +- $(mkdir_p) $(distdir)/ ++ $(MKDIR_P) $(distdir)/ + file=libunistring.html; \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + cp -p $$d/$$file $(distdir)/$$file || exit 1 + + # We would like to put libunistring_*.html into EXTRA_DIST, but it doesn't work. + dist-html-split: libunistring_toc.html +- $(mkdir_p) $(distdir)/ ++ $(MKDIR_P) $(distdir)/ + file=libunistring_toc.html; \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + for file in `cd $$d && echo libunistring_*.html`; do \ diff --git a/meta/recipes-support/libunistring/libunistring/parallelmake.patch b/meta/recipes-support/libunistring/libunistring/parallelmake.patch new file mode 100644 index 0000000000..21025b8e9d --- /dev/null +++ b/meta/recipes-support/libunistring/libunistring/parallelmake.patch @@ -0,0 +1,26 @@ +Fix a parallel make race where cdefs.h uses the unused-parameter.h header file +but has no dependency listed. This can result in an empty cdefs.h file which +results in a build failure like: + +| In file included from striconveh.c:30:0: +| unistr.h:193:48: error: expected ';', ',' or ')' before '_GL_UNUSED_PARAMETER' +| In file included from striconveh.c:30:0: +| unistr.h:263:54: error: expected ';', ',' or ')' before '_GL_UNUSED_PARAMETER' + +Upstream-Status: Pending + +RP 2012/4/12 + +Index: libunistring-0.9.3/lib/Makefile.am +=================================================================== +--- libunistring-0.9.3.orig/lib/Makefile.am 2012-04-12 07:45:41.450059820 +0000 ++++ libunistring-0.9.3/lib/Makefile.am 2012-04-12 07:48:45.434055559 +0000 +@@ -157,7 +157,7 @@ + + # unistring/cdefs.h is not public, but is included by other header files. + nobase_nodist_include_HEADERS += unistring/cdefs.h +-unistring/cdefs.h : unistring/cdefs.in.h ++unistring/cdefs.h : unistring/cdefs.in.h $(UNUSED_PARAMETER_H) + @MKDIR_P@ unistring + rm -f $@-t $@ + sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ diff --git a/meta/recipes-support/libunistring/libunistring_0.9.3.bb b/meta/recipes-support/libunistring/libunistring_0.9.3.bb new file mode 100644 index 0000000000..db1651b2a6 --- /dev/null +++ b/meta/recipes-support/libunistring/libunistring_0.9.3.bb @@ -0,0 +1,32 @@ +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://parallelmake.patch \ + file://libunistring_fix_for_automake_1.12.patch \ + file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \ +" + +SRC_URI[md5sum] = "db8eca3b64163abadf8c40e5cecc261f" +SRC_URI[sha256sum] = "610d3ec724fbdaa654afe3cff20b9f4d504be3fd296fded2e0f7f764041006a3" + +PR = "r3" + +inherit autotools texinfo +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch b/meta/recipes-support/libunwind/libunwind-1.1/AArch64-port.patch new file mode 100644 index 0000000000..228ec322d5 --- /dev/null +++ b/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 +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 ++ 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 ++#include ++#include ++ ++#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 ++ 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 ++ 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 ++#include ++ ++#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 ++ 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 ++#include ++ ++#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 ++ 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 ++ 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 ++ 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 ++#include ++ ++#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 ++ 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 ++ 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 ++ ++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 ++ ++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 ++#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 ++#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 ++#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 ++#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 ++#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 ++#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 ++#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 ++#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 ++#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 ++#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 ++#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 ++#include ++#include ++#include ++ ++#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 ++ 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 ++ 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 ++ ++#include ++ ++#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 ++ 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/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch b/meta/recipes-support/libunwind/libunwind-1.1/Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch new file mode 100644 index 0000000000..dc0f5c1b47 --- /dev/null +++ b/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 +--- + 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/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch new file mode 100644 index 0000000000..0e55c91b80 --- /dev/null +++ b/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 +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 +Signed-off-by: Jonathan Liu +--- + 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/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch b/meta/recipes-support/libunwind/libunwind-1.1/Support-building-with-older-compilers.patch new file mode 100644 index 0000000000..268b702dcb --- /dev/null +++ b/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 +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/meta/recipes-support/libunwind/libunwind.inc b/meta/recipes-support/libunwind/libunwind.inc new file mode 100644 index 0000000000..6743b21fcf --- /dev/null +++ b/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" + +SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz" + +inherit autotools + +PACKAGECONFIG ??= "" +PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,lzma" + +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 += "${LIBATOMICS}" +LIBATOMICS_armv5 = "-latomic_ops" +LIBATOMICS_armv4 = "-latomic_ops" +LIBATOMICS ?= "" + +DEPENDS += "${DEPLIBATOMICS}" +DEPLIBATOMICS_armv5 = "libatomics-ops" +DEPLIBATOMICS_armv4 = "libatomics-ops" +DEPLIBATOMICS ?= "" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-support/libunwind/libunwind_1.1.bb b/meta/recipes-support/libunwind/libunwind_1.1.bb new file mode 100644 index 0000000000..ee6f522d68 --- /dev/null +++ b/meta/recipes-support/libunwind/libunwind_1.1.bb @@ -0,0 +1,11 @@ +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 \ +" + +SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce" +SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a" diff --git a/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch b/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch new file mode 100644 index 0000000000..535a7384cb --- /dev/null +++ b/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 +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 +--- + 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/meta/recipes-support/liburcu/liburcu/patch-to-support-aarch64-builds-using-gcc-at.patch b/meta/recipes-support/liburcu/liburcu/patch-to-support-aarch64-builds-using-gcc-at.patch new file mode 100644 index 0000000000..fe43f60069 --- /dev/null +++ b/meta/recipes-support/liburcu/liburcu/patch-to-support-aarch64-builds-using-gcc-at.patch @@ -0,0 +1,11 @@ +diff -ruN a/configure.ac b/configure.ac +--- a/configure.ac 2014-11-17 15:17:03.671908297 +0100 ++++ b/configure.ac 2014-11-17 15:19:20.990058779 +0100 +@@ -79,6 +79,7 @@ + [arm*], [ARCHTYPE="arm"], + [mips*], [ARCHTYPE="mips"], + [tile*], [ARCHTYPE="gcc"], ++ [aarch64], [ARCHTYPE="gcc"], + [ARCHTYPE="unknown"] + ) + diff --git a/meta/recipes-support/liburcu/liburcu_0.8.4.bb b/meta/recipes-support/liburcu/liburcu_0.8.4.bb new file mode 100644 index 0000000000..09516dadc5 --- /dev/null +++ b/meta/recipes-support/liburcu/liburcu_0.8.4.bb @@ -0,0 +1,20 @@ +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://patch-to-support-aarch64-builds-using-gcc-at.patch \ + file://Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch \ + " + +SRC_URI[md5sum] = "2ca6671b20a550aa0e8020a1a9a96fd4" +SRC_URI[sha256sum] = "96c0a157e94a15b1506efe9aedd98145e6eb41a3fbcf5b0d118b7a783b22fe12" + +S = "${WORKDIR}/userspace-rcu-${PV}" +CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE" +inherit autotools diff --git a/meta/recipes-support/libusb/libusb-compat_0.1.5.bb b/meta/recipes-support/libusb/libusb-compat_0.1.5.bb new file mode 100644 index 0000000000..74761d6a44 --- /dev/null +++ b/meta/recipes-support/libusb/libusb-compat_0.1.5.bb @@ -0,0 +1,37 @@ +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" + +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/meta/recipes-support/libusb/libusb1_1.0.19.bb b/meta/recipes-support/libusb/libusb1_1.0.19.bb new file mode 100644 index 0000000000..a20e1fcdb8 --- /dev/null +++ b/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/meta/recipes-support/libxslt/libxslt/pkgconfig.patch b/meta/recipes-support/libxslt/libxslt/pkgconfig.patch new file mode 100644 index 0000000000..89d14c944d --- /dev/null +++ b/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/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch b/meta/recipes-support/libxslt/libxslt/pkgconfig_fix.patch new file mode 100644 index 0000000000..16a801010c --- /dev/null +++ b/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/meta/recipes-support/libxslt/libxslt_1.1.28.bb b/meta/recipes-support/libxslt/libxslt_1.1.28.bb new file mode 100644 index 0000000000..ded883e457 --- /dev/null +++ b/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" diff --git a/meta/recipes-support/lz4/lz4_svn.bb b/meta/recipes-support/lz4/lz4_svn.bb new file mode 100644 index 0000000000..bbd5d9391f --- /dev/null +++ b/meta/recipes-support/lz4/lz4_svn.bb @@ -0,0 +1,22 @@ +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://LICENSE;md5=0b0d063f37a4477b54af2459477dcafd \ + file://Makefile;md5=68938168b5cee826476a13e1b8d1f480" + +# Upstream names releases after SVN revs +SRCREV = "122" +PV = "r${SRCREV}" + +SRC_URI = "svn://lz4.googlecode.com/svn/;module=trunk;protocol=http" + +S = "${WORKDIR}/trunk" + +EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir}" + +do_install() { + oe_runmake install +} + +BBCLASSEXTEND += "native nativesdk" diff --git a/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch b/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch new file mode 100644 index 0000000000..c26891b46f --- /dev/null +++ b/meta/recipes-support/lzo/lzo/0001-Use-memcpy-instead-of-reinventing-it.patch @@ -0,0 +1,70 @@ +From: Simon McVittie +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 +--- + 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/meta/recipes-support/lzo/lzo/acinclude.m4 b/meta/recipes-support/lzo/lzo/acinclude.m4 new file mode 100644 index 0000000000..c4d2ccd5b5 --- /dev/null +++ b/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 +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 +#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 +#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 +#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/meta/recipes-support/lzo/lzo_2.08.bb b/meta/recipes-support/lzo/lzo_2.08.bb new file mode 100644 index 0000000000..af06e29a6f --- /dev/null +++ b/meta/recipes-support/lzo/lzo_2.08.bb @@ -0,0 +1,24 @@ +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=a6e25df9a83b24629e847846ccdd8054" + +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 \ + " + +SRC_URI[md5sum] = "fcec64c26a0f4f4901468f360029678f" +SRC_URI[sha256sum] = "ac1b3e4dee46febe9fd28737eb7f5692d3232ef1a01da10444394c3d47536614" + +inherit autotools + +EXTRA_OECONF = "--enable-shared" + +do_configure_prepend () { + cp ${WORKDIR}/acinclude.m4 ${S}/ +} + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/lzop/lzop/acinclude.m4 b/meta/recipes-support/lzop/lzop/acinclude.m4 new file mode 100644 index 0000000000..0029c19c7d --- /dev/null +++ b/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 +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 +#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 +#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 +#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 +#include ], [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/meta/recipes-support/lzop/lzop_1.03.bb b/meta/recipes-support/lzop/lzop_1.03.bb new file mode 100644 index 0000000000..abfc81cfb9 --- /dev/null +++ b/meta/recipes-support/lzop/lzop_1.03.bb @@ -0,0 +1,26 @@ +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" +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/meta/recipes-support/mpfr/mpfr-3.1.2/long-long-thumb.patch b/meta/recipes-support/mpfr/mpfr-3.1.2/long-long-thumb.patch new file mode 100644 index 0000000000..ca7100eb29 --- /dev/null +++ b/meta/recipes-support/mpfr/mpfr-3.1.2/long-long-thumb.patch @@ -0,0 +1,39 @@ +From 84021b1e236508169be65e802a9c0a25fc9a8827 Mon Sep 17 00:00:00 2001 +From: Phil Blundell +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 + +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/meta/recipes-support/mpfr/mpfr.inc b/meta/recipes-support/mpfr/mpfr.inc new file mode 100644 index 0000000000..7f3f9175dc --- /dev/null +++ b/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/meta/recipes-support/mpfr/mpfr_3.1.2.bb b/meta/recipes-support/mpfr/mpfr_3.1.2.bb new file mode 100644 index 0000000000..c05e956d5b --- /dev/null +++ b/meta/recipes-support/mpfr/mpfr_3.1.2.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] = "e3d203d188b8fe60bb6578dd3152e05c" +SRC_URI[sha256sum] = "399d0f47ef6608cc01d29ed1b99c7faff36d9994c45f36f41ba250147100453b" + +S = "${WORKDIR}/mpfr-${PV}" + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/neon/neon-0.30.0/pkgconfig.patch b/meta/recipes-support/neon/neon-0.30.0/pkgconfig.patch new file mode 100644 index 0000000000..1a2550c6fb --- /dev/null +++ b/meta/recipes-support/neon/neon-0.30.0/pkgconfig.patch @@ -0,0 +1,18 @@ +Upstream-Status: Inappropriate [configuration] + +--- + neon.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- neon-0.28.1.orig/neon.pc.in ++++ neon-0.28.1/neon.pc.in +@@ -4,8 +4,8 @@ libdir=@libdir@ + includedir=@includedir@ + + Name: neon + Description: HTTP/WebDAV client library + Version: @NEON_VERSION@ +-Libs.private: @NEON_LIBS@ ++Libs.private: -L${libdir} -lz -lgcrypt -lgpg-error -lexpat -lgnutls + Libs: -L${libdir} -lneon @NEON_PC_LIBS@ + Cflags: -I${includedir}/neon @NEON_CFLAGS@ diff --git a/meta/recipes-support/neon/neon_0.30.0.bb b/meta/recipes-support/neon/neon_0.30.0.bb new file mode 100644 index 0000000000..61bd7d9269 --- /dev/null +++ b/meta/recipes-support/neon/neon_0.30.0.bb @@ -0,0 +1,22 @@ +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" +SRC_URI[md5sum] = "fb60b3a124eeec441937a812c456fd94" +SRC_URI[sha256sum] = "2962cfcb5d30f3272e3d2fa0e473434419770a3801afe3d46e5d1650787990c2" + +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" diff --git a/meta/recipes-support/nettle/nettle_2.7.1.bb b/meta/recipes-support/nettle/nettle_2.7.1.bb new file mode 100644 index 0000000000..f53afcc5d4 --- /dev/null +++ b/meta/recipes-support/nettle/nettle_2.7.1.bb @@ -0,0 +1,26 @@ +SUMMARY = "A low level cryptographic library" +HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/" +SECTION = "libs" +LICENSE = "LGPLv2.1 & GPLv2" +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" + +SRC_URI[md5sum] = "003d5147911317931dd453520eb234a5" +SRC_URI[sha256sum] = "bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40" + +EXTRA_OECONF = "--disable-openssl" + +do_configure_prepend() { + if [ ! -e ${S}/acinclude.m4 -a -e ${S}/aclocal.m4 ]; then + cp ${S}/aclocal.m4 ${S}/acinclude.m4 + fi +} + +inherit autotools + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/npth/npth_0.91.bb b/meta/recipes-support/npth/npth_0.91.bb new file mode 100644 index 0000000000..7105b94e3d --- /dev/null +++ b/meta/recipes-support/npth/npth_0.91.bb @@ -0,0 +1,19 @@ +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 \ + " +SRC_URI[md5sum] = "87712f0cee656c390b49773923e26e7f" +SRC_URI[sha256sum] = "caef86ced4a331e162897818a5b924860c8d6003e52da5bdf76da00e8e0dfae1" + +BINCONFIG = "${bindir}/npth-config" + +inherit autotools binconfig-disabled + +FILES_${PN} = "${libdir}/libnpth.so.*" +FILES_${PN}-dev += "${bindir}/npth-config" diff --git a/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch b/meta/recipes-support/nspr/nspr/fix-build-on-x86_64.patch new file mode 100644 index 0000000000..c2b7258e50 --- /dev/null +++ b/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 + +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/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch b/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch new file mode 100644 index 0000000000..565ff168e0 --- /dev/null +++ b/meta/recipes-support/nspr/nspr/nspr-CVE-2014-1545.patch @@ -0,0 +1,67 @@ +Fix for CVE-2014-1545 + +Upstream-Status: Backport + +Backported from nspr-4.10.6.tar.gz. +--- +--- a/pr/src/io/prprf.c ++++ b/pr/src/io/prprf.c +@@ -50,6 +50,10 @@ + #include "prlog.h" + #include "prmem.h" + ++#ifdef _MSC_VER ++#define snprintf _snprintf ++#endif ++ + /* + ** WARNING: This code may *NOT* call PR_LOG (because PR_LOG calls it) + */ +@@ -330,7 +334,7 @@ + ** Convert a double precision floating point number into its printable + ** form. + ** +-** XXX stop using sprintf to convert floating point ++** XXX stop using snprintf to convert floating point + */ + static int cvt_f(SprintfState *ss, double d, const char *fmt0, const char *fmt1) + { +@@ -338,15 +342,14 @@ + char fout[300]; + int amount = fmt1 - fmt0; + +- PR_ASSERT((amount > 0) && (amount < sizeof(fin))); +- if (amount >= sizeof(fin)) { +- /* Totally bogus % command to sprintf. Just ignore it */ ++ if (amount <= 0 || amount >= sizeof(fin)) { ++ /* Totally bogus % command to snprintf. Just ignore it */ + return 0; + } + memcpy(fin, fmt0, amount); + fin[amount] = 0; + +- /* Convert floating point using the native sprintf code */ ++ /* Convert floating point using the native snprintf code */ + #ifdef DEBUG + { + const char *p = fin; +@@ -356,14 +359,11 @@ + } + } + #endif +- sprintf(fout, fin, d); +- +- /* +- ** This assert will catch overflow's of fout, when building with +- ** debugging on. At least this way we can track down the evil piece +- ** of calling code and fix it! +- */ +- PR_ASSERT(strlen(fout) < sizeof(fout)); ++ memset(fout, 0, sizeof(fout)); ++ snprintf(fout, sizeof(fout), fin, d); ++ /* Explicitly null-terminate fout because on Windows snprintf doesn't ++ * append a null-terminator if the buffer is too small. */ ++ fout[sizeof(fout) - 1] = '\0'; + + return (*ss->stuff)(ss, fout, strlen(fout)); + } diff --git a/meta/recipes-support/nspr/nspr/nspr.pc.in b/meta/recipes-support/nspr/nspr/nspr.pc.in new file mode 100644 index 0000000000..c37d0bcbd7 --- /dev/null +++ b/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/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch new file mode 100644 index 0000000000..a7e7853de1 --- /dev/null +++ b/meta/recipes-support/nspr/nspr/remove-rpath-from-tests.patch @@ -0,0 +1,26 @@ +Author: Andrei Gherzan +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 +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/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch b/meta/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch new file mode 100644 index 0000000000..bde715c5dc --- /dev/null +++ b/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 + +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/meta/recipes-support/nspr/nspr_4.10.7.bb b/meta/recipes-support/nspr/nspr_4.10.7.bb new file mode 100644 index 0000000000..69e9dfa6a3 --- /dev/null +++ b/meta/recipes-support/nspr/nspr_4.10.7.bb @@ -0,0 +1,172 @@ +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] = "6e06919e4b56efed501e05d8b45ec10e" +SRC_URI[sha256sum] = "389af5cfa863ea9bc6de7b30c15f8a4f9bddd8002f8c6fdc8b33caef43893938" + +S = "${WORKDIR}/nspr-${PV}/nspr" + +RDEPENDS_${PN}-dev += "perl" +TARGET_CC_ARCH += "${LDFLAGS}" + +TESTS = "runtests.pl \ + runtests.sh \ + accept \ + acceptread \ + acceptreademu \ + affinity \ + alarm \ + anonfm \ + atomic \ + attach \ + bigfile \ + cleanup \ + cltsrv \ + concur \ + cvar \ + cvar2 \ + dlltest \ + dtoa \ + errcodes \ + exit \ + fdcach \ + fileio \ + foreign \ + formattm \ + fsync \ + gethost \ + getproto \ + i2l \ + initclk \ + inrval \ + instrumt \ + intrio \ + intrupt \ + io_timeout \ + ioconthr \ + join \ + joinkk \ + joinku \ + joinuk \ + joinuu \ + layer \ + lazyinit \ + libfilename \ + lltest \ + lock \ + lockfile \ + logfile \ + logger \ + many_cv \ + multiwait \ + nameshm1 \ + nblayer \ + nonblock \ + ntioto \ + ntoh \ + op_2long \ + op_excl \ + op_filnf \ + op_filok \ + op_nofil \ + parent \ + parsetm \ + peek \ + perf \ + pipeping \ + pipeping2 \ + pipeself \ + poll_nm \ + poll_to \ + pollable \ + prftest \ + primblok \ + provider \ + prpollml \ + ranfile \ + randseed \ + reinit \ + rwlocktest \ + sel_spd \ + selct_er \ + selct_nm \ + selct_to \ + selintr \ + sema \ + semaerr \ + semaping \ + sendzlf \ + server_test \ + servr_kk \ + servr_uk \ + servr_ku \ + servr_uu \ + short_thread \ + sigpipe \ + socket \ + sockopt \ + sockping \ + sprintf \ + stack \ + stdio \ + str2addr \ + strod \ + switch \ + system \ + testbit \ + testfile \ + threads \ + timemac \ + timetest \ + tpd \ + udpsrv \ + vercheck \ + version \ + writev \ + xnotify \ + zerolen" + +inherit autotools-brokensep + +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 + cd ${S}/pr/tests + mkdir -p ${D}${libdir}/nspr/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/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb new file mode 100644 index 0000000000..bbce9e9af0 --- /dev/null +++ b/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*\//' \ + -e 's/\(^hosts:.*\)\(\\)\(.*\)\(\\)\(.*\)/\1\2 myhostname \3\4\5/' \ + -i $D${sysconfdir}/nsswitch.conf +} + +pkg_prerm_${PN} () { + sed -e '/^hosts:/s/\s*\//' \ + -e '/^hosts:/s/\s*myhostname//' \ + -i $D${sysconfdir}/nsswitch.conf +} diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch new file mode 100644 index 0000000000..1a159c3934 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1739.patch @@ -0,0 +1,81 @@ +Upstream-Status: Backport +Signed-off-by: yzhu1 + +--- a/nss/lib/ssl/ssl3con.c ++++ b/nss/lib/ssl/ssl3con.c +@@ -10509,7 +10509,7 @@ ssl_RemoveSSLv3CBCPadding(sslBuffer *pla + /* SSLv3 padding bytes are random and cannot be checked. */ + t = plaintext->len; + t -= paddingLength+overhead; +- /* If len >= padding_length+overhead then the MSB of t is zero. */ ++ /* If len >= paddingLength+overhead then the MSB of t is zero. */ + good = DUPLICATE_MSB_TO_ALL(~t); + /* SSLv3 requires that the padding is minimal. */ + t = blockSize - (paddingLength+1); +@@ -10742,7 +10742,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip + } + } + +- good = (unsigned)-1; ++ good = ~0U; + minLength = crSpec->mac_size; + if (cipher_def->type == type_block) { + /* CBC records have a padding length byte at the end. */ +@@ -10756,14 +10756,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip + /* We can perform this test in variable time because the record's total + * length and the ciphersuite are both public knowledge. */ + if (cText->buf->len < minLength) { +- SSL_DBG(("%d: SSL3[%d]: HandleRecord, record too small.", +- SSL_GETPID(), ss->fd)); +- /* must not hold spec lock when calling SSL3_SendAlert. */ +- ssl_ReleaseSpecReadLock(ss); +- SSL3_SendAlert(ss, alert_fatal, bad_record_mac); +- /* always log mac error, in case attacker can read server logs. */ +- PORT_SetError(SSL_ERROR_BAD_MAC_READ); +- return SECFailure; ++ goto decrypt_loser; + } + + if (cipher_def->type == type_block && +@@ -10831,11 +10824,18 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip + return SECFailure; + } + ++ if (cipher_def->type == type_block && ++ ((cText->buf->len - ivLen) % cipher_def->block_size) != 0) { ++ goto decrypt_loser; ++ } ++ + /* decrypt from cText buf to plaintext. */ + rv = crSpec->decode( + crSpec->decodeContext, plaintext->buf, (int *)&plaintext->len, + plaintext->space, cText->buf->buf + ivLen, cText->buf->len - ivLen); +- good &= SECStatusToMask(rv); ++ if (rv != SECSuccess) { ++ goto decrypt_loser; ++ } + + PRINT_BUF(80, (ss, "cleartext:", plaintext->buf, plaintext->len)); + +@@ -10843,7 +10843,7 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip + + /* If it's a block cipher, check and strip the padding. */ + if (cipher_def->type == type_block) { +- const unsigned int blockSize = cipher_def->iv_size; ++ const unsigned int blockSize = cipher_def->block_size; + const unsigned int macSize = crSpec->mac_size; + + if (crSpec->version <= SSL_LIBRARY_VERSION_3_0) { +@@ -10899,10 +10899,11 @@ ssl3_HandleRecord(sslSocket *ss, SSL3Cip + } + + if (good == 0) { ++decrypt_loser: + /* must not hold spec lock when calling SSL3_SendAlert. */ + ssl_ReleaseSpecReadLock(ss); + +- SSL_DBG(("%d: SSL3[%d]: mac check failed", SSL_GETPID(), ss->fd)); ++ SSL_DBG(("%d: SSL3[%d]: decryption failed", SSL_GETPID(), ss->fd)); + + if (!IS_DTLS(ss)) { + SSL3_SendAlert(ss, alert_fatal, bad_record_mac); diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch new file mode 100644 index 0000000000..21da0c03b5 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-1741.patch @@ -0,0 +1,92 @@ +Upstream-Status: backport +yanjun.zhu +--- a/nss/lib/util/secport.c ++++ b/nss/lib/util/secport.c +@@ -69,13 +69,22 @@ PORTCharConversionFunc ucs4Utf8ConvertFu + PORTCharConversionFunc ucs2Utf8ConvertFunc; + PORTCharConversionWSwapFunc ucs2AsciiConvertFunc; + ++/* NSPR memory allocation functions (PR_Malloc, PR_Calloc, and PR_Realloc) ++ * use the PRUint32 type for the size parameter. Before we pass a size_t or ++ * unsigned long size to these functions, we need to ensure it is <= half of ++ * the maximum PRUint32 value to avoid truncation and catch a negative size. ++ */ ++#define MAX_SIZE (PR_UINT32_MAX >> 1) ++ + void * + PORT_Alloc(size_t bytes) + { +- void *rv; ++ void *rv = NULL; + +- /* Always allocate a non-zero amount of bytes */ +- rv = (void *)PR_Malloc(bytes ? bytes : 1); ++ if (bytes <= MAX_SIZE) { ++ /* Always allocate a non-zero amount of bytes */ ++ rv = PR_Malloc(bytes ? bytes : 1); ++ } + if (!rv) { + ++port_allocFailures; + PORT_SetError(SEC_ERROR_NO_MEMORY); +@@ -86,9 +95,11 @@ PORT_Alloc(size_t bytes) + void * + PORT_Realloc(void *oldptr, size_t bytes) + { +- void *rv; ++ void *rv = NULL; + +- rv = (void *)PR_Realloc(oldptr, bytes); ++ if (bytes <= MAX_SIZE) { ++ rv = PR_Realloc(oldptr, bytes); ++ } + if (!rv) { + ++port_allocFailures; + PORT_SetError(SEC_ERROR_NO_MEMORY); +@@ -99,10 +110,12 @@ PORT_Realloc(void *oldptr, size_t bytes) + void * + PORT_ZAlloc(size_t bytes) + { +- void *rv; ++ void *rv = NULL; + +- /* Always allocate a non-zero amount of bytes */ +- rv = (void *)PR_Calloc(1, bytes ? bytes : 1); ++ if (bytes <= MAX_SIZE) { ++ /* Always allocate a non-zero amount of bytes */ ++ rv = PR_Calloc(1, bytes ? bytes : 1); ++ } + if (!rv) { + ++port_allocFailures; + PORT_SetError(SEC_ERROR_NO_MEMORY); +@@ -209,6 +222,10 @@ PORT_NewArena(unsigned long chunksize) + { + PORTArenaPool *pool; + ++ if (chunksize > MAX_SIZE) { ++ PORT_SetError(SEC_ERROR_NO_MEMORY); ++ return NULL; ++ } + pool = PORT_ZNew(PORTArenaPool); + if (!pool) { + return NULL; +@@ -224,8 +241,6 @@ PORT_NewArena(unsigned long chunksize) + return(&pool->arena); + } + +-#define MAX_SIZE 0x7fffffffUL +- + void * + PORT_ArenaAlloc(PLArenaPool *arena, size_t size) + { +@@ -330,6 +345,11 @@ PORT_ArenaGrow(PLArenaPool *arena, void + PORTArenaPool *pool = (PORTArenaPool *)arena; + PORT_Assert(newsize >= oldsize); + ++ if (newsize > MAX_SIZE) { ++ PORT_SetError(SEC_ERROR_NO_MEMORY); ++ return NULL; ++ } ++ + if (ARENAPOOL_MAGIC == pool->magic ) { + PZ_Lock(pool->lock); + /* Do we do a THREADMARK check here? */ diff --git a/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch new file mode 100644 index 0000000000..7203d02c78 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-3.15.1-fix-CVE-2013-5605.patch @@ -0,0 +1,18 @@ +signed-off-by: Ryan Sleevi +Upstream-Status: Backport +reference:https://hg.mozilla.org/projects/nss/rev/e79a09364b5e + +--- a/nss/lib/ssl/ssl3con.c ++++ b/nss/lib/ssl/ssl3con.c +@@ -781,6 +781,11 @@ static SECStatus + Null_Cipher(void *ctx, unsigned char *output, int *outputLen, int maxOutputLen, + const unsigned char *input, int inputLen) + { ++ if (inputLen > maxOutputLen) { ++ *outputLen = 0; /* Match PK11_CipherOp in setting outputLen */ ++ PORT_SetError(SEC_ERROR_OUTPUT_LEN); ++ return SECFailure; ++ } + *outputLen = inputLen; + if (input != output) + PORT_Memcpy(output, input, inputLen); diff --git a/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch b/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch new file mode 100644 index 0000000000..db3d6f9103 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-CVE-2013-1740.patch @@ -0,0 +1,916 @@ +nss: CVE-2013-1740 + +Upstream-Status: Backport + +the patch comes from: +http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-1740 +https://bugzilla.mozilla.org/show_bug.cgi?id=919877 +https://bugzilla.mozilla.org/show_bug.cgi?id=713933 + +changeset: 10946:f28426e944ae +user: Wan-Teh Chang +date: Tue Nov 26 16:44:39 2013 -0800 +summary: Bug 713933: Handle the return value of both ssl3_HandleRecord calls + +changeset: 10945:774c7dec7565 +user: Wan-Teh Chang +date: Mon Nov 25 19:16:23 2013 -0800 +summary: Bug 713933: Declare the |falseStart| local variable in the smallest + +changeset: 10848:141fae8fb2e8 +user: Wan-Teh Chang +date: Mon Sep 23 11:25:41 2013 -0700 +summary: Bug 681839: Allow SSL_HandshakeNegotiatedExtension to be called before the handshake is finished, r=brian@briansmith.org + +changeset: 10898:1b9c43d28713 +user: Brian Smith +date: Thu Oct 31 15:40:42 2013 -0700 +summary: Bug 713933: Make SSL False Start work with asynchronous certificate validation, r=wtc + +Signed-off-by: Li Wang +--- + nss/lib/ssl/ssl.def | 7 ++ + nss/lib/ssl/ssl.h | 54 +++++++++++--- + nss/lib/ssl/ssl3con.c | 188 +++++++++++++++++++++++++++++++++++------------ + nss/lib/ssl/ssl3gthr.c | 63 ++++++++++++---- + nss/lib/ssl/sslauth.c | 10 +-- + nss/lib/ssl/sslimpl.h | 22 +++++- + nss/lib/ssl/sslinfo.c | 10 +-- + nss/lib/ssl/sslreveal.c | 9 +-- + nss/lib/ssl/sslsecur.c | 139 ++++++++++++++++++++++++++++------- + nss/lib/ssl/sslsock.c | 12 ++- + 10 files changed, 386 insertions(+), 128 deletions(-) + +diff --git a/nss/lib/ssl/ssl.def b/nss/lib/ssl/ssl.def +index fbf7fc5..e937bd4 100644 +--- a/nss/lib/ssl/ssl.def ++++ b/nss/lib/ssl/ssl.def +@@ -163,3 +163,10 @@ SSL_SetStapledOCSPResponses; + ;+ local: + ;+*; + ;+}; ++;+NSS_3.15.3 { # NSS 3.15.3 release ++;+ global: ++SSL_RecommendedCanFalseStart; ++SSL_SetCanFalseStartCallback; ++;+ local: ++;+*; ++;+}; +diff --git a/nss/lib/ssl/ssl.h b/nss/lib/ssl/ssl.h +index 6db0e34..ddeaaef 100644 +--- a/nss/lib/ssl/ssl.h ++++ b/nss/lib/ssl/ssl.h +@@ -121,14 +121,17 @@ SSL_IMPORT PRFileDesc *DTLS_ImportFD(PRFileDesc *model, PRFileDesc *fd); + #define SSL_ENABLE_FALSE_START 22 /* Enable SSL false start (off by */ + /* default, applies only to */ + /* clients). False start is a */ +-/* mode where an SSL client will start sending application data before */ +-/* verifying the server's Finished message. This means that we could end up */ +-/* sending data to an imposter. However, the data will be encrypted and */ +-/* only the true server can derive the session key. Thus, so long as the */ +-/* cipher isn't broken this is safe. Because of this, False Start will only */ +-/* occur on RSA or DH ciphersuites where the cipher's key length is >= 80 */ +-/* bits. The advantage of False Start is that it saves a round trip for */ +-/* client-speaks-first protocols when performing a full handshake. */ ++/* mode where an SSL client will start sending application data before ++ * verifying the server's Finished message. This means that we could end up ++ * sending data to an imposter. However, the data will be encrypted and ++ * only the true server can derive the session key. Thus, so long as the ++ * cipher isn't broken this is safe. The advantage of false start is that ++ * it saves a round trip for client-speaks-first protocols when performing a ++ * full handshake. ++ * ++ * In addition to enabling this option, the application must register a ++ * callback using the SSL_SetCanFalseStartCallback function. ++ */ + + /* For SSL 3.0 and TLS 1.0, by default we prevent chosen plaintext attacks + * on SSL CBC mode cipher suites (see RFC 4346 Section F.3) by splitting +@@ -653,14 +656,45 @@ SSL_IMPORT SECStatus SSL_SetMaxServerCacheLocks(PRUint32 maxLocks); + SSL_IMPORT SECStatus SSL_InheritMPServerSIDCache(const char * envString); + + /* +-** Set the callback on a particular socket that gets called when we finish +-** performing a handshake. ++** Set the callback that gets called when a TLS handshake is complete. The ++** handshake callback is called after verifying the peer's Finished message and ++** before processing incoming application data. ++** ++** For the initial handshake: If the handshake false started (see ++** SSL_ENABLE_FALSE_START), then application data may already have been sent ++** before the handshake callback is called. If we did not false start then the ++** callback will get called before any application data is sent. + */ + typedef void (PR_CALLBACK *SSLHandshakeCallback)(PRFileDesc *fd, + void *client_data); + SSL_IMPORT SECStatus SSL_HandshakeCallback(PRFileDesc *fd, + SSLHandshakeCallback cb, void *client_data); + ++/* Applications that wish to enable TLS false start must set this callback ++** function. NSS will invoke the functon to determine if a particular ++** connection should use false start or not. SECSuccess indicates that the ++** callback completed successfully, and if so *canFalseStart indicates if false ++** start can be used. If the callback does not return SECSuccess then the ++** handshake will be canceled. NSS's recommended criteria can be evaluated by ++** calling SSL_RecommendedCanFalseStart. ++** ++** If no false start callback is registered then false start will never be ++** done, even if the SSL_ENABLE_FALSE_START option is enabled. ++**/ ++typedef SECStatus (PR_CALLBACK *SSLCanFalseStartCallback)( ++ PRFileDesc *fd, void *arg, PRBool *canFalseStart); ++ ++SSL_IMPORT SECStatus SSL_SetCanFalseStartCallback( ++ PRFileDesc *fd, SSLCanFalseStartCallback callback, void *arg); ++ ++/* This function sets *canFalseStart according to the recommended criteria for ++** false start. These criteria may change from release to release and may depend ++** on which handshake features have been negotiated and/or properties of the ++** certifciates/keys used on the connection. ++*/ ++SSL_IMPORT SECStatus SSL_RecommendedCanFalseStart(PRFileDesc *fd, ++ PRBool *canFalseStart); ++ + /* + ** For the server, request a new handshake. For the client, begin a new + ** handshake. If flushCache is non-zero, the SSL3 cache entry will be +diff --git a/nss/lib/ssl/ssl3con.c b/nss/lib/ssl/ssl3con.c +index 61d24d9..f39ba09 100644 +--- a/nss/lib/ssl/ssl3con.c ++++ b/nss/lib/ssl/ssl3con.c +@@ -2535,7 +2535,7 @@ ssl3_SendRecord( sslSocket * ss, + SSL_TRC(3, ("%d: SSL3[%d] SendRecord type: %s nIn=%d", + SSL_GETPID(), ss->fd, ssl3_DecodeContentType(type), + nIn)); +- PRINT_BUF(3, (ss, "Send record (plain text)", pIn, nIn)); ++ PRINT_BUF(50, (ss, "Send record (plain text)", pIn, nIn)); + + PORT_Assert( ss->opt.noLocks || ssl_HaveXmitBufLock(ss) ); + +@@ -6674,36 +6674,73 @@ done: + return rv; + } + ++static SECStatus ++ssl3_CheckFalseStart(sslSocket *ss) ++{ ++ PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); ++ PORT_Assert( !ss->ssl3.hs.authCertificatePending ); ++ PORT_Assert( !ss->ssl3.hs.canFalseStart ); ++ ++ if (!ss->canFalseStartCallback) { ++ SSL_TRC(3, ("%d: SSL[%d]: no false start callback so no false start", ++ SSL_GETPID(), ss->fd)); ++ } else { ++ PRBool maybeFalseStart; ++ SECStatus rv; ++ ++ /* An attacker can control the selected ciphersuite so we only wish to ++ * do False Start in the case that the selected ciphersuite is ++ * sufficiently strong that the attack can gain no advantage. ++ * Therefore we always require an 80-bit cipher. */ ++ ssl_GetSpecReadLock(ss); ++ maybeFalseStart = ss->ssl3.cwSpec->cipher_def->secret_key_size >= 10; ++ ssl_ReleaseSpecReadLock(ss); ++ ++ if (!maybeFalseStart) { ++ SSL_TRC(3, ("%d: SSL[%d]: no false start due to weak cipher", ++ SSL_GETPID(), ss->fd)); ++ } else { ++ rv = (ss->canFalseStartCallback)(ss->fd, ++ ss->canFalseStartCallbackData, ++ &ss->ssl3.hs.canFalseStart); ++ if (rv == SECSuccess) { ++ SSL_TRC(3, ("%d: SSL[%d]: false start callback returned %s", ++ SSL_GETPID(), ss->fd, ++ ss->ssl3.hs.canFalseStart ? "TRUE" : "FALSE")); ++ } else { ++ SSL_TRC(3, ("%d: SSL[%d]: false start callback failed (%s)", ++ SSL_GETPID(), ss->fd, ++ PR_ErrorToName(PR_GetError()))); ++ } ++ return rv; ++ } ++ } ++ ++ ss->ssl3.hs.canFalseStart = PR_FALSE; ++ return SECSuccess; ++} ++ + PRBool +-ssl3_CanFalseStart(sslSocket *ss) { +- PRBool rv; ++ssl3_WaitingForStartOfServerSecondRound(sslSocket *ss) ++{ ++ PRBool result = PR_FALSE; + + PORT_Assert( ss->opt.noLocks || ssl_HaveSSL3HandshakeLock(ss) ); + +- /* XXX: does not take into account whether we are waiting for +- * SSL_AuthCertificateComplete or SSL_RestartHandshakeAfterCertReq. If/when +- * that is done, this function could return different results each time it +- * would be called. +- */ ++ switch (ss->ssl3.hs.ws) { ++ case wait_new_session_ticket: ++ result = PR_TRUE; ++ break; ++ case wait_change_cipher: ++ result = !ssl3_ExtensionNegotiated(ss, ssl_session_ticket_xtn); ++ break; ++ case wait_finished: ++ break; ++ default: ++ PR_NOT_REACHED("ssl3_WaitingForStartOfServerSecondRound"); ++ } + +- ssl_GetSpecReadLock(ss); +- rv = ss->opt.enableFalseStart && +- !ss->sec.isServer && +- !ss->ssl3.hs.isResuming && +- ss->ssl3.cwSpec && +- +- /* An attacker can control the selected ciphersuite so we only wish to +- * do False Start in the case that the selected ciphersuite is +- * sufficiently strong that the attack can gain no advantage. +- * Therefore we require an 80-bit cipher and a forward-secret key +- * exchange. */ +- ss->ssl3.cwSpec->cipher_def->secret_key_size >= 10 && +- (ss->ssl3.hs.kea_def->kea == kea_dhe_dss || +- ss->ssl3.hs.kea_def->kea == kea_dhe_rsa || +- ss->ssl3.hs.kea_def->kea == kea_ecdhe_ecdsa || +- ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa); +- ssl_ReleaseSpecReadLock(ss); +- return rv; ++ return result; + } + + static SECStatus ssl3_SendClientSecondRound(sslSocket *ss); +@@ -6785,6 +6822,9 @@ ssl3_SendClientSecondRound(sslSocket *ss) + } + if (ss->ssl3.hs.authCertificatePending && + (sendClientCert || ss->ssl3.sendEmptyCert || ss->firstHsDone)) { ++ SSL_TRC(3, ("%d: SSL3[%p]: deferring ssl3_SendClientSecondRound because" ++ " certificate authentication is still pending.", ++ SSL_GETPID(), ss->fd)); + ss->ssl3.hs.restartTarget = ssl3_SendClientSecondRound; + return SECWouldBlock; + } +@@ -6822,14 +6862,50 @@ ssl3_SendClientSecondRound(sslSocket *ss) + goto loser; /* err code was set. */ + } + +- /* XXX: If the server's certificate hasn't been authenticated by this +- * point, then we may be leaking this NPN message to an attacker. ++ /* This must be done after we've set ss->ssl3.cwSpec in ++ * ssl3_SendChangeCipherSpecs because SSL_GetChannelInfo uses information ++ * from cwSpec. This must be done before we call ssl3_CheckFalseStart ++ * because the false start callback (if any) may need the information from ++ * the functions that depend on this being set. + */ ++ ss->enoughFirstHsDone = PR_TRUE; ++ + if (!ss->firstHsDone) { ++ /* XXX: If the server's certificate hasn't been authenticated by this ++ * point, then we may be leaking this NPN message to an attacker. ++ */ + rv = ssl3_SendNextProto(ss); + if (rv != SECSuccess) { + goto loser; /* err code was set. */ + } ++ ++ if (ss->opt.enableFalseStart) { ++ if (!ss->ssl3.hs.authCertificatePending) { ++ /* When we fix bug 589047, we will need to know whether we are ++ * false starting before we try to flush the client second ++ * round to the network. With that in mind, we purposefully ++ * call ssl3_CheckFalseStart before calling ssl3_SendFinished, ++ * which includes a call to ssl3_FlushHandshake, so that ++ * no application develops a reliance on such flushing being ++ * done before its false start callback is called. ++ */ ++ ssl_ReleaseXmitBufLock(ss); ++ rv = ssl3_CheckFalseStart(ss); ++ ssl_GetXmitBufLock(ss); ++ if (rv != SECSuccess) { ++ goto loser; ++ } ++ } else { ++ /* The certificate authentication and the server's Finished ++ * message are racing each other. If the certificate ++ * authentication wins, then we will try to false start in ++ * ssl3_AuthCertificateComplete. ++ */ ++ SSL_TRC(3, ("%d: SSL3[%p]: deferring false start check because" ++ " certificate authentication is still pending.", ++ SSL_GETPID(), ss->fd)); ++ } ++ } + } + + rv = ssl3_SendFinished(ss, 0); +@@ -6844,10 +6920,7 @@ ssl3_SendClientSecondRound(sslSocket *ss) + else + ss->ssl3.hs.ws = wait_change_cipher; + +- /* Do the handshake callback for sslv3 here, if we can false start. */ +- if (ss->handshakeCallback != NULL && ssl3_CanFalseStart(ss)) { +- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData); +- } ++ PORT_Assert(ssl3_WaitingForStartOfServerSecondRound(ss)); + + return SECSuccess; + +@@ -9421,13 +9494,6 @@ ssl3_AuthCertificate(sslSocket *ss) + + ss->ssl3.hs.authCertificatePending = PR_TRUE; + rv = SECSuccess; +- +- /* XXX: Async cert validation and False Start don't work together +- * safely yet; if we leave False Start enabled, we may end up false +- * starting (sending application data) before we +- * SSL_AuthCertificateComplete has been called. +- */ +- ss->opt.enableFalseStart = PR_FALSE; + } + + if (rv != SECSuccess) { +@@ -9551,6 +9617,12 @@ ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error) + } else if (ss->ssl3.hs.restartTarget != NULL) { + sslRestartTarget target = ss->ssl3.hs.restartTarget; + ss->ssl3.hs.restartTarget = NULL; ++ ++ if (target == ssl3_FinishHandshake) { ++ SSL_TRC(3,("%d: SSL3[%p]: certificate authentication lost the race" ++ " with peer's finished message", SSL_GETPID(), ss->fd)); ++ } ++ + rv = target(ss); + /* Even if we blocked here, we have accomplished enough to claim + * success. Any remaining work will be taken care of by subsequent +@@ -9560,7 +9632,29 @@ ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error) + rv = SECSuccess; + } + } else { +- rv = SECSuccess; ++ SSL_TRC(3, ("%d: SSL3[%p]: certificate authentication won the race with" ++ " peer's finished message", SSL_GETPID(), ss->fd)); ++ ++ PORT_Assert(!ss->firstHsDone); ++ PORT_Assert(!ss->sec.isServer); ++ PORT_Assert(!ss->ssl3.hs.isResuming); ++ PORT_Assert(ss->ssl3.hs.ws == wait_new_session_ticket || ++ ss->ssl3.hs.ws == wait_change_cipher || ++ ss->ssl3.hs.ws == wait_finished); ++ ++ /* ssl3_SendClientSecondRound deferred the false start check because ++ * certificate authentication was pending, so we do it now if we still ++ * haven't received any of the server's second round yet. ++ */ ++ if (ss->opt.enableFalseStart && ++ !ss->firstHsDone && ++ !ss->sec.isServer && ++ !ss->ssl3.hs.isResuming && ++ ssl3_WaitingForStartOfServerSecondRound(ss)) { ++ rv = ssl3_CheckFalseStart(ss); ++ } else { ++ rv = SECSuccess; ++ } + } + + done: +@@ -10023,9 +10117,6 @@ xmit_loser: + return rv; + } + +- ss->gs.writeOffset = 0; +- ss->gs.readOffset = 0; +- + if (ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa) { + effectiveExchKeyType = kt_rsa; + } else { +@@ -10090,6 +10181,9 @@ xmit_loser: + return rv; + } + ++/* The return type is SECStatus instead of void because this function needs ++ * to have type sslRestartTarget. ++ */ + SECStatus + ssl3_FinishHandshake(sslSocket * ss) + { +@@ -10099,19 +10193,16 @@ ssl3_FinishHandshake(sslSocket * ss) + + /* The first handshake is now completed. */ + ss->handshake = NULL; +- ss->firstHsDone = PR_TRUE; + + if (ss->ssl3.hs.cacheSID) { + (*ss->sec.cache)(ss->sec.ci.sid); + ss->ssl3.hs.cacheSID = PR_FALSE; + } + ++ ss->ssl3.hs.canFalseStart = PR_FALSE; /* False Start phase is complete */ + ss->ssl3.hs.ws = idle_handshake; + +- /* Do the handshake callback for sslv3 here, if we cannot false start. */ +- if (ss->handshakeCallback != NULL && !ssl3_CanFalseStart(ss)) { +- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData); +- } ++ ssl_FinishHandshake(ss); + + return SECSuccess; + } +@@ -11045,7 +11136,6 @@ process_it: + + ssl_ReleaseSSL3HandshakeLock(ss); + return rv; +- + } + + /* +diff --git a/nss/lib/ssl/ssl3gthr.c b/nss/lib/ssl/ssl3gthr.c +index 6d62515..03e369d 100644 +--- a/nss/lib/ssl/ssl3gthr.c ++++ b/nss/lib/ssl/ssl3gthr.c +@@ -275,11 +275,17 @@ ssl3_GatherCompleteHandshake(sslSocket *ss, int flags) + { + SSL3Ciphertext cText; + int rv; +- PRBool canFalseStart = PR_FALSE; ++ PRBool keepGoing = PR_TRUE; + + SSL_TRC(30, ("ssl3_GatherCompleteHandshake")); + ++ /* ssl3_HandleRecord may end up eventually calling ssl_FinishHandshake, ++ * which requires the 1stHandshakeLock, which must be acquired before the ++ * RecvBufLock. ++ */ ++ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) ); + PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); ++ + do { + PRBool handleRecordNow = PR_FALSE; + +@@ -368,20 +374,48 @@ ssl3_GatherCompleteHandshake(sslSocket *ss, int flags) + if (rv < 0) { + return ss->recvdCloseNotify ? 0 : rv; + } ++ if (rv == (int) SECSuccess && ss->gs.buf.len > 0) { ++ /* We have application data to return to the application. This ++ * prioritizes returning application data to the application over ++ * completing any renegotiation handshake we may be doing. ++ */ ++ PORT_Assert(ss->firstHsDone); ++ PORT_Assert(cText.type == content_application_data); ++ break; ++ } + +- /* If we kicked off a false start in ssl3_HandleServerHelloDone, break +- * out of this loop early without finishing the handshake. +- */ +- if (ss->opt.enableFalseStart) { +- ssl_GetSSL3HandshakeLock(ss); +- canFalseStart = (ss->ssl3.hs.ws == wait_change_cipher || +- ss->ssl3.hs.ws == wait_new_session_ticket) && +- ssl3_CanFalseStart(ss); +- ssl_ReleaseSSL3HandshakeLock(ss); ++ PORT_Assert(keepGoing); ++ ssl_GetSSL3HandshakeLock(ss); ++ if (ss->ssl3.hs.ws == idle_handshake) { ++ /* We are done with the current handshake so stop trying to ++ * handshake. Note that it would be safe to test ss->firstHsDone ++ * instead of ss->ssl3.hs.ws. By testing ss->ssl3.hs.ws instead, ++ * we prioritize completing a renegotiation handshake over sending ++ * application data. ++ */ ++ PORT_Assert(ss->firstHsDone); ++ PORT_Assert(!ss->ssl3.hs.canFalseStart); ++ keepGoing = PR_FALSE; ++ } else if (ss->ssl3.hs.canFalseStart) { ++ /* Prioritize sending application data over trying to complete ++ * the handshake if we're false starting. ++ * ++ * If we were to do this check at the beginning of the loop instead ++ * of here, then this function would become be a no-op after ++ * receiving the ServerHelloDone in the false start case, and we ++ * would never complete the handshake. ++ */ ++ PORT_Assert(!ss->firstHsDone); ++ ++ if (ssl3_WaitingForStartOfServerSecondRound(ss)) { ++ keepGoing = PR_FALSE; ++ } else { ++ ss->ssl3.hs.canFalseStart = PR_FALSE; ++ } + } +- } while (ss->ssl3.hs.ws != idle_handshake && +- !canFalseStart && +- ss->gs.buf.len == 0); ++ ssl_ReleaseSSL3HandshakeLock(ss); ++ } while (keepGoing); ++ + + ss->gs.readOffset = 0; + ss->gs.writeOffset = ss->gs.buf.len; +@@ -404,7 +438,10 @@ ssl3_GatherAppDataRecord(sslSocket *ss, int flags) + { + int rv; + ++ /* ssl3_GatherCompleteHandshake requires both of these locks. */ ++ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) ); + PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); ++ + do { + rv = ssl3_GatherCompleteHandshake(ss, flags); + } while (rv > 0 && ss->gs.buf.len == 0); +diff --git a/nss/lib/ssl/sslauth.c b/nss/lib/ssl/sslauth.c +index d2f57bf..cb956d4 100644 +--- a/nss/lib/ssl/sslauth.c ++++ b/nss/lib/ssl/sslauth.c +@@ -60,7 +60,6 @@ SSL_SecurityStatus(PRFileDesc *fd, int *op, char **cp, int *kp0, int *kp1, + sslSocket *ss; + const char *cipherName; + PRBool isDes = PR_FALSE; +- PRBool enoughFirstHsDone = PR_FALSE; + + ss = ssl_FindSocket(fd); + if (!ss) { +@@ -78,14 +77,7 @@ SSL_SecurityStatus(PRFileDesc *fd, int *op, char **cp, int *kp0, int *kp1, + *op = SSL_SECURITY_STATUS_OFF; + } + +- if (ss->firstHsDone) { +- enoughFirstHsDone = PR_TRUE; +- } else if (ss->version >= SSL_LIBRARY_VERSION_3_0 && +- ssl3_CanFalseStart(ss)) { +- enoughFirstHsDone = PR_TRUE; +- } +- +- if (ss->opt.useSecurity && enoughFirstHsDone) { ++ if (ss->opt.useSecurity && ss->enoughFirstHsDone) { + if (ss->version < SSL_LIBRARY_VERSION_3_0) { + cipherName = ssl_cipherName[ss->sec.cipherType]; + } else { +diff --git a/nss/lib/ssl/sslimpl.h b/nss/lib/ssl/sslimpl.h +index 90e9567..bf0d67f 100644 +--- a/nss/lib/ssl/sslimpl.h ++++ b/nss/lib/ssl/sslimpl.h +@@ -842,6 +842,8 @@ const ssl3CipherSuiteDef *suite_def; + /* Shared state between ssl3_HandleFinished and ssl3_FinishHandshake */ + PRBool cacheSID; + ++ PRBool canFalseStart; /* Can/did we False Start */ ++ + /* clientSigAndHash contains the contents of the signature_algorithms + * extension (if any) from the client. This is only valid for TLS 1.2 + * or later. */ +@@ -1116,6 +1118,10 @@ struct sslSocketStr { + unsigned long clientAuthRequested; + unsigned long delayDisabled; /* Nagle delay disabled */ + unsigned long firstHsDone; /* first handshake is complete. */ ++ unsigned long enoughFirstHsDone; /* enough of the first handshake is ++ * done for callbacks to be able to ++ * retrieve channel security ++ * parameters from the SSL socket. */ + unsigned long handshakeBegun; + unsigned long lastWriteBlocked; + unsigned long recvdCloseNotify; /* received SSL EOF. */ +@@ -1156,6 +1162,8 @@ const unsigned char * preferredCipher; + void *badCertArg; + SSLHandshakeCallback handshakeCallback; + void *handshakeCallbackData; ++ SSLCanFalseStartCallback canFalseStartCallback; ++ void *canFalseStartCallbackData; + void *pkcs11PinArg; + SSLNextProtoCallback nextProtoCallback; + void *nextProtoArg; +@@ -1358,7 +1366,19 @@ extern void ssl3_SetAlwaysBlock(sslSocket *ss); + + extern SECStatus ssl_EnableNagleDelay(sslSocket *ss, PRBool enabled); + +-extern PRBool ssl3_CanFalseStart(sslSocket *ss); ++extern void ssl_FinishHandshake(sslSocket *ss); ++ ++/* Returns PR_TRUE if we are still waiting for the server to respond to our ++ * client second round. Once we've received any part of the server's second ++ * round then we don't bother trying to false start since it is almost always ++ * the case that the NewSessionTicket, ChangeCipherSoec, and Finished messages ++ * were sent in the same packet and we want to process them all at the same ++ * time. If we were to try to false start in the middle of the server's second ++ * round, then we would increase the number of I/O operations ++ * (SSL_ForceHandshake/PR_Recv/PR_Send/etc.) needed to finish the handshake. ++ */ ++extern PRBool ssl3_WaitingForStartOfServerSecondRound(sslSocket *ss); ++ + extern SECStatus + ssl3_CompressMACEncryptRecord(ssl3CipherSpec * cwSpec, + PRBool isServer, +diff --git a/nss/lib/ssl/sslinfo.c b/nss/lib/ssl/sslinfo.c +index 9f2597e..d0c23b7 100644 +--- a/nss/lib/ssl/sslinfo.c ++++ b/nss/lib/ssl/sslinfo.c +@@ -26,7 +26,6 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len) + sslSocket * ss; + SSLChannelInfo inf; + sslSessionID * sid; +- PRBool enoughFirstHsDone = PR_FALSE; + + if (!info || len < sizeof inf.length) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); +@@ -43,14 +42,7 @@ SSL_GetChannelInfo(PRFileDesc *fd, SSLChannelInfo *info, PRUintn len) + memset(&inf, 0, sizeof inf); + inf.length = PR_MIN(sizeof inf, len); + +- if (ss->firstHsDone) { +- enoughFirstHsDone = PR_TRUE; +- } else if (ss->version >= SSL_LIBRARY_VERSION_3_0 && +- ssl3_CanFalseStart(ss)) { +- enoughFirstHsDone = PR_TRUE; +- } +- +- if (ss->opt.useSecurity && enoughFirstHsDone) { ++ if (ss->opt.useSecurity && ss->enoughFirstHsDone) { + sid = ss->sec.ci.sid; + inf.protocolVersion = ss->version; + inf.authKeyBits = ss->sec.authKeyBits; +diff --git a/nss/lib/ssl/sslreveal.c b/nss/lib/ssl/sslreveal.c +index dc14794..d972998 100644 +--- a/nss/lib/ssl/sslreveal.c ++++ b/nss/lib/ssl/sslreveal.c +@@ -77,7 +77,6 @@ SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, + { + /* some decisions derived from SSL_GetChannelInfo */ + sslSocket * sslsocket = NULL; +- PRBool enoughFirstHsDone = PR_FALSE; + + if (!pYes) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); +@@ -93,14 +92,8 @@ SSL_HandshakeNegotiatedExtension(PRFileDesc * socket, + + *pYes = PR_FALSE; + +- if (sslsocket->firstHsDone) { +- enoughFirstHsDone = PR_TRUE; +- } else if (sslsocket->ssl3.initialized && ssl3_CanFalseStart(sslsocket)) { +- enoughFirstHsDone = PR_TRUE; +- } +- + /* according to public API SSL_GetChannelInfo, this doesn't need a lock */ +- if (sslsocket->opt.useSecurity && enoughFirstHsDone) { ++ if (sslsocket->opt.useSecurity) { + if (sslsocket->ssl3.initialized) { /* SSL3 and TLS */ + /* now we know this socket went through ssl3_InitState() and + * ss->xtnData got initialized, which is the only member accessed by +diff --git a/nss/lib/ssl/sslsecur.c b/nss/lib/ssl/sslsecur.c +index 49bb42b..d0df442 100644 +--- a/nss/lib/ssl/sslsecur.c ++++ b/nss/lib/ssl/sslsecur.c +@@ -97,23 +97,13 @@ ssl_Do1stHandshake(sslSocket *ss) + ss->securityHandshake = 0; + } + if (ss->handshake == 0) { +- ssl_GetRecvBufLock(ss); +- ss->gs.recordLen = 0; +- ssl_ReleaseRecvBufLock(ss); +- +- SSL_TRC(3, ("%d: SSL[%d]: handshake is completed", +- SSL_GETPID(), ss->fd)); +- /* call handshake callback for ssl v2 */ +- /* for v3 this is done in ssl3_HandleFinished() */ +- if ((ss->handshakeCallback != NULL) && /* has callback */ +- (!ss->firstHsDone) && /* only first time */ +- (ss->version < SSL_LIBRARY_VERSION_3_0)) { /* not ssl3 */ +- ss->firstHsDone = PR_TRUE; +- (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData); ++ /* for v3 this is done in ssl3_FinishHandshake */ ++ if (!ss->firstHsDone && ss->version < SSL_LIBRARY_VERSION_3_0) { ++ ssl_GetRecvBufLock(ss); ++ ss->gs.recordLen = 0; ++ ssl_FinishHandshake(ss); ++ ssl_ReleaseRecvBufLock(ss); + } +- ss->firstHsDone = PR_TRUE; +- ss->gs.writeOffset = 0; +- ss->gs.readOffset = 0; + break; + } + rv = (*ss->handshake)(ss); +@@ -134,6 +124,24 @@ ssl_Do1stHandshake(sslSocket *ss) + return rv; + } + ++void ++ssl_FinishHandshake(sslSocket *ss) ++{ ++ PORT_Assert( ss->opt.noLocks || ssl_Have1stHandshakeLock(ss) ); ++ PORT_Assert( ss->opt.noLocks || ssl_HaveRecvBufLock(ss) ); ++ ++ SSL_TRC(3, ("%d: SSL[%d]: handshake is completed", SSL_GETPID(), ss->fd)); ++ ++ ss->firstHsDone = PR_TRUE; ++ ss->enoughFirstHsDone = PR_TRUE; ++ ss->gs.writeOffset = 0; ++ ss->gs.readOffset = 0; ++ ++ if (ss->handshakeCallback) { ++ (ss->handshakeCallback)(ss->fd, ss->handshakeCallbackData); ++ } ++} ++ + /* + * Handshake function that blocks. Used to force a + * retry on a connection on the next read/write. +@@ -206,6 +214,7 @@ SSL_ResetHandshake(PRFileDesc *s, PRBool asServer) + ssl_Get1stHandshakeLock(ss); + + ss->firstHsDone = PR_FALSE; ++ ss->enoughFirstHsDone = PR_FALSE; + if ( asServer ) { + ss->handshake = ssl2_BeginServerHandshake; + ss->handshaking = sslHandshakingAsServer; +@@ -221,6 +230,8 @@ SSL_ResetHandshake(PRFileDesc *s, PRBool asServer) + ssl_ReleaseRecvBufLock(ss); + + ssl_GetSSL3HandshakeLock(ss); ++ ss->ssl3.hs.canFalseStart = PR_FALSE; ++ ss->ssl3.hs.restartTarget = NULL; + + /* + ** Blow away old security state and get a fresh setup. +@@ -331,6 +342,71 @@ SSL_HandshakeCallback(PRFileDesc *fd, SSLHandshakeCallback cb, + return SECSuccess; + } + ++/* Register an application callback to be called when false start may happen. ++** Acquires and releases HandshakeLock. ++*/ ++SECStatus ++SSL_SetCanFalseStartCallback(PRFileDesc *fd, SSLCanFalseStartCallback cb, ++ void *arg) ++{ ++ sslSocket *ss; ++ ++ ss = ssl_FindSocket(fd); ++ if (!ss) { ++ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_SetCanFalseStartCallback", ++ SSL_GETPID(), fd)); ++ return SECFailure; ++ } ++ ++ if (!ss->opt.useSecurity) { ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ ssl_Get1stHandshakeLock(ss); ++ ssl_GetSSL3HandshakeLock(ss); ++ ++ ss->canFalseStartCallback = cb; ++ ss->canFalseStartCallbackData = arg; ++ ++ ssl_ReleaseSSL3HandshakeLock(ss); ++ ssl_Release1stHandshakeLock(ss); ++ ++ return SECSuccess; ++} ++ ++SECStatus ++SSL_RecommendedCanFalseStart(PRFileDesc *fd, PRBool *canFalseStart) ++{ ++ sslSocket *ss; ++ ++ *canFalseStart = PR_FALSE; ++ ss = ssl_FindSocket(fd); ++ if (!ss) { ++ SSL_DBG(("%d: SSL[%d]: bad socket in SSL_RecommendedCanFalseStart", ++ SSL_GETPID(), fd)); ++ return SECFailure; ++ } ++ ++ if (!ss->ssl3.initialized) { ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ if (ss->version < SSL_LIBRARY_VERSION_3_0) { ++ PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_SSL2); ++ return SECFailure; ++ } ++ ++ /* Require a forward-secret key exchange. */ ++ *canFalseStart = ss->ssl3.hs.kea_def->kea == kea_dhe_dss || ++ ss->ssl3.hs.kea_def->kea == kea_dhe_rsa || ++ ss->ssl3.hs.kea_def->kea == kea_ecdhe_ecdsa || ++ ss->ssl3.hs.kea_def->kea == kea_ecdhe_rsa; ++ ++ return SECSuccess; ++} ++ + /* Try to make progress on an SSL handshake by attempting to read the + ** next handshake from the peer, and sending any responses. + ** For non-blocking sockets, returns PR_ERROR_WOULD_BLOCK if it cannot +@@ -524,6 +600,9 @@ DoRecv(sslSocket *ss, unsigned char *out, int len, int flags) + int amount; + int available; + ++ /* ssl3_GatherAppDataRecord may call ssl_FinishHandshake, which needs the ++ * 1stHandshakeLock. */ ++ ssl_Get1stHandshakeLock(ss); + ssl_GetRecvBufLock(ss); + + available = ss->gs.writeOffset - ss->gs.readOffset; +@@ -590,6 +669,7 @@ DoRecv(sslSocket *ss, unsigned char *out, int len, int flags) + + done: + ssl_ReleaseRecvBufLock(ss); ++ ssl_Release1stHandshakeLock(ss); + return rv; + } + +@@ -1156,7 +1236,7 @@ ssl_SecureRead(sslSocket *ss, unsigned char *buf, int len) + int + ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags) + { +- int rv = 0; ++ int rv = 0; + + SSL_TRC(2, ("%d: SSL[%d]: SecureSend: sending %d bytes", + SSL_GETPID(), ss->fd, len)); +@@ -1191,19 +1271,15 @@ ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags) + ss->writerThread = PR_GetCurrentThread(); + /* If any of these is non-zero, the initial handshake is not done. */ + if (!ss->firstHsDone) { +- PRBool canFalseStart = PR_FALSE; ++ PRBool falseStart = PR_FALSE; + ssl_Get1stHandshakeLock(ss); +- if (ss->version >= SSL_LIBRARY_VERSION_3_0) { ++ if (ss->opt.enableFalseStart && ++ ss->version >= SSL_LIBRARY_VERSION_3_0) { + ssl_GetSSL3HandshakeLock(ss); +- if ((ss->ssl3.hs.ws == wait_change_cipher || +- ss->ssl3.hs.ws == wait_finished || +- ss->ssl3.hs.ws == wait_new_session_ticket) && +- ssl3_CanFalseStart(ss)) { +- canFalseStart = PR_TRUE; +- } ++ falseStart = ss->ssl3.hs.canFalseStart; + ssl_ReleaseSSL3HandshakeLock(ss); + } +- if (!canFalseStart && ++ if (!falseStart && + (ss->handshake || ss->nextHandshake || ss->securityHandshake)) { + rv = ssl_Do1stHandshake(ss); + } +@@ -1228,6 +1304,17 @@ ssl_SecureSend(sslSocket *ss, const unsigned char *buf, int len, int flags) + goto done; + } + ++ if (!ss->firstHsDone) { ++ PORT_Assert(ss->version >= SSL_LIBRARY_VERSION_3_0); ++#ifdef DEBUG ++ ssl_GetSSL3HandshakeLock(ss); ++ PORT_Assert(ss->ssl3.hs.canFalseStart); ++ ssl_ReleaseSSL3HandshakeLock(ss); ++#endif ++ SSL_TRC(3, ("%d: SSL[%d]: SecureSend: sending data due to false start", ++ SSL_GETPID(), ss->fd)); ++ } ++ + /* Send out the data using one of these functions: + * ssl2_SendClear, ssl2_SendStream, ssl2_SendBlock, + * ssl3_SendApplicationData +diff --git a/nss/lib/ssl/sslsock.c b/nss/lib/ssl/sslsock.c +index cd4a7a7..73e069b 100644 +--- a/nss/lib/ssl/sslsock.c ++++ b/nss/lib/ssl/sslsock.c +@@ -349,6 +349,8 @@ ssl_DupSocket(sslSocket *os) + ss->badCertArg = os->badCertArg; + ss->handshakeCallback = os->handshakeCallback; + ss->handshakeCallbackData = os->handshakeCallbackData; ++ ss->canFalseStartCallback = os->canFalseStartCallback; ++ ss->canFalseStartCallbackData = os->canFalseStartCallbackData; + ss->pkcs11PinArg = os->pkcs11PinArg; + + /* Create security data */ +@@ -2341,10 +2343,14 @@ ssl_Poll(PRFileDesc *fd, PRInt16 how_flags, PRInt16 *p_out_flags) + } else if (new_flags & PR_POLL_WRITE) { + /* The caller is trying to write, but the handshake is + ** blocked waiting for data to read, and the first +- ** handshake has been sent. so do NOT to poll on write. ++ ** handshake has been sent. So do NOT to poll on write ++ ** unless we did false start. + */ +- new_flags ^= PR_POLL_WRITE; /* don't select on write. */ +- new_flags |= PR_POLL_READ; /* do select on read. */ ++ if (!(ss->version >= SSL_LIBRARY_VERSION_3_0 && ++ ss->ssl3.hs.canFalseStart)) { ++ new_flags ^= PR_POLL_WRITE; /* don't select on write. */ ++ } ++ new_flags |= PR_POLL_READ; /* do select on read. */ + } + } + } else if ((new_flags & PR_POLL_READ) && (SSL_DataPending(fd) > 0)) { +-- +1.7.9.5 + diff --git a/meta/recipes-support/nss/files/nss-CVE-2013-5606.patch b/meta/recipes-support/nss/files/nss-CVE-2013-5606.patch new file mode 100644 index 0000000000..f30475b16b --- /dev/null +++ b/meta/recipes-support/nss/files/nss-CVE-2013-5606.patch @@ -0,0 +1,48 @@ +nss: CVE-2013-5606 + +Upstream-Status: Backport + +the patch comes from: +http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-5606 +https://bugzilla.mozilla.org/show_bug.cgi?id=910438 +http://hg.mozilla.org/projects/nss/rev/d29898e0981c + +The CERT_VerifyCert function in lib/certhigh/certvfy.c in +Mozilla Network Security Services (NSS) 3.15 before 3.15.3 provides +an unexpected return value for an incompatible key-usage certificate +when the CERTVerifyLog argument is valid, which might allow remote +attackers to bypass intended access restrictions via a crafted certificate. + +Signed-off-by: Li Wang +--- + nss/lib/certhigh/certvfy.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/nss/lib/certhigh/certvfy.c b/nss/lib/certhigh/certvfy.c +index f364ceb..f450205 100644 +--- a/nss/lib/certhigh/certvfy.c ++++ b/nss/lib/certhigh/certvfy.c +@@ -1312,7 +1312,7 @@ CERT_VerifyCert(CERTCertDBHandle *handle, CERTCertificate *cert, + PORT_SetError(SEC_ERROR_UNTRUSTED_CERT); + LOG_ERROR_OR_EXIT(log,cert,0,flags); + } else if (trusted) { +- goto winner; ++ goto done; + } + + +@@ -1340,7 +1340,10 @@ CERT_VerifyCert(CERTCertDBHandle *handle, CERTCertificate *cert, + } + } + +-winner: ++done: ++ if (log && log->head) { ++ return SECFailure; ++ } + return(SECSuccess); + + loser: +-- +1.7.9.5 + diff --git a/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch b/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch new file mode 100644 index 0000000000..1be8a17870 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-CVE-2014-1492.patch @@ -0,0 +1,68 @@ +nss: CVE-2014-1492 + +Upstream-Status: Backport + +the patch comes from: +http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-1492 +https://bugzilla.mozilla.org/show_bug.cgi?id=903885 + +changeset: 11063:709d4e597979 +user: Kai Engert +date: Wed Mar 05 18:38:55 2014 +0100 +summary: Bug 903885, address requests to clarify comments from wtc + +changeset: 11046:2ffa40a3ff55 +tag: tip +user: Wan-Teh Chang +date: Tue Feb 25 18:17:08 2014 +0100 +summary: Bug 903885, fix IDNA wildcard handling v4, r=kaie + +changeset: 11045:15ea62260c21 +user: Christian Heimes +date: Mon Feb 24 17:50:25 2014 +0100 +summary: Bug 903885, fix IDNA wildcard handling, r=kaie + +Signed-off-by: Li Wang +--- + nss/lib/certdb/certdb.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/nss/lib/certdb/certdb.c b/nss/lib/certdb/certdb.c +index b7d22bd..91877b7 100644 +--- a/nss/lib/certdb/certdb.c ++++ b/nss/lib/certdb/certdb.c +@@ -1381,7 +1381,7 @@ cert_TestHostName(char * cn, const char * hn) + return rv; + } + } else { +- /* New approach conforms to RFC 2818. */ ++ /* New approach conforms to RFC 6125. */ + char *wildcard = PORT_Strchr(cn, '*'); + char *firstcndot = PORT_Strchr(cn, '.'); + char *secondcndot = firstcndot ? PORT_Strchr(firstcndot+1, '.') : NULL; +@@ -1390,14 +1390,17 @@ cert_TestHostName(char * cn, const char * hn) + /* For a cn pattern to be considered valid, the wildcard character... + * - may occur only in a DNS name with at least 3 components, and + * - may occur only as last character in the first component, and +- * - may be preceded by additional characters ++ * - may be preceded by additional characters, and ++ * - must not be preceded by an IDNA ACE prefix (xn--) + */ + if (wildcard && secondcndot && secondcndot[1] && firsthndot +- && firstcndot - wildcard == 1 +- && secondcndot - firstcndot > 1 +- && PORT_Strrchr(cn, '*') == wildcard ++ && firstcndot - wildcard == 1 /* wildcard is last char in first component */ ++ && secondcndot - firstcndot > 1 /* second component is non-empty */ ++ && PORT_Strrchr(cn, '*') == wildcard /* only one wildcard in cn */ + && !PORT_Strncasecmp(cn, hn, wildcard - cn) +- && !PORT_Strcasecmp(firstcndot, firsthndot)) { ++ && !PORT_Strcasecmp(firstcndot, firsthndot) ++ /* If hn starts with xn--, then cn must start with wildcard */ ++ && (PORT_Strncasecmp(hn, "xn--", 4) || wildcard == cn)) { + /* valid wildcard pattern match */ + return SECSuccess; + } +-- +1.7.9.5 + diff --git a/meta/recipes-support/nss/files/nss-CVE-2014-1544.patch b/meta/recipes-support/nss/files/nss-CVE-2014-1544.patch new file mode 100644 index 0000000000..d6434dfe23 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-CVE-2014-1544.patch @@ -0,0 +1,41 @@ +nss: CVE-2014-1544 + +the patch comes from: +https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-1544 +https://hg.mozilla.org/projects/nss/rev/204f22c527f8 + +author Robert Relyea +https://bugzilla.mozilla.org/show_bug.cgi?id=963150 +Bug 963150: Add nssCertificate_AddRef and nssCertificate_Destroy calls +to PK11_ImportCert to prevent nssTrustDomain_AddCertsToCache from +freeing the CERTCertificate associated with the NSSCertificate. r=wtc. + +Upstream-Status: Pending +Signed-off-by: Li Wang +--- + nss/lib/pk11wrap/pk11cert.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/nss/lib/pk11wrap/pk11cert.c b/nss/lib/pk11wrap/pk11cert.c +index 39168b9..3f3edb1 100644 +--- a/nss/lib/pk11wrap/pk11cert.c ++++ b/nss/lib/pk11wrap/pk11cert.c +@@ -981,8 +981,15 @@ PK11_ImportCert(PK11SlotInfo *slot, CERTCertificate *cert, + * CERTCertificate, and finish + */ + nssPKIObject_AddInstance(&c->object, certobj); ++ /* nssTrustDomain_AddCertsToCache may release a reference to 'c' and ++ * replace 'c' by a different value. So we add a reference to 'c' to ++ * prevent 'c' from being destroyed. */ ++ nssCertificate_AddRef(c); + nssTrustDomain_AddCertsToCache(STAN_GetDefaultTrustDomain(), &c, 1); ++ /* XXX should we pass the original value of 'c' to ++ * STAN_ForceCERTCertificateUpdate? */ + (void)STAN_ForceCERTCertificateUpdate(c); ++ nssCertificate_Destroy(c); + SECITEM_FreeItem(keyID,PR_TRUE); + return SECSuccess; + loser: +-- +1.7.9.5 + diff --git a/meta/recipes-support/nss/files/nss-CVE-2014-1568.patch b/meta/recipes-support/nss/files/nss-CVE-2014-1568.patch new file mode 100644 index 0000000000..dbdb00ce2b --- /dev/null +++ b/meta/recipes-support/nss/files/nss-CVE-2014-1568.patch @@ -0,0 +1,670 @@ +nss: CVE-2014-1568 + +the patch comes from: +http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-1568 +https://bugzilla.mozilla.org/show_bug.cgi?id=1064636 +nss ng log: +===== +changeset: 11252:ad411fb64046 +user: Kai Engert +date: Tue Sep 23 19:28:34 2014 +0200 +summary: Fix bug 1064636, patch part 2, r=rrelyea +===== +changeset: 11253:4e90910ad2f9 +user: Kai Engert +date: Tue Sep 23 19:28:45 2014 +0200 +summary: Fix bug 1064636, patch part 3, r=rrelyea +===== +changeset: 11254:fb7208e91ae8 +user: Kai Engert +date: Tue Sep 23 19:28:52 2014 +0200 +summary: Fix bug 1064636, patch part 1, r=rrelyea +===== +changeset: 11255:8dd6c6ac977d +user: Kai Engert +date: Tue Sep 23 19:39:40 2014 +0200 +summary: Bug 1064636, follow up commit to fix Windows build bustage + +Upstream-Status: Backport +Signed-off-by: Li Wang +--- + nss/lib/cryptohi/secvfy.c | 202 +++++++++++++++++++++++++++----------------- + nss/lib/softoken/pkcs11c.c | 69 +++++++-------- + nss/lib/util/manifest.mn | 2 + + nss/lib/util/nssutil.def | 6 ++ + nss/lib/util/pkcs1sig.c | 169 ++++++++++++++++++++++++++++++++++++ + nss/lib/util/pkcs1sig.h | 30 +++++++ + 6 files changed, 360 insertions(+), 118 deletions(-) + create mode 100644 nss/lib/util/pkcs1sig.c + create mode 100644 nss/lib/util/pkcs1sig.h + +diff --git a/nss/lib/cryptohi/secvfy.c b/nss/lib/cryptohi/secvfy.c +index c1ac39b..0a20672 100644 +--- a/nss/lib/cryptohi/secvfy.c ++++ b/nss/lib/cryptohi/secvfy.c +@@ -12,78 +12,111 @@ + #include "secasn1.h" + #include "secoid.h" + #include "pk11func.h" ++#include "pkcs1sig.h" + #include "secdig.h" + #include "secerr.h" + #include "keyi.h" + + /* +-** Decrypt signature block using public key +-** Store the hash algorithm oid tag in *tagp +-** Store the digest in the digest buffer +-** Store the digest length in *digestlen ++** Recover the DigestInfo from an RSA PKCS#1 signature. ++** ++** If givenDigestAlg != SEC_OID_UNKNOWN, copy givenDigestAlg to digestAlgOut. ++** Otherwise, parse the DigestInfo structure and store the decoded digest ++** algorithm into digestAlgOut. ++** ++** Store the encoded DigestInfo into digestInfo. ++** Store the DigestInfo length into digestInfoLen. ++** ++** This function does *not* verify that the AlgorithmIdentifier in the ++** DigestInfo identifies givenDigestAlg or that the DigestInfo is encoded ++** correctly; verifyPKCS1DigestInfo does that. ++** + ** XXX this is assuming that the signature algorithm has WITH_RSA_ENCRYPTION + */ + static SECStatus +-DecryptSigBlock(SECOidTag *tagp, unsigned char *digest, +- unsigned int *digestlen, unsigned int maxdigestlen, +- SECKEYPublicKey *key, const SECItem *sig, char *wincx) ++recoverPKCS1DigestInfo(SECOidTag givenDigestAlg, ++ /*out*/ SECOidTag* digestAlgOut, ++ /*out*/ unsigned char** digestInfo, ++ /*out*/ unsigned int* digestInfoLen, ++ SECKEYPublicKey* key, ++ const SECItem* sig, void* wincx) + { +- SGNDigestInfo *di = NULL; +- unsigned char *buf = NULL; +- SECStatus rv; +- SECOidTag tag; +- SECItem it; +- +- if (key == NULL) goto loser; +- ++ SGNDigestInfo* di = NULL; ++ SECItem it; ++ PRBool rv = SECSuccess; ++ ++ PORT_Assert(digestAlgOut); ++ PORT_Assert(digestInfo); ++ PORT_Assert(digestInfoLen); ++ PORT_Assert(key); ++ PORT_Assert(key->keyType == rsaKey); ++ PORT_Assert(sig); ++ ++ it.data = NULL; + it.len = SECKEY_PublicKeyStrength(key); +- if (!it.len) goto loser; +- it.data = buf = (unsigned char *)PORT_Alloc(it.len); +- if (!buf) goto loser; ++ if (it.len != 0) { ++ it.data = (unsigned char *)PORT_Alloc(it.len); ++ } ++ if (it.len == 0 || it.data == NULL ) { ++ rv = SECFailure; ++ } + +- /* decrypt the block */ +- rv = PK11_VerifyRecover(key, (SECItem *)sig, &it, wincx); +- if (rv != SECSuccess) goto loser; ++ if (rv == SECSuccess) { ++ /* decrypt the block */ ++ rv = PK11_VerifyRecover(key, sig, &it, wincx); ++ } + +- di = SGN_DecodeDigestInfo(&it); +- if (di == NULL) goto sigloser; ++ if (rv == SECSuccess) { ++ if (givenDigestAlg != SEC_OID_UNKNOWN) { ++ /* We don't need to parse the DigestInfo if the caller gave us the ++ * digest algorithm to use. Later verifyPKCS1DigestInfo will verify ++ * that the DigestInfo identifies the given digest algorithm and ++ * that the DigestInfo is encoded absolutely correctly. ++ */ ++ *digestInfoLen = it.len; ++ *digestInfo = (unsigned char*)it.data; ++ *digestAlgOut = givenDigestAlg; ++ return SECSuccess; ++ } ++ } + +- /* +- ** Finally we have the digest info; now we can extract the algorithm +- ** ID and the signature block +- */ +- tag = SECOID_GetAlgorithmTag(&di->digestAlgorithm); +- /* Check that tag is an appropriate algorithm */ +- if (tag == SEC_OID_UNKNOWN) { +- goto sigloser; +- } +- /* make sure the "parameters" are not too bogus. */ +- if (di->digestAlgorithm.parameters.len > 2) { +- goto sigloser; +- } +- if (di->digest.len > maxdigestlen) { +- PORT_SetError(SEC_ERROR_OUTPUT_LEN); +- goto loser; ++ if (rv == SECSuccess) { ++ /* The caller didn't specify a digest algorithm to use, so choose the ++ * digest algorithm by parsing the AlgorithmIdentifier within the ++ * DigestInfo. ++ */ ++ di = SGN_DecodeDigestInfo(&it); ++ if (!di) { ++ rv = SECFailure; ++ } + } +- PORT_Memcpy(digest, di->digest.data, di->digest.len); +- *tagp = tag; +- *digestlen = di->digest.len; +- goto done; + +- sigloser: +- PORT_SetError(SEC_ERROR_BAD_SIGNATURE); ++ if (rv == SECSuccess) { ++ *digestAlgOut = SECOID_GetAlgorithmTag(&di->digestAlgorithm); ++ if (*digestAlgOut == SEC_OID_UNKNOWN) { ++ rv = SECFailure; ++ } ++ } + +- loser: +- rv = SECFailure; ++ if (di) { ++ SGN_DestroyDigestInfo(di); ++ } ++ ++ if (rv == SECSuccess) { ++ *digestInfoLen = it.len; ++ *digestInfo = (unsigned char*)it.data; ++ } else { ++ if (it.data) { ++ PORT_Free(it.data); ++ } ++ *digestInfo = NULL; ++ *digestInfoLen = 0; ++ PORT_SetError(SEC_ERROR_BAD_SIGNATURE); ++ } + +- done: +- if (di != NULL) SGN_DestroyDigestInfo(di); +- if (buf != NULL) PORT_Free(buf); +- + return rv; + } + +- + struct VFYContextStr { + SECOidTag hashAlg; /* the hash algorithm */ + SECKEYPublicKey *key; +@@ -99,14 +132,14 @@ struct VFYContextStr { + union { + unsigned char buffer[1]; + +- /* the digest in the decrypted RSA signature */ +- unsigned char rsadigest[HASH_LENGTH_MAX]; + /* the full DSA signature... 40 bytes */ + unsigned char dsasig[DSA_MAX_SIGNATURE_LEN]; + /* the full ECDSA signature */ + unsigned char ecdsasig[2 * MAX_ECKEY_LEN]; + } u; +- unsigned int rsadigestlen; ++ unsigned int pkcs1RSADigestInfoLen; ++ /* the encoded DigestInfo from a RSA PKCS#1 signature */ ++ unsigned char *pkcs1RSADigestInfo; + void * wincx; + void *hashcx; + const SECHashObject *hashobj; +@@ -117,6 +150,17 @@ struct VFYContextStr { + * VFY_EndWithSignature call. */ + }; + ++static SECStatus ++verifyPKCS1DigestInfo(const VFYContext* cx, const SECItem* digest) ++{ ++ SECItem pkcs1DigestInfo; ++ pkcs1DigestInfo.data = cx->pkcs1RSADigestInfo; ++ pkcs1DigestInfo.len = cx->pkcs1RSADigestInfoLen; ++ return _SGN_VerifyPKCS1DigestInfo( ++ cx->hashAlg, digest, &pkcs1DigestInfo, ++ PR_TRUE /*XXX: unsafeAllowMissingParameters*/); ++} ++ + /* + * decode the ECDSA or DSA signature from it's DER wrapping. + * The unwrapped/raw signature is placed in the buffer pointed +@@ -376,16 +420,16 @@ vfy_CreateContext(const SECKEYPublicKey *key, const SECItem *sig, + cx->encAlg = encAlg; + cx->hashAlg = hashAlg; + cx->key = SECKEY_CopyPublicKey(key); ++ cx->pkcs1RSADigestInfo = NULL; + rv = SECSuccess; + if (sig) { + switch (type) { + case rsaKey: +- rv = DecryptSigBlock(&cx->hashAlg, cx->u.buffer, &cx->rsadigestlen, +- HASH_LENGTH_MAX, cx->key, sig, (char*)wincx); +- if (cx->hashAlg != hashAlg && hashAlg != SEC_OID_UNKNOWN) { +- PORT_SetError(SEC_ERROR_BAD_SIGNATURE); +- rv = SECFailure; +- } ++ rv = recoverPKCS1DigestInfo(hashAlg, &cx->hashAlg, ++ &cx->pkcs1RSADigestInfo, ++ &cx->pkcs1RSADigestInfoLen, ++ cx->key, ++ sig, wincx); + break; + case dsaKey: + case ecKey: +@@ -469,6 +513,9 @@ VFY_DestroyContext(VFYContext *cx, PRBool freeit) + if (cx->key) { + SECKEY_DestroyPublicKey(cx->key); + } ++ if (cx->pkcs1RSADigestInfo) { ++ PORT_Free(cx->pkcs1RSADigestInfo); ++ } + if (freeit) { + PORT_ZFree(cx, sizeof(VFYContext)); + } +@@ -548,21 +595,25 @@ VFY_EndWithSignature(VFYContext *cx, SECItem *sig) + } + break; + case rsaKey: ++ { ++ SECItem digest; ++ digest.data = final; ++ digest.len = part; + if (sig) { +- SECOidTag hashid = SEC_OID_UNKNOWN; +- rv = DecryptSigBlock(&hashid, cx->u.buffer, &cx->rsadigestlen, +- HASH_LENGTH_MAX, cx->key, sig, (char*)cx->wincx); +- if ((rv != SECSuccess) || (hashid != cx->hashAlg)) { +- PORT_SetError(SEC_ERROR_BAD_SIGNATURE); ++ SECOidTag hashid; ++ PORT_Assert(cx->hashAlg != SEC_OID_UNKNOWN); ++ rv = recoverPKCS1DigestInfo(cx->hashAlg, &hashid, ++ &cx->pkcs1RSADigestInfo, ++ &cx->pkcs1RSADigestInfoLen, ++ cx->key, ++ sig, cx->wincx); ++ PORT_Assert(cx->hashAlg == hashid); ++ if (rv != SECSuccess) { + return SECFailure; + } + } +- if ((part != cx->rsadigestlen) || +- PORT_Memcmp(final, cx->u.buffer, part)) { +- PORT_SetError(SEC_ERROR_BAD_SIGNATURE); +- return SECFailure; +- } +- break; ++ return verifyPKCS1DigestInfo(cx, &digest); ++ } + default: + PORT_SetError(SEC_ERROR_BAD_SIGNATURE); + return SECFailure; /* shouldn't happen */ +@@ -595,12 +646,7 @@ vfy_VerifyDigest(const SECItem *digest, const SECKEYPublicKey *key, + if (cx != NULL) { + switch (key->keyType) { + case rsaKey: +- if ((digest->len != cx->rsadigestlen) || +- PORT_Memcmp(digest->data, cx->u.buffer, digest->len)) { +- PORT_SetError(SEC_ERROR_BAD_SIGNATURE); +- } else { +- rv = SECSuccess; +- } ++ rv = verifyPKCS1DigestInfo(cx, digest); + break; + case dsaKey: + case ecKey: +diff --git a/nss/lib/softoken/pkcs11c.c b/nss/lib/softoken/pkcs11c.c +index 89b5bd8..ba6dcfa 100644 +--- a/nss/lib/softoken/pkcs11c.c ++++ b/nss/lib/softoken/pkcs11c.c +@@ -23,6 +23,7 @@ + #include "blapi.h" + #include "pkcs11.h" + #include "pkcs11i.h" ++#include "pkcs1sig.h" + #include "lowkeyi.h" + #include "secder.h" + #include "secdig.h" +@@ -2580,54 +2581,42 @@ sftk_hashCheckSign(SFTKHashVerifyInfo *info, unsigned char *sig, + } + + SECStatus +-RSA_HashCheckSign(SECOidTag hashOid, NSSLOWKEYPublicKey *key, ++RSA_HashCheckSign(SECOidTag digestOid, NSSLOWKEYPublicKey *key, + unsigned char *sig, unsigned int sigLen, +- unsigned char *digest, unsigned int digestLen) ++ unsigned char *digestData, unsigned int digestLen) + { ++ unsigned char *pkcs1DigestInfoData; ++ SECItem pkcs1DigestInfo; ++ SECItem digest; ++ unsigned int bufferSize; ++ SECStatus rv; + +- SECItem it; +- SGNDigestInfo *di = NULL; +- SECStatus rv = SECSuccess; +- +- it.data = NULL; +- +- if (key == NULL) goto loser; +- +- it.len = nsslowkey_PublicModulusLen(key); +- if (!it.len) goto loser; ++ /* pkcs1DigestInfo.data must be less than key->u.rsa.modulus.len */ ++ bufferSize = key->u.rsa.modulus.len; ++ pkcs1DigestInfoData = PORT_ZAlloc(bufferSize); ++ if (!pkcs1DigestInfoData) { ++ PORT_SetError(SEC_ERROR_NO_MEMORY); ++ return SECFailure; ++ } + +- it.data = (unsigned char *) PORT_Alloc(it.len); +- if (it.data == NULL) goto loser; ++ pkcs1DigestInfo.data = pkcs1DigestInfoData; ++ pkcs1DigestInfo.len = bufferSize; + + /* decrypt the block */ +- rv = RSA_CheckSignRecover(key, it.data, &it.len, it.len, sig, sigLen); +- if (rv != SECSuccess) goto loser; +- +- di = SGN_DecodeDigestInfo(&it); +- if (di == NULL) goto loser; +- if (di->digest.len != digestLen) goto loser; +- +- /* make sure the tag is OK */ +- if (SECOID_GetAlgorithmTag(&di->digestAlgorithm) != hashOid) { +- goto loser; +- } +- /* make sure the "parameters" are not too bogus. */ +- if (di->digestAlgorithm.parameters.len > 2) { +- goto loser; +- } +- /* Now check the signature */ +- if (PORT_Memcmp(digest, di->digest.data, di->digest.len) == 0) { +- goto done; ++ rv = RSA_CheckSignRecover(key, pkcs1DigestInfo.data, ++ &pkcs1DigestInfo.len, pkcs1DigestInfo.len, ++ sig, sigLen); ++ if (rv != SECSuccess) { ++ PORT_SetError(SEC_ERROR_BAD_SIGNATURE); ++ } else { ++ digest.data = (PRUint8*) digestData; ++ digest.len = digestLen; ++ rv = _SGN_VerifyPKCS1DigestInfo( ++ digestOid, &digest, &pkcs1DigestInfo, ++ PR_TRUE /*XXX: unsafeAllowMissingParameters*/); + } + +- loser: +- PORT_SetError(SEC_ERROR_BAD_SIGNATURE); +- rv = SECFailure; +- +- done: +- if (it.data != NULL) PORT_Free(it.data); +- if (di != NULL) SGN_DestroyDigestInfo(di); +- ++ PORT_Free(pkcs1DigestInfoData); + return rv; + } + +diff --git a/nss/lib/util/manifest.mn b/nss/lib/util/manifest.mn +index ed54a16..9ff3758 100644 +--- a/nss/lib/util/manifest.mn ++++ b/nss/lib/util/manifest.mn +@@ -22,6 +22,7 @@ EXPORTS = \ + pkcs11t.h \ + pkcs11n.h \ + pkcs11u.h \ ++ pkcs1sig.h \ + portreg.h \ + secasn1.h \ + secasn1t.h \ +@@ -58,6 +59,7 @@ CSRCS = \ + nssrwlk.c \ + nssilock.c \ + oidstring.c \ ++ pkcs1sig.c \ + portreg.c \ + secalgid.c \ + secasn1d.c \ +diff --git a/nss/lib/util/nssutil.def b/nss/lib/util/nssutil.def +index 86a0ad7..9d98df2 100644 +--- a/nss/lib/util/nssutil.def ++++ b/nss/lib/util/nssutil.def +@@ -271,3 +271,9 @@ SECITEM_ZfreeArray; + ;+ local: + ;+ *; + ;+}; ++;+NSSUTIL_3.17.1 { # NSS Utilities 3.17.1 release ++;+ global: ++_SGN_VerifyPKCS1DigestInfo; ++;+ local: ++;+ *; ++;+}; +diff --git a/nss/lib/util/pkcs1sig.c b/nss/lib/util/pkcs1sig.c +new file mode 100644 +index 0000000..03b16f5 +--- /dev/null ++++ b/nss/lib/util/pkcs1sig.c +@@ -0,0 +1,169 @@ ++/* 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 ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. ++ */ ++ ++#include "pkcs1sig.h" ++#include "hasht.h" ++#include "secerr.h" ++#include "secasn1t.h" ++#include "secoid.h" ++ ++typedef struct pkcs1PrefixStr pkcs1Prefix; ++struct pkcs1PrefixStr { ++ unsigned int len; ++ PRUint8 *data; ++}; ++ ++typedef struct pkcs1PrefixesStr pkcs1Prefixes; ++struct pkcs1PrefixesStr { ++ unsigned int digestLen; ++ pkcs1Prefix prefixWithParams; ++ pkcs1Prefix prefixWithoutParams; ++}; ++ ++/* The value for SGN_PKCS1_DIGESTINFO_MAX_PREFIX_LEN_EXCLUDING_OID is based on ++ * the possible prefix encodings as explained below. ++ */ ++#define MAX_PREFIX_LEN_EXCLUDING_OID 10 ++ ++static SECStatus ++encodePrefix(const SECOidData *hashOid, unsigned int digestLen, ++ pkcs1Prefix *prefix, PRBool withParams) ++{ ++ /* with params coding is: ++ * Sequence (2 bytes) { ++ * Sequence (2 bytes) { ++ * Oid (2 bytes) { ++ * Oid value (derOid->oid.len) ++ * } ++ * NULL (2 bytes) ++ * } ++ * OCTECT (2 bytes); ++ * ++ * without params coding is: ++ * Sequence (2 bytes) { ++ * Sequence (2 bytes) { ++ * Oid (2 bytes) { ++ * Oid value (derOid->oid.len) ++ * } ++ * } ++ * OCTECT (2 bytes); ++ */ ++ ++ unsigned int innerSeqLen = 2 + hashOid->oid.len; ++ unsigned int outerSeqLen = 2 + innerSeqLen + 2 + digestLen; ++ unsigned int extra = 0; ++ ++ if (withParams) { ++ innerSeqLen += 2; ++ outerSeqLen += 2; ++ extra = 2; ++ } ++ ++ if (innerSeqLen >= 128 || ++ outerSeqLen >= 128 || ++ (outerSeqLen + 2 - digestLen) > ++ (MAX_PREFIX_LEN_EXCLUDING_OID + hashOid->oid.len)) { ++ /* this is actually a library failure, It shouldn't happen */ ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ prefix->len = 6 + hashOid->oid.len + extra + 2; ++ prefix->data = PORT_Alloc(prefix->len); ++ if (!prefix->data) { ++ PORT_SetError(SEC_ERROR_NO_MEMORY); ++ return SECFailure; ++ } ++ ++ prefix->data[0] = SEC_ASN1_SEQUENCE|SEC_ASN1_CONSTRUCTED; ++ prefix->data[1] = outerSeqLen; ++ prefix->data[2] = SEC_ASN1_SEQUENCE|SEC_ASN1_CONSTRUCTED; ++ prefix->data[3] = innerSeqLen; ++ prefix->data[4] = SEC_ASN1_OBJECT_ID; ++ prefix->data[5] = hashOid->oid.len; ++ PORT_Memcpy(&prefix->data[6], hashOid->oid.data, hashOid->oid.len); ++ if (withParams) { ++ prefix->data[6 + hashOid->oid.len] = SEC_ASN1_NULL; ++ prefix->data[6 + hashOid->oid.len + 1] = 0; ++ } ++ prefix->data[6 + hashOid->oid.len + extra] = SEC_ASN1_OCTET_STRING; ++ prefix->data[6 + hashOid->oid.len + extra + 1] = digestLen; ++ ++ return SECSuccess; ++} ++ ++SECStatus ++_SGN_VerifyPKCS1DigestInfo(SECOidTag digestAlg, ++ const SECItem* digest, ++ const SECItem* dataRecoveredFromSignature, ++ PRBool unsafeAllowMissingParameters) ++{ ++ SECOidData *hashOid; ++ pkcs1Prefixes pp; ++ const pkcs1Prefix* expectedPrefix; ++ SECStatus rv, rv2, rv3; ++ ++ if (!digest || !digest->data || ++ !dataRecoveredFromSignature || !dataRecoveredFromSignature->data) { ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ hashOid = SECOID_FindOIDByTag(digestAlg); ++ if (hashOid == NULL) { ++ PORT_SetError(SEC_ERROR_INVALID_ARGS); ++ return SECFailure; ++ } ++ ++ pp.digestLen = digest->len; ++ pp.prefixWithParams.data = NULL; ++ pp.prefixWithoutParams.data = NULL; ++ ++ rv2 = encodePrefix(hashOid, pp.digestLen, &pp.prefixWithParams, PR_TRUE); ++ rv3 = encodePrefix(hashOid, pp.digestLen, &pp.prefixWithoutParams, PR_FALSE); ++ ++ rv = SECSuccess; ++ if (rv2 != SECSuccess || rv3 != SECSuccess) { ++ rv = SECFailure; ++ } ++ ++ if (rv == SECSuccess) { ++ /* We don't attempt to avoid timing attacks on these comparisons because ++ * signature verification is a public key operation, not a private key ++ * operation. ++ */ ++ ++ if (dataRecoveredFromSignature->len == ++ pp.prefixWithParams.len + pp.digestLen) { ++ expectedPrefix = &pp.prefixWithParams; ++ } else if (unsafeAllowMissingParameters && ++ dataRecoveredFromSignature->len == ++ pp.prefixWithoutParams.len + pp.digestLen) { ++ expectedPrefix = &pp.prefixWithoutParams; ++ } else { ++ PORT_SetError(SEC_ERROR_BAD_SIGNATURE); ++ rv = SECFailure; ++ } ++ } ++ ++ if (rv == SECSuccess) { ++ if (memcmp(dataRecoveredFromSignature->data, expectedPrefix->data, ++ expectedPrefix->len) || ++ memcmp(dataRecoveredFromSignature->data + expectedPrefix->len, ++ digest->data, digest->len)) { ++ PORT_SetError(SEC_ERROR_BAD_SIGNATURE); ++ rv = SECFailure; ++ } ++ } ++ ++ if (pp.prefixWithParams.data) { ++ PORT_Free(pp.prefixWithParams.data); ++ } ++ if (pp.prefixWithoutParams.data) { ++ PORT_Free(pp.prefixWithoutParams.data); ++ } ++ ++ return rv; ++} +diff --git a/nss/lib/util/pkcs1sig.h b/nss/lib/util/pkcs1sig.h +new file mode 100644 +index 0000000..7c52b15 +--- /dev/null ++++ b/nss/lib/util/pkcs1sig.h +@@ -0,0 +1,30 @@ ++/* 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 ++ * file, You can obtain one at http://mozilla.org/MPL/2.0/. ++ */ ++ ++#ifndef _PKCS1SIG_H_ ++#define _PKCS1SIG_H_ ++ ++#include "hasht.h" ++#include "seccomon.h" ++#include "secoidt.h" ++ ++/* SGN_VerifyPKCS1DigestInfo verifies that the length of the digest is correct ++ * for the given algorithm, then verifies that the recovered data from the ++ * PKCS#1 signature is a properly-formatted DigestInfo that identifies the ++ * given digest algorithm, then verifies that the digest in the DigestInfo ++ * matches the given digest. ++ * ++ * dataRecoveredFromSignature must be the result of calling PK11_VerifyRecover ++ * or equivalent. ++ * ++ * If unsafeAllowMissingParameters is true (not recommended), then a DigestInfo ++ * without the mandatory ASN.1 NULL parameter will also be accepted. ++ */ ++SECStatus _SGN_VerifyPKCS1DigestInfo(SECOidTag digestAlg, ++ const SECItem* digest, ++ const SECItem* dataRecoveredFromSignature, ++ PRBool unsafeAllowMissingParameters); ++ ++#endif /* _PKCS1SIG_H_ */ +-- +1.7.9.5 diff --git a/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch b/meta/recipes-support/nss/files/nss-fix-incorrect-shebang-of-perl.patch new file mode 100644 index 0000000000..547594d5b6 --- /dev/null +++ b/meta/recipes-support/nss/files/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 +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/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch b/meta/recipes-support/nss/files/nss-fix-support-cross-compiling.patch new file mode 100644 index 0000000000..f0b3550bff --- /dev/null +++ b/meta/recipes-support/nss/files/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 +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/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch b/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch new file mode 100644 index 0000000000..7661dc93a0 --- /dev/null +++ b/meta/recipes-support/nss/files/nss-no-rpath-for-cross-compiling.patch @@ -0,0 +1,26 @@ +nss:no rpath for cross compiling + +Signed-off-by: Hongxu Jia +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/meta/recipes-support/nss/files/nss.pc.in b/meta/recipes-support/nss/files/nss.pc.in new file mode 100644 index 0000000000..200f635c65 --- /dev/null +++ b/meta/recipes-support/nss/files/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/meta/recipes-support/nss/files/signlibs.sh b/meta/recipes-support/nss/files/signlibs.sh new file mode 100644 index 0000000000..1ec79f4576 --- /dev/null +++ b/meta/recipes-support/nss/files/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=`find /lib* /usr/lib* -name "*.chk"` +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/meta/recipes-support/nss/nss.inc b/meta/recipes-support/nss/nss.inc new file mode 100644 index 0000000000..008bdad5c7 --- /dev/null +++ b/meta/recipes-support/nss/nss.inc @@ -0,0 +1,215 @@ +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/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \ + file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=6bf96825e3d7ce4de25621ae886cc859" +SRC_URI = "\ + 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-3.15.1-fix-CVE-2013-1741.patch \ + file://nss-3.15.1-fix-CVE-2013-5605.patch \ + file://nss-CVE-2014-1492.patch \ + file://nss-CVE-2013-1740.patch \ + file://nss-3.15.1-fix-CVE-2013-1739.patch \ + file://nss-CVE-2013-5606.patch \ + file://nss-CVE-2014-1544.patch \ + file://nss-CVE-2014-1568.patch \ +" +SRC_URI_append = "\ + file://nss.pc.in \ + file://signlibs.sh \ +" +inherit siteinfo +PR = "r0" +DEPENDS = "sqlite3 nspr zlib nss-native" +DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" +RDEPENDS_${PN} = "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 + fi + + make -C ./nss CCC="${CXX}" \ + 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 + 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 +} + +FILES_${PN} = "\ + ${sysconfdir} \ + ${bindir} \ + ${libdir}/lib*.chk \ + ${libdir}/lib*.so \ + " +FILES_${PN}-dev = "\ + ${libdir}/nss \ + ${libdir}/pkgconfig/* \ + ${includedir}/* \ + " +FILES_${PN}-dbg = "\ + ${bindir}/.debug/* \ + ${libdir}/.debug/* \ + " + +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/nss/nss_3.15.1.bb b/meta/recipes-support/nss/nss_3.15.1.bb new file mode 100644 index 0000000000..7b06f00cde --- /dev/null +++ b/meta/recipes-support/nss/nss_3.15.1.bb @@ -0,0 +1,9 @@ +require nss.inc + +SRC_URI += "\ + http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_15_1_RTM/src/${BPN}-${PV}.tar.gz \ +" + +SRC_URI[md5sum] = "fb68f4d210ac9397dd0d3c39c4f938eb" +SRC_URI[sha256sum] = "f994106a33d1f3210f4151bbb3419a1c28fd1cb545caa7dc9afdebd6da626284" + diff --git a/meta/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch b/meta/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch new file mode 100644 index 0000000000..cb1e2f7341 --- /dev/null +++ b/meta/recipes-support/ntp/files/ntp-4.2.4_p6-nano.patch @@ -0,0 +1,17 @@ +--- a/include/ntp_syscall.h.orig 2009-05-19 16:44:55.048156467 -0400 ++++ b/include/ntp_syscall.h 2009-05-19 16:46:19.293323686 -0400 +@@ -14,6 +14,14 @@ + # include + #endif + ++#if defined(ADJ_NANO) && !defined(MOD_NANO) ++#define MOD_NANO ADJ_NANO ++#endif ++ ++#if defined(ADJ_TAI) && !defined(MOD_TAI) ++#define MOD_TAI ADJ_TAI ++#endif ++ + #ifndef NTP_SYSCALLS_LIBC + #ifdef NTP_SYSCALLS_STD + # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t)) diff --git a/meta/recipes-support/ntp/files/ntp.conf b/meta/recipes-support/ntp/files/ntp.conf new file mode 100644 index 0000000000..a9cc838450 --- /dev/null +++ b/meta/recipes-support/ntp/files/ntp.conf @@ -0,0 +1,14 @@ +# This is the most basic ntp configuration file +# The driftfile must remain in a place specific to this +# machine - it records the machine specific clock error +driftfile /etc/ntp.drift +# This obtains a random server which will be close +# (in IP terms) to the machine. Add other servers +# as required, or change this. +server time.server.example.com +# Using local hardware clock as fallback +# Disable this when using ntpd -q -g -x as ntpdate or it will sync to itself +server 127.127.1.0 +fudge 127.127.1.0 stratum 14 +# Defining a default security setting +restrict default diff --git a/meta/recipes-support/ntp/files/ntpd b/meta/recipes-support/ntp/files/ntpd new file mode 100755 index 0000000000..ae50f135d0 --- /dev/null +++ b/meta/recipes-support/ntp/files/ntpd @@ -0,0 +1,62 @@ +#! /bin/sh +# +# ntpd init.d script for ntpdc from ntp.isc.org +test -x /usr/bin/ntpd -a -r /etc/ntp.conf || exit 0 +# rcS contains TICKADJ +test -r /etc/default/rcS && . /etc/default/rcS + +# Functions to do individual actions +settick(){ + # If TICKADJ is set we *must* adjust it before we start, because the + # driftfile relies on the correct setting + test -n "$TICKADJ" -a -x /usr/bin/tickadj && { + echo -n "Setting tick to $TICKADJ: " + /usr/bin/tickadj "$TICKADJ" + echo "done" + } +} +startdaemon(){ + # The -g option allows ntpd to step the time to correct it just + # once. The daemon will exit if the clock drifts too much after + # this. If ntpd seems to disappear after a while assume TICKADJ + # above is set to a totally incorrect value. + echo -n "Starting ntpd: " + start-stop-daemon --start -x /usr/bin/ntpd -- -p /var/run/ntp.pid "$@" + echo "done" +} +stopdaemon(){ + echo -n "Stopping ntpd: " + start-stop-daemon --stop -p /var/run/ntp.pid + echo "done" +} + +case "$1" in + start) + settick + startdaemon -g + ;; + stop) + stopdaemon + ;; + force-reload) + stopdaemon + settick + startdaemon -g + ;; + restart) + # Don't reset the tick here + stopdaemon + startdaemon -g + ;; + reload) + # Must do this by hand, but don't do -g + stopdaemon + startdaemon + ;; + *) + echo "Usage: ntpd { start | stop | restart | reload }" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/meta/recipes-support/ntp/files/ntpdate b/meta/recipes-support/ntp/files/ntpdate new file mode 100755 index 0000000000..ab0551c5a5 --- /dev/null +++ b/meta/recipes-support/ntp/files/ntpdate @@ -0,0 +1,54 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/bin + +test -x /usr/bin/ntpdate || exit 0 + +if test -f /etc/default/ntpdate ; then +. /etc/default/ntpdate +fi + +if [ "$NTPSERVERS" = "" ] ; then + if [ "$METHOD" = "" -a "$1" != "silent" ] ; then + echo "Please set NTPSERVERS in /etc/default/ntpdate" + exit 1 + else + exit 0 + fi +fi + +# This is a heuristic: The idea is that if a static interface is brought +# up, that is a major event, and we can put in some extra effort to fix +# the system time. Feel free to change this, especially if you regularly +# bring up new network interfaces. +if [ "$METHOD" = static ]; then + OPTS="-b" +fi + +if [ "$METHOD" = loopback ]; then + exit 0 +fi + +( + +LOCKFILE=/var/lock/ntpdate + +# Avoid running more than one at a time +if [ -x /usr/bin/lockfile-create ]; then + lockfile-create $LOCKFILE + lockfile-touch $LOCKFILE & + LOCKTOUCHPID="$!" +fi + +if /usr/bin/ntpdate -s $OPTS $NTPSERVERS 2>/dev/null; then + if [ "$UPDATE_HWCLOCK" = "yes" ]; then + hwclock --systohc || : + fi +fi + +if [ -x /usr/bin/lockfile-create ] ; then + kill $LOCKTOUCHPID + lockfile-remove $LOCKFILE +fi + +) & diff --git a/meta/recipes-support/ntp/files/ntpdate.default b/meta/recipes-support/ntp/files/ntpdate.default new file mode 100644 index 0000000000..486b6e07d3 --- /dev/null +++ b/meta/recipes-support/ntp/files/ntpdate.default @@ -0,0 +1,7 @@ +# Configuration script used by ntpdate-sync script + +NTPSERVERS="" + +# Set to "yes" to write time to hardware clock on success +UPDATE_HWCLOCK="no" + diff --git a/meta/recipes-support/ntp/files/openssl-check.patch b/meta/recipes-support/ntp/files/openssl-check.patch new file mode 100644 index 0000000000..8b4a6733cd --- /dev/null +++ b/meta/recipes-support/ntp/files/openssl-check.patch @@ -0,0 +1,59 @@ +Hack OpenSSL check to work when libssl and libcrypto aren't in same dir + +Upstream-Status: Inappropriate [config] + +Signed-off-by: Paul Eggleton +--- + configure | 4 ++-- + m4/ntp_openssl.m4 | 4 ++-- + sntp/configure | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/configure b/configure +index aae2c01..6a3c15e 100755 +--- a/configure ++++ b/configure +@@ -22868,8 +22868,8 @@ case "$ans" in + test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break + ;; + *) +- test -f $i/libcrypto.so -a -f $i/libssl.so && break +- test -f $i/libcrypto.a -a -f $i/libssl.a && break ++ test -f $i/libssl.so && break ++ test -f $i/libssl.a && break + ;; + esac + done +diff --git a/m4/ntp_openssl.m4 b/m4/ntp_openssl.m4 +index 7d9f477..67bdd55 100644 +--- a/m4/ntp_openssl.m4 ++++ b/m4/ntp_openssl.m4 +@@ -41,8 +41,8 @@ case "$ans" in + test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break + ;; + *) +- test -f $i/libcrypto.so -a -f $i/libssl.so && break +- test -f $i/libcrypto.a -a -f $i/libssl.a && break ++ test -f $i/libssl.so && break ++ test -f $i/libssl.a && break + ;; + esac + done +diff --git a/sntp/configure b/sntp/configure +index 7782c29..55e82d9 100755 +--- a/sntp/configure ++++ b/sntp/configure +@@ -14810,8 +14810,8 @@ case "$ans" in + test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break + ;; + *) +- test -f $i/libcrypto.so -a -f $i/libssl.so && break +- test -f $i/libcrypto.a -a -f $i/libssl.a && break ++ test -f $i/libssl.so && break ++ test -f $i/libssl.a && break + ;; + esac + done +-- +1.7.1 + diff --git a/meta/recipes-support/ntp/files/tickadj.c.patch b/meta/recipes-support/ntp/files/tickadj.c.patch new file mode 100644 index 0000000000..9ef9de9e1f --- /dev/null +++ b/meta/recipes-support/ntp/files/tickadj.c.patch @@ -0,0 +1,32 @@ +Index: ntp-4.2.2p3-r0/ntp-4.2.2p3/util/tickadj.c +=================================================================== +--- ntp-4.2.2p3/util/tickadj.c 2004-02-25 06:58:33.000000000 +0100 ++++ ntp-4.2.2p3/util/tickadj.c 2007-07-07 01:00:54.000000000 +0200 +@@ -21,7 +21,8 @@ + # include + #endif /* HAVE_UNISTD_H */ + +-#ifdef HAVE___ADJTIMEX /* Linux */ ++/* proper handling here has been moved to upstream ntp bugzilla */ ++#ifdef linux + + #include + struct timex txc; +@@ -91,7 +92,7 @@ + } + + if (!errflg) { +- if (__adjtimex(&txc) < 0) ++ if (adjtimex(&txc) < 0) + perror("adjtimex"); + else if (!quiet) + printf("tick = %ld\ntick_adj = %d\n", +@@ -146,7 +147,7 @@ + #endif + } + +- if (__adjtimex(&txc) < 0) ++ if (adjtimex(&txc) < 0) + { + perror("adjtimex"); + } diff --git a/meta/recipes-support/ntp/ntp.inc b/meta/recipes-support/ntp/ntp.inc new file mode 100644 index 0000000000..d93f22d473 --- /dev/null +++ b/meta/recipes-support/ntp/ntp.inc @@ -0,0 +1,93 @@ +SUMMARY = "Network Time Protocol daemon and utilities" +DESCRIPTION = "The Network Time Protocol (NTP) is used to \ +synchronize the time of a computer client or server to \ +another server or reference time source, such as a radio \ +or satellite receiver or modem." +HOMEPAGE = "http://support.ntp.org" +SECTION = "console/network" +LICENSE = "NTP" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fea4b50c33b18c2194b4b1c9ca512670" + +INC_PR = "r3" + +SRC_URI = "http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-${PV}.tar.gz \ + file://tickadj.c.patch \ + file://ntp-4.2.4_p6-nano.patch \ + file://openssl-check.patch \ + file://ntpd \ + file://ntp.conf \ + file://ntpdate \ + file://ntpdate.default \ + " + +inherit autotools update-rc.d + +# The ac_cv_header_readline_history is to stop ntpdc depending on either +# readline or curses +EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readline_history_h=no" +CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \ + --with-openssl-incdir=${STAGING_INCDIR} \ + --with-crypto, \ + --without-openssl --without-crypto, \ + openssl" + +do_install_append() { + install -d ${D}${sysconfdir}/init.d + install -m 644 ${WORKDIR}/ntp.conf ${D}${sysconfdir} + install -m 755 ${WORKDIR}/ntpd ${D}${sysconfdir}/init.d + install -d ${D}${bindir} + install -m 755 ${WORKDIR}/ntpdate ${D}${bindir}/ntpdate-sync + + # Fix hardcoded paths in scripts + sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync + sed -i 's!/usr/bin/!${bindir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync + sed -i 's!/etc/!${sysconfdir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync + sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/ntpd ${D}${bindir}/ntpdate-sync + sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${bindir}/ntpdate-sync + + install -d ${D}/${sysconfdir}/default + install -m 644 ${WORKDIR}/ntpdate.default ${D}${sysconfdir}/default/ntpdate + install -d ${D}/${sysconfdir}/network/if-up.d + ln -s ${bindir}/ntpdate-sync ${D}/${sysconfdir}/network/if-up.d +} + +PACKAGES += "ntpdate ${PN}-tickadj ${PN}-utils" +# NOTE: you don't need ntpdate, use "ntpd -q -g -x" + +# ntp originally includes tickadj. It's split off for inclusion in small firmware images on platforms +# with wonky clocks (e.g. OpenSlug) +RDEPENDS_${PN} = "${PN}-tickadj" +# Handle move from bin to utils package +RPROVIDES_${PN}-utils = "${PN}-bin" +RREPLACES_${PN}-utils = "${PN}-bin" +RCONFLICTS_${PN}-utils = "${PN}-bin" + +RSUGGESTS_${PN} = "iana-etc" + +FILES_${PN} = "${bindir}/ntpd ${sysconfdir}/ntp.conf ${sysconfdir}/init.d/ntpd ${sbindir} ${libdir}" +FILES_${PN}-tickadj = "${bindir}/tickadj" +FILES_${PN}-utils = "${bindir}" +FILES_ntpdate = "${bindir}/ntpdate ${sysconfdir}/network/if-up.d/ntpdate-sync ${bindir}/ntpdate-sync ${sysconfdir}/default/ntpdate" + +CONFFILES_${PN} = "${sysconfdir}/ntp.conf" +CONFFILES_ntpdate = "${sysconfdir}/default/ntpdate" + +INITSCRIPT_NAME = "ntpd" +# No dependencies, so just go in at the standard level (20) +INITSCRIPT_PARAMS = "defaults" + +pkg_postinst_ntpdate() { +if test "x$D" != "x"; then + exit 1 +else + if ! grep -q -s ntpdate /var/spool/cron/root; then + echo "adding crontab" + test -d /var/spool/cron || mkdir -p /var/spool/cron + echo "30 * * * * ${bindir}/ntpdate-sync silent" >> /var/spool/cron/root + fi +fi +} + diff --git a/meta/recipes-support/ntp/ntp_4.2.6p5.bb b/meta/recipes-support/ntp/ntp_4.2.6p5.bb new file mode 100644 index 0000000000..f1e9ecd7a8 --- /dev/null +++ b/meta/recipes-support/ntp/ntp_4.2.6p5.bb @@ -0,0 +1,7 @@ +require ntp.inc + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "00df80a84ec9528fcfb09498075525bc" +SRC_URI[sha256sum] = "d6ab8371f9d31e594eb6922823d5ccd03dcc4e9d84b0e23ea25ac1405432f91c" + diff --git a/meta/recipes-support/pinentry/pinentry_0.8.4.bb b/meta/recipes-support/pinentry/pinentry_0.8.4.bb new file mode 100644 index 0000000000..acc69923ba --- /dev/null +++ b/meta/recipes-support/pinentry/pinentry_0.8.4.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-brokensep + +SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \ + " + +SRC_URI[md5sum] = "e2b6f94471ba1e978f6e5bf6b275189b" +SRC_URI[sha256sum] = "359db3bf46cb743ba0b3aeef259f6107271ca888ba3e22c1cba525c9aca35612" + +EXTRA_OECONF = "--disable-rpath \ + --disable-dependency-tracking \ + --disable-glibtest \ + --disable-pinentry-gtk \ + --disable-pinentry-qt \ + " + +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[gtk2] = "--enable-pinentry-gtk2, --disable-pinentry-gtk2, gtk+ glib-2.0" diff --git a/meta/recipes-support/popt/popt/disable_tests.patch b/meta/recipes-support/popt/popt/disable_tests.patch new file mode 100644 index 0000000000..016cf66a27 --- /dev/null +++ b/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 +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/meta/recipes-support/popt/popt/pkgconfig_fix.patch b/meta/recipes-support/popt/popt/pkgconfig_fix.patch new file mode 100644 index 0000000000..0bddbf8c94 --- /dev/null +++ b/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/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch b/meta/recipes-support/popt/popt/popt_fix_for_automake-1.12.patch new file mode 100644 index 0000000000..91bca96a50 --- /dev/null +++ b/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 +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/meta/recipes-support/popt/popt_1.16.bb b/meta/recipes-support/popt/popt_1.16.bb new file mode 100644 index 0000000000..cb13a815e0 --- /dev/null +++ b/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/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner new file mode 100644 index 0000000000..c618f1148d --- /dev/null +++ b/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/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb new file mode 100644 index 0000000000..7443811d8c --- /dev/null +++ b/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb @@ -0,0 +1,22 @@ +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" + +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/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch b/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch new file mode 100644 index 0000000000..67a28ab77a --- /dev/null +++ b/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 + +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/meta/recipes-support/pth/pth_2.0.7.bb b/meta/recipes-support/pth/pth_2.0.7.bb new file mode 100644 index 0000000000..416e788e5d --- /dev/null +++ b/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" + +SRC_URI[md5sum] = "9cb4a25331a4c4db866a31cbe507c793" +SRC_URI[sha256sum] = "72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232" + +PARALLEL_MAKE="" + +BINCONFIG = "${bindir}/pth-config" + +inherit autotools binconfig-disabled pkgconfig + +do_configure() { + ( cd ${S}; gnu-configize ) + ( cd ${S}; autoconf ) + oe_runconf +} diff --git a/meta/recipes-support/serf/serf/env.patch b/meta/recipes-support/serf/serf/env.patch new file mode 100644 index 0000000000..9d073e9abf --- /dev/null +++ b/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/meta/recipes-support/serf/serf/norpath.patch b/meta/recipes-support/serf/serf/norpath.patch new file mode 100644 index 0000000000..380f5d00d2 --- /dev/null +++ b/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/meta/recipes-support/serf/serf_1.3.7.bb b/meta/recipes-support/serf/serf_1.3.7.bb new file mode 100644 index 0000000000..b87a04ab69 --- /dev/null +++ b/meta/recipes-support/serf/serf_1.3.7.bb @@ -0,0 +1,25 @@ + +SRC_URI = "http://serf.googlecode.com/svn/src_releases/serf-1.3.7.tar.bz2 \ + file://norpath.patch \ + file://env.patch" +SRC_URI[md5sum] = "0a6fa745df4517dd8f79c75c538919bc" +SRC_URI[sha256sum] = "ecccb74e665e6ea7539271e126a21d0f7eeddfeaa8ce090adb3aec6682f9f0ae" + +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/meta/recipes-support/shared-mime-info/shared-mime-info.inc b/meta/recipes-support/shared-mime-info/shared-mime-info.inc new file mode 100644 index 0000000000..6eedb6d3fd --- /dev/null +++ b/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/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch b/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch new file mode 100644 index 0000000000..3c9f1ea438 --- /dev/null +++ b/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 + +--- 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/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch b/meta/recipes-support/shared-mime-info/shared-mime-info/parallelmake.patch new file mode 100644 index 0000000000..84c4d03731 --- /dev/null +++ b/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 + +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/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb new file mode 100644 index 0000000000..4bd81cd831 --- /dev/null +++ b/meta/recipes-support/shared-mime-info/shared-mime-info_1.3.bb @@ -0,0 +1,7 @@ +require shared-mime-info.inc + +SRC_URI[md5sum] = "743720bc4803dd69f55449013d350f31" +SRC_URI[sha256sum] = "4fd49c8c7ca9ecb10c59845094a18dbb73b69c72b4bad3db5e864f2111cb323a" + +SRC_URI =+ "file://parallelmake.patch \ + file://install-data-hook.patch" diff --git a/meta/recipes-support/sqlite/sqlite3.inc b/meta/recipes-support/sqlite/sqlite3.inc new file mode 100644 index 0000000000..2e3791bfc3 --- /dev/null +++ b/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/meta/recipes-support/sqlite/sqlite3_3.8.6.0.bb b/meta/recipes-support/sqlite/sqlite3_3.8.6.0.bb new file mode 100644 index 0000000000..32f60ebbeb --- /dev/null +++ b/meta/recipes-support/sqlite/sqlite3_3.8.6.0.bb @@ -0,0 +1,21 @@ +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/2014/sqlite-autoconf-${SQLITE_PV}.tar.gz" + +SRC_URI[md5sum] = "f7e4a156b583abeba349629e2364224b" +SRC_URI[sha256sum] = "53bab14255bc16c3d73fdbe54b364c1764709d68dda167587f8026c98b9f4e95" + +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/meta/recipes-support/taglib/taglib_1.9.1.bb b/meta/recipes-support/taglib/taglib_1.9.1.bb new file mode 100644 index 0000000000..55e345f1cc --- /dev/null +++ b/meta/recipes-support/taglib/taglib_1.9.1.bb @@ -0,0 +1,32 @@ +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" + +S = "${WORKDIR}/${BP}" + +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 +} + diff --git a/meta/recipes-support/user-creation/xuser-account_0.1.bb b/meta/recipes-support/user-creation/xuser-account_0.1.bb new file mode 100644 index 0000000000..77ba97dbf1 --- /dev/null +++ b/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/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch b/meta/recipes-support/vte/vte-0.28.2/obsolete_automake_macros.patch new file mode 100644 index 0000000000..6763d37540 --- /dev/null +++ b/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 +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/meta/recipes-support/vte/vte.inc b/meta/recipes-support/vte/vte.inc new file mode 100644 index 0000000000..4081a7fac6 --- /dev/null +++ b/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.1+" +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/meta/recipes-support/vte/vte_0.28.2.bb b/meta/recipes-support/vte/vte_0.28.2.bb new file mode 100644 index 0000000000..485187df82 --- /dev/null +++ b/meta/recipes-support/vte/vte_0.28.2.bb @@ -0,0 +1,10 @@ +require vte.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7" + +PR = "r6" + +SRC_URI += "file://obsolete_automake_macros.patch" + +SRC_URI[archive.md5sum] = "f07a4bf943194f94b7f142db8f7f36dc" +SRC_URI[archive.sha256sum] = "8d04e202b617373dfb47689e5e628febe2c58840b34cccc4af4feb88c48df903" -- cgit v1.2.3-54-g00ecf