# $Id: Portfile 52959 2009-06-26 11:49:57Z css@macports.org $

PortSystem		1.0

name			Coin
version			3.1.0
description		cross platform C++ OpenGL scene graph library
long_description	Coin is a high-level 3D graphics library with a   \
	C++ Application Programming Interface. Coin uses scene-graph data \
	structures to render real-time graphics suitable for mostly all   \
	kinds of scientific and engineering visualization applications.

categories		graphics devel
homepage		http://www.coin3d.org/lib/coin/
platforms		darwin
maintainers		css
master_sites		http://ftp.coin3d.org/coin/src/all/
checksums		md5 bbb3956e68a88c6e4a074a7283656955 \
			sha1 369f3b28baa7725ab2a3f0f2cf4ccaa191fcecc5 \
			rmd160 0fd8125b08be4d623d2ded14feceb0c70b45eec4

depends_lib		port:simage \
			port:xorg-libsm \
			port:xorg-libXext

use_configure		yes
configure.args		--with-simage=${prefix} --mandir=${prefix}/share/man

platform darwin {
	configure.args-append	--disable-framework --enable-darwin-x11
}

variant aqua requires darwin {
	configure.args-delete	--disable-framework --enable-darwin-x11
	configure.args-append	--with-framework=${destroot}/Library/Frameworks  --without-x
	depends_lib-delete	port:xorg-libsm \
				port:xorg-libXext
}

variant devel description {Activate developer features, including debug libraries.} {
	configure.args-append	--enable-next-minor --enable-debug
}

variant manpages description {Include API documentation in manpages.} {
	depends_build-append	port:doxygen
	configure.args-append	--enable-man --mandir=${prefix}/share/man
	post-destroot {
		file rename ${destroot}${prefix}/share/man/man3/threads.3 \
			${destroot}${prefix}/share/man/man3/threads-coin.3
		file rename ${destroot}${prefix}/share/man/man3/manips.3 \
			${destroot}${prefix}/share/man/man3/manips-coin.3
	}
}

variant threadsafe description {Allow threadsafe scene graph traversals.} {
	configure.args-append	--enable-threadsafe
}
