# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit distutils eutils DESCRIPTION="Scientific data visualizer" HOMEPAGE="http://mayavi.sourceforge.net" LICENSE="BSD" SLOT="0" KEYWORDS="~x86" IUSE="doc" DEPEND=">=dev-lang/python-2.0 >=dev-lang/tcl-8.2.3 sci-libs/vtk" SRC_URI="http://download.sourceforge.net/mayavi/MayaVi-${PV}.tar.gz" S=${WORKDIR}/MayaVi-${PV} pkg_setup() { if ! built_with_use dev-lang/python tk ; then eerror "python is missing tk support." eerror "Please add 'tk' to your USE flags, and re-emerge python." die "python needs tk support" fi # does vtk have to be compiled with patented? Comment #5 in bug #50464 says # it does... #if ! built_with_use sci-libs/vtk tcl tk patented ; then # eerror "vtk is missing tcl, tk or patented support." # eerror "Please ensure you have the 'tcl', 'tk' and 'patented' USE flags" # eerror "enabled for vtk and then re-emerge vtk." # die "vtk needs tcl, tk and patented USE flags" #fi if ! built_with_use sci-libs/vtk tcl tk ; then eerror "vtk is missing tcl or tk support." eerror "Please ensure you have the 'tcl' and 'tk' USE flags" eerror "enabled for vtk and then re-emerge vtk." die "vtk needs tcl and tk USE flags" fi } src_compile() { distutils_src_compile || die "src compile failed" } src_install() { distutils_src_install cd doc dodoc *.txt if use doc; then dohtml -r guide/* dodir /usr/share/doc/${PF}/examples/ cp -r ${S}/examples/* ${D}/usr/share/doc/${PF}/examples/ fi } pkg_postinst() { if ! built_with_use sci-libs/vtk patented ; then ewarn "Mayavi may require vtk to be built with the 'patent' USE flag" ewarn "to be fully functional" fi }