--- icu-51.2-r1.ebuild 2013-11-12 21:12:53.000000000 +0100 +++ icu-51.2-r2.ebuild 2013-12-22 17:11:32.485653692 +0100 @@ -4,7 +4,7 @@ EAPI=5 -inherit eutils toolchain-funcs base autotools +inherit eutils toolchain-funcs autotools multilib-minimal DESCRIPTION="International Components for Unicode" HOMEPAGE="http://www.icu-project.org/" @@ -18,7 +18,7 @@ SLOT="0/51.2" # other irregularities occured until the consumers were rebuilt. So let's rather err on the side # of caution and more rebuilds here. See also bug 464876. dilfridge -KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" IUSE="debug doc examples static-libs" DEPEND=" @@ -36,7 +36,7 @@ PATCHES=( src_prepare() { local variable - base_src_prepare + epatch_user # Do not hardcode flags in icu-config and icu-*.pc files. # https://ssl.icu-project.org/trac/ticket/6102 @@ -66,41 +66,55 @@ src_prepare() { } src_configure() { - local cross_opts - - # bootstrap for cross compilation 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)" \ - ./configure --disable-renaming --disable-debug \ + "${S}"/configure --disable-renaming --disable-debug \ --disable-samples --enable-static || die emake - mkdir -p "${WORKDIR}/host/" - cp -a {bin,lib,config,tools} "${WORKDIR}/host/" - emake clean - cross_opts="--with-cross-build=${WORKDIR}/host" + popd >/dev/null || die fi - econf \ - --disable-renaming \ - $(use_enable debug) \ - $(use_enable examples samples) \ - $(use_enable static-libs static) \ - ${cross_opts} + multilib-minimal_src_configure } -src_compile() { +multilib_src_configure() { + local myeconfargs=( + --disable-renaming + --disable-samples + $(use_enable debug) + $(use_enable static-libs static) + ) + + multilib_build_binaries && 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 use doc; then + if multilib_build_binaries && use doc; then doxygen -u Doxyfile || die doxygen Doxyfile || die fi } -src_test() { +multilib_src_test() { # INTLTEST_OPTS: intltest options # -e: Exhaustive testing # -l: Reporting of memory leaks @@ -114,10 +128,15 @@ src_test() { emake -j1 VERBOSE="1" check } -src_install() { +multilib_src_install() { default - dohtml ../readme.html + if multilib_build_binaries && use doc; then + dohtml -p api -r doc/html/ + fi +} - use doc && dohtml -p api -r doc/html/ +multilib_src_install_all() { + einstalldocs + dohtml ../readme.html }