aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Belsito <lluixhi@gmail.com>2017-05-26 10:32:50 -0700
committerAric Belsito <lluixhi@gmail.com>2017-05-26 10:32:50 -0700
commitc0682ce0cce6f5dd55da71c9b445dd137147aa0a (patch)
tree517bd778bc402770c172ceea108863c1fb845d07
parentmedia-sound/ncmpcpp: remove id field (diff)
downloadmusl-c0682ce0cce6f5dd55da71c9b445dd137147aa0a.tar.gz
musl-c0682ce0cce6f5dd55da71c9b445dd137147aa0a.tar.bz2
musl-c0682ce0cce6f5dd55da71c9b445dd137147aa0a.zip
dev-libs/icu: version bump to 58.2-r1
-rw-r--r--dev-libs/icu/Manifest6
-rw-r--r--dev-libs/icu/files/icu-58.2-CVE-2017-7867.patch155
-rw-r--r--dev-libs/icu/icu-58.1-r1.ebuild21
-rw-r--r--dev-libs/icu/icu-58.2-r1.ebuild159
-rw-r--r--dev-libs/icu/icu-58.2.ebuild19
5 files changed, 353 insertions, 7 deletions
diff --git a/dev-libs/icu/Manifest b/dev-libs/icu/Manifest
index eadde474..c6bd4334 100644
--- a/dev-libs/icu/Manifest
+++ b/dev-libs/icu/Manifest
@@ -1,9 +1,11 @@
AUX icu-58.1-iterator.patch 4097 SHA256 468bba2185584c30a5b096d7c85d0afa739067594f0883b6f8f448b1bf996801 SHA512 46c51629fb5ff14cdfcbc355bff6cceb7132fc79176ec7fcf76bd9ac8553fccbf6528508753b73a0a4301721260ad60a359bf56c66e3bd0151415a4a226ff21c WHIRLPOOL 4268216dad6ed8a2ce3e00cb1a9d7e7a8bcb2922ce1f02b5f50d07632a843d1bb8e1dea9710acff1cbc943a41940c22fc453faafe39fa3bb8bad068d0ca01588
AUX icu-58.1-no-xlocale.patch 465 SHA256 ead33ba16d6fb9cabb77c4ee8b13390f8ac925ab40568053f136254f05985369 SHA512 60833baee65232a5312baff4a7221d215af05596ae4aa3372ff0bf3190f37f5a6c5597a4b0f40a20da0303a216927141174ff1bfd22c85ca63d9e46c8ed2eb12 WHIRLPOOL f8ee2a29415624d1b50bd5c7378c618539e77c6ef8b15d53e60fdab3db9ecea30effeab083acbee428183db94f413024706d70150cd14afdbdb5295c7f596706
AUX icu-58.1-remove-bashisms.patch 5888 SHA256 8a2177d5f549168d5680d6477381a9f6f5ca0bd8f6bd23cc30d7f953e10907bc SHA512 54835db4db5bca704aed015a911a1f5285fbd3f6d09493cdcf98493d87a03851c9ee79cc9cbcb45da409513ad5b3af38b302aa5d164992d94af1f80c6349aeb8 WHIRLPOOL 8f0d95fe666a3de52ebf4511b0792add819e4dbf3e5e259e2f80bd1fce28e21bd046084a18c3130dc16ad1bc3c73cb912c8bb1d0d8bb387b0587d8748c656824
+AUX icu-58.2-CVE-2017-7867.patch 8934 SHA256 2dfef95f7f0ac9f769a8d221ba2572f30bbbb84c0566bfe5b0594287f8cfad87 SHA512 6e29326f378461ae07b253c59550447096352be1247e575d974839cea37ec326f7fa8dca58caab63544582ef9f4b3c71c9e3fa0eceb2e85fb7380ee71b138c5a WHIRLPOOL 43d1163e4e53db31929c380964b8ef1ad5dbdcf6d6f7d20cebf28b1959509783a4feaa42782af7fc3c3f555dbba4be6c4e18deaac096f0ea6ba031ac68891061
AUX icu-58.2-no-xlocale.patch 464 SHA256 450510c2c946974e9e70dec067bc2a14b5c50b23312c01255f5adbdcc3fc21d9 SHA512 ff2a0846302a215c0b36dc705cb5eb5386ef972d8d16d06a5901140d9809f3c7fee989c9151c51530f4771a353297f5dee8473004b04ce12689d68bdbca5fb60 WHIRLPOOL 0c49b90b37ba64edaabc1c8b3cedf612bc7a289cd6d4f6755eb31335a0af87004f5af4313af4c4f46b797f092c710b283c46f191765c74429cf171625d4da5d3
DIST icu4c-58_1-src.tgz 23366443 SHA256 0eb46ba3746a9c2092c8ad347a29b1a1b4941144772d13a88667a7b11ea30309 SHA512 59b2a76834192a35125fda326587e613ef4486152cf0278c6f22568d4ae02c4b2d897efcea2654ef2b11bd1c3154aecd38cb68a70f69430736f343689f94c155 WHIRLPOOL faf2624a83f0d6f874166b328522dc9c89088db2690433ab05e96371722b635b81fd5210c7e87fe8e5df6681e881cf10204832925b448552affe8c2f6c851e37
DIST icu4c-58_2-src.tgz 23369902 SHA256 2b0a4410153a9b20de0e20c7d8b66049a72aef244b53683d0d7521371683da0c SHA512 5c21af748f48b392e6c0412bd0aee92162ea931820dcbfab4ec6e0299868504b303d88f7586cc95de55c777ac0dca3a29d6c8ca0892c646ebc864c8a5b5a162a WHIRLPOOL 25829f8ee870b703fd604ae5b9b584390a142f5011e2a5db18332453e2f1640d81270086f243318eeb93f187b04ea23dab14901ab81c8d924c8d47b1f77aee5a
-EBUILD icu-58.1-r1.ebuild 2995 SHA256 59fee71afba6047825cd515fa809c9f243fba862b93025b270ed1651ab4b26a6 SHA512 5e87466528ee0ad1789e94a9004163525b10e92ed21413c79ce07a1c965f5786dffd571fb5829df83039de346c7df8cfa38b2c7e071c23f592a8282841b67708 WHIRLPOOL 4c4ced486a67dca79355730e4eb2c3f697d4e7b4ea23be0f0c40a24b2457d01022df82c9f12881755ea6d144631ff0217b4ccf24863ecabd40738d3e953d649a
-EBUILD icu-58.2.ebuild 3002 SHA256 46d635320ce0e39cce0ddd735d5a10e98c583823dd41818891adf4962150432b SHA512 76cfb0e4f20e6161923e52fe9703ef5cccbe0b4145a86778711eddfd8960329c81ecc7c23a846af66b9d8248293e083ba4a9db7daeefb5bca06856378e963f75 WHIRLPOOL e14f86525233ed6053808ba68d17a730d77dc67cc686de26717332e4600cb456347f7a8695aef940028ce349cb96d96f52a2ef8b1506ce51140f64cd771a56f8
+EBUILD icu-58.1-r1.ebuild 3375 SHA256 ab02bc4f595c342de9eb6c1c970c0db874f8c979b1ba9391172a330fac4c0e23 SHA512 e97c42dffbf27cebf2c6380b199f2ae01884322a8cdeb0a56669f6e017673175f3c12f41e4a3344fd7ddb54e442c2987a5e9d975f457579cbd39949ff9ffda75 WHIRLPOOL 881c33e01d00742a3bdb76595f60d9c0a366fb7e3b764ef40d5ad09636b4726b23f38357650b2fe4e2138850fe2103a55746726b39b08dda2a3bc504f2e9d641
+EBUILD icu-58.2-r1.ebuild 3431 SHA256 4c6c334a879e147daec1c32fe7a3ffa605f9c7d1e6c3f7335835c116f8e29a0d SHA512 50ed9b0fe325f991409fd8445d52e6de05330965cc4fc86e135ac84ee6245bf3f85a3beeebd9dbbf5f56a3c1e93320e5083d61aa5000c13deb8c8c63ced97a6b WHIRLPOOL 9243d7ca6691d4eae13f2e668869696541d4f011ac0665fea17d4183cf4e4790df42caf1d7eb106c10bf7e6491c90867c0ace43bb9414f4993f741ebc68df7e7
+EBUILD icu-58.2.ebuild 3385 SHA256 1e18328e726e0009dcb9647e0a15bb38f5b1340fba007cd34c8be5f30f2ed40e SHA512 608070d11d128eaba89674c006d1567886156071c0cf4cd75dd00cebd6bcfe504412713f81ee704f75f14080940d427ba9f97e60ae9d973c6b64f8b5447221aa WHIRLPOOL 9be176bfc25aadcf230775faa67257419cabbd36f85b4d16ff427104c23a3ec753425b5ccfeac56734a39e57e20b171664fedbd975deb5fea8d209eac41fc271
MISC metadata.xml 255 SHA256 34d028c790cfe86c47c5c3dcf8655fcefc3e23ff52fed38a400ce42d678c8c5e SHA512 ac646e8ac676faf0aac283e4be31c5f2b29e98ccf07327073ed05e688ce696caf639bdfea63e4aed141a90e84c0a86892bc717a52b95cdf1739aaa15240013c3 WHIRLPOOL 87f7199996948fe95e5417f8da0c4c90cd51a68f246ac8ae87a2e2a31c11c709f220d664eb893b34692577415e5f5eb351dd7e310dbc59f508fa40c7edb8ceeb
diff --git a/dev-libs/icu/files/icu-58.2-CVE-2017-7867.patch b/dev-libs/icu/files/icu-58.2-CVE-2017-7867.patch
new file mode 100644
index 00000000..a34537bb
--- /dev/null
+++ b/dev-libs/icu/files/icu-58.2-CVE-2017-7867.patch
@@ -0,0 +1,155 @@
+Index: /trunk/icu4c/source/common/utext.cpp
+===================================================================
+--- a/common/utext.cpp (revision 39670)
++++ b/common/utext.cpp (revision 39671)
+@@ -848,7 +848,13 @@
+
+ // Chunk size.
+-// Must be less than 85, because of byte mapping from UChar indexes to native indexes.
+-// Worst case is three native bytes to one UChar. (Supplemenaries are 4 native bytes
+-// to two UChars.)
++// Must be less than 42 (256/6), because of byte mapping from UChar indexes to native indexes.
++// Worst case there are six UTF-8 bytes per UChar.
++// obsolete 6 byte form fd + 5 trails maps to fffd
++// obsolete 5 byte form fc + 4 trails maps to fffd
++// non-shortest 4 byte forms maps to fffd
++// normal supplementaries map to a pair of utf-16, two utf8 bytes per utf-16 unit
++// mapToUChars array size must allow for the worst case, 6.
++// This could be brought down to 4, by treating fd and fc as pure illegal,
++// rather than obsolete lead bytes. But that is not compatible with the utf-8 access macros.
+ //
+ enum { UTF8_TEXT_CHUNK_SIZE=32 };
+@@ -890,5 +896,5 @@
+ // one for a supplementary starting in the last normal position,
+ // and one for an entry for the buffer limit position.
+- uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset from bufNativeStart to
++ uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset from bufNativeStart to
+ // correspoding offset in filled part of buf.
+ int32_t align;
+@@ -1033,4 +1039,5 @@
+ u8b = (UTF8Buf *)ut->p; // the current buffer
+ mapIndex = ix - u8b->toUCharsMapStart;
++ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
+ ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
+ return TRUE;
+@@ -1299,4 +1306,8 @@
+ // If index is at the end, there is no character there to look at.
+ if (ix != ut->b) {
++ // Note: this function will only move the index back if it is on a trail byte
++ // and there is a preceding lead byte and the sequence from the lead
++ // through this trail could be part of a valid UTF-8 sequence
++ // Otherwise the index remains unchanged.
+ U8_SET_CP_START(s8, 0, ix);
+ }
+@@ -1312,5 +1323,8 @@
+ uint8_t *mapToNative = u8b->mapToNative;
+ uint8_t *mapToUChars = u8b->mapToUChars;
+- int32_t toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1);
++ int32_t toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1;
++ // Note that toUCharsMapStart can be negative. Happens when the remaining
++ // text from current position to the beginning is less than the buffer size.
++ // + 1 because mapToUChars must have a slot at the end for the bufNativeLimit entry.
+ int32_t destIx = UTF8_TEXT_CHUNK_SIZE+2; // Start in the overflow region
+ // at end of buffer to leave room
+@@ -1339,4 +1353,5 @@
+ // Special case ASCII range for speed.
+ buf[destIx] = (UChar)c;
++ U_ASSERT(toUCharsMapStart <= srcIx);
+ mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx;
+ mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart);
+@@ -1368,4 +1383,5 @@
+ mapToUChars[sIx-- - toUCharsMapStart] = (uint8_t)destIx;
+ } while (sIx >= srcIx);
++ U_ASSERT(toUCharsMapStart <= (srcIx+1));
+
+ // Set native indexing limit to be the current position.
+@@ -1542,4 +1558,5 @@
+ U_ASSERT(index<=ut->chunkNativeLimit);
+ int32_t mapIndex = index - u8b->toUCharsMapStart;
++ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));
+ int32_t offset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;
+ U_ASSERT(offset>=0 && offset<=ut->chunkLength);
+Index: /trunk/icu4c/source/test/intltest/utxttest.cpp
+===================================================================
+--- a/test/intltest/utxttest.cpp (revision 39670)
++++ b/test/intltest/utxttest.cpp (revision 39671)
+@@ -68,4 +68,6 @@
+ case 7: name = "Ticket12130";
+ if (exec) Ticket12130(); break;
++ case 8: name = "Ticket12888";
++ if (exec) Ticket12888(); break;
+ default: name = ""; break;
+ }
+@@ -1584,2 +1586,62 @@
+ utext_close(&ut);
+ }
++
++// Ticket 12888: bad handling of illegal utf-8 containing many instances of the archaic, now illegal,
++// six byte utf-8 forms. Original implementation had an assumption that
++// there would be at most three utf-8 bytes per UTF-16 code unit.
++// The five and six byte sequences map to a single replacement character.
++
++void UTextTest::Ticket12888() {
++ const char *badString =
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"
++ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80";
++
++ UErrorCode status = U_ZERO_ERROR;
++ LocalUTextPointer ut(utext_openUTF8(NULL, badString, -1, &status));
++ TEST_SUCCESS(status);
++ for (;;) {
++ UChar32 c = utext_next32(ut.getAlias());
++ if (c == U_SENTINEL) {
++ break;
++ }
++ }
++ int32_t endIdx = utext_getNativeIndex(ut.getAlias());
++ if (endIdx != (int32_t)strlen(badString)) {
++ errln("%s:%d expected=%d, actual=%d", __FILE__, __LINE__, strlen(badString), endIdx);
++ return;
++ }
++
++ for (int32_t prevIndex = endIdx; prevIndex>0;) {
++ UChar32 c = utext_previous32(ut.getAlias());
++ int32_t currentIndex = utext_getNativeIndex(ut.getAlias());
++ if (c != 0xfffd) {
++ errln("%s:%d (expected, actual, index) = (%d, %d, %d)\n",
++ __FILE__, __LINE__, 0xfffd, c, currentIndex);
++ break;
++ }
++ if (currentIndex != prevIndex - 6) {
++ errln("%s:%d: wrong index. Expected, actual = %d, %d",
++ __FILE__, __LINE__, prevIndex - 6, currentIndex);
++ break;
++ }
++ prevIndex = currentIndex;
++ }
++}
+Index: /trunk/icu4c/source/test/intltest/utxttest.h
+===================================================================
+--- a/test/intltest/utxttest.h (revision 39670)
++++ b/test/intltest/utxttest.h (revision 39671)
+@@ -39,4 +39,5 @@
+ void Ticket10983();
+ void Ticket12130();
++ void Ticket12888();
+
+ private:
diff --git a/dev-libs/icu/icu-58.1-r1.ebuild b/dev-libs/icu/icu-58.1-r1.ebuild
index c6700f9b..d49d557d 100644
--- a/dev-libs/icu/icu-58.1-r1.ebuild
+++ b/dev-libs/icu/icu-58.1-r1.ebuild
@@ -1,6 +1,5 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
EAPI=6
@@ -14,7 +13,7 @@ LICENSE="BSD"
SLOT="0/${PV}"
-KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ~ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
IUSE="debug doc examples static-libs"
DEPEND="
@@ -36,6 +35,15 @@ PATCHES=(
"${FILESDIR}/${PN}-58.1-no-xlocale.patch"
)
+pkg_pretend() {
+ if tc-is-gcc ; then
+ if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 9 \
+ || $(gcc-major-version) -lt 4 ]] ; then
+ die "You need at least sys-devel/gcc-4.9"
+ fi
+ fi
+}
+
src_prepare() {
# apply patches
default
@@ -64,6 +72,13 @@ src_configure() {
# Use C++14
append-cxxflags -std=c++14
+ if tc-is-gcc ; then
+ if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 9 \
+ || $(gcc-major-version) -lt 4 ]] ; then
+ die "You need at least sys-devel/gcc-4.9"
+ fi
+ fi
+
if tc-is-cross-compiler; then
mkdir "${WORKDIR}"/host || die
pushd "${WORKDIR}"/host >/dev/null || die
diff --git a/dev-libs/icu/icu-58.2-r1.ebuild b/dev-libs/icu/icu-58.2-r1.ebuild
new file mode 100644
index 00000000..21e2004d
--- /dev/null
+++ b/dev-libs/icu/icu-58.2-r1.ebuild
@@ -0,0 +1,159 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils flag-o-matic toolchain-funcs autotools multilib-minimal
+
+DESCRIPTION="International Components for Unicode"
+HOMEPAGE="http://www.icu-project.org/"
+SRC_URI="http://download.icu-project.org/files/icu4c/${PV/_/}/icu4c-${PV//./_}-src.tgz"
+
+LICENSE="BSD"
+
+SLOT="0/${PV}"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="debug doc examples static-libs"
+
+DEPEND="
+ virtual/pkgconfig
+ doc? (
+ app-doc/doxygen[dot]
+ )
+"
+
+S="${WORKDIR}/${PN}/source"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/icu-config
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-58.1-remove-bashisms.patch"
+ "${FILESDIR}/${PN}-58.1-iterator.patch"
+ "${FILESDIR}/${PN}-58.2-CVE-2017-7867.patch"
+ "${FILESDIR}/${PN}-58.2-no-xlocale.patch"
+)
+
+pkg_pretend() {
+ if tc-is-gcc ; then
+ if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 9 \
+ || $(gcc-major-version) -lt 4 ]] ; then
+ die "You need at least sys-devel/gcc-4.9"
+ fi
+ fi
+}
+
+src_prepare() {
+ # apply patches
+ default
+
+ local variable
+
+ # Disable renaming as it is stupid thing to do
+ sed -i \
+ -e "s/#define U_DISABLE_RENAMING 0/#define U_DISABLE_RENAMING 1/" \
+ common/unicode/uconfig.h || die
+
+ # Fix linking of icudata
+ sed -i \
+ -e "s:LDFLAGSICUDT=-nodefaultlibs -nostdlib:LDFLAGSICUDT=:" \
+ config/mh-linux || die
+
+ # Append doxygen configuration to configure
+ sed -i \
+ -e 's:icudefs.mk:icudefs.mk Doxyfile:' \
+ configure.ac || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # Use C++14
+ append-cxxflags -std=c++14
+
+ if tc-is-gcc ; then
+ if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 9 \
+ || $(gcc-major-version) -lt 4 ]] ; then
+ die "You need at least sys-devel/gcc-4.9"
+ fi
+ fi
+
+ if tc-is-cross-compiler; then
+ mkdir "${WORKDIR}"/host || die
+ pushd "${WORKDIR}"/host >/dev/null || die
+
+ CFLAGS="" CXXFLAGS="" ASFLAGS="" LDFLAGS="" \
+ CC="$(tc-getBUILD_CC)" CXX="$(tc-getBUILD_CXX)" AR="$(tc-getBUILD_AR)" \
+ RANLIB="$(tc-getBUILD_RANLIB)" LD="$(tc-getBUILD_LD)" \
+ "${S}"/configure --disable-renaming --disable-debug \
+ --disable-samples --enable-static || die
+ emake
+
+ popd >/dev/null || die
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --disable-renaming
+ --disable-samples
+ --disable-layoutex
+ $(use_enable debug)
+ $(use_enable static-libs static)
+ )
+
+ multilib_is_native_abi && myeconfargs+=(
+ $(use_enable examples samples)
+ )
+ tc-is-cross-compiler && myeconfargs+=(
+ --with-cross-build="${WORKDIR}"/host
+ )
+
+ # icu tries to use clang by default
+ tc-export CC CXX
+
+ ECONF_SOURCE=${S} \
+ econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use doc; then
+ doxygen -u Doxyfile || die
+ doxygen Doxyfile || die
+ fi
+}
+
+multilib_src_test() {
+ # INTLTEST_OPTS: intltest options
+ # -e: Exhaustive testing
+ # -l: Reporting of memory leaks
+ # -v: Increased verbosity
+ # IOTEST_OPTS: iotest options
+ # -e: Exhaustive testing
+ # -v: Increased verbosity
+ # CINTLTST_OPTS: cintltst options
+ # -e: Exhaustive testing
+ # -v: Increased verbosity
+ emake -j1 VERBOSE="1" check
+}
+
+multilib_src_install() {
+ default
+
+ if multilib_is_native_abi && use doc; then
+ docinto html
+ dodoc -r doc/html/*
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ docinto html
+ dodoc ../readme.html
+}
diff --git a/dev-libs/icu/icu-58.2.ebuild b/dev-libs/icu/icu-58.2.ebuild
index 86c8276a..4eaa1138 100644
--- a/dev-libs/icu/icu-58.2.ebuild
+++ b/dev-libs/icu/icu-58.2.ebuild
@@ -1,6 +1,5 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
EAPI=6
@@ -36,6 +35,15 @@ PATCHES=(
"${FILESDIR}/${PN}-58.2-no-xlocale.patch"
)
+pkg_pretend() {
+ if tc-is-gcc ; then
+ if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 9 \
+ || $(gcc-major-version) -lt 4 ]] ; then
+ die "You need at least sys-devel/gcc-4.9"
+ fi
+ fi
+}
+
src_prepare() {
# apply patches
default
@@ -64,6 +72,13 @@ src_configure() {
# Use C++14
append-cxxflags -std=c++14
+ if tc-is-gcc ; then
+ if [[ $(gcc-major-version) == 4 && $(gcc-minor-version) -lt 9 \
+ || $(gcc-major-version) -lt 4 ]] ; then
+ die "You need at least sys-devel/gcc-4.9"
+ fi
+ fi
+
if tc-is-cross-compiler; then
mkdir "${WORKDIR}"/host || die
pushd "${WORKDIR}"/host >/dev/null || die