--- /usr/portage/sys-libs/readline/readline-4.3-r5.ebuild.orig 2005-03-02 14:35:24.885159981 +0100 +++ /usr/portage/sys-libs/readline/readline-4.3-r5.ebuild 2005-03-02 14:42:07.509791215 +0100 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-libs/readline/readline-4.3-r5.ebuild,v 1.22 2005/01/27 03:36:04 vapier Exp $ -inherit eutils gnuconfig +inherit eutils gnuconfig multilib # Official patches PLEVEL="x001 x002 x003 x004 x005" @@ -20,7 +20,8 @@ # We must be certain that we have a bash that is linked # to its internal readline, else we may get problems. DEPEND=">=app-shells/bash-2.05b-r2 - >=sys-libs/ncurses-5.2-r2" + >=sys-libs/ncurses-5.2-r2 + !app-emulation/emul-linux-x86-baselibs" src_unpack() { unpack ${P}.tar.gz @@ -35,9 +36,32 @@ sed -i -e 's:^SHLIB_LIBS=:SHLIB_LIBS=-lncurses:' support/shobj-conf || die "sed" gnuconfig_update + if use amd64 && has_multilib_profile; then + cp -ar ${S} ${S}-x86 + mv ${S} ${S}-amd64 + fi } src_compile() { + if use amd64 && has_multilib_profile; then + local OABI=${ABI} + local OPWD=${PWD} + ABI="x86" + cd ${S}-x86 + src_compile-multilib + ABI="amd64" + cd ${S}-amd64 + src_compile-multilib + ABI=${OABI} + cd ${OPWD} + unset OABI + unset OPWD + else + src_compile-multilib + fi +} + +src_compile-multilib() { # the --libdir= is needed because if lib64 is a directory, it will default # to using that... even if CONF_LIBDIR isnt set or we're using a version # of portage without CONF_LIBDIR support. @@ -48,8 +72,26 @@ emake || die } - src_install() { + if use amd64 && has_multilib_profile; then + local OABI=${ABI} + local OPWD=${PWD} + ABI="x86" + cd ${S}-x86 + src_install-multilib + ABI="amd64" + cd ${S}-amd64 + src_install-multilib + ABI=${OABI} + cd ${OPWD} + unset OABI + unset OPWD + else + src_install-multilib + fi +} + +src_install-multilib() { # portage 2.0.50's einstall causes sandbox violations if lib64 is a # directory, since readline's configure automatically sets libdir for you. make DESTDIR="${D}" install || die