# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit mono eutils MY_P=${P/_rc/-rc} DESCRIPTION=".NET unit testing tool" HOMEPAGE="http://nunit.sourceforge.net/" SRC_URI="mirror://sourceforge/nunit/NUnit-2.2.2-src.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="dev-lang/mono dev-dotnet/nant" S=${WORKDIR}/${P}/src src_unpack() { #Extract Windows Zip (fails with warning if in ebuild) ${FILESDIR}/fixzip.sh ${DISTDIR}/${A} ${WORKDIR}/${P} cd ${S} #Convert windows directory paths to unix find ./ -name '*.build' -exec sed -i 's/\\/\//g' {} \; find ./ -name '*.build.include' -exec sed -i 's/\\/\//g' {} \; find ./ -name 'AssemblyInfo.cs' -exec sed -i 's/\\\\/\//g' {} \; } src_compile() { cd ${S} nant mono-1.0 release build || die } DLL_FILES="nunit-console-runner.dll nunit.core.dll nunit.extensions.dll nunit.util.dll nunit.framework.dll" src_install() { cd ${S}/build/mono/1.0/release # This installs all of the dll files with the exe file # directory. insinto /usr/share/nunit for dll in $DLL_FILES; do doins $dll || die "Failed to install DLL." done DEBUG_VAR="" use debug && DEBUG_VAR="--debug" cat > nunit <<- EOF #!/bin/bash mono $DEBUG_VAR /usr/share/nunit/nunit-console.exe "\$@" EOF insinto /usr/share/nunit/ doins nunit-console.exe doins nunit-console.exe.config dobin nunit use doc && dohtml -a gif,html,css,doc,xsd,xml,xstl,pdf,txt -r ${S}/../doc/sdk/ }