--- squeak-3.10.ebuild~ 2008-06-06 18:12:45.000000000 +0100 +++ squeak-3.10.ebuild 2008-06-06 18:34:03.000000000 +0100 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-lang/squeak/squeak-3.9.7.ebuild,v 1.4 2007/07/22 08:43:03 graaff Exp $ -inherit base fixheadtails eutils +inherit eutils fixheadtails toolchain-funcs MY_PV="${PV}-1" @@ -11,7 +11,7 @@ SRC_URI="http://ftp.squeak.org/${PV}/unix-linux/Squeak-${MY_PV}.src.tar.gz " LICENSE="Apple" SLOT="0" -KEYWORDS="~x86" +KEYWORDS="~amd64 ~x86" IUSE="X mmx threads iconv opengl" DEPEND="X? ( x11-libs/libX11 x11-libs/libXext x11-libs/libXt ) @@ -21,12 +21,24 @@ S="${WORKDIR}/Squeak-${MY_PV}" +pkg_setup() { + local mygcc="~sys-devel/gcc-$(gcc-fullversion)" + # can't use built_with_use -o because of the interaction with --missing + if ! use x86 && ! use ppc && + ! built_with_use --missing false ${mygcc} libffi && + ! built_with_use --missing false ${mygcc} gcj; then + die "please rebuild ${mygcc} with the libffi USE-flag" + fi +} + src_unpack() { - base_src_unpack + unpack ${A} cd "${S}" ht_fix_all einfo "Patch for inisqueak" sed -i s/\${MAJOR}/39/ "${S}/platforms/unix/config/inisqueak.in" + # ht_fix_all doesn't catch this because there's no number + sed -i -e 's/tail +/tail -n +/' platforms/unix/config/inisqueak.in } src_compile() { @@ -43,7 +55,6 @@ --prefix=/usr \ --infodir=/usr/share/info \ --mandir=/usr/share/man \ - --with-ffi=x86-sysv \ ${myconf} || die "configure failed" emake || die }