# $Id: Portfile,v 1.3 2006/05/06 11:12:51 mww Exp $

PortSystem		1.0
name			Coin
version			2.4.5
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		cssdev@mac.com
master_sites		http://ftp.coin3d.org/coin/src/all/
checksums		md5 99b83c5189c3755fd5f08fcad0994a7b

depends_build		lib:libX11.6:XFree86 bin:doxygen:doxygen
depends_lib		port:simage

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

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

variant aqua requires darwin {
	configure.args-delete	--without-framework --enable-darwin-x11
	configure.args-append	--with-framework=${destroot}/Library/Frameworks  --without-x
	depends_build-delete	lib:libX11.6:XFree86
}

variant devel {
	configure.args-append	--enable-next-minor --enable-debug
}

variant manpages {
	depends_build-append	bin:doxygen: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 {
	configure.args-append	--enable-threadsafe
}
