aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-crypt/qca/Manifest1
-rw-r--r--app-crypt/qca/files/qca-2.1.1-libressl.patch51
-rw-r--r--app-crypt/qca/files/qca-2.1.1-libressl.patch.orig35
-rw-r--r--app-crypt/qca/files/qca-disable-pgp-test.patch13
-rw-r--r--app-crypt/qca/metadata.xml27
-rw-r--r--app-crypt/qca/qca-2.1.1.ebuild123
-rw-r--r--dev-java/icedtea/Manifest13
-rw-r--r--dev-java/icedtea/files/6-cacao-pr-157.patch143
-rw-r--r--dev-java/icedtea/files/7-cacao-pr-157.patch139
-rw-r--r--dev-java/icedtea/files/fontconfig.Gentoo.properties.src385
-rw-r--r--dev-java/icedtea/files/generate-cacerts.pl358
-rw-r--r--dev-java/icedtea/files/icedtea-bug-2781.patch42
-rw-r--r--dev-java/icedtea/files/icedtea.env18
-rw-r--r--dev-java/icedtea/icedtea-6.1.13.9.ebuild352
-rw-r--r--dev-java/icedtea/icedtea-7.2.6.4.ebuild412
-rw-r--r--dev-java/icedtea/metadata.xml39
-rw-r--r--dev-qt/qtcore/Manifest2
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch81
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.5-libressl.patch52
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch12
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch94
-rw-r--r--dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch431
-rw-r--r--dev-qt/qtcore/metadata.xml19
-rw-r--r--dev-qt/qtcore/qtcore-4.8.6.ebuild91
-rw-r--r--dev-qt/qtcore/qtcore-4.8.7.ebuild93
-rw-r--r--dev-qt/qtnetwork/Manifest1
-rw-r--r--dev-qt/qtnetwork/files/0001-Fix-compilation-with-libressl.patch36
-rw-r--r--dev-qt/qtnetwork/files/qtnetwork-5.5-socklen_t.patch40
-rw-r--r--dev-qt/qtnetwork/metadata.xml20
-rw-r--r--dev-qt/qtnetwork/qtnetwork-5.5.1.ebuild60
-rw-r--r--net-mail/fetchmail/Manifest1
-rw-r--r--net-mail/fetchmail/fetchmail-6.3.26.ebuild104
-rw-r--r--net-mail/fetchmail/files/fetchmail-6.3.26-libressl.patch117
-rw-r--r--net-mail/fetchmail/files/fetchmail-6.3.26-python-optional.patch14
-rw-r--r--net-mail/fetchmail/files/fetchmail-6.3.26-tests.patch11
-rw-r--r--net-mail/fetchmail/files/fetchmail.conf1
-rw-r--r--net-mail/fetchmail/files/fetchmail.confd10
-rw-r--r--net-mail/fetchmail/files/fetchmail.initd44
-rw-r--r--net-mail/fetchmail/files/fetchmail.service11
-rw-r--r--net-mail/fetchmail/metadata.xml16
40 files changed, 3512 insertions, 0 deletions
diff --git a/app-crypt/qca/Manifest b/app-crypt/qca/Manifest
new file mode 100644
index 0000000..e27dad3
--- /dev/null
+++ b/app-crypt/qca/Manifest
@@ -0,0 +1 @@
+DIST qca-2.1.1.tar.xz 688460 SHA256 95de3e7910b5f9ec7084169989c9d98bfb527e6a4865fe17269c3b24308be983 SHA512 f077b5a4cc6539e0880f4d0a615bebcf851f634e99c6c355522598204f625e5195e0cbc8a1976593669018e57eff95796c8fef69b1301b42cb18736bc8aa1abf WHIRLPOOL 454751a76f5e59aa09d6cc979bc26a490b23a2e5308f663400f45f38a95e6ad7a34428cffb1a2a82ec6958aa0b4418e0054503a58b43e0c172201cbaa7c669f8
diff --git a/app-crypt/qca/files/qca-2.1.1-libressl.patch b/app-crypt/qca/files/qca-2.1.1-libressl.patch
new file mode 100644
index 0000000..ad84361
--- /dev/null
+++ b/app-crypt/qca/files/qca-2.1.1-libressl.patch
@@ -0,0 +1,51 @@
+--- a/plugins/qca-ossl/CMakeLists.txt 2015-10-02 05:39:21.000000000 -0400
++++ b/plugins/qca-ossl/CMakeLists.txt 2016-01-29 01:40:22.193522019 -0500
+@@ -25,6 +25,13 @@
+ message(WARNING "qca-ossl will be compiled without AES CTR mode encryption support")
+ endif(HAVE_OPENSSL_AES_CTR)
+
++ check_function_exists(EVP_sha HAVE_OPENSSL_SHA0)
++ if(HAVE_OPENSSL_SHA0)
++ add_definitions(-DHAVE_OPENSSL_SHA0)
++ else(HAVE_OPENSSL_SHA0)
++ message(WARNING "qca-ossl will be compiled without SHA-0 digest algorithm support")
++ endif(HAVE_OPENSSL_SHA0)
++
+ set(QCA_OSSL_SOURCES qca-ossl.cpp)
+
+ my_automoc( QCA_OSSL_SOURCES )
+--- a/plugins/qca-ossl/qca-ossl.cpp 2015-10-02 05:39:21.000000000 -0400
++++ b/plugins/qca-ossl/qca-ossl.cpp 2016-01-29 01:40:22.195522008 -0500
+@@ -5403,9 +5403,11 @@
+ ctx = SSL_CTX_new(SSLv2_client_method());
+ break;
+ #endif
++#ifndef OPENSSL_NO_SSL3_METHOD
+ case TLS::SSL_v3:
+ ctx = SSL_CTX_new(SSLv3_client_method());
+ break;
++#endif
+ case TLS::TLS_v1:
+ ctx = SSL_CTX_new(TLSv1_client_method());
+ break;
+@@ -6880,7 +6882,9 @@
+ {
+ QStringList list;
+ list += "sha1";
++#ifdef HAVE_OPENSSL_SHA0
+ list += "sha0";
++#endif
+ list += "ripemd160";
+ #ifdef HAVE_OPENSSL_MD2
+ list += "md2";
+@@ -7133,8 +7137,10 @@
+ return new opensslInfoContext(this);
+ else if ( type == "sha1" )
+ return new opensslHashContext( EVP_sha1(), this, type);
++#ifdef HAVE_OPENSSL_SHA0
+ else if ( type == "sha0" )
+ return new opensslHashContext( EVP_sha(), this, type);
++#endif
+ else if ( type == "ripemd160" )
+ return new opensslHashContext( EVP_ripemd160(), this, type);
+ #ifdef HAVE_OPENSSL_MD2
diff --git a/app-crypt/qca/files/qca-2.1.1-libressl.patch.orig b/app-crypt/qca/files/qca-2.1.1-libressl.patch.orig
new file mode 100644
index 0000000..a01541b
--- /dev/null
+++ b/app-crypt/qca/files/qca-2.1.1-libressl.patch.orig
@@ -0,0 +1,35 @@
+--- plugins/qca-ossl/qca-ossl.cpp.orig 2016-01-24 16:54:35.145936357 -0500
++++ plugins/qca-ossl/qca-ossl.cpp 2016-01-24 16:58:13.784157053 -0500
+@@ -5403,9 +5403,11 @@
+ ctx = SSL_CTX_new(SSLv2_client_method());
+ break;
+ #endif
++#ifndef OPENSSL_NO_SSL3
+ case TLS::SSL_v3:
+ ctx = SSL_CTX_new(SSLv3_client_method());
+ break;
++#endif
+ case TLS::TLS_v1:
+ ctx = SSL_CTX_new(TLSv1_client_method());
+ break;
+@@ -6880,7 +6882,9 @@
+ {
+ QStringList list;
+ list += "sha1";
++#ifndef OPENSSL_NO_SHA0
+ list += "sha0";
++#endif
+ list += "ripemd160";
+ #ifdef HAVE_OPENSSL_MD2
+ list += "md2";
+@@ -7133,8 +7137,10 @@
+ return new opensslInfoContext(this);
+ else if ( type == "sha1" )
+ return new opensslHashContext( EVP_sha1(), this, type);
++#ifndef OPENSSL_NO_SHA0
+ else if ( type == "sha0" )
+ return new opensslHashContext( EVP_sha(), this, type);
++#endif
+ else if ( type == "ripemd160" )
+ return new opensslHashContext( EVP_ripemd160(), this, type);
+ #ifdef HAVE_OPENSSL_MD2
diff --git a/app-crypt/qca/files/qca-disable-pgp-test.patch b/app-crypt/qca/files/qca-disable-pgp-test.patch
new file mode 100644
index 0000000..7944e3c
--- /dev/null
+++ b/app-crypt/qca/files/qca-disable-pgp-test.patch
@@ -0,0 +1,13 @@
+diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt
+index f4d9eb9..67ef281 100644
+--- a/unittest/CMakeLists.txt
++++ b/unittest/CMakeLists.txt
+@@ -23,7 +23,7 @@ add_subdirectory(keylengthunittest)
+ add_subdirectory(keystore)
+ add_subdirectory(macunittest)
+ add_subdirectory(metatype)
+-add_subdirectory(pgpunittest)
++# add_subdirectory(pgpunittest)
+ add_subdirectory(pipeunittest)
+ add_subdirectory(pkits)
+ add_subdirectory(rsaunittest)
diff --git a/app-crypt/qca/metadata.xml b/app-crypt/qca/metadata.xml
new file mode 100644
index 0000000..a92ea3e
--- /dev/null
+++ b/app-crypt/qca/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+</maintainer>
+<maintainer type="project">
+ <email>qt@gentoo.org</email>
+ <name>Gentoo Qt Project</name>
+</maintainer>
+<maintainer type="project">
+ <email>kde@gentoo.org</email>
+ <name>Gentoo KDE Project</name>
+</maintainer>
+<use>
+ <flag name="botan">Enable botan plugin</flag>
+ <flag name="gcrypt">Enable gcrypt plugin</flag>
+ <flag name="gpg">Enable GnuPG plugin</flag>
+ <flag name="logger">Enable logger plugin</flag>
+ <flag name="nss">Enable NSS plugin</flag>
+ <flag name="openssl">Enable OpenSSL plugin</flag>
+ <flag name="pkcs11">Enable PKCS#11 plugin</flag>
+ <flag name="sasl">Enable SASL plugin</flag>
+ <flag name="softstore">Enable softstore plugin</flag>
+</use>
+</pkgmetadata>
diff --git a/app-crypt/qca/qca-2.1.1.ebuild b/app-crypt/qca/qca-2.1.1.ebuild
new file mode 100644
index 0000000..b0dcdb5
--- /dev/null
+++ b/app-crypt/qca/qca-2.1.1.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multibuild qmake-utils
+
+DESCRIPTION="Qt Cryptographic Architecture (QCA)"
+HOMEPAGE="http://delta.affinix.com/qca/"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
+
+IUSE="botan debug doc examples gcrypt gpg libressl logger nss +openssl pkcs11 +qt4 qt5 sasl softstore test"
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+RDEPEND="
+ !app-crypt/qca-cyrus-sasl
+ !app-crypt/qca-gnupg
+ !app-crypt/qca-logger
+ !app-crypt/qca-ossl
+ !app-crypt/qca-pkcs11
+ botan? ( dev-libs/botan )
+ gcrypt? ( dev-libs/libgcrypt:= )
+ gpg? ( app-crypt/gnupg )
+ nss? ( dev-libs/nss )
+ openssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ pkcs11? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ dev-libs/pkcs11-helper
+ )
+ qt4? ( dev-qt/qtcore:4 )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtconcurrent:5
+ dev-qt/qtnetwork:5
+ )
+ sasl? ( dev-libs/cyrus-sasl:2 )
+"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ test? (
+ qt4? ( dev-qt/qttest:4 )
+ qt5? ( dev-qt/qttest:5 )
+ )
+"
+
+DOCS=( README TODO )
+
+PATCHES=(
+ "${FILESDIR}/${PN}-disable-pgp-test.patch"
+ "${FILESDIR}/${PN}-2.1.1-libressl.patch"
+)
+
+qca_plugin_use() {
+ echo -DWITH_${2:-$1}_PLUGIN=$(usex "$1")
+}
+
+pkg_setup() {
+ MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
+}
+
+src_configure() {
+ myconfigure() {
+ local mycmakeargs=(
+ -DQCA_FEATURE_INSTALL_DIR="${EPREFIX}$(${MULTIBUILD_VARIANT}_get_mkspecsdir)/features"
+ -DQCA_PLUGINS_INSTALL_DIR="${EPREFIX}$(${MULTIBUILD_VARIANT}_get_plugindir)"
+ $(qca_plugin_use botan)
+ $(qca_plugin_use gcrypt)
+ $(qca_plugin_use gpg gnupg)
+ $(qca_plugin_use logger)
+ $(qca_plugin_use nss)
+ $(qca_plugin_use openssl ossl)
+ $(qca_plugin_use pkcs11)
+ $(qca_plugin_use sasl cyrus-sasl)
+ $(qca_plugin_use softstore)
+ $(cmake-utils_use_build test TESTS)
+ )
+
+ if [[ ${MULTIBUILD_VARIANT} == qt4 ]]; then
+ mycmakeargs+=(-DQT4_BUILD=ON)
+ fi
+
+ cmake-utils_src_configure
+ }
+
+ multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+ multibuild_foreach_variant cmake-utils_src_compile
+}
+
+src_test() {
+ mytest() {
+ local -x QCA_PLUGIN_PATH="${BUILD_DIR}/lib/qca"
+ cmake-utils_src_test
+ }
+
+ multibuild_foreach_variant mytest
+}
+
+src_install() {
+ multibuild_foreach_variant cmake-utils_src_install
+
+ if use doc; then
+ pushd "${BUILD_DIR}" >/dev/null || die
+ doxygen Doxyfile.in || die
+ dodoc -r apidocs/html
+ popd >/dev/null || die
+ fi
+
+ if use examples; then
+ dodoc -r "${S}"/examples
+ fi
+}
diff --git a/dev-java/icedtea/Manifest b/dev-java/icedtea/Manifest
new file mode 100644
index 0000000..3875c9b
--- /dev/null
+++ b/dev-java/icedtea/Manifest
@@ -0,0 +1,13 @@
+DIST icedtea-2.6-corba-2135da66cc53.tar.bz2 1072269 SHA256 26bbfae0504fb7e83fd5eaba08d9e44e0c07a609cdf7c04fb6832a097b56bc08 SHA512 2e07d6529c347625c06aed7dc25b41b5ca425aedb0652cc92df477f8a4ab1343c4aa90b1204a94a327a550d75cfe13c0adaf607b7e064e11b5a9ed07afb9313f WHIRLPOOL 2cbf0e97038907800f6d88084fc9879714c8c1297842179e3f220dde416d6f47d076fdc2c2296600aa06dcf839ec029378db8e7a662ce8c3cbfd8eda67e9ac3b
+DIST icedtea-2.6-hotspot-19d919ae5506.tar.bz2 8162545 SHA256 3747417c3ba69d1ff7d80dc6df19454c4f4023c35f8b711e47baefe2fc772e65 SHA512 be3c356fac53112324f688e6336e8bcde453284f20671a1630b97a30bfaaedf1f7915984250e51aea106fbcc25790aca3f7d4ed419499394748f0391b17782c5 WHIRLPOOL 65251c4e6d91fd8a25bb2bc83b58aacd23f3e7f4f65112d135ec04f98136e351a8175a84a05c070a42d1a351c8301c55a34f65f120e908e129cecb0ff703d32d
+DIST icedtea-2.6-jaxp-bc6edb6c12a7.tar.bz2 2733735 SHA256 097cb0423271b6439b36db190a66bab9d447dd03ee22e42a6089a3b3b8363f62 SHA512 fb9a7607403ba15759427bd7ef1740949dc9cf3892e61a643b9dcdfda7633876d38606dd06af96b0fa362eec427c68b9faa458762defe502c81cdd97290a056b WHIRLPOOL 62583d7e1907b97b90f818b9b0e76fe10a0f57342597191157f6c0a696af8f1fdc4b4968aa2112c7b42900e6a988fd291b0d5ffe7c3de7d89473e536ab6b9e56
+DIST icedtea-2.6-jaxws-271b555de438.tar.bz2 2022035 SHA256 da7604aaaedaab93ba9ad21ee5ee8f18c807606a97d60037ae8c3647e823dfa1 SHA512 cc7d9ee95ba4350c44eb1e9c08e70f6c4e5f1c115a8bc1c3af91828e8c6b814c31494426edc08e75601506e8f6208d07e8425f0f5b14ba5f5de7c7e3165b76c4 WHIRLPOOL a9376fc7ccfd9fea8adf7716aa0da93a32f855acc565b6ea39fa38cbbf3a008a035e62d54d9b2e3633c8a1c185787e0a373d2b166ef609e6483a4d28a3fdd1fc
+DIST icedtea-2.6-jdk-dc86038147b2.tar.bz2 32420326 SHA256 9d3199c0f9c39238c6920c941026cf8661a92e97845f75d74e9ff277532b5d63 SHA512 d22cba72083b65ec5b818652e0520c7b63974ecd940f6f39e27ce83cac664de15c3c4611e088056b6ae123b77f605fb61c1226c05811b03086c39cc2e12f114d WHIRLPOOL 48d3cacd5ec54c8e7dd203abd53f956669ff861ebe98e677d107d31d6964467b2387995e644a64ba238f44dab287bb2f6ef5d6e8333aa167d994cd72d74fdda3
+DIST icedtea-2.6-langtools-fd0a34cb97b4.tar.bz2 1707682 SHA256 f9b0ce14c73c263276d3dfe78601714869cd2c0463bd01c637c8556d52a7d7cc SHA512 0044e405fdaaae8fa54dd576b9efec4e51bdc0ee410eeeb3f78984a20efd6bd31b678e9b113a9d33c4eafaab3cb4ef190c78a4d02172e010282768bad917c497 WHIRLPOOL 6c70b2b176b1186eb9faf1a017becef1cc05b7c1c49ddfe5251b5660972514bb65c613cd5a5de5a11a5f104d63414947d5a3229e30294f57e67ace001acd9ef9
+DIST icedtea-2.6-openjdk-4f1e498cad9c.tar.bz2 129984 SHA256 bb02e71972ad606e739c79fc11c6dc61b4840a526a41049a600a206cc37152e2 SHA512 0b5affd4dfd76f584d1cd921026c5ae1d1017ee176f323a14eaaa5d02aa699e744f4c42ca76c31be93b334bfade63e1ca6635f9d9191640841497ba92cfb813c WHIRLPOOL 46769805754e869e4348925e96e63acec443e7e7bc4181925eb3610181d78784c54e288d0383668607b86945ee1e2eb7eeb345a161abb4524cb9f5acc77566c2
+DIST icedtea-2.6.4.tar.xz 2078228 SHA256 d20a365feea95a4c01c9f9db1f7562f471f638bc672db9de6c6e654d2d826164 SHA512 96373c8452b3087804d906544cd84ddae5bd3969314bd856cb89a9aa02c49fde0ea04d602f6d0d9e82308d34c60aa6c309314ec03ec7c73a4bf3c18a8825d1e0 WHIRLPOOL 688051df4a304874761f5e37bd0b003e20df17cf9f1552230b9638aa6df62d09c8c29dcdf3c7646b523266cc40ad0b4a4528bf4dfb46eae2e91d7e5e575dbc5c
+DIST icedtea-cacao-68fe50ac34ec.tar.gz 4263528 SHA256 b8230f20d7022f9230bbfea13b2f3f179b2f42db40138ac6d32c82fc418ffc3a SHA512 bfa719e5c0212435bbc0e3abc7c69d84b52b17edc1571df94f13e4183889da07c82bb332745724cfa4944e18034c71fd9383e3c4515a69dbfa1369ba9318231f WHIRLPOOL 539c0fed1057723212b209d4341ece9c6b2786b1c216789ebdb8d22b4339daf26425883bbc2f08ea754252c28259f02bc829a42ec05d6838162232066f0ec0a3
+DIST icedtea-cacao-c182f119eaad.tar.gz 4485353 SHA256 eade43f6c5da8b3b5a64e6b206b624eaca88539f80101d7164d6aa426eb590b1 SHA512 2ccb947d71b80d84b83295d473c19952e98698a1fd944fc7c12004ff1af29af2989d46fbd95b5daf95eae2fda9de7c7f88f964fa887a6345b4f57d0c490bee23 WHIRLPOOL 8da9aff897bb7119d99ca825e70b4e79663f04d86a58c23cbf50b2bf56e96d833cc09d18380e510671c0ea65a3e19ae4cd1470741fc3b2c6cd6bcd1b9b9323b4
+DIST icedtea-jamvm-ec18fb9e49e62dce16c5094ef1527eed619463aa.tar.gz 317187 SHA256 31810266666c23822942aac62a78019c2c4589e1c5ee48329cbf42652d4437bc SHA512 a31348481e1c02747f5bb9db333f855c45a1555aa187ee35de5ef553a10a8a47dfcc1beb1e69502046c1758438b91958a328e0a0015812c153221f67734a70a6 WHIRLPOOL 2d629f581a257d51b814aa771173c952445f502e5bd6e21ae7e748e1683fc7820d13f9fd9bf6cacbffeed2097e74628107778f223d617bba71c33f4b124e44c4
+DIST icedtea6-1.13.9.tar.xz 4573884 SHA256 61e0fb2ed0fc2d793a42e24d2192423f8a7ccb04f130d82d5889a0ecf52bc965 SHA512 b1a6e7d36904e3a9cea620c86dc656324bc99622d470f021f86a66c77919d8faf774d199f42669f9813f1ca4c41f2a920a66f9927d33eeca5476edd26438822a WHIRLPOOL 32586b8563cb7c9246bfb1731d409a03d0367b653dff866f9a3e8b4deb1f09d6405e8e103a94681fe3e80ba4dd042782a2defec409f0b020c1d3c263bf3feec1
+DIST openjdk-6-src-b37-11_nov_2015.tar.xz 33790124 SHA256 462ac2c28f6dbfb4a18eb46efca232b907d6027f7618715cbc4de5dd73b89e8d SHA512 e7da587e5cb5a99d3a92bc64ae1bc668bd470cd5664f097197d87af07aa32414903c1b212693449e471b933ed6b1bc7e754fb56ccd7af23038d766dbfdf8eba8 WHIRLPOOL 685fd308007bc236b2c461c09186f910ef5c829a3f557fad5b37902d0550b66d7be82502a66209c99430639d875356f5249fa5047f46468983d164aa156aed17
diff --git a/dev-java/icedtea/files/6-cacao-pr-157.patch b/dev-java/icedtea/files/6-cacao-pr-157.patch
new file mode 100644
index 0000000..3419b8f
--- /dev/null
+++ b/dev-java/icedtea/files/6-cacao-pr-157.patch
@@ -0,0 +1,143 @@
+diff -Naur cacao/cacao/src/vm/options.c cacao/cacao/src/vm/options.c
+--- cacao/cacao/src/vm/options.c 2013-01-10 16:45:14.000000000 +0000
++++ cacao/cacao/src/vm/options.c 2016-01-03 11:48:06.439004345 +0000
+@@ -26,6 +26,7 @@
+ #include "config.h"
+
+ #include <limits.h>
++#include <stddef.h>
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -56,9 +57,9 @@
+
+ bool opt_run = true;
+
+-s4 opt_heapmaxsize = 0; /* maximum heap size */
+-s4 opt_heapstartsize = 0; /* initial heap size */
+-s4 opt_stacksize = 0; /* thread stack size */
++size_t opt_heapmaxsize = 0; /* maximum heap size */
++size_t opt_heapstartsize = 0; /* initial heap size */
++size_t opt_stacksize = 0; /* thread stack size */
+
+ bool opt_verbose = false;
+ bool opt_debugcolor = false; /* use ANSI terminal sequences */
+diff -Naur cacao/cacao/src/vm/options.h cacao/cacao/src/vm/options.h
+--- cacao/cacao/src/vm/options.h 2013-01-10 16:45:14.000000000 +0000
++++ cacao/cacao/src/vm/options.h 2016-01-03 11:48:55.397204706 +0000
+@@ -32,6 +32,7 @@
+ extern "C" {
+ #endif
+
++#include <stddef.h>
+ #include <stdint.h>
+
+ #include "vm/types.h"
+@@ -82,9 +83,9 @@
+ extern bool opt_jar;
+ extern bool opt_run;
+
+-extern s4 opt_heapmaxsize;
+-extern s4 opt_heapstartsize;
+-extern s4 opt_stacksize;
++extern size_t opt_heapmaxsize;
++extern size_t opt_heapstartsize;
++extern size_t opt_stacksize;
+
+ extern bool opt_verbose;
+ extern bool opt_debugcolor;
+diff -Naur cacao/cacao/src/vm/vm.cpp cacao/cacao/src/vm/vm.cpp
+--- cacao/cacao/src/vm/vm.cpp 2013-01-10 16:45:14.000000000 +0000
++++ cacao/cacao/src/vm/vm.cpp 2016-01-03 11:50:15.779891441 +0000
+@@ -25,6 +25,7 @@
+
+ #include "config.h"
+
++#include <stddef.h>
+ #include <stdint.h>
+
+ #include <exception>
+@@ -33,6 +34,10 @@
+ #include <errno.h>
+ #include <stdlib.h>
+
++#if defined(__LINUX__)
++#include <unistd.h>
++#endif
++
+ #include "vm/types.h"
+
+ #include "arch.h"
+@@ -699,6 +704,19 @@
+ opt_heapstartsize = HEAP_STARTSIZE;
+ opt_stacksize = STACK_SIZE;
+
++#if defined(__LINUX__)
++ // Calculate 1/4 of the physical memory.
++ size_t qmem = sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE) / 4;
++
++ if (qmem > INT32_MAX) {
++ // Allocate no more than 2GB.
++ opt_heapmaxsize = INT32_MAX;
++ } else if (qmem > HEAP_MAXSIZE) {
++ // Otherwise use this if greater than default (128MB).
++ opt_heapmaxsize = qmem;
++ }
++#endif
++
+ // First of all, parse the -XX options.
+
+ #if defined(ENABLE_VMLOG)
+@@ -914,18 +932,33 @@
+ case OPT_SS:
+ {
+ char c;
+- int j;
++ size_t j;
+
++ errno = 0;
+ c = opt_arg[strlen(opt_arg) - 1];
++ j = strtoul(opt_arg, NULL, 10);
++
++ if (errno)
++ break; // Invalid.
+
+ if ((c == 'k') || (c == 'K')) {
+- j = atoi(opt_arg) * 1024;
++ if (j > SIZE_MAX / 1024)
++ break; // Overflow.
++ else
++ j *= 1024;
+
+ } else if ((c == 'm') || (c == 'M')) {
+- j = atoi(opt_arg) * 1024 * 1024;
+-
+- } else
+- j = atoi(opt_arg);
++ if (j > SIZE_MAX / 1024 / 1024)
++ break; // Overflow.
++ else
++ j *= 1024 * 1024;
++
++ } else if ((c == 'g') || (c == 'G')) {
++ if (j > SIZE_MAX / 1024 / 1024 / 1024)
++ break; // Overflow.
++ else
++ j *= 1024 * 1024 * 1024;
++ }
+
+ if (opt == OPT_MX)
+ opt_heapmaxsize = j;
+@@ -1525,9 +1558,9 @@
+ void VM::print_run_time_config()
+ {
+ puts("Run-time variables:\n");
+- printf(" maximum heap size : %d\n", opt_heapmaxsize);
+- printf(" initial heap size : %d\n", opt_heapstartsize);
+- printf(" stack size : %d\n", opt_stacksize);
++ printf(" maximum heap size : %lu\n", opt_heapmaxsize);
++ printf(" initial heap size : %lu\n", opt_heapstartsize);
++ printf(" stack size : %lu\n", opt_stacksize);
+
+ #if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
+ printf(" gnu.classpath.boot.library.path: %s\n", _properties.get("gnu.classpath.boot.library.path"));
diff --git a/dev-java/icedtea/files/7-cacao-pr-157.patch b/dev-java/icedtea/files/7-cacao-pr-157.patch
new file mode 100644
index 0000000..0701363
--- /dev/null
+++ b/dev-java/icedtea/files/7-cacao-pr-157.patch
@@ -0,0 +1,139 @@
+diff -Naur cacao/cacao/src/vm/options.cpp cacao/cacao/src/vm/options.cpp
+--- cacao/cacao/src/vm/options.cpp 2014-12-12 21:14:45.000000000 +0000
++++ cacao/cacao/src/vm/options.cpp 2015-12-23 21:01:37.644275263 +0000
+@@ -26,6 +26,7 @@
+ #include "config.h"
+
+ #include <limits.h>
++#include <stddef.h>
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -60,9 +61,9 @@
+
+ bool opt_run = true;
+
+-s4 opt_heapmaxsize = 0; /* maximum heap size */
+-s4 opt_heapstartsize = 0; /* initial heap size */
+-s4 opt_stacksize = 0; /* thread stack size */
++size_t opt_heapmaxsize = 0; /* maximum heap size */
++size_t opt_heapstartsize = 0; /* initial heap size */
++size_t opt_stacksize = 0; /* thread stack size */
+
+ bool opt_verbose = false;
+ bool opt_debugcolor = false; /* use ANSI terminal sequences */
+diff -Naur cacao/cacao/src/vm/options.hpp cacao/cacao/src/vm/options.hpp
+--- cacao/cacao/src/vm/options.hpp 2014-12-12 21:14:45.000000000 +0000
++++ cacao/cacao/src/vm/options.hpp 2015-12-23 21:01:37.645275246 +0000
+@@ -26,6 +26,7 @@
+ #ifndef OPTIONS_HPP_
+ #define OPTIONS_HPP_ 1
+
++#include <stddef.h> // for size_t
+ #include <stdint.h> // for int64_t
+ #include <stdio.h> // for FILE
+ #include "config.h" // for ENABLE_DEBUG_FILTER, etc
+@@ -77,9 +78,9 @@
+ extern bool opt_jar;
+ extern bool opt_run;
+
+-extern s4 opt_heapmaxsize;
+-extern s4 opt_heapstartsize;
+-extern s4 opt_stacksize;
++extern size_t opt_heapmaxsize;
++extern size_t opt_heapstartsize;
++extern size_t opt_stacksize;
+
+ extern bool opt_verbose;
+ extern bool opt_debugcolor;
+diff -Naur cacao/cacao/src/vm/vm.cpp cacao/cacao/src/vm/vm.cpp
+--- cacao/cacao/src/vm/vm.cpp 2014-12-12 21:14:45.000000000 +0000
++++ cacao/cacao/src/vm/vm.cpp 2015-12-23 21:01:38.046268504 +0000
+@@ -29,9 +29,14 @@
+ #include <cerrno>
+ #include <cstdlib>
+ #include <exception>
++#include <stddef.h>
+ #include <stdint.h>
+ #include <inttypes.h>
+
++#if defined(__LINUX__)
++#include <unistd.h>
++#endif
++
+ #include "md-abi.hpp"
+
+ #include "mm/codememory.hpp"
+@@ -690,6 +695,19 @@
+ opt_heapstartsize = HEAP_STARTSIZE;
+ opt_stacksize = STACK_SIZE;
+
++#if defined(__LINUX__)
++ // Calculate 1/4 of the physical memory.
++ size_t qmem = sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGESIZE) / 4;
++
++ if (qmem > INT32_MAX) {
++ // Allocate no more than 2GB.
++ opt_heapmaxsize = INT32_MAX;
++ } else if (qmem > HEAP_MAXSIZE) {
++ // Otherwise use this if greater than default (128MB).
++ opt_heapmaxsize = qmem;
++ }
++#endif
++
+ // First of all, parse the -XX options.
+ options_xx(vm_args);
+
+@@ -896,18 +914,33 @@
+ case OPT_SS:
+ {
+ char c;
+- int j;
++ size_t j;
+
++ errno = 0;
+ c = opt_arg[strlen(opt_arg) - 1];
++ j = strtoul(opt_arg, NULL, 10);
++
++ if (errno)
++ break; // Invalid.
+
+ if ((c == 'k') || (c == 'K')) {
+- j = atoi(opt_arg) * 1024;
++ if (j > SIZE_MAX / 1024)
++ break; // Overflow.
++ else
++ j *= 1024;
+
+ } else if ((c == 'm') || (c == 'M')) {
+- j = atoi(opt_arg) * 1024 * 1024;
+-
+- } else
+- j = atoi(opt_arg);
++ if (j > SIZE_MAX / 1024 / 1024)
++ break; // Overflow.
++ else
++ j *= 1024 * 1024;
++
++ } else if ((c == 'g') || (c == 'G')) {
++ if (j > SIZE_MAX / 1024 / 1024 / 1024)
++ break; // Overflow.
++ else
++ j *= 1024 * 1024 * 1024;
++ }
+
+ if (opt == OPT_MX)
+ opt_heapmaxsize = j;
+@@ -1498,9 +1531,9 @@
+ void VM::print_run_time_config()
+ {
+ puts("Run-time variables:\n");
+- printf(" maximum heap size : %d\n", opt_heapmaxsize);
+- printf(" initial heap size : %d\n", opt_heapstartsize);
+- printf(" stack size : %d\n", opt_stacksize);
++ printf(" maximum heap size : %lu\n", opt_heapmaxsize);
++ printf(" initial heap size : %lu\n", opt_heapstartsize);
++ printf(" stack size : %lu\n", opt_stacksize);
+
+ #if defined(WITH_JAVA_RUNTIME_LIBRARY_GNU_CLASSPATH)
+ printf(" gnu.classpath.boot.library.path: %s\n", _properties.get("gnu.classpath.boot.library.path"));
diff --git a/dev-java/icedtea/files/fontconfig.Gentoo.properties.src b/dev-java/icedtea/files/fontconfig.Gentoo.properties.src
new file mode 100644
index 0000000..519cccd
--- /dev/null
+++ b/dev-java/icedtea/files/fontconfig.Gentoo.properties.src
@@ -0,0 +1,385 @@
+#
+#
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code 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
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# Version
+
+version=1
+
+# Component Font Mappings
+
+dialog.plain.latin-1=DejaVu Sans
+dialog.plain.japanese-x0208=Sazanami Gothic
+dialog.plain.korean=Baekmuk Gulim
+dialog.plain.chinese-big5=AR PL ShanHeiSun Uni
+dialog.plain.chinese-gb18030=AR PL ShanHeiSun Uni
+dialog.plain.bengali=Lohit Bengali
+dialog.plain.gujarati=Lohit Gujarati
+dialog.plain.hindi=Lohit Hindi
+dialog.plain.malayalam=Lohit Malayalam
+dialog.plain.oriya=Lohit Oriya
+dialog.plain.punjabi=Lohit Punjabi
+dialog.plain.tamil=Lohit Tamil
+dialog.plain.telugu=Lohit Telugu
+dialog.plain.sinhala=LKLUG
+
+dialog.bold.latin-1=DejaVu Sans Bold
+dialog.bold.japanese-x0208=Sazanami Gothic
+dialog.bold.korean=Baekmuk Gulim
+dialog.bold.chinese-big5=AR PL ShanHeiSun Uni
+dialog.bold.chinese-gb18030=AR PL ShanHeiSun Uni
+dialog.bold.bengali=Lohit Bengali
+dialog.bold.gujarati=Lohit Gujarati
+dialog.bold.hindi=Lohit Hindi
+dialog.bold.malayalam=Lohit Malayalam
+dialog.bold.oriya=Lohit Oriya
+dialog.bold.punjabi=Lohit Punjabi
+dialog.bold.tamil=Lohit Tamil
+dialog.bold.telugu=Lohit Telugu
+dialog.bold.sinhala=LKLUG
+
+dialog.italic.latin-1=DejaVu Sans Oblique
+dialog.italic.japanese-x0208=Sazanami Gothic
+dialog.italic.korean=Baekmuk Gulim
+dialog.italic.chinese-big5=AR PL ShanHeiSun Uni
+dialog.italic.chinese-gb18030=AR PL ShanHeiSun Uni
+dialog.italic.bengali=Lohit Bengali
+dialog.italic.gujarati=Lohit Gujarati
+dialog.italic.hindi=Lohit Hindi
+dialog.italic.malayalam=Lohit Malayalam
+dialog.italic.oriya=Lohit Oriya
+dialog.italic.punjabi=Lohit Punjabi
+dialog.italic.tamil=Lohit Tamil
+dialog.italic.telugu=Lohit Telugu
+dialog.italic.sinhala=LKLUG
+
+dialog.bolditalic.latin-1=DejaVu Sans Bold Oblique
+dialog.bolditalic.japanese-x0208=Sazanami Gothic
+dialog.bolditalic.korean=Baekmuk Gulim
+dialog.bolditalic.chinese-big5=AR PL ShanHeiSun Uni
+dialog.bolditalic.chinese-gb18030=AR PL ShanHeiSun Uni
+dialog.bolditalic.bengali=Lohit Bengali
+dialog.bolditalic.gujarati=Lohit Gujarati
+dialog.bolditalic.hindi=Lohit Hindi
+dialog.bolditalic.malayalam=Lohit Malayalam
+dialog.bolditalic.oriya=Lohit Oriya
+dialog.bolditalic.punjabi=Lohit Punjabi
+dialog.bolditalic.tamil=Lohit Tamil
+dialog.bolditalic.telugu=Lohit Telugu
+dialog.bolditalic.sinhala=LKLUG
+
+sansserif.plain.latin-1=DejaVu Sans
+sansserif.plain.japanese-x0208=Sazanami Gothic
+sansserif.plain.korean=Baekmuk Gulim
+sansserif.plain.chinese-big5=AR PL ShanHeiSun Uni
+sansserif.plain.chinese-gb18030=AR PL ShanHeiSun Uni
+sansserif.plain.bengali=Lohit Bengali
+sansserif.plain.gujarati=Lohit Gujarati
+sansserif.plain.hindi=Lohit Hindi
+sansserif.plain.malayalam=Lohit Malayalam
+sansserif.plain.oriya=Lohit Oriya
+sansserif.plain.punjabi=Lohit Punjabi
+sansserif.plain.tamil=Lohit Tamil
+sansserif.plain.telugu=Lohit Telugu
+sansserif.plain.sinhala=LKLUG
+
+sansserif.bold.latin-1=DejaVu Sans Bold
+sansserif.bold.japanese-x0208=Sazanami Gothic
+sansserif.bold.korean=Baekmuk Gulim
+sansserif.bold.chinese-big5=AR PL ShanHeiSun Uni
+sansserif.bold.chinese-gb18030=AR PL ShanHeiSun Uni
+sansserif.bold.bengali=Lohit Bengali
+sansserif.bold.gujarati=Lohit Gujarati
+sansserif.bold.hindi=Lohit Hindi
+sansserif.bold.malayalam=Lohit Malayalam
+sansserif.bold.oriya=Lohit Oriya
+sansserif.bold.punjabi=Lohit Punjabi
+sansserif.bold.tamil=Lohit Tamil
+sansserif.bold.telugu=Lohit Telugu
+sansserif.bold.sinhala=LKLUG
+
+sansserif.italic.latin-1=DejaVu Sans Oblique
+sansserif.italic.japanese-x0208=Sazanami Gothic
+sansserif.italic.korean=Baekmuk Gulim
+sansserif.italic.chinese-big5=AR PL ShanHeiSun Uni
+sansserif.italic.chinese-gb18030=AR PL ShanHeiSun Uni
+sansserif.italic.bengali=Lohit Bengali
+sansserif.italic.gujarati=Lohit Gujarati
+sansserif.italic.hindi=Lohit Hindi
+sansserif.italic.malayalam=Lohit Malayalam
+sansserif.italic.oriya=Lohit Oriya
+sansserif.italic.punjabi=Lohit Punjabi
+sansserif.italic.tamil=Lohit Tamil
+sansserif.italic.telugu=Lohit Telugu
+sansserif.italic.sinhala=LKLUG
+
+sansserif.bolditalic.latin-1=DejaVu Sans Bold Oblique
+sansserif.bolditalic.japanese-x0208=Sazanami Gothic
+sansserif.bolditalic.korean=Baekmuk Gulim
+sansserif.bolditalic.chinese-big5=AR PL ShanHeiSun Uni
+sansserif.bolditalic.chinese-gb18030=AR PL ShanHeiSun Uni
+sansserif.bolditalic.bengali=Lohit Bengali
+sansserif.bolditalic.gujarati=Lohit Gujarati
+sansserif.bolditalic.hindi=Lohit Hindi
+sansserif.bolditalic.malayalam=Lohit Malayalam
+sansserif.bolditalic.oriya=Lohit Oriya
+sansserif.bolditalic.punjabi=Lohit Punjabi
+sansserif.bolditalic.tamil=Lohit Tamil
+sansserif.bolditalic.telugu=Lohit Telugu
+sansserif.bolditalic.sinhala=LKLUG
+
+serif.plain.latin-1=DejaVu Serif
+serif.plain.japanese-x0208=Sazanami Mincho
+serif.plain.korean=Baekmuk Batang
+serif.plain.chinese-big5=AR PL ZenKai Uni
+serif.plain.chinese-gb18030=AR PL ZenKai Uni
+serif.plain.bengali=Lohit Bengali
+serif.plain.gujarati=Lohit Gujarati
+serif.plain.hindi=Lohit Hindi
+serif.plain.malayalam=Lohit Malayalam
+serif.plain.oriya=Lohit Oriya
+serif.plain.punjabi=Lohit Punjabi
+serif.plain.tamil=Lohit Tamil
+serif.plain.telugu=Lohit Telugu
+serif.plain.sinhala=LKLUG
+
+serif.bold.latin-1=DejaVu Serif Bold
+serif.bold.japanese-x0208=Sazanami Mincho
+serif.bold.korean=Baekmuk Batang
+serif.bold.chinese-big5=AR PL ZenKai Uni
+serif.bold.chinese-gb18030=AR PL ZenKai Uni
+serif.bold.bengali=Lohit Bengali
+serif.bold.gujarati=Lohit Gujarati
+serif.bold.hindi=Lohit Hindi
+serif.bold.malayalam=Lohit Malayalam
+serif.bold.oriya=Lohit Oriya
+serif.bold.punjabi=Lohit Punjabi
+serif.bold.tamil=Lohit Tamil
+serif.bold.telugu=Lohit Telugu
+serif.bold.sinhala=LKLUG
+
+serif.italic.latin-1=DejaVu Serif Oblique
+serif.italic.japanese-x0208=Sazanami Mincho
+serif.italic.korean=Baekmuk Batang
+serif.italic.chinese-big5=AR PL ZenKai Uni
+serif.italic.chinese-gb18030=AR PL ZenKai Uni
+serif.italic.bengali=Lohit Bengali
+serif.italic.gujarati=Lohit Gujarati
+serif.italic.hindi=Lohit Hindi
+serif.italic.malayalam=Lohit Malayalam
+serif.italic.oriya=Lohit Oriya
+serif.italic.punjabi=Lohit Punjabi
+serif.italic.tamil=Lohit Tamil
+serif.italic.telugu=Lohit Telugu
+serif.italic.sinhala=LKLUG
+
+serif.bolditalic.latin-1=DejaVu Serif Bold Oblique
+serif.bolditalic.japanese-x0208=Sazanami Mincho
+serif.bolditalic.korean=Baekmuk Batang
+serif.bolditalic.chinese-big5=AR PL ZenKai Uni
+serif.bolditalic.chinese-gb18030=AR PL ZenKai Uni
+serif.bolditalic.bengali=Lohit Bengali
+serif.bolditalic.gujarati=Lohit Gujarati
+serif.bolditalic.hindi=Lohit Hindi
+serif.bolditalic.malayalam=Lohit Malayalam
+serif.bolditalic.oriya=Lohit Oriya
+serif.bolditalic.punjabi=Lohit Punjabi
+serif.bolditalic.tamil=Lohit Tamil
+serif.bolditalic.telugu=Lohit Telugu
+serif.bolditalic.sinhala=LKLUG
+
+monospaced.plain.latin-1=DejaVu Sans Mono
+monospaced.plain.japanese-x0208=Sazanami Gothic
+monospaced.plain.korean=Baekmuk Gulim
+monospaced.plain.chinese-big5=AR PL ShanHeiSun Uni
+monospaced.plain.chinese-gb18030=AR PL ShanHeiSun Uni
+monospaced.plain.bengali=Lohit Bengali
+monospaced.plain.gujarati=Lohit Gujarati
+monospaced.plain.hindi=Lohit Hindi
+monospaced.plain.malayalam=Lohit Malayalam
+monospaced.plain.oriya=Lohit Oriya
+monospaced.plain.punjabi=Lohit Punjabi
+monospaced.plain.tamil=Lohit Tamil
+monospaced.plain.telugu=Lohit Telugu
+monospaced.plain.sinhala=LKLUG
+
+monospaced.bold.latin-1=DejaVu Sans Mono Bold
+monospaced.bold.japanese-x0208=Sazanami Gothic
+monospaced.bold.korean=Baekmuk Gulim
+monospaced.bold.chinese-big5=AR PL ShanHeiSun Uni
+monospaced.bold.chinese-gb18030=AR PL ShanHeiSun Uni
+monospaced.bold.bengali=Lohit Bengali
+monospaced.bold.gujarati=Lohit Gujarati
+monospaced.bold.hindi=Lohit Hindi
+monospaced.bold.malayalam=Lohit Malayalam
+monospaced.bold.oriya=Lohit Oriya
+monospaced.bold.punjabi=Lohit Punjabi
+monospaced.bold.tamil=Lohit Tamil
+monospaced.bold.telugu=Lohit Telugu
+monospaced.bold.sinhala=LKLUG
+
+monospaced.italic.latin-1=DejaVu Sans Mono Oblique
+monospaced.italic.japanese-x0208=Sazanami Gothic
+monospaced.italic.korean=Baekmuk Gulim
+monospaced.italic.chinese-big5=AR PL ShanHeiSun Uni
+monospaced.italic.chinese-gb18030=AR PL ShanHeiSun Uni
+monospaced.italic.bengali=Lohit Bengali
+monospaced.italic.gujarati=Lohit Gujarati
+monospaced.italic.hindi=Lohit Hindi
+monospaced.italic.malayalam=Lohit Malayalam
+monospaced.italic.oriya=Lohit Oriya
+monospaced.italic.punjabi=Lohit Punjabi
+monospaced.italic.tamil=Lohit Tamil
+monospaced.italic.telugu=Lohit Telugu
+monospaced.italic.sinhala=LKLUG
+
+monospaced.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
+monospaced.bolditalic.japanese-x0208=Sazanami Gothic
+monospaced.bolditalic.korean=Baekmuk Gulim
+monospaced.bolditalic.chinese-big5=AR PL ShanHeiSun Uni
+monospaced.bolditalic.chinese-gb18030=AR PL ShanHeiSun Uni
+monospaced.bolditalic.bengali=Lohit Bengali
+monospaced.bolditalic.gujarati=Lohit Gujarati
+monospaced.bolditalic.hindi=Lohit Hindi
+monospaced.bolditalic.malayalam=Lohit Malayalam
+monospaced.bolditalic.oriya=Lohit Oriya
+monospaced.bolditalic.punjabi=Lohit Punjabi
+monospaced.bolditalic.tamil=Lohit Tamil
+monospaced.bolditalic.telugu=Lohit Telugu
+monospaced.bolditalic.sinhala=LKLUG
+
+dialoginput.plain.latin-1=DejaVu Sans Mono
+dialoginput.plain.japanese-x0208=Sazanami Gothic
+dialoginput.plain.korean=Baekmuk Gulim
+dialoginput.plain.chinese-big5=AR PL ShanHeiSun Uni
+dialoginput.plain.chinese-gb18030=AR PL ShanHeiSun Uni
+dialoginput.plain.bengali=Lohit Bengali
+dialoginput.plain.gujarati=Lohit Gujarati
+dialoginput.plain.hindi=Lohit Hindi
+dialoginput.plain.malayalam=Lohit Malayalam
+dialoginput.plain.oriya=Lohit Oriya
+dialoginput.plain.punjabi=Lohit Punjabi
+dialoginput.plain.tamil=Lohit Tamil
+dialoginput.plain.telugu=Lohit Telugu
+dialoginput.plain.sinhala=LKLUG
+
+dialoginput.bold.latin-1=DejaVu Sans Mono Bold
+dialoginput.bold.japanese-x0208=Sazanami Gothic
+dialoginput.bold.korean=Baekmuk Gulim
+dialoginput.bold.chinese-big5=AR PL ShanHeiSun Uni
+dialoginput.bold.chinese-gb18030=AR PL ShanHeiSun Uni
+dialoginput.bold.bengali=Lohit Bengali
+dialoginput.bold.gujarati=Lohit Gujarati
+dialoginput.bold.hindi=Lohit Hindi
+dialoginput.bold.malayalam=Lohit Malayalam
+dialoginput.bold.oriya=Lohit Oriya
+dialoginput.bold.punjabi=Lohit Punjabi
+dialoginput.bold.tamil=Lohit Tamil
+dialoginput.bold.telugu=Lohit Telugu
+dialoginput.bold.sinhala=LKLUG
+
+dialoginput.italic.latin-1=DejaVu Sans Mono Oblique
+dialoginput.italic.japanese-x0208=Sazanami Gothic
+dialoginput.italic.korean=Baekmuk Gulim
+dialoginput.italic.chinese-big5=AR PL ShanHeiSun Uni
+dialoginput.italic.chinese-gb18030=AR PL ShanHeiSun Uni
+dialoginput.italic.bengali=Lohit Bengali
+dialoginput.italic.gujarati=Lohit Gujarati
+dialoginput.italic.hindi=Lohit Hindi
+dialoginput.italic.malayalam=Lohit Malayalam
+dialoginput.italic.oriya=Lohit Oriya
+dialoginput.italic.punjabi=Lohit Punjabi
+dialoginput.italic.tamil=Lohit Tamil
+dialoginput.italic.telugu=Lohit Telugu
+dialoginput.italic.sinhala=LKLUG
+
+dialoginput.bolditalic.latin-1=DejaVu Sans Mono Bold Oblique
+dialoginput.bolditalic.japanese-x0208=Sazanami Gothic
+dialoginput.bolditalic.korean=Baekmuk Gulim
+dialoginput.bolditalic.chinese-big5=AR PL ShanHeiSun Uni
+dialoginput.bolditalic.chinese-gb18030=AR PL ShanHeiSun Uni
+dialoginput.bolditalic.bengali=Lohit Bengali
+dialoginput.bolditalic.gujarati=Lohit Gujarati
+dialoginput.bolditalic.hindi=Lohit Hindi
+dialoginput.bolditalic.malayalam=Lohit Malayalam
+dialoginput.bolditalic.oriya=Lohit Oriya
+dialoginput.bolditalic.punjabi=Lohit Punjabi
+dialoginput.bolditalic.tamil=Lohit Tamil
+dialoginput.bolditalic.telugu=Lohit Telugu
+dialoginput.bolditalic.sinhala=LKLUG
+
+# Search Sequences
+
+sequence.allfonts=latin-1
+sequence.allfonts.Big5=chinese-big5,latin-1
+sequence.allfonts.x-euc-jp-linux=japanese-x0208,latin-1
+sequence.allfonts.EUC-KR=korean,latin-1
+sequence.allfonts.GB18030=chinese-gb18030,latin-1
+sequence.fallback=chinese-big5,chinese-gb18030,japanese-x0208,korean,bengali,gujarati,hindi,oriya,punjabi,malayalam,tamil,telugu,sinhala
+
+# Font File Names
+
+# media-fonts/dejavu
+filename.DejaVu_Sans=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSans.ttf
+filename.DejaVu_Sans_Bold=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf
+filename.DejaVu_Sans_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSans-Oblique.ttf
+filename.DejaVu_Sans_Bold_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf
+
+filename.DejaVu_Sans_Mono=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSansMono.ttf
+filename.DejaVu_Sans_Mono_Bold=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf
+filename.DejaVu_Sans_Mono_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf
+filename.DejaVu_Sans_Mono_Bold_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSansMono-BoldOblique.ttf
+
+filename.DejaVu_Serif=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSerif.ttf
+filename.DejaVu_Serif_Bold=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSerif-Bold.ttf
+filename.DejaVu_Serif_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSerif-Oblique.ttf
+filename.DejaVu_Serif_Bold_Oblique=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/dejavu/DejaVuSerif-BoldOblique.ttf
+
+# media-fonts/sazanami
+filename.Sazanami_Gothic=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/sazanami/sazanami-gothic.ttf
+filename.Sazanami_Mincho=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/sazanami/sazanami-mincho.ttf
+
+# media-fonts/arphicfonts
+filename.AR_PL_ShanHeiSun_Uni=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/arphicfonts/uming.ttc
+filename.AR_PL_ZenKai_Uni=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/arphicfonts/ukai.ttc
+
+# media-fonts/baekmuk-fonts
+filename.Baekmuk_Gulim=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/baekmuk-fonts/gulim.ttf
+filename.Baekmuk_Batang=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/baekmuk-fonts/batang.ttf
+
+# media-fonts/lohit-fonts
+filename.Lohit_Bengali=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_bn.ttf
+filename.Lohit_Gujarati=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_gu.ttf
+filename.Lohit_Hindi=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_hi.ttf
+filename.Lohit_Kannda=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_kn.ttf
+filename.Lohit_Malayalam=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_ml.ttf
+filename.Lohit_Oriya=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_or.ttf
+filename.Lohit_Punjabi=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_pa.ttf
+filename.Lohit_Tamil=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_ta.ttf
+filename.Lohit_Telugu=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/indic/lohit_te.ttf
+
+# media-fonts/lklug
+filename.LKLUG=@GENTOO_PORTAGE_EPREFIX@/usr/share/fonts/lklug/lklug.ttf
+
diff --git a/dev-java/icedtea/files/generate-cacerts.pl b/dev-java/icedtea/files/generate-cacerts.pl
new file mode 100644
index 0000000..17d29b3
--- /dev/null
+++ b/dev-java/icedtea/files/generate-cacerts.pl
@@ -0,0 +1,358 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2007, 2008 Red Hat, 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 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.
+
+# generate-cacerts.pl generates a JKS keystore named 'cacerts' from
+# OpenSSL's certificate bundle using OpenJDK's keytool.
+
+# First extract each of OpenSSL's bundled certificates into its own
+# aliased filename.
+
+# Downloaded from http://cvs.fedoraproject.org/viewvc/rpms/ca-certificates/F-12/generate-cacerts.pl?revision=1.2
+# Check and prevention of duplicate aliases added by Vlastimil Babka <caster@gentoo.org>
+
+$file = $ARGV[1];
+open(CERTS, $file);
+@certs = <CERTS>;
+close(CERTS);
+
+$pem_file_count = 0;
+$in_cert_block = 0;
+$write_current_cert = 1;
+foreach $cert (@certs)
+{
+ if ($cert =~ /Issuer: /)
+ {
+ $_ = $cert;
+ if ($cert =~ /personal-freemail/)
+ {
+ $cert_alias = "thawtepersonalfreemailca";
+ }
+ elsif ($cert =~ /personal-basic/)
+ {
+ $cert_alias = "thawtepersonalbasicca";
+ }
+ elsif ($cert =~ /personal-premium/)
+ {
+ $cert_alias = "thawtepersonalpremiumca";
+ }
+ elsif ($cert =~ /server-certs/)
+ {
+ $cert_alias = "thawteserverca";
+ }
+ elsif ($cert =~ /premium-server/)
+ {
+ $cert_alias = "thawtepremiumserverca";
+ }
+ elsif ($cert =~ /Class 1 Public Primary Certification Authority$/)
+ {
+ $cert_alias = "verisignclass1ca";
+ }
+ elsif ($cert =~ /Class 1 Public Primary Certification Authority - G2/)
+ {
+ $cert_alias = "verisignclass1g2ca";
+ }
+ elsif ($cert =~
+ /VeriSign Class 1 Public Primary Certification Authority - G3/)
+ {
+ $cert_alias = "verisignclass1g3ca";
+ }
+ elsif ($cert =~ /Class 2 Public Primary Certification Authority$/)
+ {
+ $cert_alias = "verisignclass2ca";
+ }
+ elsif ($cert =~ /Class 2 Public Primary Certification Authority - G2/)
+ {
+ $cert_alias = "verisignclass2g2ca";
+ }
+ elsif ($cert =~
+ /VeriSign Class 2 Public Primary Certification Authority - G3/)
+ {
+ $cert_alias = "verisignclass2g3ca";
+ }
+ elsif ($cert =~ /Class 3 Public Primary Certification Authority$/)
+ {
+ $cert_alias = "verisignclass3ca";
+ }
+ # Version 1 of Class 3 Public Primary Certification Authority
+ # - G2 is added. Version 3 is excluded. See below.
+ elsif ($cert =~
+ /VeriSign Class 3 Public Primary Certification Authority - G3/)
+ {
+ $cert_alias = "verisignclass3g3ca";
+ }
+ elsif ($cert =~
+ /RSA Data Security.*Secure Server Certification Authority/)
+ {
+ $cert_alias = "verisignserverca";
+ }
+ elsif ($cert =~ /GTE CyberTrust Global Root/)
+ {
+ $cert_alias = "gtecybertrustglobalca";
+ }
+ elsif ($cert =~ /Baltimore CyberTrust Root/)
+ {
+ $cert_alias = "baltimorecybertrustca";
+ }
+ elsif ($cert =~ /www.entrust.net\/Client_CA_Info\/CPS/)
+ {
+ $cert_alias = "entrustclientca";
+ }
+ elsif ($cert =~ /www.entrust.net\/GCCA_CPS/)
+ {
+ $cert_alias = "entrustglobalclientca";
+ }
+ elsif ($cert =~ /www.entrust.net\/CPS_2048/)
+ {
+ $cert_alias = "entrust2048ca";
+ }
+ elsif ($cert =~ /www.entrust.net\/CPS /)
+ {
+ $cert_alias = "entrustsslca";
+ }
+ elsif ($cert =~ /www.entrust.net\/SSL_CPS/)
+ {
+ $cert_alias = "entrustgsslca";
+ }
+ elsif ($cert =~ /The Go Daddy Group/)
+ {
+ $cert_alias = "godaddyclass2ca";
+ }
+ elsif ($cert =~ /Starfield Class 2 Certification Authority/)
+ {
+ $cert_alias = "starfieldclass2ca";
+ }
+ elsif ($cert =~ /ValiCert Class 2 Policy Validation Authority/)
+ {
+ $cert_alias = "valicertclass2ca";
+ }
+ elsif ($cert =~ /GeoTrust Global CA$/)
+ {
+ $cert_alias = "geotrustglobalca";
+ }
+ elsif ($cert =~ /Equifax Secure Certificate Authority/)
+ {
+ $cert_alias = "equifaxsecureca";
+ }
+ elsif ($cert =~ /Equifax Secure eBusiness CA-1/)
+ {
+ $cert_alias = "equifaxsecureebusinessca1";
+ }
+ elsif ($cert =~ /Equifax Secure eBusiness CA-2/)
+ {
+ $cert_alias = "equifaxsecureebusinessca2";
+ }
+ elsif ($cert =~ /Equifax Secure Global eBusiness CA-1/)
+ {
+ $cert_alias = "equifaxsecureglobalebusinessca1";
+ }
+ elsif ($cert =~ /Sonera Class1 CA/)
+ {
+ $cert_alias = "soneraclass1ca";
+ }
+ elsif ($cert =~ /Sonera Class2 CA/)
+ {
+ $cert_alias = "soneraclass2ca";
+ }
+ elsif ($cert =~ /AAA Certificate Services/)
+ {
+ $cert_alias = "comodoaaaca";
+ }
+ elsif ($cert =~ /AddTrust Class 1 CA Root/)
+ {
+ $cert_alias = "addtrustclass1ca";
+ }
+ elsif ($cert =~ /AddTrust External CA Root/)
+ {
+ $cert_alias = "addtrustexternalca";
+ }
+ elsif ($cert =~ /AddTrust Qualified CA Root/)
+ {
+ $cert_alias = "addtrustqualifiedca";
+ }
+ elsif ($cert =~ /UTN-USERFirst-Hardware/)
+ {
+ $cert_alias = "utnuserfirsthardwareca";
+ }
+ elsif ($cert =~ /UTN-USERFirst-Client Authentication and Email/)
+ {
+ $cert_alias = "utnuserfirstclientauthemailca";
+ }
+ elsif ($cert =~ /UTN - DATACorp SGC/)
+ {
+ $cert_alias = "utndatacorpsgcca";
+ }
+ elsif ($cert =~ /UTN-USERFirst-Object/)
+ {
+ $cert_alias = "utnuserfirstobjectca";
+ }
+ elsif ($cert =~ /America Online Root Certification Authority 1/)
+ {
+ $cert_alias = "aolrootca1";
+ }
+ elsif ($cert =~ /DigiCert Assured ID Root CA/)
+ {
+ $cert_alias = "digicertassuredidrootca";
+ }
+ elsif ($cert =~ /DigiCert Global Root CA/)
+ {
+ $cert_alias = "digicertglobalrootca";
+ }
+ elsif ($cert =~ /DigiCert High Assurance EV Root CA/)
+ {
+ $cert_alias = "digicerthighassuranceevrootca";
+ }
+ elsif ($cert =~ /GlobalSign Root CA$/)
+ {
+ $cert_alias = "globalsignca";
+ }
+ elsif ($cert =~ /GlobalSign Root CA - R2/)
+ {
+ $cert_alias = "globalsignr2ca";
+ }
+ elsif ($cert =~ /Elektronik.*Kas.*2005/)
+ {
+ $cert_alias = "extra-elektronikkas2005";
+ }
+ elsif ($cert =~ /Elektronik/)
+ {
+ $cert_alias = "extra-elektronik2005";
+ }
+ # Mozilla does not provide these certificates:
+ # baltimorecodesigningca
+ # gtecybertrust5ca
+ # trustcenterclass2caii
+ # trustcenterclass4caii
+ # trustcenteruniversalcai
+ else
+ {
+ # Generate an alias using the OU and CN attributes of the
+ # Issuer field if both are present, otherwise use only the
+ # CN attribute. The Issuer field must have either the OU
+ # or the CN attribute.
+ $_ = $cert;
+ if ($cert =~ /OU=/)
+ {
+ s/Issuer:.*?OU=//;
+ # Remove other occurrences of OU=.
+ s/OU=.*CN=//;
+ # Remove CN= if there were not other occurrences of OU=.
+ s/CN=//;
+ s/\/emailAddress.*//;
+ s/Certificate Authority/ca/g;
+ s/Certification Authority/ca/g;
+ }
+ elsif ($cert =~ /CN=/)
+ {
+ s/Issuer:.*CN=//;
+ s/\/emailAddress.*//;
+ s/Certificate Authority/ca/g;
+ s/Certification Authority/ca/g;
+ }
+ s/\W//g;
+ tr/A-Z/a-z/;
+ $cert_alias = "extra-$_";
+
+ }
+ while (-e "$cert_alias.pem")
+ {
+ $cert_alias = "$cert_alias" . "_";
+ }
+ }
+ # When it attempts to parse:
+ #
+ # Class 3 Public Primary Certification Authority - G2, Version 3
+ #
+ # keytool says:
+ #
+ # #2: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
+ # Unparseable AuthorityInfoAccess extension due to
+ # java.io.IOException: Invalid encoding of URI
+ #
+ # If we do not exclude this file
+ # openjdk/jdk/test/lib/security/cacerts/VerifyCACerts.java fails
+ # on this cert, printing:
+ #
+ # Couldn't verify: java.security.SignatureException: Signature
+ # does not match.
+ #
+ elsif ($cert =~
+ /A6:0F:34:C8:62:6C:81:F6:8B:F7:7D:A9:F6:67:58:8A:90:3F:7D:36/)
+ {
+ $write_current_cert = 0;
+ $pem_file_count--;
+ }
+ elsif ($cert eq "-----BEGIN CERTIFICATE-----\n")
+ {
+ if ($in_cert_block != 0)
+ {
+ die "$file is malformed.";
+ }
+ $in_cert_block = 1;
+ if ($write_current_cert == 1)
+ {
+ $pem_file_count++;
+ if (-e "$cert_alias.pem")
+ {
+ print "$cert_alias";
+ die "already exists"
+ }
+ open(PEM, ">$cert_alias.pem");
+ print PEM $cert;
+ }
+ }
+ elsif ($cert eq "-----END CERTIFICATE-----\n")
+ {
+ $in_cert_block = 0;
+ if ($write_current_cert == 1)
+ {
+ print PEM $cert;
+ close(PEM);
+ }
+ $write_current_cert = 1
+ }
+ else
+ {
+ if ($in_cert_block == 1 && $write_current_cert == 1)
+ {
+ print PEM $cert;
+ }
+ }
+}
+
+# Check that the correct number of .pem files were produced.
+@pem_files = <*.pem>;
+if (@pem_files != $pem_file_count)
+{
+ print "$pem_file_count";
+ die "Number of .pem files produced does not match".
+ " number of certs read from $file.";
+}
+
+# Now store each cert in the 'cacerts' file using keytool.
+$certs_written_count = 0;
+foreach $pem_file (@pem_files)
+{
+ system "$ARGV[0] -noprompt -import".
+ " -alias `basename $pem_file .pem`".
+ " -keystore cacerts -storepass 'changeit' -file $pem_file";
+ unlink($pem_file);
+ $certs_written_count++;
+}
+
+# Check that the correct number of certs were added to the keystore.
+if ($certs_written_count != $pem_file_count)
+{
+ die "Number of certs added to keystore does not match".
+ " number of certs read from $file.";
+}
diff --git a/dev-java/icedtea/files/icedtea-bug-2781.patch b/dev-java/icedtea/files/icedtea-bug-2781.patch
new file mode 100644
index 0000000..5cc32c3
--- /dev/null
+++ b/dev-java/icedtea/files/icedtea-bug-2781.patch
@@ -0,0 +1,42 @@
+# HG changeset patch
+# User Stefan Ring <stefan@complang.tuwien.ac.at>
+# Date 1452083014 -3600
+# Node ID 9295d3c06eb706407b5af1412674c8f0a0ce9fdf
+# Parent 468081e3e037df27b6427aa298dfaaa20f4ba4bf
+Fix some oversights during a large macro cleanup in 1e9787c3484e
+
+diff --git cacao/cacao/src/vm/jit/verify/typecheck-common.cpp cacao/cacao/src/vm/jit/verify/typecheck-common.cpp
+--- cacao/cacao/src/vm/jit/verify/typecheck-common.cpp
++++ cacao/cacao/src/vm/jit/verify/typecheck-common.cpp
+@@ -281,7 +281,7 @@
+
+ dv->type = sv->type;
+ if (dv->type == TYPE_ADR) {
+- dv->typeinfo = sv->typeinfo;
++ typeinfo_t::clone(sv->typeinfo, dv->typeinfo);
+ }
+ }
+ return true;
+diff --git cacao/cacao/src/vm/jit/verify/typeinfo.cpp cacao/cacao/src/vm/jit/verify/typeinfo.cpp
+--- cacao/cacao/src/vm/jit/verify/typeinfo.cpp
++++ cacao/cacao/src/vm/jit/verify/typeinfo.cpp
+@@ -1674,6 +1674,7 @@
+ classref_or_classinfo common;
+ classref_or_classinfo elementclass;
+ int dimension;
++ ArrayType elementtype;
+ bool changed;
+ typecheck_result r;
+
+diff --git cacao/cacao/src/vm/resolve.cpp cacao/cacao/src/vm/resolve.cpp
+--- cacao/cacao/src/vm/resolve.cpp
++++ cacao/cacao/src/vm/resolve.cpp
+@@ -703,7 +703,7 @@
+
+ /* uninitialized objects are illegal here */
+
+- if (subtinfo->is_primitive()) {
++ if (subtinfo->is_newobject()) {
+ exceptions_throw_verifyerror(refmethod,
+ "Invalid use of uninitialized object");
+ return resolveFailed;
diff --git a/dev-java/icedtea/files/icedtea.env b/dev-java/icedtea/files/icedtea.env
new file mode 100644
index 0000000..463add6
--- /dev/null
+++ b/dev-java/icedtea/files/icedtea.env
@@ -0,0 +1,18 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+VERSION="IcedTea JDK @PV@"
+JAVA_HOME="@GENTOO_PORTAGE_EPREFIX@/usr/@LIBDIR@/icedtea@SLOT@"
+JDK_HOME="@GENTOO_PORTAGE_EPREFIX@/usr/@LIBDIR@/icedtea@SLOT@"
+JAVAC="${JAVA_HOME}/bin/javac"
+PATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
+ROOTPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
+LDPATH="${JAVA_HOME}/jre/lib/@PLATFORM@/:${JAVA_HOME}/jre/lib/@PLATFORM@/native_threads/:${JAVA_HOME}/jre/lib/@PLATFORM@/xawt/:${JAVA_HOME}/jre/lib/@PLATFORM@/server/"
+MANPATH="@GENTOO_PORTAGE_EPREFIX@/usr/@LIBDIR@/icedtea@SLOT@/man"
+PROVIDES_TYPE="JDK JRE"
+PROVIDES_VERSION="1.@SLOT@"
+# Taken from sun.boot.class.path property
+BOOTCLASSPATH="${JAVA_HOME}/jre/lib/resources.jar:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/jre/lib/jsse.jar:${JAVA_HOME}/jre/lib/jce.jar:${JAVA_HOME}/jre/lib/charsets.jar"
+GENERATION="2"
+ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH ROOTPATH LDPATH MANPATH"
diff --git a/dev-java/icedtea/icedtea-6.1.13.9.ebuild b/dev-java/icedtea/icedtea-6.1.13.9.ebuild
new file mode 100644
index 0000000..a42a355
--- /dev/null
+++ b/dev-java/icedtea/icedtea-6.1.13.9.ebuild
@@ -0,0 +1,352 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+# Build written by Andrew John Hughes (gnu_andrew@member.fsf.org)
+
+# *********************************************************
+# * IF YOU CHANGE THIS EBUILD, CHANGE ICEDTEA-7.* AS WELL *
+# *********************************************************
+
+EAPI="5"
+
+inherit check-reqs java-pkg-2 java-vm-2 multiprocessing pax-utils versionator virtualx
+
+ICEDTEA_PKG=${PN}$(replace_version_separator 1 -)
+ICEDTEA_BRANCH=$(get_version_component_range 1-3)
+OPENJDK_BUILD="37"
+OPENJDK_DATE="11_nov_2015"
+OPENJDK_TARBALL="openjdk-6-src-b${OPENJDK_BUILD}-${OPENJDK_DATE}.tar.xz"
+# Download cacao and jamvm regardless for use with EXTRA_ECONF
+CACAO_TARBALL="68fe50ac34ec.tar.gz"
+JAMVM_TARBALL="jamvm-ec18fb9e49e62dce16c5094ef1527eed619463aa.tar.gz"
+
+CACAO_GENTOO_TARBALL="icedtea-cacao-${CACAO_TARBALL}"
+JAMVM_GENTOO_TARBALL="icedtea-${JAMVM_TARBALL}"
+
+DESCRIPTION="A harness to build OpenJDK using Free Software build tools and dependencies"
+HOMEPAGE="http://icedtea.classpath.org"
+SRC_PKG="${ICEDTEA_PKG}.tar.xz"
+SRC_URI="
+ http://icedtea.classpath.org/download/source/${SRC_PKG}
+ https://java.net/downloads/openjdk6/${OPENJDK_TARBALL}
+ http://icedtea.classpath.org/download/drops/cacao/${CACAO_TARBALL} -> ${CACAO_GENTOO_TARBALL}
+ http://icedtea.classpath.org/download/drops/jamvm/${JAMVM_TARBALL} -> ${JAMVM_GENTOO_TARBALL}"
+
+LICENSE="Apache-1.1 Apache-2.0 GPL-1 GPL-2 GPL-2-with-linking-exception LGPL-2 MPL-1.0 MPL-1.1 public-domain W3C"
+SLOT="6"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+RESTRICT="test"
+
+IUSE="+alsa cacao cjk +cups debug doc examples +gtk headless-awt
+ javascript +jbootstrap kerberos libressl nsplugin +nss pax_kernel
+ pulseaudio selinux source systemtap test +webstart zero"
+
+# Ideally the following were optional at build time.
+ALSA_COMMON_DEP="
+ >=media-libs/alsa-lib-1.0"
+CUPS_COMMON_DEP="
+ >=net-print/cups-1.2.12"
+X_COMMON_DEP="
+ >=media-libs/giflib-4.1.6:=
+ >=media-libs/libpng-1.2:0=
+ >=x11-libs/libX11-1.1.3
+ >=x11-libs/libXext-1.1.1
+ >=x11-libs/libXi-1.1.3
+ >=x11-libs/libXrender-0.9.4
+ >=x11-libs/libXtst-1.0.3
+ x11-libs/libXt"
+X_DEPEND="
+ >=x11-libs/libXau-1.0.3
+ >=x11-libs/libXdmcp-1.0.2
+ >=x11-libs/libXinerama-1.0.2
+ x11-proto/inputproto
+ >=x11-proto/xextproto-7.1.1
+ x11-proto/xineramaproto
+ x11-proto/xproto"
+
+COMMON_DEP="
+ >=media-libs/freetype-2.3.5:2=
+ >=media-libs/lcms-2.5
+ >=sys-libs/zlib-1.2.3:=
+ virtual/jpeg:0=
+ javascript? ( dev-java/rhino:1.6 )
+ kerberos? ( virtual/krb5 )
+ nss? ( >=dev-libs/nss-3.12.5-r1 )
+ pulseaudio? ( >=media-sound/pulseaudio-0.9.11:= )
+ systemtap? ( >=dev-util/systemtap-1 )"
+
+# media-fonts/lklug needs ppc ppc64 keywords
+RDEPEND="${COMMON_DEP}
+ !dev-java/icedtea6
+ !dev-java/icedtea-web:6
+ media-fonts/dejavu
+ alsa? ( ${ALSA_COMMON_DEP} )
+ cjk? (
+ media-fonts/arphicfonts
+ media-fonts/baekmuk-fonts
+ media-fonts/lklug
+ media-fonts/lohit-fonts
+ media-fonts/sazanami
+ )
+ cups? ( ${CUPS_COMMON_DEP} )
+ gtk? ( >=x11-libs/gtk+-2.8:2 )
+ !headless-awt? ( ${X_COMMON_DEP} )
+ selinux? ( sec-policy/selinux-java )"
+
+# Only ant-core-1.8.1 has fixed ant -diagnostics when xerces+xalan are not present.
+# ca-certificates, perl and openssl are used for the cacerts keystore generation
+DEPEND="${COMMON_DEP} ${ALSA_COMMON_DEP} ${CUPS_COMMON_DEP} ${X_COMMON_DEP} ${X_DEPEND}
+ || (
+ >=dev-java/gcj-jdk-4.3
+ dev-java/icedtea-bin:6
+ dev-java/icedtea:6
+ )
+ app-arch/cpio
+ app-arch/unzip
+ app-arch/zip
+ app-misc/ca-certificates
+ >=dev-java/ant-core-1.8.2
+ dev-lang/perl
+ >=dev-libs/libxslt-1.1.26
+ !libressl? ( dev-libs/openssl )
+ libressl? ( dev-libs/libressl )
+ sys-apps/lsb-release
+ virtual/pkgconfig
+ pax_kernel? ( sys-apps/elfix )"
+
+PDEPEND="webstart? ( dev-java/icedtea-web:0 )
+ nsplugin? ( dev-java/icedtea-web:0[nsplugin] )"
+
+S="${WORKDIR}"/${ICEDTEA_PKG}
+
+icedtea_check_requirements() {
+ local CHECKREQS_DISK_BUILD
+
+ if use doc; then
+ CHECKREQS_DISK_BUILD="8500M"
+ else
+ CHECKREQS_DISK_BUILD="8000M"
+ fi
+
+ check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+ icedtea_check_requirements
+}
+
+pkg_setup() {
+ icedtea_check_requirements
+
+ JAVA_PKG_WANT_BUILD_VM="
+ icedtea-6 icedtea-bin-6
+ gcj-jdk"
+ JAVA_PKG_WANT_SOURCE="1.5"
+ JAVA_PKG_WANT_TARGET="1.5"
+
+ java-vm-2_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${SRC_PKG}
+}
+
+java_prepare() {
+ # For bootstrap builds as the sandbox control file might not yet exist.
+ addpredict /proc/self/coredump_filter
+
+ # icedtea doesn't like some locales. #330433 #389717
+ export LANG="C" LC_ALL="C"
+}
+
+src_configure() {
+ local cacao_config config hotspot_port use_cacao use_zero zero_config
+ local vm=$(java-pkg_get-current-vm)
+
+ # gcj-jdk ensures ecj is present.
+ if use jbootstrap || has "${vm}" gcj-jdk; then
+ use jbootstrap || einfo "bootstrap is necessary when building with ${vm}, ignoring USE=\"-jbootstrap\""
+ config+=" --enable-bootstrap"
+ else
+ config+=" --disable-bootstrap"
+ fi
+
+ # Use Zero if requested
+ if use zero; then
+ use_zero="yes"
+ fi
+
+ # Use CACAO if requested
+ if use cacao; then
+ use_cacao="yes"
+ fi
+
+ # Are we on a architecture with a HotSpot port?
+ # In-tree JIT ports are available for amd64, arm, sparc and x86.
+ if { use amd64 || use arm || use sparc || use x86; }; then
+ hotspot_port="yes"
+ fi
+
+ # Always use HotSpot as the primary VM if available. #389521 #368669 #357633 ...
+ # Otherwise use CACAO on ppc and Zero on anything else
+ if test "x${hotspot_port}" != "xyes"; then
+ if { use ppc || use ppc64; }; then
+ use_cacao="yes"
+ else
+ use_zero="yes"
+ fi
+ fi
+
+ # Turn on CACAO if needed (non-HS archs) or requested
+ if test "x${use_cacao}" = "xyes"; then
+ if test "x${hotspot_port}" = "xyes"; then
+ ewarn 'Enabling CACAO on an architecture with HotSpot support; issues may result.'
+ ewarn 'If so, please rebuild with USE="-cacao"'
+ fi
+ cacao_config="--enable-cacao"
+
+ # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2611
+ export DISTRIBUTION_PATCHES="${SLOT}-cacao-pr-157.patch"
+ ln -snf "${FILESDIR}/${DISTRIBUTION_PATCHES}" || die
+ fi
+
+ # Turn on Zero if needed (non-HS/CACAO archs) or requested
+ if test "x${use_zero}" = "xyes"; then
+ zero_config="--enable-zero"
+ fi
+
+ config+=" --with-parallel-jobs=$(makeopts_jobs)"
+
+ if use javascript ; then
+ config+=" --with-rhino=$(java-pkg_getjar rhino-1.6 js.jar)"
+ else
+ config+=" --without-rhino"
+ fi
+
+ unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
+
+ econf ${config} \
+ --with-openjdk-src-zip="${DISTDIR}/${OPENJDK_TARBALL}" \
+ --with-cacao-src-zip="${DISTDIR}/${CACAO_GENTOO_TARBALL}" \
+ --with-jamvm-src-zip="${DISTDIR}/${JAMVM_GENTOO_TARBALL}" \
+ --with-jdk-home="$(java-config -O)" \
+ --with-abs-install-dir="${EPREFIX}/usr/$(get_libdir)/icedtea${SLOT}" \
+ --with-pkgversion="Gentoo package ${PF}" \
+ --disable-downloading --disable-Werror \
+ $(use_enable !headless-awt system-gif) \
+ $(use_enable !headless-awt system-png) \
+ $(use_enable !debug optimizations) \
+ $(use_enable doc docs) \
+ $(use_enable kerberos system-kerberos) \
+ $(use_enable nss) \
+ $(use_with pax_kernel pax "${EPREFIX}/usr/sbin/paxmark.sh") \
+ $(use_enable pulseaudio pulse-java) \
+ $(use_enable systemtap) \
+ ${zero_config} ${cacao_config}
+}
+
+src_compile() {
+ # Would use GENTOO_VM otherwise.
+ export ANT_RESPECT_JAVA_HOME=TRUE
+
+ # With ant >=1.8.2 all required tasks are part of ant-core
+ export ANT_TASKS="none"
+
+ emake
+}
+
+src_test() {
+ # Use Xvfb for tests
+ unset DISPLAY
+
+ Xemake check
+}
+
+src_install() {
+ local dest="/usr/$(get_libdir)/icedtea${SLOT}"
+ local ddest="${ED}${dest#/}"
+ dodir "${dest}"
+
+ dodoc README NEWS AUTHORS
+ dosym /usr/share/doc/${PF} /usr/share/doc/${PN}${SLOT}
+
+ cd openjdk.build/j2sdk-image || die
+
+ if ! use alsa; then
+ rm -v jre/lib/$(get_system_arch)/libjsoundalsa.* || die
+ fi
+
+ if use headless-awt ; then
+ rm -vr jre/lib/$(get_system_arch)/{xawt,libsplashscreen.*} \
+ {,jre/}bin/policytool bin/appletviewer || die
+ fi
+
+ # Don't hide classes
+ rm lib/ct.sym || die
+
+ #402507
+ mkdir jre/.systemPrefs || die
+ touch jre/.systemPrefs/.system.lock || die
+ touch jre/.systemPrefs/.systemRootModFile || die
+
+ # doins doesn't preserve executable bits.
+ cp -vRP bin include jre lib man "${ddest}" || die
+
+ dodoc ASSEMBLY_EXCEPTION THIRD_PARTY_README
+
+ if use doc; then
+ docinto html
+ dodoc -r ../docs/*
+ fi
+
+ if use examples; then
+ cp -vRP demo sample "${ddest}" || die
+ fi
+
+ if use source; then
+ cp src.zip "${ddest}" || die
+ fi
+
+ # provided by icedtea-web but we need it in JAVA_HOME to work with run-java-tool
+ if use webstart || use nsplugin; then
+ dosym /usr/libexec/icedtea-web/itweb-settings ${dest}/bin/itweb-settings
+ dosym /usr/libexec/icedtea-web/itweb-settings ${dest}/jre/bin/itweb-settings
+ fi
+ if use webstart; then
+ dosym /usr/libexec/icedtea-web/javaws ${dest}/bin/javaws
+ dosym /usr/libexec/icedtea-web/javaws ${dest}/jre/bin/javaws
+ fi
+
+ # Fix the permissions.
+ find "${ddest}" \! -type l \( -perm /111 -exec chmod 755 {} \; -o -exec chmod 644 {} \; \) || die
+
+ # Needs to be done before generating cacerts
+ java-vm_set-pax-markings "${ddest}"
+
+ # We need to generate keystore - bug #273306
+ einfo "Generating cacerts file from certificates in ${EPREFIX}/usr/share/ca-certificates/"
+ mkdir "${T}/certgen" && cd "${T}/certgen" || die
+ cp "${FILESDIR}/generate-cacerts.pl" . && chmod +x generate-cacerts.pl || die
+ for c in "${EPREFIX}"/usr/share/ca-certificates/*/*.crt; do
+ openssl x509 -text -in "${c}" >> all.crt || die
+ done
+ ./generate-cacerts.pl "${ddest}/bin/keytool" all.crt || die
+ cp -vRP cacerts "${ddest}/jre/lib/security/" || die
+ chmod 644 "${ddest}/jre/lib/security/cacerts" || die
+
+ set_java_env "${FILESDIR}/icedtea.env"
+ java-vm_sandbox-predict /proc/self/coredump_filter
+}
+
+pkg_preinst() {
+ if has_version "<=dev-java/icedtea-6.1.10.4:${SLOT}"; then
+ # portage would preserve the symlink otherwise, related to bug #384397
+ rm -f "${EROOT}/usr/lib/jvm/icedtea6"
+ elog "To unify the layout and simplify scripts, the identifier of Icedtea-6*"
+ elog "has changed from 'icedtea6' to 'icedtea-6' starting from version 6.1.10.4-r1"
+ elog "If you had icedtea6 as system VM, the change should be automatic, however"
+ elog "build VM settings in /etc/java-config-2/build/jdk.conf are not changed"
+ elog "and the same holds for any user VM settings. Sorry for the inconvenience."
+ fi
+}
diff --git a/dev-java/icedtea/icedtea-7.2.6.4.ebuild b/dev-java/icedtea/icedtea-7.2.6.4.ebuild
new file mode 100644
index 0000000..163f73e
--- /dev/null
+++ b/dev-java/icedtea/icedtea-7.2.6.4.ebuild
@@ -0,0 +1,412 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+# Build written by Andrew John Hughes (gnu_andrew@member.fsf.org)
+
+# *********************************************************
+# * IF YOU CHANGE THIS EBUILD, CHANGE ICEDTEA-6.* AS WELL *
+# *********************************************************
+
+EAPI="5"
+SLOT="7"
+
+inherit check-reqs gnome2-utils java-pkg-2 java-vm-2 multiprocessing pax-utils prefix versionator virtualx
+
+ICEDTEA_VER=$(get_version_component_range 2-4)
+ICEDTEA_BRANCH=$(get_version_component_range 2-3)
+ICEDTEA_PKG=icedtea-${ICEDTEA_VER}
+ICEDTEA_PRE=$(get_version_component_range _)
+CORBA_TARBALL="2135da66cc53.tar.bz2"
+JAXP_TARBALL="bc6edb6c12a7.tar.bz2"
+JAXWS_TARBALL="271b555de438.tar.bz2"
+JDK_TARBALL="dc86038147b2.tar.bz2"
+LANGTOOLS_TARBALL="fd0a34cb97b4.tar.bz2"
+OPENJDK_TARBALL="4f1e498cad9c.tar.bz2"
+HOTSPOT_TARBALL="19d919ae5506.tar.bz2"
+
+CACAO_TARBALL="cacao-c182f119eaad.tar.gz"
+JAMVM_TARBALL="jamvm-ec18fb9e49e62dce16c5094ef1527eed619463aa.tar.gz"
+
+CORBA_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-corba-${CORBA_TARBALL}"
+JAXP_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-jaxp-${JAXP_TARBALL}"
+JAXWS_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-jaxws-${JAXWS_TARBALL}"
+JDK_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-jdk-${JDK_TARBALL}"
+LANGTOOLS_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-langtools-${LANGTOOLS_TARBALL}"
+OPENJDK_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-openjdk-${OPENJDK_TARBALL}"
+HOTSPOT_GENTOO_TARBALL="icedtea-${ICEDTEA_BRANCH}-hotspot-${HOTSPOT_TARBALL}"
+
+CACAO_GENTOO_TARBALL="icedtea-${CACAO_TARBALL}"
+JAMVM_GENTOO_TARBALL="icedtea-${JAMVM_TARBALL}"
+
+DROP_URL="http://icedtea.classpath.org/download/drops"
+ICEDTEA_URL="${DROP_URL}/icedtea${SLOT}/${ICEDTEA_VER}"
+
+DESCRIPTION="A harness to build OpenJDK using Free Software build tools and dependencies"
+HOMEPAGE="http://icedtea.classpath.org"
+SRC_PKG="${ICEDTEA_PKG}.tar.xz"
+SRC_URI="
+ http://icedtea.classpath.org/download/source/${SRC_PKG}
+ ${ICEDTEA_URL}/openjdk.tar.bz2 -> ${OPENJDK_GENTOO_TARBALL}
+ ${ICEDTEA_URL}/corba.tar.bz2 -> ${CORBA_GENTOO_TARBALL}
+ ${ICEDTEA_URL}/jaxp.tar.bz2 -> ${JAXP_GENTOO_TARBALL}
+ ${ICEDTEA_URL}/jaxws.tar.bz2 -> ${JAXWS_GENTOO_TARBALL}
+ ${ICEDTEA_URL}/jdk.tar.bz2 -> ${JDK_GENTOO_TARBALL}
+ ${ICEDTEA_URL}/hotspot.tar.bz2 -> ${HOTSPOT_GENTOO_TARBALL}
+ ${ICEDTEA_URL}/langtools.tar.bz2 -> ${LANGTOOLS_GENTOO_TARBALL}
+ ${DROP_URL}/cacao/${CACAO_TARBALL} -> ${CACAO_GENTOO_TARBALL}
+ ${DROP_URL}/jamvm/${JAMVM_TARBALL} -> ${JAMVM_GENTOO_TARBALL}"
+
+LICENSE="Apache-1.1 Apache-2.0 GPL-1 GPL-2 GPL-2-with-linking-exception LGPL-2 MPL-1.0 MPL-1.1 public-domain W3C"
+KEYWORDS="~amd64 ~arm ~x86"
+RESTRICT="test"
+
+IUSE="+alsa cacao cjk +cups debug doc examples +gtk headless-awt infinality
+ jamvm javascript +jbootstrap kerberos libressl nsplugin nss pax_kernel
+ pulseaudio sctp selinux smartcard source +sunec test +webstart zero"
+
+REQUIRED_USE="gtk? ( !headless-awt )"
+
+# Ideally the following were optional at build time.
+ALSA_COMMON_DEP="
+ >=media-libs/alsa-lib-1.0"
+CUPS_COMMON_DEP="
+ >=net-print/cups-1.2.12"
+X_COMMON_DEP="
+ >=media-libs/giflib-4.1.6:=
+ >=media-libs/libpng-1.2:0=
+ >=x11-libs/libX11-1.1.3
+ >=x11-libs/libXext-1.1.1
+ >=x11-libs/libXi-1.1.3
+ >=x11-libs/libXrender-0.9.4
+ >=x11-libs/libXtst-1.0.3
+ x11-libs/libXt"
+X_DEPEND="
+ >=x11-libs/libXau-1.0.3
+ >=x11-libs/libXdmcp-1.0.2
+ >=x11-libs/libXinerama-1.0.2
+ x11-proto/inputproto
+ >=x11-proto/xextproto-7.1.1
+ x11-proto/xineramaproto
+ x11-proto/xproto"
+
+COMMON_DEP="
+ >=dev-libs/glib-2.26:2
+ >=dev-util/systemtap-1
+ media-libs/fontconfig
+ >=media-libs/freetype-2.5.3:2=[infinality?]
+ >=media-libs/lcms-2.5
+ >=sys-libs/zlib-1.2.3:=
+ virtual/jpeg:0=
+ gtk? (
+ >=dev-libs/atk-1.30.0
+ >=x11-libs/cairo-1.8.8:=
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-2.8:2=
+ >=x11-libs/pango-1.24.5
+ )
+ javascript? ( dev-java/rhino:1.6 )
+ kerberos? ( virtual/krb5 )
+ nss? ( >=dev-libs/nss-3.12.5-r1 )
+ sctp? ( net-misc/lksctp-tools )
+ smartcard? ( sys-apps/pcsc-lite )
+ sunec? ( >=dev-libs/nss-3.16.1-r1 )"
+
+# gsettings-desktop-schemas is needed for native proxy support. #431972
+RDEPEND="${COMMON_DEP}
+ !dev-java/icedtea:0
+ !dev-java/icedtea-web:7
+ >=gnome-base/gsettings-desktop-schemas-3.12.2
+ media-fonts/dejavu
+ alsa? ( ${ALSA_COMMON_DEP} )
+ cjk? (
+ media-fonts/arphicfonts
+ media-fonts/baekmuk-fonts
+ media-fonts/lklug
+ media-fonts/lohit-fonts
+ media-fonts/sazanami
+ )
+ cups? ( ${CUPS_COMMON_DEP} )
+ !headless-awt? ( ${X_COMMON_DEP} )
+ selinux? ( sec-policy/selinux-java )"
+
+# Only ant-core-1.8.1 has fixed ant -diagnostics when xerces+xalan are not present.
+# ca-certificates, perl and openssl are used for the cacerts keystore generation
+DEPEND="${COMMON_DEP} ${ALSA_COMMON_DEP} ${CUPS_COMMON_DEP} ${X_COMMON_DEP} ${X_DEPEND}
+ || (
+ >=dev-java/gcj-jdk-4.3
+ dev-java/icedtea-bin:7
+ dev-java/icedtea-bin:6
+ dev-java/icedtea:7
+ dev-java/icedtea:6
+ )
+ app-arch/cpio
+ app-arch/unzip
+ app-arch/zip
+ app-misc/ca-certificates
+ >=dev-java/ant-core-1.8.2
+ dev-lang/perl
+ >=dev-libs/libxslt-1.1.26
+ !libressl? ( dev-libs/openssl )
+ libressl? ( dev-libs/libressl )
+ sys-apps/attr
+ sys-apps/lsb-release
+ virtual/pkgconfig
+ pax_kernel? ( sys-apps/elfix )"
+
+PDEPEND="webstart? ( dev-java/icedtea-web:0[icedtea7(+)] )
+ nsplugin? ( dev-java/icedtea-web:0[icedtea7(+),nsplugin] )
+ pulseaudio? ( dev-java/icedtea-sound )"
+
+S="${WORKDIR}"/${ICEDTEA_PKG}
+
+icedtea_check_requirements() {
+ local CHECKREQS_DISK_BUILD
+
+ if use doc; then
+ CHECKREQS_DISK_BUILD="9000M"
+ else
+ CHECKREQS_DISK_BUILD="8500M"
+ fi
+
+ check-reqs_pkg_${EBUILD_PHASE}
+}
+
+pkg_pretend() {
+ icedtea_check_requirements
+}
+
+pkg_setup() {
+ icedtea_check_requirements
+
+ JAVA_PKG_WANT_BUILD_VM="
+ icedtea-7 icedtea-bin-7
+ icedtea-6 icedtea-bin-6
+ gcj-jdk"
+ JAVA_PKG_WANT_SOURCE="1.5"
+ JAVA_PKG_WANT_TARGET="1.5"
+
+ java-vm-2_pkg_setup
+ java-pkg-2_pkg_setup
+}
+
+src_unpack() {
+ unpack ${SRC_PKG}
+}
+
+java_prepare() {
+ if ! use cups; then
+ # CUPS is always needed at build time but you can at least make it dlopen.
+ sed -i 's/SYSTEM_CUPS="true"/SYSTEM_CUPS="false"/g' Makefile.in || die
+ fi
+
+ # For bootstrap builds as the sandbox control file might not yet exist.
+ addpredict /proc/self/coredump_filter
+
+ # icedtea doesn't like some locales. #330433 #389717
+ export LANG="C" LC_ALL="C"
+}
+
+src_configure() {
+ local cacao_config config hotspot_port jamvm_config use_cacao use_jamvm use_zero zero_config
+ local vm=$(java-pkg_get-current-vm)
+
+ # gcj-jdk ensures ecj is present.
+ if use jbootstrap || has "${vm}" gcj-jdk; then
+ use jbootstrap || einfo "bootstrap is necessary when building with ${vm}, ignoring USE=\"-jbootstrap\""
+ config+=" --enable-bootstrap"
+ else
+ config+=" --disable-bootstrap"
+ fi
+
+ # Use Zero if requested
+ if use zero; then
+ use_zero="yes"
+ fi
+
+ # Use JamVM if requested
+ if use jamvm; then
+ use_jamvm="yes"
+ fi
+
+ # Use CACAO if requested
+ if use cacao; then
+ use_cacao="yes"
+ fi
+
+ # Are we on a architecture with a HotSpot port?
+ # In-tree JIT ports are available for amd64, arm, arm64, ppc64 (be&le), SPARC and x86.
+ if { use amd64 || use arm || use arm64 || use ppc64 || use sparc || use x86; }; then
+ hotspot_port="yes"
+ fi
+
+ # Always use HotSpot as the primary VM if available. #389521 #368669 #357633 ...
+ # Otherwise use CACAO on ppc and Zero on anything else
+ if test "x${hotspot_port}" != "xyes"; then
+ if use ppc; then
+ use_cacao="yes"
+ else
+ use_zero="yes"
+ fi
+ fi
+
+ # Turn on JamVM if needed (non-HS archs) or requested
+ if test "x${use_jamvm}" = "xyes"; then
+ if test "x${hotspot_port}" = "xyes"; then
+ ewarn 'Enabling JamVM on an architecture with HotSpot support; issues may result.'
+ ewarn 'If so, please rebuild with USE="-jamvm"'
+ fi
+ jamvm_config="--enable-jamvm"
+ fi
+
+ # Turn on CACAO if needed (non-HS archs) or requested
+ if test "x${use_cacao}" = "xyes"; then
+ if test "x${hotspot_port}" = "xyes"; then
+ ewarn 'Enabling CACAO on an architecture with HotSpot support; issues may result.'
+ ewarn 'If so, please rebuild with USE="-cacao"'
+ fi
+ cacao_config="--enable-cacao"
+
+ # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2612
+ # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2781
+ export DISTRIBUTION_PATCHES="${SLOT}-cacao-pr-157.patch icedtea-bug-2781.patch"
+ ln -snf "${FILESDIR}"/{${SLOT}-cacao-pr-157,icedtea-bug-2781}.patch . || die
+ fi
+
+ # Turn on Zero if needed (non-HS/CACAO archs) or requested
+ if test "x${use_zero}" = "xyes"; then
+ if test "x${hotspot_port}" = "xyes"; then
+ ewarn 'Enabling Zero on an architecture with HotSpot support; performance will be significantly reduced.'
+ fi
+ zero_config="--enable-zero"
+ fi
+
+ config+=" --with-parallel-jobs=$(makeopts_jobs)"
+
+ if use javascript ; then
+ config+=" --with-rhino=$(java-pkg_getjar rhino-1.6 js.jar)"
+ else
+ config+=" --without-rhino"
+ fi
+
+ unset JAVA_HOME JDK_HOME CLASSPATH JAVAC JAVACFLAGS
+
+ econf ${config} \
+ --with-openjdk-src-zip="${DISTDIR}/${OPENJDK_GENTOO_TARBALL}" \
+ --with-corba-src-zip="${DISTDIR}/${CORBA_GENTOO_TARBALL}" \
+ --with-jaxp-src-zip="${DISTDIR}/${JAXP_GENTOO_TARBALL}" \
+ --with-jaxws-src-zip="${DISTDIR}/${JAXWS_GENTOO_TARBALL}" \
+ --with-jdk-src-zip="${DISTDIR}/${JDK_GENTOO_TARBALL}" \
+ --with-hotspot-src-zip="${DISTDIR}/${HOTSPOT_GENTOO_TARBALL}" \
+ --with-langtools-src-zip="${DISTDIR}/${LANGTOOLS_GENTOO_TARBALL}" \
+ --with-cacao-src-zip="${DISTDIR}/${CACAO_GENTOO_TARBALL}" \
+ --with-jamvm-src-zip="${DISTDIR}/${JAMVM_GENTOO_TARBALL}" \
+ --with-jdk-home="$(java-config -O)" \
+ --prefix="${EPREFIX}/usr/$(get_libdir)/icedtea${SLOT}" \
+ --mandir="${EPREFIX}/usr/$(get_libdir)/icedtea${SLOT}/man" \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --htmldir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --with-pkgversion="Gentoo ${PF}" \
+ --disable-downloading --disable-Werror \
+ --disable-hotspot-tests --disable-jdk-tests \
+ --enable-system-lcms --enable-system-jpeg \
+ --enable-system-zlib \
+ $(use_enable !headless-awt system-gif) \
+ $(use_enable !headless-awt system-png) \
+ $(use_enable !debug optimizations) \
+ $(use_enable doc docs) \
+ $(use_enable gtk system-gtk) \
+ $(use_enable infinality) \
+ $(use_enable kerberos system-kerberos) \
+ $(use_enable nss) \
+ $(use_with pax_kernel pax "${EPREFIX}/usr/sbin/paxmark.sh") \
+ $(use_enable sctp system-sctp) \
+ $(use_enable smartcard system-pcsc) \
+ $(use_enable sunec) \
+ ${zero_config} ${cacao_config} ${jamvm_config}
+}
+
+src_compile() {
+ # Would use GENTOO_VM otherwise.
+ export ANT_RESPECT_JAVA_HOME=TRUE
+
+ # With ant >=1.8.2 all required tasks are part of ant-core
+ export ANT_TASKS="none"
+
+ emake
+}
+
+src_test() {
+ # Use Xvfb for tests
+ unset DISPLAY
+
+ Xemake check
+}
+
+src_install() {
+ default
+
+ local dest="/usr/$(get_libdir)/icedtea${SLOT}"
+ local ddest="${ED}${dest#/}"
+
+ if ! use alsa; then
+ rm -v "${ddest}"/jre/lib/$(get_system_arch)/libjsoundalsa.* || die
+ fi
+
+ if use headless-awt; then
+ rm -vr "${ddest}"/jre/lib/$(get_system_arch)/{xawt,libsplashscreen.*,libjavagtk.*} \
+ "${ddest}"/{,jre/}bin/policytool "${ddest}"/bin/appletviewer || die
+ fi
+
+ if ! use examples; then
+ rm -r "${ddest}"/demo "${ddest}"/sample || die
+ fi
+
+ if ! use source; then
+ rm -v "${ddest}"/src.zip || die
+ fi
+
+ # provided by icedtea-web but we need it in JAVA_HOME to work with run-java-tool
+ if use webstart || use nsplugin; then
+ dosym /usr/libexec/icedtea-web/itweb-settings ${dest}/bin/itweb-settings
+ dosym /usr/libexec/icedtea-web/itweb-settings ${dest}/jre/bin/itweb-settings
+ fi
+ if use webstart; then
+ dosym /usr/libexec/icedtea-web/javaws ${dest}/bin/javaws
+ dosym /usr/libexec/icedtea-web/javaws ${dest}/jre/bin/javaws
+ fi
+ dosym /usr/share/doc/${PF} /usr/share/doc/${PN}${SLOT}
+
+ # Fix the permissions.
+ find "${ddest}" \! -type l \( -perm /111 -exec chmod 755 {} \; -o -exec chmod 644 {} \; \) || die
+
+ # We need to generate keystore - bug #273306
+ einfo "Generating cacerts file from certificates in ${EPREFIX}/usr/share/ca-certificates/"
+ mkdir "${T}/certgen" && cd "${T}/certgen" || die
+ cp "${FILESDIR}/generate-cacerts.pl" . && chmod +x generate-cacerts.pl || die
+ for c in "${EPREFIX}"/usr/share/ca-certificates/*/*.crt; do
+ openssl x509 -text -in "${c}" >> all.crt || die
+ done
+ ./generate-cacerts.pl "${ddest}/bin/keytool" all.crt || die
+ cp -vRP cacerts "${ddest}/jre/lib/security/" || die
+ chmod 644 "${ddest}/jre/lib/security/cacerts" || die
+
+ set_java_env "${FILESDIR}/icedtea.env"
+ java-vm_sandbox-predict /proc/self/coredump_filter
+}
+
+pkg_preinst() {
+ if has_version "<=dev-java/icedtea-7.2.0:7"; then
+ # portage would preserve the symlink otherwise, related to bug #384397
+ rm -f "${EROOT}/usr/lib/jvm/icedtea7"
+ elog "To unify the layout and simplify scripts, the identifier of Icedtea-7*"
+ elog "has changed from 'icedtea7' to 'icedtea-7' starting from version 7.2.0-r1"
+ elog "If you had icedtea7 as system VM, the change should be automatic, however"
+ elog "build VM settings in /etc/java-config-2/build/jdk.conf are not changed"
+ elog "and the same holds for any user VM settings. Sorry for the inconvenience."
+ fi
+
+ gnome2_icon_savelist;
+}
+
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/dev-java/icedtea/metadata.xml b/dev-java/icedtea/metadata.xml
new file mode 100644
index 0000000..b5480c2
--- /dev/null
+++ b/dev-java/icedtea/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>gnu_andrew@member.fsf.org</email>
+ <name>Andrew John Hughes</name>
+ <description>Proxy Maintainer</description>
+</maintainer>
+<maintainer type="person">
+ <email>chewi@gentoo.org</email>
+ <name>James Le Cuirot</name>
+ <description>Committer</description>
+</maintainer>
+<maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+</maintainer>
+<maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+</maintainer>
+<longdescription>The IcedTea project provides a harness to build the source code from OpenJDK (http://openjdk.java.net) using Free Software build tools along with additional tools such as a browser plugin and Web Start support via NetX. </longdescription>
+<use>
+ <flag name="cacao">Use the CACAO virtual machine rather than HotSpot.</flag>
+ <flag name="headless-awt">Don't install the X backend for AWT, needed by some GUIs (used to be X flag)</flag>
+ <flag name="infinality">Enable better font rendering using fontconfig.</flag>
+ <flag name="jamvm">Use the JamVM virtual machine rather than HotSpot.</flag>
+ <flag name="jbootstrap">If possible, recompile the final IcedTea executables with itself.</flag>
+ <flag name="nss">Enable NSS security provider support.</flag>
+ <flag name="nsplugin">Enable browser plugin (NPPlugin), requires also the webstart flag to be enabled.</flag>
+ <flag name="pax_kernel">Apply patch needed for pax enabled kernels.</flag>
+ <flag name="sctp">Build the SCTP NIO channel implementation against lksctp</flag>
+ <flag name="smartcard">Build the PCSC driver against pcsc-lite</flag>
+ <flag name="sunec">Build the SunEC provider against system NSS</flag>
+ <flag name="systemtap">Enable SystemTap probes in HotSpot.</flag>
+ <flag name="zero">Enable Zero assembler port (usually for non-HotSpot architectures)</flag>
+ <flag name="webstart">Enable Web Start support (via NetX).</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-qt/qtcore/Manifest b/dev-qt/qtcore/Manifest
new file mode 100644
index 0000000..1bd4b07
--- /dev/null
+++ b/dev-qt/qtcore/Manifest
@@ -0,0 +1,2 @@
+DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84
+DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch b/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch
new file mode 100644
index 0000000..0fcc1fa
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch
@@ -0,0 +1,81 @@
+From 267feb2de49eed0823ca0c29f1cd5238537c7116 Mon Sep 17 00:00:00 2001
+From: Jan-Marek Glogowski <glogow@fbihome.de>
+Date: Thu, 6 Mar 2014 18:44:43 +0100
+Subject: Honor ExcludeSocketNotifiers in glib event loop
+
+Implements QEventLoop::ExcludeSocketNotifiers in the same way
+QEventLoop::X11ExcludeTimers is already implemented for the glib
+event loop.
+
+This prevents crashes when QClipboard checks for clipboard events
+and
+ qApp->clipboard()->setProperty( "useEventLoopWhenWaiting", true );
+is set.
+
+Task-number: QTBUG-34614
+Task-number: QTBUG-37380
+
+Change-Id: Id4e2a74c6bdf8c3b439a4e3813d24d11368b607d
+---
+ src/corelib/kernel/qeventdispatcher_glib.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
+index 0b0e308..ba522fa 100644
+--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
++++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
+@@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier
+ struct GSocketNotifierSource
+ {
+ GSource source;
++ QEventLoop::ProcessEventsFlags processEventsFlags;
+ QList<GPollFDWithQSocketNotifier *> pollfds;
+ };
+
+@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceCheck(GSource *source)
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
+
+ bool pending = false;
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
++ return pending;
++
+ for (int i = 0; !pending && i < src->pollfds.count(); ++i) {
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
+
+@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDispatch(GSource *source, GSourceFunc, gpoin
+ QEvent event(QEvent::SockAct);
+
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source);
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers)
++ return true;
++
+ for (int i = 0; i < src->pollfds.count(); ++i) {
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i);
+
+@@ -331,6 +338,7 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
+ reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs,
+ sizeof(GSocketNotifierSource)));
+ (void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>();
++ socketNotifierSource->processEventsFlags = QEventLoop::AllEvents;
+ g_source_set_can_recurse(&socketNotifierSource->source, true);
+ g_source_attach(&socketNotifierSource->source, mainContext);
+
+@@ -416,6 +424,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
+ // tell postEventSourcePrepare() and timerSource about any new flags
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
+ d->timerSource->processEventsFlags = flags;
++ d->socketNotifierSource->processEventsFlags = flags;
+
+ if (!(flags & QEventLoop::EventLoopExec)) {
+ // force timers to be sent at normal priority
+@@ -427,6 +436,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags)
+ result = g_main_context_iteration(d->mainContext, canWait);
+
+ d->timerSource->processEventsFlags = savedFlags;
++ d->socketNotifierSource->processEventsFlags = savedFlags;
+
+ if (canWait)
+ emit awake();
+--
+2.0.0
+
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-libressl.patch b/dev-qt/qtcore/files/qtcore-4.8.5-libressl.patch
new file mode 100644
index 0000000..b838c7a
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-libressl.patch
@@ -0,0 +1,52 @@
+--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2015-11-25 01:38:42.103898399 -0500
++++ src/network/ssl/qsslsocket_openssl_symbols.cpp 2015-11-25 01:40:50.146247648 -0500
+@@ -224,13 +224,17 @@
+ #ifndef OPENSSL_NO_SSL2
+ DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
+ #endif
++#ifndef OPENSSL_NO_SSL3
+ DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
++#endif
+ DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
+ DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
+ #ifndef OPENSSL_NO_SSL2
+ DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
+ #endif
++#ifndef OPENSSL_NO_SSL3
+ DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
++#endif
+ DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
+ DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
+ #else
+@@ -818,13 +822,17 @@
+ #ifndef OPENSSL_NO_SSL2
+ RESOLVEFUNC(SSLv2_client_method)
+ #endif
++#ifndef OPENSSL_NO_SSL3
+ RESOLVEFUNC(SSLv3_client_method)
++#endif
+ RESOLVEFUNC(SSLv23_client_method)
+ RESOLVEFUNC(TLSv1_client_method)
+ #ifndef OPENSSL_NO_SSL2
+ RESOLVEFUNC(SSLv2_server_method)
+ #endif
++#ifndef OPENSSL_NO_SSL3
+ RESOLVEFUNC(SSLv3_server_method)
++#endif
+ RESOLVEFUNC(SSLv23_server_method)
+ RESOLVEFUNC(TLSv1_server_method)
+ RESOLVEFUNC(X509_NAME_entry_count)
+--- src/network/ssl/qsslsocket_openssl.cpp.orig 2015-11-25 01:44:55.235087906 -0500
++++ src/network/ssl/qsslsocket_openssl.cpp 2015-11-25 01:45:45.194443818 -0500
+@@ -263,7 +263,11 @@
+ #endif
+ break;
+ case QSsl::SslV3:
++#ifndef OPENSSL_NO_SSL3
+ ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method());
++#else
++ ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error
++#endif
+ break;
+ case QSsl::SecureProtocols: // SslV2 will be disabled below
+ case QSsl::TlsV1SslV3: // SslV2 will be disabled below
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch b/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch
new file mode 100644
index 0000000..b464c92
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch
@@ -0,0 +1,12 @@
+Index: qt-everywhere-opensource-src-4.8.9999/src/tools/moc/main.cpp
+===================================================================
+--- qt-everywhere-opensource-src-4.8.9999.orig/src/tools/moc/main.cpp
++++ qt-everywhere-opensource-src-4.8.9999/src/tools/moc/main.cpp
+@@ -190,6 +190,7 @@ int runMoc(int _argc, char **_argv)
+
+ // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829
+ pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
++ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
+
+ QByteArray filename;
+ QByteArray output;
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch b/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch
new file mode 100644
index 0000000..6d3bf2f
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch
@@ -0,0 +1,94 @@
+--- src/corelib/kernel/qeventdispatcher_glib.cpp.sav 2014-03-28 15:26:37.000000000 +0100
++++ src/corelib/kernel/qeventdispatcher_glib.cpp 2014-04-24 09:44:09.358659204 +0200
+@@ -255,22 +255,30 @@ struct GPostEventSource
+ GSource source;
+ QAtomicInt serialNumber;
+ int lastSerialNumber;
++ QEventLoop::ProcessEventsFlags processEventsFlags;
+ QEventDispatcherGlibPrivate *d;
+ };
+
+ static gboolean postEventSourcePrepare(GSource *s, gint *timeout)
+ {
++ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ QThreadData *data = QThreadData::current();
+ if (!data)
+ return false;
+
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((source->processEventsFlags & excludeAllFlags) == excludeAllFlags)
++ return false;
++
+ gint dummy;
+ if (!timeout)
+ timeout = &dummy;
+ const bool canWait = data->canWaitLocked();
+ *timeout = canWait ? -1 : 0;
+
+- GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ return (!canWait
+ || (source->serialNumber != source->lastSerialNumber));
+ }
+@@ -284,8 +292,14 @@ static gboolean postEventSourceDispatch(
+ {
+ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ source->lastSerialNumber = source->serialNumber;
+- QCoreApplication::sendPostedEvents();
+- source->d->runTimersOnceWithNormalPriority();
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((source->processEventsFlags & excludeAllFlags) != excludeAllFlags) {
++ QCoreApplication::sendPostedEvents();
++ source->d->runTimersOnceWithNormalPriority();
++ }
+ return true; // i dunno, george...
+ }
+
+@@ -329,6 +343,7 @@ QEventDispatcherGlibPrivate::QEventDispa
+ postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
+ sizeof(GPostEventSource)));
+ postEventSource->serialNumber = 1;
++ postEventSource->processEventsFlags = QEventLoop::AllEvents;
+ postEventSource->d = this;
+ g_source_set_can_recurse(&postEventSource->source, true);
+ g_source_attach(&postEventSource->source, mainContext);
+@@ -423,6 +438,7 @@ bool QEventDispatcherGlib::processEvents
+
+ // tell postEventSourcePrepare() and timerSource about any new flags
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
++ d->postEventSource->processEventsFlags = flags;
+ d->timerSource->processEventsFlags = flags;
+ d->socketNotifierSource->processEventsFlags = flags;
+
+@@ -435,6 +451,7 @@ bool QEventDispatcherGlib::processEvents
+ while (!result && canWait)
+ result = g_main_context_iteration(d->mainContext, canWait);
+
++ d->postEventSource->processEventsFlags = savedFlags;
+ d->timerSource->processEventsFlags = savedFlags;
+ d->socketNotifierSource->processEventsFlags = savedFlags;
+
+--- src/corelib/kernel/qeventdispatcher_unix.cpp.sav 2013-06-07 07:16:52.000000000 +0200
++++ src/corelib/kernel/qeventdispatcher_unix.cpp 2014-04-24 09:43:06.927589535 +0200
+@@ -905,7 +905,15 @@ bool QEventDispatcherUNIX::processEvents
+
+ // we are awake, broadcast it
+ emit awake();
+- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
++
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((flags & excludeAllFlags) == excludeAllFlags)
++ return false;
++ if(( flags & excludeAllFlags ) != excludeAllFlags )
++ QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
+
+ int nevents = 0;
+ const bool canWait = (d->threadData->canWaitLocked()
diff --git a/dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch b/dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch
new file mode 100644
index 0000000..1d83caa
--- /dev/null
+++ b/dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch
@@ -0,0 +1,431 @@
+From fa81aa6d027049e855b76f5408586a288f160575 Mon Sep 17 00:00:00 2001
+From: Markus Goetz <markus@woboq.com>
+Date: Tue, 28 Apr 2015 11:57:36 +0200
+Subject: QNAM: Fix upload corruptions when server closes connection
+
+This patch fixes several upload corruptions if the server closes the connection
+while/before we send data into it. They happen inside multiple places in the HTTP
+layer and are explained in the comments.
+Corruptions are:
+* The upload byte device has an in-flight signal with pending upload data, if
+it gets reset (because server closes the connection) then the re-send of the
+request was sometimes taking this stale in-flight pending upload data.
+* Because some signals were DirectConnection and some were QueuedConnection, there
+was a chance that a direct signal overtakes a queued signal. The state machine
+then sent data down the socket which was buffered there (and sent later) although
+it did not match the current state of the state machine when it was actually sent.
+* A socket was seen as being able to have requests sent even though it was not
+encrypted yet. This relates to the previous corruption where data is stored inside
+the socket's buffer and then sent later.
+
+The included auto test produces all fixed corruptions, I detected no regressions
+via the other tests.
+This code also adds a bit of sanity checking to protect from possible further
+problems.
+
+[ChangeLog][QtNetwork] Fix HTTP(s) upload corruption when server closes connection
+
+(cherry picked from commit qtbase/cff39fba10ffc10ee4dcfdc66ff6528eb26462d3)
+Change-Id: I9793297be6cf3edfb75b65ba03b65f7a133ef194
+Reviewed-by: Richard J. Moore <rich@kde.org>
+---
+ src/corelib/io/qnoncontiguousbytedevice.cpp | 19 +++
+ src/corelib/io/qnoncontiguousbytedevice_p.h | 4 +
+ .../access/qhttpnetworkconnectionchannel.cpp | 47 +++++-
+ src/network/access/qhttpthreaddelegate_p.h | 36 ++++-
+ src/network/access/qnetworkaccesshttpbackend.cpp | 24 ++-
+ src/network/access/qnetworkaccesshttpbackend_p.h | 5 +-
+ tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 174 ++++++++++++++++++++-
+ 7 files changed, 280 insertions(+), 29 deletions(-)
+
+diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp
+index bf58eee..1a0591e 100644
+--- a/src/corelib/io/qnoncontiguousbytedevice.cpp
++++ b/src/corelib/io/qnoncontiguousbytedevice.cpp
+@@ -245,6 +245,12 @@ qint64 QNonContiguousByteDeviceByteArrayImpl::size()
+ return byteArray->size();
+ }
+
++qint64 QNonContiguousByteDeviceByteArrayImpl::pos()
++{
++ return currentPosition;
++}
++
++
+ QNonContiguousByteDeviceRingBufferImpl::QNonContiguousByteDeviceRingBufferImpl(QSharedPointer<QRingBuffer> rb)
+ : QNonContiguousByteDevice(), currentPosition(0)
+ {
+@@ -296,6 +302,11 @@ qint64 QNonContiguousByteDeviceRingBufferImpl::size()
+ return ringBuffer->size();
+ }
+
++qint64 QNonContiguousByteDeviceRingBufferImpl::pos()
++{
++ return currentPosition;
++}
++
+ QNonContiguousByteDeviceIoDeviceImpl::QNonContiguousByteDeviceIoDeviceImpl(QIODevice *d)
+ : QNonContiguousByteDevice(),
+ currentReadBuffer(0), currentReadBufferSize(16*1024),
+@@ -415,6 +426,14 @@ qint64 QNonContiguousByteDeviceIoDeviceImpl::size()
+ return device->size() - initialPosition;
+ }
+
++qint64 QNonContiguousByteDeviceIoDeviceImpl::pos()
++{
++ if (device->isSequential())
++ return -1;
++
++ return device->pos();
++}
++
+ QByteDeviceWrappingIoDevice::QByteDeviceWrappingIoDevice(QNonContiguousByteDevice *bd) : QIODevice((QObject*)0)
+ {
+ byteDevice = bd;
+diff --git a/src/corelib/io/qnoncontiguousbytedevice_p.h b/src/corelib/io/qnoncontiguousbytedevice_p.h
+index b6966eb..d1a99a1 100644
+--- a/src/corelib/io/qnoncontiguousbytedevice_p.h
++++ b/src/corelib/io/qnoncontiguousbytedevice_p.h
+@@ -69,6 +69,7 @@ public:
+ virtual const char* readPointer(qint64 maximumLength, qint64 &len) = 0;
+ virtual bool advanceReadPointer(qint64 amount) = 0;
+ virtual bool atEnd() = 0;
++ virtual qint64 pos() { return -1; }
+ virtual bool reset() = 0;
+ void disableReset();
+ bool isResetDisabled() { return resetDisabled; }
+@@ -108,6 +109,7 @@ public:
+ bool atEnd();
+ bool reset();
+ qint64 size();
++ qint64 pos();
+ protected:
+ QByteArray* byteArray;
+ qint64 currentPosition;
+@@ -123,6 +125,7 @@ public:
+ bool atEnd();
+ bool reset();
+ qint64 size();
++ qint64 pos();
+ protected:
+ QSharedPointer<QRingBuffer> ringBuffer;
+ qint64 currentPosition;
+@@ -140,6 +143,7 @@ public:
+ bool atEnd();
+ bool reset();
+ qint64 size();
++ qint64 pos();
+ protected:
+ QIODevice* device;
+ QByteArray* currentReadBuffer;
+diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
+index 550e090..db2f712 100644
+--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
++++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
+@@ -107,15 +107,19 @@ void QHttpNetworkConnectionChannel::init()
+ socket->setProxy(QNetworkProxy::NoProxy);
+ #endif
+
++ // We want all signals (except the interactive ones) be connected as QueuedConnection
++ // because else we're falling into cases where we recurse back into the socket code
++ // and mess up the state. Always going to the event loop (and expecting that when reading/writing)
++ // is safer.
+ QObject::connect(socket, SIGNAL(bytesWritten(qint64)),
+ this, SLOT(_q_bytesWritten(qint64)),
+- Qt::DirectConnection);
++ Qt::QueuedConnection);
+ QObject::connect(socket, SIGNAL(connected()),
+ this, SLOT(_q_connected()),
+- Qt::DirectConnection);
++ Qt::QueuedConnection);
+ QObject::connect(socket, SIGNAL(readyRead()),
+ this, SLOT(_q_readyRead()),
+- Qt::DirectConnection);
++ Qt::QueuedConnection);
+
+ // The disconnected() and error() signals may already come
+ // while calling connectToHost().
+@@ -144,13 +148,13 @@ void QHttpNetworkConnectionChannel::init()
+ // won't be a sslSocket if encrypt is false
+ QObject::connect(sslSocket, SIGNAL(encrypted()),
+ this, SLOT(_q_encrypted()),
+- Qt::DirectConnection);
++ Qt::QueuedConnection);
+ QObject::connect(sslSocket, SIGNAL(sslErrors(QList<QSslError>)),
+ this, SLOT(_q_sslErrors(QList<QSslError>)),
+ Qt::DirectConnection);
+ QObject::connect(sslSocket, SIGNAL(encryptedBytesWritten(qint64)),
+ this, SLOT(_q_encryptedBytesWritten(qint64)),
+- Qt::DirectConnection);
++ Qt::QueuedConnection);
+ }
+ #endif
+ }
+@@ -163,7 +167,8 @@ void QHttpNetworkConnectionChannel::close()
+ else
+ state = QHttpNetworkConnectionChannel::ClosingState;
+
+- socket->close();
++ if (socket)
++ socket->close();
+ }
+
+
+@@ -280,6 +285,14 @@ bool QHttpNetworkConnectionChannel::sendRequest()
+ // nothing to read currently, break the loop
+ break;
+ } else {
++ if (written != uploadByteDevice->pos()) {
++ // Sanity check. This was useful in tracking down an upload corruption.
++ qWarning() << "QHttpProtocolHandler: Internal error in sendRequest. Expected to write at position" << written << "but read device is at" << uploadByteDevice->pos();
++ Q_ASSERT(written == uploadByteDevice->pos());
++ connection->d_func()->emitReplyError(socket, reply, QNetworkReply::ProtocolFailure);
++ return false;
++ }
++
+ qint64 currentWriteSize = socket->write(readPointer, currentReadSize);
+ if (currentWriteSize == -1 || currentWriteSize != currentReadSize) {
+ // socket broke down
+@@ -639,6 +652,14 @@ bool QHttpNetworkConnectionChannel::ensureConnection()
+ }
+ return false;
+ }
++
++ // This code path for ConnectedState
++ if (pendingEncrypt) {
++ // Let's only be really connected when we have received the encrypted() signal. Else the state machine seems to mess up
++ // and corrupt the things sent to the server.
++ return false;
++ }
++
+ return true;
+ }
+
+@@ -980,6 +1001,13 @@ void QHttpNetworkConnectionChannel::_q_readyRead()
+ void QHttpNetworkConnectionChannel::_q_bytesWritten(qint64 bytes)
+ {
+ Q_UNUSED(bytes);
++
++ if (ssl) {
++ // In the SSL case we want to send data from encryptedBytesWritten signal since that one
++ // is the one going down to the actual network, not only into some SSL buffer.
++ return;
++ }
++
+ // bytes have been written to the socket. write even more of them :)
+ if (isSocketWriting())
+ sendRequest();
+@@ -1029,7 +1057,7 @@ void QHttpNetworkConnectionChannel::_q_connected()
+
+ // ### FIXME: if the server closes the connection unexpectedly, we shouldn't send the same broken request again!
+ //channels[i].reconnectAttempts = 2;
+- if (!pendingEncrypt) {
++ if (!pendingEncrypt && !ssl) { // FIXME: Didn't work properly with pendingEncrypt only, we should refactor this into an EncrypingState
+ state = QHttpNetworkConnectionChannel::IdleState;
+ if (!reply)
+ connection->d_func()->dequeueRequest(socket);
+@@ -1157,7 +1185,10 @@ void QHttpNetworkConnectionChannel::_q_proxyAuthenticationRequired(const QNetwor
+
+ void QHttpNetworkConnectionChannel::_q_uploadDataReadyRead()
+ {
+- sendRequest();
++ if (reply && state == QHttpNetworkConnectionChannel::WritingState) {
++ // There might be timing issues, make sure to only send upload data if really in that state
++ sendRequest();
++ }
+ }
+
+ #ifndef QT_NO_OPENSSL
+diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h
+index 7648325..9dd0deb 100644
+--- a/src/network/access/qhttpthreaddelegate_p.h
++++ b/src/network/access/qhttpthreaddelegate_p.h
+@@ -190,6 +190,7 @@ protected:
+ QByteArray m_dataArray;
+ bool m_atEnd;
+ qint64 m_size;
++ qint64 m_pos; // to match calls of haveDataSlot with the expected position
+ public:
+ QNonContiguousByteDeviceThreadForwardImpl(bool aE, qint64 s)
+ : QNonContiguousByteDevice(),
+@@ -197,7 +198,8 @@ public:
+ m_amount(0),
+ m_data(0),
+ m_atEnd(aE),
+- m_size(s)
++ m_size(s),
++ m_pos(0)
+ {
+ }
+
+@@ -205,6 +207,11 @@ public:
+ {
+ }
+
++ qint64 pos()
++ {
++ return m_pos;
++ }
++
+ const char* readPointer(qint64 maximumLength, qint64 &len)
+ {
+ if (m_amount > 0) {
+@@ -232,11 +239,10 @@ public:
+
+ m_amount -= a;
+ m_data += a;
++ m_pos += a;
+
+- // To main thread to inform about our state
+- emit processedData(a);
+-
+- // FIXME possible optimization, already ask user thread for some data
++ // To main thread to inform about our state. The m_pos will be sent as a sanity check.
++ emit processedData(m_pos, a);
+
+ return true;
+ }
+@@ -253,10 +259,21 @@ public:
+ {
+ m_amount = 0;
+ m_data = 0;
++ m_dataArray.clear();
++
++ if (wantDataPending) {
++ // had requested the user thread to send some data (only 1 in-flight at any moment)
++ wantDataPending = false;
++ }
+
+ // Communicate as BlockingQueuedConnection
+ bool b = false;
+ emit resetData(&b);
++ if (b) {
++ // the reset succeeded, we're at pos 0 again
++ m_pos = 0;
++ // the HTTP code will anyway abort the request if !b.
++ }
+ return b;
+ }
+
+@@ -267,8 +284,13 @@ public:
+
+ public slots:
+ // From user thread:
+- void haveDataSlot(QByteArray dataArray, bool dataAtEnd, qint64 dataSize)
++ void haveDataSlot(qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize)
+ {
++ if (pos != m_pos) {
++ // Sometimes when re-sending a request in the qhttpnetwork* layer there is a pending haveData from the
++ // user thread on the way to us. We need to ignore it since it is the data for the wrong(later) chunk.
++ return;
++ }
+ wantDataPending = false;
+
+ m_dataArray = dataArray;
+@@ -288,7 +310,7 @@ signals:
+
+ // to main thread:
+ void wantData(qint64);
+- void processedData(qint64);
++ void processedData(qint64 pos, qint64 amount);
+ void resetData(bool *b);
+ };
+
+diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
+index cc67258..fe2f627 100644
+--- a/src/network/access/qnetworkaccesshttpbackend.cpp
++++ b/src/network/access/qnetworkaccesshttpbackend.cpp
+@@ -193,6 +193,7 @@ QNetworkAccessHttpBackendFactory::create(QNetworkAccessManager::Operation op,
+ QNetworkAccessHttpBackend::QNetworkAccessHttpBackend()
+ : QNetworkAccessBackend()
+ , statusCode(0)
++ , uploadByteDevicePosition(false)
+ , pendingDownloadDataEmissions(new QAtomicInt())
+ , pendingDownloadProgressEmissions(new QAtomicInt())
+ , loadingFromCache(false)
+@@ -610,9 +611,9 @@ void QNetworkAccessHttpBackend::postRequest()
+ forwardUploadDevice->setParent(delegate); // needed to make sure it is moved on moveToThread()
+ delegate->httpRequest.setUploadByteDevice(forwardUploadDevice);
+
+- // From main thread to user thread:
+- QObject::connect(this, SIGNAL(haveUploadData(QByteArray, bool, qint64)),
+- forwardUploadDevice, SLOT(haveDataSlot(QByteArray, bool, qint64)), Qt::QueuedConnection);
++ // From user thread to http thread:
++ QObject::connect(this, SIGNAL(haveUploadData(qint64,QByteArray,bool,qint64)),
++ forwardUploadDevice, SLOT(haveDataSlot(qint64,QByteArray,bool,qint64)), Qt::QueuedConnection);
+ QObject::connect(uploadByteDevice.data(), SIGNAL(readyRead()),
+ forwardUploadDevice, SIGNAL(readyRead()),
+ Qt::QueuedConnection);
+@@ -620,8 +621,8 @@ void QNetworkAccessHttpBackend::postRequest()
+ // From http thread to user thread:
+ QObject::connect(forwardUploadDevice, SIGNAL(wantData(qint64)),
+ this, SLOT(wantUploadDataSlot(qint64)));
+- QObject::connect(forwardUploadDevice, SIGNAL(processedData(qint64)),
+- this, SLOT(sentUploadDataSlot(qint64)));
++ QObject::connect(forwardUploadDevice,SIGNAL(processedData(qint64, qint64)),
++ this, SLOT(sentUploadDataSlot(qint64,qint64)));
+ connect(forwardUploadDevice, SIGNAL(resetData(bool*)),
+ this, SLOT(resetUploadDataSlot(bool*)),
+ Qt::BlockingQueuedConnection); // this is the only one with BlockingQueued!
+@@ -915,12 +916,21 @@ void QNetworkAccessHttpBackend::replySslConfigurationChanged(const QSslConfigura
+ void QNetworkAccessHttpBackend::resetUploadDataSlot(bool *r)
+ {
+ *r = uploadByteDevice->reset();
++ if (*r) {
++ // reset our own position which is used for the inter-thread communication
++ uploadByteDevicePosition = 0;
++ }
+ }
+
+ // Coming from QNonContiguousByteDeviceThreadForwardImpl in HTTP thread
+-void QNetworkAccessHttpBackend::sentUploadDataSlot(qint64 amount)
++void QNetworkAccessHttpBackend::sentUploadDataSlot(qint64 pos, qint64 amount)
+ {
++ if (uploadByteDevicePosition + amount != pos) {
++ // Sanity check, should not happen.
++ error(QNetworkReply::UnknownNetworkError, "");
++ }
+ uploadByteDevice->advanceReadPointer(amount);
++ uploadByteDevicePosition += amount;
+ }
+
+ // Coming from QNonContiguousByteDeviceThreadForwardImpl in HTTP thread
+@@ -933,7 +943,7 @@ void QNetworkAccessHttpBackend::wantUploadDataSlot(qint64 maxSize)
+ QByteArray dataArray(data, currentUploadDataLength);
+
+ // Communicate back to HTTP thread
+- emit haveUploadData(dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size());
++ emit haveUploadData(uploadByteDevicePosition, dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size());
+ }
+
+ /*
+diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h
+index 13519c6..b4ed67c 100644
+--- a/src/network/access/qnetworkaccesshttpbackend_p.h
++++ b/src/network/access/qnetworkaccesshttpbackend_p.h
+@@ -112,7 +112,7 @@ signals:
+
+ void startHttpRequestSynchronously();
+
+- void haveUploadData(QByteArray dataArray, bool dataAtEnd, qint64 dataSize);
++ void haveUploadData(const qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize);
+ private slots:
+ // From HTTP thread:
+ void replyDownloadData(QByteArray);
+@@ -129,13 +129,14 @@ private slots:
+ // From QNonContiguousByteDeviceThreadForwardImpl in HTTP thread:
+ void resetUploadDataSlot(bool *r);
+ void wantUploadDataSlot(qint64);
+- void sentUploadDataSlot(qint64);
++ void sentUploadDataSlot(qint64, qint64);
+
+ bool sendCacheContents(const QNetworkCacheMetaData &metaData);
+
+ private:
+ QHttpNetworkRequest httpRequest; // There is also a copy in the HTTP thread
+ int statusCode;
++ qint64 uploadByteDevicePosition;
+ QString reasonPhrase;
+ // Will be increased by HTTP thread:
+ QSharedPointer<QAtomicInt> pendingDownloadDataEmissions;
+
diff --git a/dev-qt/qtcore/metadata.xml b/dev-qt/qtcore/metadata.xml
new file mode 100644
index 0000000..3856b33
--- /dev/null
+++ b/dev-qt/qtcore/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>qt@gentoo.org</email>
+ <name>Gentoo Qt Project</name>
+ </maintainer>
+ <use>
+ <flag name="exceptions">Add support for exceptions - like catching them
+ inside the event loop (recommended by upstream)</flag>
+ <flag name="glib">Enable <pkg>dev-libs/glib</pkg> eventloop support</flag>
+ <flag name="qt3support">Enable the Qt3Support libraries for Qt4. Note that
+ this does not mean you can compile pure Qt3 programs with Qt4.</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtcore/qtcore-4.8.6.ebuild b/dev-qt/qtcore/qtcore-4.8.6.ebuild
new file mode 100644
index 0000000..b540a51
--- /dev/null
+++ b/dev-qt/qtcore/qtcore-4.8.6.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="Cross-platform application development framework"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+glib iconv icu libressl qt3support ssl"
+
+DEPEND="
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
+ iconv? ( >=virtual/libiconv-0-r2[${MULTILIB_USEDEP}] )
+ icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
+ )
+"
+RDEPEND="${DEPEND}"
+PDEPEND="
+ ~dev-qt/qttranslations-${PV}
+ qt3support? ( ~dev-qt/qtgui-${PV}[aqua=,debug=,glib=,qt3support,${MULTILIB_USEDEP}] )
+"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/qt4/Qt/qconfig.h
+ /usr/include/qt4/QtCore/qconfig.h
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.5-moc-boost-lexical-cast.patch"
+ "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.5-libressl.patch"
+ "${FILESDIR}/${PN}-4.8.6-QNAM-corruptions-fix.patch" # bug 548622
+)
+
+QT4_TARGET_DIRECTORIES="
+ src/tools/bootstrap
+ src/tools/moc
+ src/tools/rcc
+ src/tools/uic
+ src/corelib
+ src/network
+ src/xml
+ src/plugins/codecs/cn
+ src/plugins/codecs/jp
+ src/plugins/codecs/kr
+ src/plugins/codecs/tw
+ tools/linguist/lconvert
+ tools/linguist/lrelease
+ tools/linguist/lupdate"
+
+QCONFIG_DEFINE="QT_ZLIB"
+
+src_prepare() {
+ qt4-build-multilib_src_prepare
+
+ # bug 172219
+ sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
+ -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
+ qmake/Makefile.unix || die "sed qmake/Makefile.unix failed"
+
+ # bug 427782
+ sed -i -e '/^CPPFLAGS\s*=/ s/-g //' \
+ qmake/Makefile.unix || die "sed CPPFLAGS in qmake/Makefile.unix failed"
+ sed -i -e 's/setBootstrapVariable QMAKE_CFLAGS_RELEASE/QMakeVar set QMAKE_CFLAGS_RELEASE/' \
+ -e 's/setBootstrapVariable QMAKE_CXXFLAGS_RELEASE/QMakeVar set QMAKE_CXXFLAGS_RELEASE/' \
+ configure || die "sed configure setBootstrapVariable failed"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl -no-openvg
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ $(qt_use glib)
+ $(qt_use iconv)
+ $(qt_use icu)
+ $(use ssl && echo -openssl-linked || echo -no-openssl)
+ $(qt_use qt3support)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtcore/qtcore-4.8.7.ebuild b/dev-qt/qtcore/qtcore-4.8.7.ebuild
new file mode 100644
index 0000000..712a55f
--- /dev/null
+++ b/dev-qt/qtcore/qtcore-4.8.7.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt4-build-multilib
+
+DESCRIPTION="Cross-platform application development framework"
+
+if [[ ${QT4_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+fi
+
+IUSE="+glib iconv icu libressl qt3support ssl"
+
+DEPEND="
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+ glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
+ iconv? ( >=virtual/libiconv-0-r2[${MULTILIB_USEDEP}] )
+ icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
+ ssl? (
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
+ )
+"
+RDEPEND="${DEPEND}"
+PDEPEND="
+ ~dev-qt/qttranslations-${PV}
+ qt3support? ( ~dev-qt/qtgui-${PV}[aqua=,debug=,glib=,qt3support,${MULTILIB_USEDEP}] )
+"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/qt4/Qt/qconfig.h
+ /usr/include/qt4/QtCore/qconfig.h
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.8.5-moc-boost-lexical-cast.patch"
+ "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968
+ "${FILESDIR}/${PN}-4.8.5-libressl.patch"
+)
+
+QT4_TARGET_DIRECTORIES="
+ src/tools/bootstrap
+ src/tools/moc
+ src/tools/rcc
+ src/tools/uic
+ src/corelib
+ src/network
+ src/xml
+ src/plugins/codecs/cn
+ src/plugins/codecs/jp
+ src/plugins/codecs/kr
+ src/plugins/codecs/tw
+ tools/linguist/lconvert
+ tools/linguist/lrelease
+ tools/linguist/lupdate"
+
+QCONFIG_DEFINE="QT_ZLIB"
+
+src_prepare() {
+ qt4-build-multilib_src_prepare
+
+ # bug 172219
+ sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \
+ -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \
+ qmake/Makefile.unix || die "sed qmake/Makefile.unix failed"
+
+ # bug 427782
+ sed -i -e '/^CPPFLAGS\s*=/ s/-g //' \
+ qmake/Makefile.unix || die "sed CPPFLAGS in qmake/Makefile.unix failed"
+ sed -i -e 's/setBootstrapVariable QMAKE_CFLAGS_RELEASE/QMakeVar set QMAKE_CFLAGS_RELEASE/' \
+ -e 's/setBootstrapVariable QMAKE_CXXFLAGS_RELEASE/QMakeVar set QMAKE_CXXFLAGS_RELEASE/' \
+ configure || die "sed configure setBootstrapVariable failed"
+}
+
+multilib_src_configure() {
+ local myconf=(
+ -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon
+ -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative
+ -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg
+ -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl -no-openvg
+ -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes
+ -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb
+ $(qt_use glib)
+ $(qt_use iconv)
+ $(qt_use icu)
+ $(use ssl && echo -openssl-linked || echo -no-openssl)
+ $(qt_use qt3support)
+ )
+ qt4_multilib_src_configure
+}
diff --git a/dev-qt/qtnetwork/Manifest b/dev-qt/qtnetwork/Manifest
new file mode 100644
index 0000000..f430aad
--- /dev/null
+++ b/dev-qt/qtnetwork/Manifest
@@ -0,0 +1 @@
+DIST qtbase-opensource-src-5.5.1.tar.xz 46389212 SHA256 dfa4e8a4d7e4c6b69285e7e8833eeecd819987e1bdbe5baa6b6facd4420de916 SHA512 4d31de136870025dfb7544f255798884af1ad4f3060b0c00a0467c98af1f7de368eb298d4c52ba6d1ad27e36060b30c0314ce7ba0744b15642420ec89587a575 WHIRLPOOL 8975a54a720105d1b12b4f50072b98157f6a91020ecd7bad12ab4a92b7ac4663713a82e87f033cc6ad49602a5f9468c6d3ee23120be6c15d63e55ea0b5a343c4
diff --git a/dev-qt/qtnetwork/files/0001-Fix-compilation-with-libressl.patch b/dev-qt/qtnetwork/files/0001-Fix-compilation-with-libressl.patch
new file mode 100644
index 0000000..c49be2f
--- /dev/null
+++ b/dev-qt/qtnetwork/files/0001-Fix-compilation-with-libressl.patch
@@ -0,0 +1,36 @@
+From 81494e67eccba04fc3fe554d76a9ca6fe7f2250e Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sat, 10 Oct 2015 01:15:01 +0200
+Subject: [PATCH] Fix compilation with libressl
+
+By additionally checking for defined(SSL_CTRL_SET_CURVES), which
+is defined in openssl, but not in libressl.
+---
+ src/network/ssl/qsslcontext_openssl.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
+index b88ab54..cfc4f6d 100644
+--- a/src/network/ssl/qsslcontext_openssl.cpp
++++ b/src/network/ssl/qsslcontext_openssl.cpp
+@@ -338,7 +338,7 @@ init_context:
+
+ const QVector<QSslEllipticCurve> qcurves = sslContext->sslConfiguration.ellipticCurves();
+ if (!qcurves.isEmpty()) {
+-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
+ // Set the curves to be used
+ if (q_SSLeay() >= 0x10002000L) {
+ // SSL_CTX_ctrl wants a non-const pointer as last argument,
+@@ -352,7 +352,7 @@ init_context:
+ return sslContext;
+ }
+ } else
+-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(OPENSSL_NO_EC)
++#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L && defined(SSL_CTRL_SET_CURVES) && !defined(OPENSSL_NO_EC)
+ {
+ // specific curves requested, but not possible to set -> error
+ sslContext->errorStr = msgErrorSettingEllipticCurves(QSslSocket::tr("OpenSSL version too old, need at least v1.0.2"));
+--
+2.6.0
+
diff --git a/dev-qt/qtnetwork/files/qtnetwork-5.5-socklen_t.patch b/dev-qt/qtnetwork/files/qtnetwork-5.5-socklen_t.patch
new file mode 100644
index 0000000..dd8c335
--- /dev/null
+++ b/dev-qt/qtnetwork/files/qtnetwork-5.5-socklen_t.patch
@@ -0,0 +1,40 @@
+From 813f468a14fb84af43c1f8fc0a1430277358eba2 Mon Sep 17 00:00:00 2001
+From: Dave Flogeras <dflogeras2@gmail.com>
+Date: Tue, 29 Sep 2015 08:52:31 -0300
+Subject: [PATCH] Fix for platform socklen_t on other C libraries than glibc.
+
+Rather than treating >=glibc-2 specially, we treat <glibc-2 specially
+and all other libc implementations as POSIX.
+
+This was found here http://patchwork.openembedded.org/patch/94947/ and
+tested with armv6j-hardfloat-linux-uclibceabi and
+armv6j-hardfloat-linux-musleabi.
+
+Change-Id: I3850b1561a2e240f6564afedd80ce39407cc50b6
+Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+---
+ mkspecs/linux-g++/qplatformdefs.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
+index 5c18632..95a5758 100644
+--- a/mkspecs/linux-g++/qplatformdefs.h
++++ b/mkspecs/linux-g++/qplatformdefs.h
+@@ -78,10 +78,10 @@
+
+ #undef QT_SOCKLEN_T
+
+-#if defined(__GLIBC__) && (__GLIBC__ >= 2)
+-#define QT_SOCKLEN_T socklen_t
+-#else
++#if defined(__GLIBC__) && (__GLIBC__ < 2)
+ #define QT_SOCKLEN_T int
++#else
++#define QT_SOCKLEN_T socklen_t
+ #endif
+
+ #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)
+--
+2.6.0
+
diff --git a/dev-qt/qtnetwork/metadata.xml b/dev-qt/qtnetwork/metadata.xml
new file mode 100644
index 0000000..b36ecbc
--- /dev/null
+++ b/dev-qt/qtnetwork/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>qt@gentoo.org</email>
+ <name>Gentoo Qt Project</name>
+ </maintainer>
+ <use>
+ <flag name="bindist">Disable EC support via <pkg>dev-libs/openssl</pkg></flag>
+ <flag name="connman">Enable <pkg>net-misc/connman</pkg>-based bearer plugin</flag>
+ <flag name="libproxy">Use <pkg>net-libs/libproxy</pkg> for automatic
+ HTTP/SOCKS proxy configuration</flag>
+ <flag name="networkmanager">Enable <pkg>net-misc/networkmanager</pkg>-based
+ bearer plugin</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://bugreports.qt.io/</bugs-to>
+ <doc>http://doc.qt.io/</doc>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-qt/qtnetwork/qtnetwork-5.5.1.ebuild b/dev-qt/qtnetwork/qtnetwork-5.5.1.ebuild
new file mode 100644
index 0000000..f5b64d6
--- /dev/null
+++ b/dev-qt/qtnetwork/qtnetwork-5.5.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+QT5_MODULE="qtbase"
+inherit qt5-build
+
+DESCRIPTION="Network abstraction library for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="bindist connman libproxy libressl networkmanager +ssl"
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+ >=sys-libs/zlib-1.2.5
+ connman? ( ~dev-qt/qtdbus-${PV} )
+ libproxy? ( net-libs/libproxy )
+ networkmanager? ( ~dev-qt/qtdbus-${PV} )
+ ssl? ( !libressl? ( dev-libs/openssl:0[bindist=] )
+ libressl? ( dev-libs/libressl ) )
+"
+RDEPEND="${DEPEND}
+ connman? ( net-misc/connman )
+ networkmanager? ( net-misc/networkmanager )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-5.5-socklen_t.patch" # bug 554556
+ "${FILESDIR}/0001-Fix-compilation-with-libressl.patch" # 562050
+)
+
+QT5_TARGET_SUBDIRS=(
+ src/network
+ src/plugins/bearer/generic
+)
+
+QT5_GENTOO_CONFIG=(
+ libproxy
+ ssl::SSL
+ ssl::OPENSSL
+ ssl:openssl-linked:LINKED_OPENSSL
+)
+
+pkg_setup() {
+ use connman && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/connman)
+ use networkmanager && QT5_TARGET_SUBDIRS+=(src/plugins/bearer/networkmanager)
+}
+
+src_configure() {
+ local myconf=(
+ $(use connman || use networkmanager && echo -dbus-linked)
+ $(qt_use libproxy)
+ $(use ssl && echo -openssl-linked)
+ )
+ qt5-build_src_configure
+}
diff --git a/net-mail/fetchmail/Manifest b/net-mail/fetchmail/Manifest
new file mode 100644
index 0000000..3f09115
--- /dev/null
+++ b/net-mail/fetchmail/Manifest
@@ -0,0 +1 @@
+DIST fetchmail-6.3.26.tar.xz 1283816 SHA256 79b4c54cdbaf02c1a9a691d9948fcb1a77a1591a813e904283a8b614b757e850 SHA512 8e0a2484e60eaf6c0231e2599e10fec6d207fa1c0fa02ec99b3ef9aea00b6d87275434e79470a25f06e358cdd4a293f9c46a82dd128fe733a99c85144e6caa63 WHIRLPOOL 275d7b121a7fcec239e074d2dadc8d1645633d7f8335d760ceba98042b8b3bfe67cdacb9e247a072a8c587f821b23f89c1c7e654fd171ad4372dbb69bcf1021a
diff --git a/net-mail/fetchmail/fetchmail-6.3.26.ebuild b/net-mail/fetchmail/fetchmail-6.3.26.ebuild
new file mode 100644
index 0000000..5412a7c
--- /dev/null
+++ b/net-mail/fetchmail/fetchmail-6.3.26.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="tk"
+
+inherit python-single-r1 user systemd toolchain-funcs autotools eutils
+
+DESCRIPTION="the legendary remote-mail retrieval and forwarding utility"
+HOMEPAGE="http://www.fetchmail.info/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="ssl nls kerberos hesiod tk socks libressl"
+REQUIRED_USE="tk? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="hesiod? ( net-dns/hesiod )
+ ssl? ( !libressl? ( dev-libs/openssl:* )
+ libressl? ( dev-libs/libressl ) )
+ kerberos? ( virtual/krb5
+ !libressl? ( dev-libs/openssl:* )
+ libressl? ( dev-libs/libressl ) )
+ nls? ( virtual/libintl )
+ !elibc_glibc? ( sys-libs/e2fsprogs-libs )
+ socks? ( net-proxy/dante )
+ tk? ( ${PYTHON_DEPS} )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ sys-devel/flex
+ nls? ( sys-devel/gettext )"
+
+DOCS="FAQ FEATURES NEWS NOTES README README.NTLM README.SSL* TODO"
+
+pkg_setup() {
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+
+ use tk && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # don't compile during src_install
+ use tk && : > "${S}"/py-compile
+
+ epatch "${FILESDIR}"/${P}-python-optional.patch
+ epatch "${FILESDIR}"/${P}-tests.patch
+ epatch "${FILESDIR}"/${P}-libressl.patch
+ eautoreconf
+}
+
+src_configure() {
+ use tk || export PYTHON=:
+
+ econf \
+ --enable-RPA \
+ --enable-NTLM \
+ --enable-SDPS \
+ $(use_enable nls) \
+ $(use_with ssl ssl "${EPREFIX}/usr") \
+ $(use kerberos && echo "--with-ssl=${EPREFIX}/usr") \
+ $(use_with kerberos gssapi) \
+ $(use_with kerberos kerberos5) \
+ $(use_with hesiod) \
+ $(use_with socks)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ # fetchmail's homedir (holds fetchmail's .fetchids)
+ keepdir /var/lib/${PN}
+ fowners ${PN}:${PN} /var/lib/${PN}
+ fperms 700 /var/lib/${PN}
+
+ default
+
+ dohtml *.html
+
+ newinitd "${FILESDIR}"/fetchmail.initd fetchmail
+ newconfd "${FILESDIR}"/fetchmail.confd fetchmail
+ systemd_dounit "${FILESDIR}"/${PN}.service
+ systemd_dotmpfilesd "${FILESDIR}"/${PN}.conf
+
+ docinto contrib
+ local f
+ for f in contrib/* ; do
+ [ -f "${f}" ] && dodoc "${f}"
+ done
+
+ use tk && python_optimize
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "Please see /etc/conf.d/fetchmail if you want to adjust"
+ elog "the polling delay used by the fetchmail init script."
+ fi
+}
diff --git a/net-mail/fetchmail/files/fetchmail-6.3.26-libressl.patch b/net-mail/fetchmail/files/fetchmail-6.3.26-libressl.patch
new file mode 100644
index 0000000..dbbed87
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail-6.3.26-libressl.patch
@@ -0,0 +1,117 @@
+--- a/configure.ac 2013-04-23 16:51:10.000000000 -0400
++++ b/configure.ac 2016-01-30 00:14:01.114090572 -0500
+@@ -803,6 +803,7 @@
+
+ case "$LIBS" in *-lssl*)
+ AC_CHECK_DECLS([SSLv2_client_method],,,[#include <openssl/ssl.h>])
++ AC_CHECK_DECLS([SSLv3_client_method],,,[#include <openssl/ssl.h>])
+ ;;
+ esac
+
+--- a/po/de.po 2013-04-23 17:33:52.000000000 -0400
++++ b/po/de.po 2016-01-30 00:25:00.255287974 -0500
+@@ -8,8 +8,8 @@
+ msgstr ""
+ "Project-Id-Version: fetchmail 6.3.26\n"
+ "Report-Msgid-Bugs-To: fetchmail-devel@lists.berlios.de\n"
+-"POT-Creation-Date: 2013-04-23 23:24+0200\n"
+-"PO-Revision-Date: 2013-04-23 23:33+0200\n"
++"POT-Creation-Date: 2015-01-16 20:42+0100\n"
++"PO-Revision-Date: 2016-01-30 00:23-0500\n"
+ "Last-Translator: Matthias Andree <matthias.andree@gmx.de>\n"
+ "Language-Team: Deutsch <de@li.org>\n"
+ "Language: \n"
+@@ -3198,20 +3198,24 @@
+ msgstr "Datei-Deskriptor außerhalb des Bereichs für SSL"
+
+ #: socket.c:913
+-msgid "Your operating system does not support SSLv2.\n"
+-msgstr "Ihr Betriebssystem unterstützt SSLv2 nicht.\n"
++msgid "Your OpenSSL version does not support SSLv2.\n"
++msgstr "Ihre OpenSSL-Version unterstützt SSLv2 nicht.\n"
+
+-#: socket.c:923
++#: socket.c:920
++msgid "Your OpenSSL version does not support SSLv3.\n"
++msgstr "Ihre OpenSSL-Version unterstützt SSLv3 nicht.\n"
++
++#: socket.c:928
+ #, c-format
+ msgid "Invalid SSL protocol '%s' specified, using default (SSLv23).\n"
+ msgstr ""
+ "Ungültiges SSL-Protokoll „%s“ angegeben, benutze Voreinstellung (SSLv23).\n"
+
+-#: socket.c:1022
++#: socket.c:1027
+ msgid "Certificate/fingerprint verification was somehow skipped!\n"
+ msgstr "Zertifikat-/Fingerabdruck-Überprüfung wurde irgendwie übersprungen!\n"
+
+-#: socket.c:1039
++#: socket.c:1044
+ msgid ""
+ "Warning: the connection is insecure, continuing anyways. (Better use --"
+ "sslcertck!)\n"
+@@ -3219,11 +3223,11 @@
+ "Warnung: Die Verbindung ist unsicher, mache trotzdem weiter. (Nehmen Sie "
+ "lieber --sslcertck!)\n"
+
+-#: socket.c:1081
++#: socket.c:1086
+ msgid "Cygwin socket read retry\n"
+ msgstr "Cygwin-Socket-Lese-Wiederholung\n"
+
+-#: socket.c:1084
++#: socket.c:1089
+ msgid "Cygwin socket read retry failed!\n"
+ msgstr "Cygwin-Socket-Lese-Wiederholung fehlgeschlagen!\n"
+
+--- a/fetchmail.c 2013-04-23 16:00:45.000000000 -0400
++++ b/fetchmail.c 2016-01-30 00:16:26.104294447 -0500
+@@ -54,6 +54,10 @@
+ #define ENETUNREACH 128 /* Interactive doesn't know this */
+ #endif /* ENETUNREACH */
+
++#ifdef SSL_ENABLE
++#include <openssl/ssl.h> /* for OPENSSL_NO_SSL2 and ..._SSL3 checks */
++#endif
++
+ /* prototypes for internal functions */
+ static int load_params(int, char **, int);
+ static void dump_params (struct runctl *runp, struct query *, flag implicit);
+@@ -263,6 +267,12 @@
+ #ifdef SSL_ENABLE
+ "+SSL"
+ #endif
++#if HAVE_DECL_SSLV2_CLIENT_METHOD + 0 == 0
++ "-SSLv2"
++#endif
++#if HAVE_DECL_SSLV3_CLIENT_METHOD + 0 == 0
++ "-SSLv3"
++#endif
+ #ifdef OPIE_ENABLE
+ "+OPIE"
+ #endif /* OPIE_ENABLE */
+--- a/socket.c 2013-04-23 16:00:45.000000000 -0400
++++ b/socket.c 2016-01-30 00:28:26.718678785 -0500
+@@ -907,14 +907,19 @@
+ _ssl_context[sock] = NULL;
+ if(myproto) {
+ if(!strcasecmp("ssl2",myproto)) {
+-#if HAVE_DECL_SSLV2_CLIENT_METHOD + 0 > 0
++#if (HAVE_DECL_SSLV2_CLIENT_METHOD + 0 > 0) && (0 == OPENSSL_NO_SSL2 + 0)
+ _ctx[sock] = SSL_CTX_new(SSLv2_client_method());
+ #else
+- report(stderr, GT_("Your operating system does not support SSLv2.\n"));
++ report(stderr, GT_("Your OpenSSL version does not support SSLv2.\n"));
+ return -1;
+ #endif
+ } else if(!strcasecmp("ssl3",myproto)) {
++#if (HAVE_DECL_SSLV3_CLIENT_METHOD + 0 > 0) && (0 == OPENSSL_NO_SSL3 + 0)
+ _ctx[sock] = SSL_CTX_new(SSLv3_client_method());
++#else
++ report(stderr, GT_("Your OpenSSL version does not support SSLv3.\n"));
++ return -1;
++#endif
+ } else if(!strcasecmp("tls1",myproto)) {
+ _ctx[sock] = SSL_CTX_new(TLSv1_client_method());
+ } else if (!strcasecmp("ssl23",myproto)) {
diff --git a/net-mail/fetchmail/files/fetchmail-6.3.26-python-optional.patch b/net-mail/fetchmail/files/fetchmail-6.3.26-python-optional.patch
new file mode 100644
index 0000000..2eafe4d
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail-6.3.26-python-optional.patch
@@ -0,0 +1,14 @@
+--- fetchmail-6.3.26/Makefile.am
++++ fetchmail-6.3.26/Makefile.am
+@@ -16,9 +16,11 @@
+ pys= fetchmailconf.py
+ pym= fetchmailconf.man
+
++if HAVE_PYTHON
+ nodist_bin_SCRIPTS= fetchmailconf
+ python_PYTHON= $(pys)
+ dist_man1_MANS+= $(pym)
++endif
+
+ CLEANFILES= $(nodist_bin_SCRIPTS)
+
diff --git a/net-mail/fetchmail/files/fetchmail-6.3.26-tests.patch b/net-mail/fetchmail/files/fetchmail-6.3.26-tests.patch
new file mode 100644
index 0000000..a0b3e8b
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail-6.3.26-tests.patch
@@ -0,0 +1,11 @@
+--- fetchmail-6.3.26/Makefile.am
++++ fetchmail-6.3.26/Makefile.am
+@@ -45,7 +47,7 @@
+ check_PROGRAMS=
+
+ TESTS= t.smoke t.validate-xhtml10 t.validate-xhtml t.x509_name_match
+-TESTS_ENVIRONMENT= srcdir="$(srcdir)" LC_ALL=C TZ=UTC SHELL="$(SHELL)" $(SHELL)
++TESTS_ENVIRONMENT= srcdir="$(srcdir)" LC_ALL=C TZ=UTC SHELL="$(SHELL)"
+
+ if NEED_TRIO
+ noinst_LIBRARIES+= libtrio.a
diff --git a/net-mail/fetchmail/files/fetchmail.conf b/net-mail/fetchmail/files/fetchmail.conf
new file mode 100644
index 0000000..07945f8
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail.conf
@@ -0,0 +1 @@
+d /run/fetchmail 700 fetchmail nobody
diff --git a/net-mail/fetchmail/files/fetchmail.confd b/net-mail/fetchmail/files/fetchmail.confd
new file mode 100644
index 0000000..a5d0b74
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail.confd
@@ -0,0 +1,10 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Polling frequency in seconds
+# (fetchmail will daemonize and check for new mail at this interval)
+polling_period="60"
+
+# Directory where the pid file is kept
+pid_dir="/var/run/fetchmail"
diff --git a/net-mail/fetchmail/files/fetchmail.initd b/net-mail/fetchmail/files/fetchmail.initd
new file mode 100644
index 0000000..889bcb6
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail.initd
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+
+piddir=${pid_dir:-/var/run/fetchmail}
+pid_file=${piddir}/${RC_SVCNAME}.pid
+rcfile=/etc/${RC_SVCNAME}rc
+
+depend() {
+ need net
+ use mta
+}
+
+checkconfig() {
+ if [ ! -f ${rcfile} ]; then
+ eerror "Configuration file ${rcfile} not found"
+ return 1
+ fi
+ local fetchmail_instance
+ fetchmail_instance=${RC_SVCNAME##*.}
+ if [ -n "${fetchmail_instance}" -a "${RC_SVCNAME}" != "fetchmail" ]; then
+ fidfile=/var/lib/fetchmail/.fetchids.${RC_SVCNAME}
+ else
+ fidfile=/var/lib/fetchmail/.fetchids
+ fi
+ if [ ! -d ${piddir} ]; then
+ checkpath -q -d -o fetchmail:fetchmail -m 0755 ${piddir} || return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${RC_SVCNAME}"
+ start-stop-daemon --start --pidfile ${pid_file} \
+ --user fetchmail --exec /usr/bin/fetchmail \
+ -- -d ${polling_period} -f ${rcfile} \
+ --pidfile ${pid_file} -i ${fidfile}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile ${pid_file}
+ eend ${?}
+}
+
diff --git a/net-mail/fetchmail/files/fetchmail.service b/net-mail/fetchmail/files/fetchmail.service
new file mode 100644
index 0000000..954f06e
--- /dev/null
+++ b/net-mail/fetchmail/files/fetchmail.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=A remote-mail retrieval utility
+After=network.target
+
+[Service]
+User=fetchmail
+ExecStart=/usr/bin/fetchmail -d 60 -f /etc/fetchmailrc
+RestartSec=1
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-mail/fetchmail/metadata.xml b/net-mail/fetchmail/metadata.xml
new file mode 100644
index 0000000..f94033e
--- /dev/null
+++ b/net-mail/fetchmail/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>net-mail@gentoo.org</email>
+ <name>Net-Mail</name>
+ </maintainer>
+ <use>
+ <flag name="hesiod">Enable support for hesiod</flag>
+ <flag name="tk">Enable support for Tk GUI toolkit, in particular it installs fetchmailconf</flag>
+ <flag name="socks">Enable support for socks proxy</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">fetchmail</remote-id>
+ </upstream>
+</pkgmetadata>