1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils flag-o-matic toolchain-funcs autotools multilib-minimal
8 DESCRIPTION="External layout part of International Components for Unicode"
9 HOMEPAGE="http://www.icu-project.org/"
10 SRC_URI="http://download.icu-project.org/files/icu4c/${PV/_/}/icu4c-${PV//./_}-src.tgz"
16 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 x86"
17 IUSE="debug static-libs"
20 ~dev-libs/icu-${PV}[${MULTILIB_USEDEP}]
21 dev-libs/icu-le-hb[${MULTILIB_USEDEP}]
25 virtual/pkgconfig[${MULTILIB_USEDEP}]
29 S="${WORKDIR}/${PN/-layoutex}/source"
32 "${FILESDIR}/${PN}-58.1-remove-bashisms.patch"
41 # Disable renaming as it is stupid thing to do
43 -e "s/#define U_DISABLE_RENAMING 0/#define U_DISABLE_RENAMING 1/" \
44 common/unicode/uconfig.h || die
46 # Fix linking of icudata
48 -e "s:LDFLAGSICUDT=-nodefaultlibs -nostdlib:LDFLAGSICUDT=:" \
49 config/mh-linux || die
56 append-cxxflags -std=c++14
58 if tc-is-cross-compiler; then
59 mkdir "${WORKDIR}"/host || die
60 pushd "${WORKDIR}"/host >/dev/null || die
62 CFLAGS="" CXXFLAGS="" ASFLAGS="" LDFLAGS="" \
63 CC="$(tc-getBUILD_CC)" CXX="$(tc-getBUILD_CXX)" AR="$(tc-getBUILD_AR)" \
64 RANLIB="$(tc-getBUILD_RANLIB)" LD="$(tc-getBUILD_LD)" \
65 "${S}"/configure --disable-renaming --disable-debug \
66 --disable-samples --enable-static || die
69 popd >/dev/null || die
72 multilib-minimal_src_configure
75 multilib_src_configure() {
81 $(use_enable static-libs static)
84 tc-is-cross-compiler && myeconfargs+=(
85 --with-cross-build="${WORKDIR}"/host
88 # icu tries to use clang by default
92 econf "${myeconfargs[@]}"
96 # INTLTEST_OPTS: intltest options
97 # -e: Exhaustive testing
98 # -l: Reporting of memory leaks
99 # -v: Increased verbosity
100 # IOTEST_OPTS: iotest options
101 # -e: Exhaustive testing
102 # -v: Increased verbosity
103 # CINTLTST_OPTS: cintltst options
104 # -e: Exhaustive testing
105 # -v: Increased verbosity
106 pushd layoutex &>/dev/null || die
107 emake -j1 VERBOSE="1" check
108 popd &>/dev/null || die
111 multilib_src_install() {
112 pushd layoutex &>/dev/null || die
114 popd &>/dev/null || die