diff -ur bam.orig/bam-0.3.2.ebuild bam/bam-0.3.2.ebuild --- bam.orig/bam-0.3.2.ebuild 2010-03-25 07:25:56.000000000 +0800 +++ bam/bam-0.3.2.ebuild 2011-11-26 23:18:34.305000062 +0800 @@ -4,7 +4,7 @@ EAPI="2" -inherit eutils +inherit eutils python toolchain-funcs DESCRIPTION="Fast and flexible Lua-based build system" HOMEPAGE="http://matricks.github.com/bam/" @@ -18,8 +18,15 @@ RDEPEND="dev-lang/lua" DEPEND="${RDEPEND} - doc? ( dev-lang/python ) - test? ( dev-lang/python )" + doc? ( =dev-lang/python-2* ) + test? ( =dev-lang/python-2* )" + +pkg_setup() { + if use doc || use test; then + python_set_active_version 2 + python_pkg_setup + fi +} src_prepare() { cp "${WORKDIR}"/Makefile "${S}"/Makefile || die "cp failed" @@ -35,9 +42,9 @@ } src_compile() { - emake txt2c || die "emake failed" - emake internal_base || die "emake failed" - emake ${PN} || die "emake failed" + emake CC=$(tc-getCC) txt2c || die "emake failed" + emake CC=$(tc-getCC) internal_base || die "emake failed" + emake CC=$(tc-getCC) ${PN} || die "emake failed" if use doc; then python scripts/gendocs.py || die "doc generation failed"