--- readline-6.2_p5.ebuild 2013-12-26 00:46:50.000000000 +0100 +++ readline-6.2_p5-r1.ebuild 2013-12-27 13:18:43.881237329 +0100 @@ -4,7 +4,7 @@ EAPI="4" -inherit eutils multilib toolchain-funcs flag-o-matic +inherit eutils multilib toolchain-funcs flag-o-matic multilib-minimal # Official patches # See ftp://ftp.cwru.edu/pub/bash/readline-6.2-patches/ @@ -37,7 +37,11 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" IUSE="static-libs" -RDEPEND=">=sys-libs/ncurses-5.2-r2" +RDEPEND=">=sys-libs/ncurses-5.2-r2[${MULTILIB_USEDEP}] + abi_x86_32? ( + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + !<=app-emulation/emul-linux-x86-baselibs-20131008-r6 + )" DEPEND="${RDEPEND}" S=${WORKDIR}/${MY_P} @@ -71,33 +75,41 @@ src_configure() { # http://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free + # Make sure configure picks a better ar than `ar`. #484866 + export ac_cv_prog_AR=$(tc-getAR) + # Force the test since we used sed above to force it. export bash_cv_termcap_lib=ncurses - # Make sure configure picks a better ar than `ar`. #484866 - tc-export AR - # This is for rlfe, but we need to make sure LDFLAGS doesn't change # so we can re-use the config cache file between the two. append-ldflags -L. + + multilib-minimal_src_configure +} + +multilib_src_configure() { + ECONF_SOURCE=${S} \ econf \ - --cache-file="${S}"/config.cache \ + --cache-file="${BUILD_DIR}"/config.cache \ --with-curses \ $(use_enable static-libs static) - if ! tc-is-cross-compiler ; then + if multilib_build_binaries && ! tc-is-cross-compiler ; then # code is full of AC_TRY_RUN() - cd examples/rlfe - econf --cache-file="${S}"/config.cache + mkdir -p examples/rlfe || die + cd examples/rlfe || die + ECONF_SOURCE=${S}/examples/rlfe \ + econf --cache-file="${BUILD_DIR}"/config.cache fi } -src_compile() { +multilib_src_compile() { emake - if ! tc-is-cross-compiler ; then + if multilib_build_binaries && ! tc-is-cross-compiler ; then # code is full of AC_TRY_RUN() - cd examples/rlfe + cd examples/rlfe || die local l for l in readline history ; do ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) @@ -107,18 +119,24 @@ src_compile() { fi } -src_install() { +multilib_src_install() { default - gen_usr_ldscript -a readline history #4411 - if ! tc-is-cross-compiler; then - dobin examples/rlfe/rlfe + if multilib_build_binaries ; then + gen_usr_ldscript -a readline history #4411 + + if ! tc-is-cross-compiler; then + dobin examples/rlfe/rlfe + fi fi +} +multilib_src_install_all() { + einstalldocs dodoc USAGE + dohtml -r doc/. docinto ps dodoc doc/*.ps - dohtml -r doc } pkg_preinst() {