# $Id: Portfile,v 1.48 2006/04/20 19:53:32 mww Exp $

PortSystem 1.0

name			mono
version			1.1.15
categories		devel lang mono
platforms		darwin
maintainers		mww@opendarwin.org
description		Implementation of the .NET Development Framework
long_description	Mono is an effort to create an open source \
			implementation of the .NET Development Framework \
			including a C# compiler.

homepage		http://www.go-mono.com/
master_sites		http://go-mono.com/sources/mono/
checksums		sha1 824e3dea0af94b96a177ed3d1439fca712f06ad2

depends_lib		port:pkgconfig port:gettext port:glib2 port:icu port:boehmgc \
			port:libiconv port:zlib

configure.env		CPPFLAGS="-I${prefix}/include" \
			LDFLAGS="-L${prefix}/lib" \
			ACLOCAL_FLAGS="-I ${prefix}/share/aclocal" \
			PKG_CONFIG_PATH="${prefix}/lib/pkgconfig:${x11prefix}/lib/pkgconfig"
configure.args		--with-gc=boehm \
			--with-preview=yes \
			--without-sigaltstack \
			--enable-threads=pthreads \
			--mandir=${prefix}/share/man

#destroot.env	DYLD_LIBRARY_PATH=${worksrcpath}/mono/mini/.libs:${worksrcpath}/mono/interpreter/.libs:${prefix}/lib:${x11prefix}/lib

test.run		yes
test.target		check

post-destroot {
	set doc	${worksrcpath}/docs
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	file copy ${doc}/assembly-bundle ${doc}/embedded-api ${doc}/exceptions \
		${doc}/gc-issues ${doc}/jit-thoughts ${doc}/jit-trampolines \
		${doc}/object-layout ${doc}/stack-alignment \
		${doc}/unmanaged-calls ${worksrcpath}/AUTHORS \
		${worksrcpath}/COPYING.LIB ${worksrcpath}/ChangeLog \
		${worksrcpath}/NEWS ${worksrcpath}/README \
		${destroot}${prefix}/share/doc/${name}
}

platform darwin 8 {
	configure.env-append	CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}

