summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/icu')
-rw-r--r--dev-libs/icu/Manifest1
-rw-r--r--dev-libs/icu/files/icu-64.1-guard-memory-include.patch52
-rw-r--r--dev-libs/icu/icu-64.1.ebuild143
3 files changed, 196 insertions, 0 deletions
diff --git a/dev-libs/icu/Manifest b/dev-libs/icu/Manifest
index 96711e6dbbee..f77c1e6b6c90 100644
--- a/dev-libs/icu/Manifest
+++ b/dev-libs/icu/Manifest
@@ -1,2 +1,3 @@
DIST icu4c-58_2-src.tgz 23369902 BLAKE2B cdd2e02c3aba050f5b7f8b38c5a3731e3e5f1cc1403ef86a50908b95560ea3cf8a2d47119fa60cf34f22a8b65eaa2392fd5bcbd3bc48b3da541fe3d9bd7392c0 SHA512 5c21af748f48b392e6c0412bd0aee92162ea931820dcbfab4ec6e0299868504b303d88f7586cc95de55c777ac0dca3a29d6c8ca0892c646ebc864c8a5b5a162a
DIST icu4c-63_1-src.tgz 23746939 BLAKE2B 5a665554506ff705c83c7a03a1b5598b1a48afbe1c6caaccd5a2d7d5aae16b3e18d7bc65ed552fc4df86248a2f13962438f19bca6c2a579843204c7dc52e6278 SHA512 9ab407ed840a00cdda7470dcc4c40299a125ad246ae4d019c4b1ede54781157fd63af015a8228cd95dbc47e4d15a0932b2c657489046a19788e5e8266eac079c
+DIST icu4c-64_1-src.tgz 24013136 BLAKE2B e577bd4c9b822e5ef3a101b3ef46b7b42ca18077d6e05fca543ff1eb702261f017981fb22dd3970662397530b390f648d4417c84dcf3d6ed0d298dd7a8c38897 SHA512 5eca8342d8bdf902689243506643e04512744b33962687e118f6810af6f7fd073678f67b991d2ae9139d257713b63abb4222b96687234df01ad5ff62df16ede0
diff --git a/dev-libs/icu/files/icu-64.1-guard-memory-include.patch b/dev-libs/icu/files/icu-64.1-guard-memory-include.patch
new file mode 100644
index 000000000000..618a42541277
--- /dev/null
+++ b/dev-libs/icu/files/icu-64.1-guard-memory-include.patch
@@ -0,0 +1,52 @@
+From 5ecd46bab07561758e0c37a9178e74175e989bdf Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 30 Mar 2019 09:59:46 +0300
+Subject: [PATCH] ICU-20530 Guard memory include for C++
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Introduce by ICU-20357, commit b7a3571b adding <memory> include without guard.
+
+Fails when compiling within extern "C".
+
+a.cxx
+---
+extern "C" {
+ #include <unicode/localpointer.h>
+}
+---
+In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/memory:84,
+ from /tmp/icu/icu4c/source/common/unicode/localpointer.h:45,
+ from a.cxx:4:
+/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/g++-v8/backward/auto_ptr.h:325:3: error: template with C linkage
+ template<typename _Tp, typename _Dp>
+ ^~~~~~~~
+a.cxx:3:1: note: ‘extern "C"’ linkage started here
+ extern "C" {
+ ^~~~~~~~~~
+---
+
+Found by usage of xmlsec.
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ icu4c/source/common/unicode/localpointer.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/icu4c/source/common/unicode/localpointer.h b/icu4c/source/common/unicode/localpointer.h
+index e011688b1a5..8e35ded0b10 100644
+--- a/common/unicode/localpointer.h
++++ b/common/unicode/localpointer.h
+@@ -42,7 +42,11 @@
+
+ #if U_SHOW_CPLUSPLUS_API
+
++#ifdef __cplusplus
++extern "C++" {
+ #include <memory>
++}
++#endif
+
+ U_NAMESPACE_BEGIN
+
diff --git a/dev-libs/icu/icu-64.1.ebuild b/dev-libs/icu/icu-64.1.ebuild
new file mode 100644
index 000000000000..fbe419ce9732
--- /dev/null
+++ b/dev-libs/icu/icu-64.1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit 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 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="debug doc examples static-libs"
+
+DEPEND="
+ doc? ( app-doc/doxygen[dot] )
+"
+BDEPEND="
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${PN}/source"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/icu-config
+)
+
+PATCHES=(
+ "${FILESDIR}/${PN}-58.1-remove-bashisms.patch"
+ "${FILESDIR}/${PN}-58.2-darwin.patch"
+ "${FILESDIR}/${P}-guard-memory-include.patch"
+)
+
+src_prepare() {
+ 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() {
+ 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_native_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
+}