# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit eutils toolchain-funcs DESCRIPTION="A lua-based build environment generation tool" HOMEPAGE="http://premake.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="debug doc" DEPEND="app-arch/unzip doc? ( app-doc/doxygen )" RDEPEND="" # Added in 4.1.2 for two test failures, prev versions were clean RESTRICT=test src_prepare() { cd "${S}" epatch "${FILESDIR}"/${PN}-4.1.2-Makefile.patch } src_compile() { use debug && myconfig="debug" || myconfig="release" export CC=$(tc-getCC) export CXX=$(tc-getCXX) export AR=$(tc-getAR) cd build/gmake.unix emake config=$myconfig verbose=true || die "make failed" if use doc; then cd "${S}" doxygen -u doxyfile &> /dev/null || die "updating doxygen config failed" doxygen doxyfile || die "making docs failed" fi } src_test() { use debug && myconfig="debug" || myconfig="release" cd "${S}"/tests sed -i -e "s:debug:${myconfig}:" test ./test || die "Tests failed." } src_install() { use debug && myconfig="debug" || myconfig="release" exeinto /usr/bin doexe "${S}"/bin/${myconfig}/premake4 if use doc; then insinto /usr/share/doc/${PF} dohtml -r "${S}"/doc/html/* fi dodoc BUILD.txt CHANGES.txt README.txt }