From 844a352e91993f0170c4b56efdb678d9e562605e Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Mon, 21 Mar 2005 08:10:09 +0000 Subject: Added support to build 32bit version on amd64. (Portage version: 2.0.51.19) --- games-emulation/nestra/ChangeLog | 8 +++++-- games-emulation/nestra/nestra-0.66-r1.ebuild | 36 +++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 8 deletions(-) (limited to 'games-emulation/nestra') diff --git a/games-emulation/nestra/ChangeLog b/games-emulation/nestra/ChangeLog index e63effe5848b..7c8dac93de78 100644 --- a/games-emulation/nestra/ChangeLog +++ b/games-emulation/nestra/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for games-emulation/nestra -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-emulation/nestra/ChangeLog,v 1.4 2004/06/24 22:31:37 agriffis Exp $ +# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-emulation/nestra/ChangeLog,v 1.5 2005/03/21 08:10:09 eradicator Exp $ + + 21 Mar 2005; Jeremy Huddleston + nestra-0.66-r1.ebuild: + Added support to build 32bit version on amd64. *nestra-0.66-r1 (27 Mar 2004) diff --git a/games-emulation/nestra/nestra-0.66-r1.ebuild b/games-emulation/nestra/nestra-0.66-r1.ebuild index 3bb180ba65ae..e7f4bad00cd9 100644 --- a/games-emulation/nestra/nestra-0.66-r1.ebuild +++ b/games-emulation/nestra/nestra-0.66-r1.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-emulation/nestra/nestra-0.66-r1.ebuild,v 1.3 2004/11/24 08:03:16 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-emulation/nestra/nestra-0.66-r1.ebuild,v 1.4 2005/03/21 08:10:09 eradicator Exp $ -inherit eutils games +inherit eutils games toolchain-funcs flag-o-matic PATCH="${P/-/_}-7.diff" DESCRIPTION="NES emulation for Linux/x86" @@ -12,20 +12,44 @@ SRC_URI="http://nestra.linuxgames.com/${P}.tar.gz LICENSE="GPL-2" SLOT="0" -KEYWORDS="x86" +KEYWORDS="~amd64 x86" IUSE="" -DEPEND="virtual/x11" +RDEPEND="amd64? ( >=app-emulation/emul-linux-x86-xlibs-1.2-r7 )" + +DEPEND="${RDEPEND} + virtual/x11" S="${WORKDIR}/${PN}" +pkg_setup() { + if use amd64; then + if has_multilib_profile; then + ABI_ALLOW="x86" + + # And until we get a real multilib portage... + ABI="x86" + + # Yeah, this is ugly, but so's their build system... + append-flags "-L/emul/linux/x86/usr/lib -L/emul/linux/x86/lib -L/usr/lib32 -L/lib32" + append-ldflags $(get_abi_LDFLAGS) + elif has_m32 ; then + einfo "multilib detected, adding -m32 to CFLAGS." + append-flags -m32 + else + die "${PN} requires multilib support in gcc. please re-emerge gcc with multilib in USE and try again" + fi + fi +} + src_unpack() { unpack ${A} cd "${S}" epatch "${WORKDIR}/${PATCH}" sed -i \ -e 's:-O2 ::' \ - -e "s:gcc:gcc ${CFLAGS}:" Makefile \ + -e "s:ld:$(tc-getLD) ${LDFLAGS}:" \ + -e "s:gcc:$(tc-getCC) ${CFLAGS}:" Makefile \ || die "sed Makefile failed" } -- cgit v1.2.3-65-gdbad