--- /usr/portage/dev-libs/glib/glib-1.2.10-r5.ebuild.orig 2005-03-02 19:15:18.783248424 +0100 +++ /usr/portage/dev-libs/glib/glib-1.2.10-r5.ebuild 2005-03-02 19:19:09.966790134 +0100 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-libs/glib/glib-1.2.10-r5.ebuild,v 1.39 2005/02/02 21:46:24 j4rg0n Exp $ -inherit libtool flag-o-matic eutils gnuconfig +inherit libtool flag-o-matic eutils gnuconfig multilib DESCRIPTION="The GLib library of C routines" HOMEPAGE="http://www.gtk.org/" @@ -14,7 +14,8 @@ KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 ppc-macos s390 sh sparc x86" IUSE="" -DEPEND="virtual/libc" +DEPEND="virtual/libc + !app-emulation/emul-linux-x86-baselibs" src_unpack() { unpack ${A} @@ -30,9 +31,33 @@ darwintoolize gnuconfig_update fi + + 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 --libdir=/usr/lib32 + ABI="amd64" + cd ${S}-amd64 + src_compile-multilib --libdir=/usr/lib64 + ABI=${OABI} + cd ${OPWD} + unset OABI + unset OPWD + else + src_compile-multilib + fi +} + +src_compile-multilib() { # Bug 48839: pam fails to build on ia64 # The problem is that it attempts to link a shared object against # libglib.a; this library needs to be built with -fPIC. Since @@ -40,7 +65,7 @@ # whole thing with -fPIC (23 Apr 2004 agriffis) append-flags -fPIC - econf \ + econf ${1} \ --with-threads=posix \ --enable-debug=yes \ || die @@ -48,6 +73,25 @@ } 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() { make install DESTDIR="${D}" || die dodoc AUTHORS ChangeLog README* INSTALL NEWS