From 15d1d12af4939f3dbac6a3741e6ab27c5aa79d9d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 1 Dec 2017 15:59:43 +0000 Subject: dev-libs/icu : version bump (58.1 -> 58.2) --- dev-libs/icu-layoutex/Manifest | 2 +- dev-libs/icu-layoutex/icu-layoutex-58.1.ebuild | 116 ----------------- dev-libs/icu-layoutex/icu-layoutex-58.2.ebuild | 115 +++++++++++++++++ dev-libs/icu/Manifest | 2 +- dev-libs/icu/files/icu-58.2-CVE-2017-7867.patch | 155 +++++++++++++++++++++++ dev-libs/icu/files/icu-58.2-glibc226.patch | 16 +++ dev-libs/icu/icu-58.1-r1.ebuild | 142 --------------------- dev-libs/icu/icu-58.2-r1.ebuild | 159 ++++++++++++++++++++++++ 8 files changed, 447 insertions(+), 260 deletions(-) delete mode 100644 dev-libs/icu-layoutex/icu-layoutex-58.1.ebuild create mode 100644 dev-libs/icu-layoutex/icu-layoutex-58.2.ebuild create mode 100644 dev-libs/icu/files/icu-58.2-CVE-2017-7867.patch create mode 100644 dev-libs/icu/files/icu-58.2-glibc226.patch delete mode 100644 dev-libs/icu/icu-58.1-r1.ebuild create mode 100644 dev-libs/icu/icu-58.2-r1.ebuild (limited to 'dev-libs') diff --git a/dev-libs/icu-layoutex/Manifest b/dev-libs/icu-layoutex/Manifest index 18f5e73c..dc6f8971 100644 --- a/dev-libs/icu-layoutex/Manifest +++ b/dev-libs/icu-layoutex/Manifest @@ -1 +1 @@ -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 diff --git a/dev-libs/icu-layoutex/icu-layoutex-58.1.ebuild b/dev-libs/icu-layoutex/icu-layoutex-58.1.ebuild deleted file mode 100644 index 8b79c652..00000000 --- a/dev-libs/icu-layoutex/icu-layoutex-58.1.ebuild +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=6 - -inherit eutils flag-o-matic toolchain-funcs autotools multilib-minimal - -DESCRIPTION="External layout part of 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="amd64 hppa ia64 ppc ppc64 ~x86" -IUSE="debug static-libs" - -RDEPEND=" - ~dev-libs/icu-${PV}[${MULTILIB_USEDEP}] - dev-libs/icu-le-hb[${MULTILIB_USEDEP}] -" - -DEPEND=" - virtual/pkgconfig[${MULTILIB_USEDEP}] - ${RDEPEND} -" - -S="${WORKDIR}/${PN/-layoutex}/source" - -PATCHES=( - "${FILESDIR}/${PN}-58.1-remove-bashisms.patch" -) - -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 - - eautoreconf -} - -src_configure() { - # Use C++14 - append-cxxflags -std=c++14 - - 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 - --enable-layoutex - $(use_enable debug) - $(use_enable static-libs static) - ) - - 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_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 - pushd layoutex &>/dev/null || die - emake -j1 VERBOSE="1" check - popd &>/dev/null || die -} - -multilib_src_install() { - pushd layoutex &>/dev/null || die - default - popd &>/dev/null || die -} diff --git a/dev-libs/icu-layoutex/icu-layoutex-58.2.ebuild b/dev-libs/icu-layoutex/icu-layoutex-58.2.ebuild new file mode 100644 index 00000000..92aedc3c --- /dev/null +++ b/dev-libs/icu-layoutex/icu-layoutex-58.2.ebuild @@ -0,0 +1,115 @@ +# 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="External layout part of 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 hppa ia64 ppc ppc64 x86" +IUSE="debug static-libs" + +RDEPEND=" + ~dev-libs/icu-${PV}[${MULTILIB_USEDEP}] + dev-libs/icu-le-hb[${MULTILIB_USEDEP}] +" + +DEPEND=" + virtual/pkgconfig[${MULTILIB_USEDEP}] + ${RDEPEND} +" + +S="${WORKDIR}/${PN/-layoutex}/source" + +PATCHES=( + "${FILESDIR}/${PN}-58.1-remove-bashisms.patch" +) + +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 + + eautoreconf +} + +src_configure() { + # Use C++14 + append-cxxflags -std=c++14 + + 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 + --enable-layoutex + $(use_enable debug) + $(use_enable static-libs static) + ) + + 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_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 + pushd layoutex &>/dev/null || die + emake -j1 VERBOSE="1" check + popd &>/dev/null || die +} + +multilib_src_install() { + pushd layoutex &>/dev/null || die + default + popd &>/dev/null || die +} diff --git a/dev-libs/icu/Manifest b/dev-libs/icu/Manifest index 18f5e73c..dc6f8971 100644 --- a/dev-libs/icu/Manifest +++ b/dev-libs/icu/Manifest @@ -1 +1 @@ -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 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/files/icu-58.2-glibc226.patch b/dev-libs/icu/files/icu-58.2-glibc226.patch new file mode 100644 index 00000000..7003173a --- /dev/null +++ b/dev-libs/icu/files/icu-58.2-glibc226.patch @@ -0,0 +1,16 @@ +diff -ruN a/i18n/digitlst.cpp b/i18n/digitlst.cpp +--- a/i18n/digitlst.cpp 2016-10-27 01:37:56.000000000 -0000 ++++ b/i18n/digitlst.cpp 2017-09-21 20:39:29.873030393 -0000 +@@ -61,11 +61,7 @@ + #endif + + #if U_USE_STRTOD_L +-# if U_PLATFORM_USES_ONLY_WIN32_API || U_PLATFORM == U_PF_CYGWIN +-# include +-# else +-# include +-# endif ++# include + #endif + + // *************************************************************************** diff --git a/dev-libs/icu/icu-58.1-r1.ebuild b/dev-libs/icu/icu-58.1-r1.ebuild deleted file mode 100644 index 98327a18..00000000 --- a/dev-libs/icu/icu-58.1-r1.ebuild +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -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" -) - -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-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-r1.ebuild b/dev-libs/icu/icu-58.2-r1.ebuild new file mode 100644 index 00000000..1eaa578e --- /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-glibc226.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 +} -- cgit v1.2.3