-DIST icu4c-58_2-src.tgz 23369902 BLAKE2B cdd2e02c3aba050f5b7f8b38c5a3731e3e5f1cc1403ef86a50908b95560ea3cf8a2d47119fa60cf34f22a8b65eaa2392fd5bcbd3bc48b3da541fe3d9bd7392c0 SHA512 5c21af748f48b392e6c0412bd0aee92162ea931820dcbfab4ec6e0299868504b303d88f7586cc95de55c777ac0dca3a29d6c8ca0892c646ebc864c8a5b5a162a
DIST icu4c-64_2-src.tgz 24013250 BLAKE2B 4a286e7a952f5faa74d942f6b6a73147a46aa10fe6d54d024e2d18d1e01056444d56118ded04b4fe084d6a0f9058d7d9e76973960ac8fe5bd9ee105d9e214318 SHA512 5ecb4c230ba45918747a1cf9aef86f555aa07d5b29b1d07ab674e8013f46dfb907a0e9d6945db41155f9dc3012fd94e1152ffc19f61a68b6dfcbabdcb8ae9d78
+++ /dev/null
-source: http://bugs.icu-project.org/trac/changeset/39484/\r
-\r
-\r
-Index: icu/common/ulist.c\r
-===================================================================\r
---- icu/common/ulist.c (revision 39483)\r
-+++ icu/common/ulist.c (revision 39484)\r
-@@ -30,5 +30,4 @@\r
- \r
- int32_t size;\r
-- int32_t currentIndex;\r
- };\r
- \r
-@@ -52,5 +51,4 @@\r
- newList->tail = NULL;\r
- newList->size = 0;\r
-- newList->currentIndex = -1;\r
- \r
- return newList;\r
-@@ -81,6 +79,7 @@\r
- p->next->previous = p->previous;\r
- }\r
-- list->curr = NULL;\r
-- list->currentIndex = 0;\r
-+ if (p == list->curr) {\r
-+ list->curr = p->next;\r
-+ }\r
- --list->size;\r
- if (p->forceDelete) {\r
-@@ -151,5 +150,4 @@\r
- list->head->previous = newItem;\r
- list->head = newItem;\r
-- list->currentIndex++;\r
- }\r
- \r
-@@ -194,5 +192,4 @@\r
- curr = list->curr;\r
- list->curr = curr->next;\r
-- list->currentIndex++;\r
- \r
- return curr->data;\r
-@@ -210,5 +207,4 @@\r
- if (list != NULL) {\r
- list->curr = list->head;\r
-- list->currentIndex = 0;\r
- }\r
- }\r
-@@ -273,3 +269,2 @@\r
- return (UList *)(en->context);\r
- }\r
--\r
-Index: icu/i18n/ucol_res.cpp\r
-===================================================================\r
---- icu/i18n/ucol_res.cpp (revision 39483)\r
-+++ icu/i18n/ucol_res.cpp (revision 39484)\r
-@@ -681,4 +681,5 @@\r
- }\r
- memcpy(en, &defaultKeywordValues, sizeof(UEnumeration));\r
-+ ulist_resetList(sink.values); // Initialize the iterator.\r
- en->context = sink.values;\r
- sink.values = NULL; // Avoid deletion in the sink destructor.\r
-Index: icu/test/intltest/apicoll.cpp\r
-===================================================================\r
---- icu/test/intltest/apicoll.cpp (revision 39483)\r
-+++ icu/test/intltest/apicoll.cpp (revision 39484)\r
-@@ -82,14 +82,7 @@\r
- col = Collator::createInstance(Locale::getEnglish(), success);\r
- if (U_FAILURE(success)){\r
-- errcheckln(success, "Default Collator creation failed. - %s", u_errorName(success));\r
-- return;\r
-- }\r
--\r
-- StringEnumeration* kwEnum = col->getKeywordValuesForLocale("", Locale::getEnglish(),true,success);\r
-- if (U_FAILURE(success)){\r
-- errcheckln(success, "Get Keyword Values for Locale failed. - %s", u_errorName(success));\r
-- return;\r
-- }\r
-- delete kwEnum;\r
-+ errcheckln(success, "English Collator creation failed. - %s", u_errorName(success));\r
-+ return;\r
-+ }\r
- \r
- col->getVersion(versionArray);\r
-@@ -230,4 +223,27 @@\r
- delete aFrCol;\r
- delete junk;\r
-+}\r
-+\r
-+void CollationAPITest::TestKeywordValues() {\r
-+ IcuTestErrorCode errorCode(*this, "TestKeywordValues");\r
-+ LocalPointer<Collator> col(Collator::createInstance(Locale::getEnglish(), errorCode));\r
-+ if (errorCode.logIfFailureAndReset("English Collator creation failed")) {\r
-+ return;\r
-+ }\r
-+\r
-+ LocalPointer<StringEnumeration> kwEnum(\r
-+ col->getKeywordValuesForLocale("collation", Locale::getEnglish(), TRUE, errorCode));\r
-+ if (errorCode.logIfFailureAndReset("Get Keyword Values for English Collator failed")) {\r
-+ return;\r
-+ }\r
-+ assertTrue("expect at least one collation tailoring for English", kwEnum->count(errorCode) > 0);\r
-+ const char *kw;\r
-+ UBool hasStandard = FALSE;\r
-+ while ((kw = kwEnum->next(NULL, errorCode)) != NULL) {\r
-+ if (strcmp(kw, "standard") == 0) {\r
-+ hasStandard = TRUE;\r
-+ }\r
-+ }\r
-+ assertTrue("expect at least the 'standard' collation tailoring for English", hasStandard);\r
- }\r
- \r
-@@ -2467,4 +2483,5 @@\r
- TESTCASE_AUTO_BEGIN;\r
- TESTCASE_AUTO(TestProperty);\r
-+ TESTCASE_AUTO(TestKeywordValues);\r
- TESTCASE_AUTO(TestOperators);\r
- TESTCASE_AUTO(TestDuplicate);\r
-Index: icu/test/intltest/apicoll.h\r
-===================================================================\r
---- icu/test/intltest/apicoll.h (revision 39483)\r
-+++ icu/test/intltest/apicoll.h (revision 39484)\r
-@@ -36,4 +36,5 @@\r
- */\r
- void TestProperty(/* char* par */);\r
-+ void TestKeywordValues();\r
- \r
- /**\r
+++ /dev/null
-Index: /trunk/icu4c/source/common/utext.cpp\r
-===================================================================\r
---- a/common/utext.cpp (revision 39670)\r
-+++ b/common/utext.cpp (revision 39671)\r
-@@ -848,7 +848,13 @@\r
- \r
- // Chunk size.\r
--// Must be less than 85, because of byte mapping from UChar indexes to native indexes.\r
--// Worst case is three native bytes to one UChar. (Supplemenaries are 4 native bytes\r
--// to two UChars.)\r
-+// Must be less than 42 (256/6), because of byte mapping from UChar indexes to native indexes.\r
-+// Worst case there are six UTF-8 bytes per UChar.\r
-+// obsolete 6 byte form fd + 5 trails maps to fffd\r
-+// obsolete 5 byte form fc + 4 trails maps to fffd\r
-+// non-shortest 4 byte forms maps to fffd\r
-+// normal supplementaries map to a pair of utf-16, two utf8 bytes per utf-16 unit\r
-+// mapToUChars array size must allow for the worst case, 6.\r
-+// This could be brought down to 4, by treating fd and fc as pure illegal,\r
-+// rather than obsolete lead bytes. But that is not compatible with the utf-8 access macros.\r
- //\r
- enum { UTF8_TEXT_CHUNK_SIZE=32 };\r
-@@ -890,5 +896,5 @@\r
- // one for a supplementary starting in the last normal position,\r
- // and one for an entry for the buffer limit position.\r
-- uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*3+6]; // Map native offset from bufNativeStart to\r
-+ uint8_t mapToUChars[UTF8_TEXT_CHUNK_SIZE*6+6]; // Map native offset from bufNativeStart to\r
- // correspoding offset in filled part of buf.\r
- int32_t align;\r
-@@ -1033,4 +1039,5 @@\r
- u8b = (UTF8Buf *)ut->p; // the current buffer\r
- mapIndex = ix - u8b->toUCharsMapStart;\r
-+ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));\r
- ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;\r
- return TRUE;\r
-@@ -1299,4 +1306,8 @@\r
- // If index is at the end, there is no character there to look at.\r
- if (ix != ut->b) {\r
-+ // Note: this function will only move the index back if it is on a trail byte\r
-+ // and there is a preceding lead byte and the sequence from the lead \r
-+ // through this trail could be part of a valid UTF-8 sequence\r
-+ // Otherwise the index remains unchanged.\r
- U8_SET_CP_START(s8, 0, ix);\r
- }\r
-@@ -1312,5 +1323,8 @@\r
- uint8_t *mapToNative = u8b->mapToNative;\r
- uint8_t *mapToUChars = u8b->mapToUChars;\r
-- int32_t toUCharsMapStart = ix - (UTF8_TEXT_CHUNK_SIZE*3 + 1);\r
-+ int32_t toUCharsMapStart = ix - sizeof(UTF8Buf::mapToUChars) + 1;\r
-+ // Note that toUCharsMapStart can be negative. Happens when the remaining\r
-+ // text from current position to the beginning is less than the buffer size.\r
-+ // + 1 because mapToUChars must have a slot at the end for the bufNativeLimit entry.\r
- int32_t destIx = UTF8_TEXT_CHUNK_SIZE+2; // Start in the overflow region\r
- // at end of buffer to leave room\r
-@@ -1339,4 +1353,5 @@\r
- // Special case ASCII range for speed.\r
- buf[destIx] = (UChar)c;\r
-+ U_ASSERT(toUCharsMapStart <= srcIx);\r
- mapToUChars[srcIx - toUCharsMapStart] = (uint8_t)destIx;\r
- mapToNative[destIx] = (uint8_t)(srcIx - toUCharsMapStart);\r
-@@ -1368,4 +1383,5 @@\r
- mapToUChars[sIx-- - toUCharsMapStart] = (uint8_t)destIx;\r
- } while (sIx >= srcIx);\r
-+ U_ASSERT(toUCharsMapStart <= (srcIx+1));\r
- \r
- // Set native indexing limit to be the current position.\r
-@@ -1542,4 +1558,5 @@\r
- U_ASSERT(index<=ut->chunkNativeLimit);\r
- int32_t mapIndex = index - u8b->toUCharsMapStart;\r
-+ U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars));\r
- int32_t offset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx;\r
- U_ASSERT(offset>=0 && offset<=ut->chunkLength);\r
-Index: /trunk/icu4c/source/test/intltest/utxttest.cpp\r
-===================================================================\r
---- a/test/intltest/utxttest.cpp (revision 39670)\r
-+++ b/test/intltest/utxttest.cpp (revision 39671)\r
-@@ -68,4 +68,6 @@\r
- case 7: name = "Ticket12130";\r
- if (exec) Ticket12130(); break;\r
-+ case 8: name = "Ticket12888";\r
-+ if (exec) Ticket12888(); break;\r
- default: name = ""; break;\r
- }\r
-@@ -1584,2 +1586,62 @@\r
- utext_close(&ut);\r
- }\r
-+\r
-+// Ticket 12888: bad handling of illegal utf-8 containing many instances of the archaic, now illegal,\r
-+// six byte utf-8 forms. Original implementation had an assumption that\r
-+// there would be at most three utf-8 bytes per UTF-16 code unit.\r
-+// The five and six byte sequences map to a single replacement character.\r
-+\r
-+void UTextTest::Ticket12888() {\r
-+ const char *badString = \r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80"\r
-+ "\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80\xfd\x80\x80\x80\x80\x80";\r
-+\r
-+ UErrorCode status = U_ZERO_ERROR;\r
-+ LocalUTextPointer ut(utext_openUTF8(NULL, badString, -1, &status));\r
-+ TEST_SUCCESS(status);\r
-+ for (;;) {\r
-+ UChar32 c = utext_next32(ut.getAlias());\r
-+ if (c == U_SENTINEL) {\r
-+ break;\r
-+ }\r
-+ }\r
-+ int32_t endIdx = utext_getNativeIndex(ut.getAlias());\r
-+ if (endIdx != (int32_t)strlen(badString)) {\r
-+ errln("%s:%d expected=%d, actual=%d", __FILE__, __LINE__, strlen(badString), endIdx);\r
-+ return;\r
-+ }\r
-+\r
-+ for (int32_t prevIndex = endIdx; prevIndex>0;) {\r
-+ UChar32 c = utext_previous32(ut.getAlias());\r
-+ int32_t currentIndex = utext_getNativeIndex(ut.getAlias());\r
-+ if (c != 0xfffd) {\r
-+ errln("%s:%d (expected, actual, index) = (%d, %d, %d)\n",\r
-+ __FILE__, __LINE__, 0xfffd, c, currentIndex);\r
-+ break;\r
-+ }\r
-+ if (currentIndex != prevIndex - 6) {\r
-+ errln("%s:%d: wrong index. Expected, actual = %d, %d",\r
-+ __FILE__, __LINE__, prevIndex - 6, currentIndex);\r
-+ break;\r
-+ }\r
-+ prevIndex = currentIndex;\r
-+ }\r
-+}\r
-Index: /trunk/icu4c/source/test/intltest/utxttest.h\r
-===================================================================\r
---- a/test/intltest/utxttest.h (revision 39670)\r
-+++ b/test/intltest/utxttest.h (revision 39671)\r
-@@ -39,4 +39,5 @@\r
- void Ticket10983();\r
- void Ticket12130();\r
-+ void Ticket12888();\r
- \r
- private:\r
+++ /dev/null
-same as 4.7, but retargetted to apply with eapply
-
---- a/config/mh-darwin
-+++ b/config/mh-darwin
-@@ -4,6 +4,13 @@
- ## Copyright (c) 1999-2011 International Business Machines Corporation and
- ## others. All Rights Reserved.
-
-+
-+SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
-+FINAL_SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO_TARGET_VERSION).$(SO)
-+MIDDLE_SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO_TARGET_VERSION_MAJOR).$(SO)
-+
-+IS_DARWIN = yes
-+
- ## Flags for position independent code
- SHAREDLIBCFLAGS = -dynamic
- SHAREDLIBCXXFLAGS = -dynamic
-@@ -28,7 +35,7 @@
- ifeq ($(ENABLE_RPATH),YES)
- LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET))
- else
--LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET))
-+LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET))
- endif
-
- ## Compiler switch to embed a runtime search path
---- a/stubdata/Makefile.in
-+++ b/stubdata/Makefile.in
-@@ -32,7 +32,11 @@
-
-
- ifneq ($(ENABLE_SHARED),)
-+ifeq ($(IS_DARWIN),)
- SO_TARGET = $(STUBDATA_LIBDIR)$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO)
-+else
-+SO_TARGET = $(LIBDIR)/$(STUBDATA_LIBDIR)$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO)
-+endif
- ALL_SO_TARGETS = $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) $(SO_TARGET) $(BATCH_STUB_TARGET) $(SHARED_OBJECT)
- endif
-
---- a/tools/ctestfw/Makefile.in
-+++ b/tools/ctestfw/Makefile.in
-@@ -31,7 +31,11 @@
- endif
-
- ifneq ($(ENABLE_SHARED),)
-+ifeq ($(IS_DARWIN),)
- SO_TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
-+else
-+SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
-+endif
- ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
- endif
-
+++ /dev/null
-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 <locale.h>
--# else
--# include <xlocale.h>
--# endif
-+# include <locale.h>
- #endif
-
- // ***************************************************************************
+++ /dev/null
-# 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 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-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"
- "${FILESDIR}/${PN}-58.2-darwin.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
-
- # Fix compilation on Solaris due to enabling of conflicting standards
- if [[ ${CHOST} == *-solaris* ]] ; then
- sed -i -e '/define _XOPEN_SOURCE_EXTENDED/s/_XOPEN/no_XOPEN/' \
- common/uposixdefs.h || die
- fi
-
- 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
-
- # make sure we configure with the same shell as we run icu-config
- # with, or ECHO_N, ECHO_T and ECHO_C will be wrongly defined
- export CONFIG_SHELL=${EPREFIX}/bin/sh
- # probably have no /bin/sh in prefix-chain
- [[ -x ${CONFIG_SHELL} ]] || CONFIG_SHELL=${BASH}
-
- 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
-}