--- a/dev-libs/ustr/ustr-1.0.4-r3.ebuild 2014-01-14 15:01:10.000000000 +0100 +++ b/dev-libs/ustr/ustr-1.0.4-r4.ebuild 2014-05-09 10:23:04.764087822 +0200 @@ -4,7 +4,7 @@ EAPI=5 -inherit multilib toolchain-funcs +inherit multilib-build toolchain-funcs DESCRIPTION="Low-overhead managed string library for C" HOMEPAGE="http://www.and.org/ustr" @@ -12,28 +12,52 @@ LICENSE="|| ( BSD-2 MIT LGPL-2 )" SLOT="0" -KEYWORDS="amd64 ~arm ~mips x86" +KEYWORDS="~amd64 ~arm ~mips ~x86" IUSE="" DEPEND="" RDEPEND="" -src_compile() { - emake AR=$(tc-getAR) CC=$(tc-getCC) CFLAGS="${CFLAGS}" HIDE= \ - SHRDIR="/usr/share/${P}" \ - all-shared +src_prepare() { + multilib_copy_sources } -src_test() { - emake AR=$(tc-getAR) CC=$(tc-getCC) CFLAGS="${CFLAGS}" HIDE= check +ustr_make() { + cd "${BUILD_DIR}" || die + [ -e ustr-conf.h ] && rm ustr-conf.h + emake "$@" \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + prefix="${EPREFIX}/usr" \ + SHRDIR="/usr/share/${P}" \ + HIDE= || die } -src_install() { - emake install DESTDIR="${D}" HIDE= \ - libdir="/usr/$(get_libdir)" \ +ustr_install() { + cd "${BUILD_DIR}" || die + + emake "$@" \ + DESTDIR="${D}" \ + prefix="${EPREFIX}/usr" \ + libdir="${EPREFIX}/usr/$(get_libdir)" \ mandir="/usr/share/man" \ SHRDIR="/usr/share/${P}" \ - DOCSHRDIR="/usr/share/doc/${PF}" + DOCSHRDIR="/usr/share/doc/${PF}" \ + HIDE= || die +} + +src_compile() { + multilib_foreach_abi ustr_make all-shared +} + +multilib_src_test() { + multilib_foreach_abi ustr_make check +} + +src_install() { + multilib_foreach_abi ustr_install install-multilib-linux dodoc ChangeLog README README-DEVELOPERS AUTHORS NEWS TODO }