summaryrefslogtreecommitdiff
blob: ff1d7722d6c290ce853188a62dfb2f2042737054 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-lang/mono/mono-1.1.10.ebuild,v 1.1.1.1 2005/11/30 09:58:07 chriswhite Exp $

inherit eutils mono flag-o-matic multilib

DESCRIPTION="Mono runtime and class libraries, a C# compiler/interpreter"
HOMEPAGE="http://www.go-mono.com/"
SRC_URI="http://www.go-mono.com/sources/mono-${PV:0:3}/${P}.tar.gz"

LICENSE="|| ( GPL-2 LGPL-2 X11)"
SLOT="0"
KEYWORDS="~x86 ~ppc ~amd64"
IUSE="nptl X"

DEPEND="virtual/libc
	>=dev-libs/glib-2.0
	sys-devel/bc
	!<dev-dotnet/pnet-0.6.12
	nptl? ( >=sys-devel/gcc-3.3.5-r1 )
	ppc? (
		>=sys-devel/gcc-3.2.3-r4
		>=sys-libs/glibc-2.3.3_pre20040420
	)"

RDEPEND="${DEPEND}
	X? ( >=dev-dotnet/libgdiplus-${PV} )
	dev-util/pkgconfig
	dev-libs/libxml2"

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

	# Fix munging of Unix paths
	epatch ${FILESDIR}/${PN}-1.1.5-pathfix.diff

	# Install all our .dlls under $(libdir), not $(prefix)/lib
	if [ $(get_libdir) != "lib" ] ; then
		sed -i -e 's:$(prefix)/lib:$(libdir):' \
			-e 's:$(exec_prefix)/lib:$(libdir):' \
			-e "s:'mono_libdir=\${exec_prefix}/lib':\"mono_libdir=\$libdir\":" \
			${S}/{scripts,mono/metadata,mono/os/unix}/Makefile.am \
			${S}/configure.in || die "sed failed"
		sed -i -e 's:^libdir.*:libdir=@libdir@:' \
			${S}/{scripts,}/*.pc.in || die "sed failed"
	fi

	libtoolize --copy --force || die "libtoolize failed"
	aclocal || die "aclocal failed"
	autoconf || die "autoconf failed"
	automake || die "automake failed"
}

src_compile() {
	strip-flags

	local myconf="--with-preview=yes"

	# Force __thread on amd64. See bug #83770
	if use amd64
	then
		myconf="${myconf} --with-tls=__thread"
	else
		if use nptl
		then
			myconf="${myconf} --with-tls=__thread"
		else
			myconf="${myconf} --with-tls=pthread"
		fi
	fi

	econf ${myconf} || die
	emake -j1 || die "MONO compilation failure"
}

src_install() {
	make DESTDIR=${D} install || die

	dodoc AUTHORS ChangeLog NEWS README
	docinto docs
	dodoc docs/*
	docinto libgc
	dodoc libgc/ChangeLog
}

pkg_postinst() {
	ewarn "This version of mono has changed the assembly version for"
	ewarn "ICSharpCode.SharpZipLib, which may break some installed"
	ewarn "applications such as monodoc. Please re-emerge monodoc and any"
	ewarn "other packages you have which may make use of this library."
}