summaryrefslogtreecommitdiff
blob: b537a9b6d9ba214eef0f28129c08e69d1e1083cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-dotnet/nant/nant-0.85.ebuild,v 1.11 2008/11/27 18:42:44 ssuominen Exp $

inherit mono eutils

DESCRIPTION=".NET build tool"
HOMEPAGE="http://nant.sourceforge.net/"
SRC_URI="mirror://sourceforge/nant/${P}-src.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc x86"
IUSE=""

RDEPEND=">=dev-lang/mono-1.2.2.1"
DEPEND="${RDEPEND}
	dev-util/pkgconfig"

# This build is not parallel build friendly
MAKEOPTS="${MAKEOPTS} -j1"

src_unpack() {
	unpack ${A}
	cd "${S}"

	# Fix a problem with duplicate building caused by the doc= target
	for file in $(find "${S}"/src -name '*.build') ; do
		sed -i "s: doc=.*>:>:" ${file}
	done

	# Build against the .NET 2.0 Framework, as it is backwards compatible
	sed -i -e "s/-f:NAnt.build/-t:mono-2.0 -f:NAnt.build/" \
		"${S}"/Makefile || die "sed failed"

	# Patch to prevent build from failing due to threading issues (see bug #199748)
	epatch "${FILESDIR}"/${P}-threadingfix.patch

	# Patch to allow building on current mono releases
	epatch "${FILESDIR}"/${P}-obselencense.patch
}

src_compile() {
	# PPC Build Workaround
	if [[ ${ARCH} == "ppc" ]] ; then
		export MONO_NO_UNLOAD=1
	fi

	emake || die
}

src_install() {
	make prefix="${D}/usr" install || die "install failed"

	# Fix ${D} showing up in the nant wrapper script, as well as silencing
	# warnings related to the log4net library
	sed -i \
		-e "s:${D}::" \
		-e "2iexport MONO_SILENT_WARNING=1" \
		"${D}"/usr/bin/nant

	dodoc README.txt
}