diff options
Diffstat (limited to 'sci-mathematics/netgen/netgen-4.9.11-r1.ebuild')
-rw-r--r-- | sci-mathematics/netgen/netgen-4.9.11-r1.ebuild | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/sci-mathematics/netgen/netgen-4.9.11-r1.ebuild b/sci-mathematics/netgen/netgen-4.9.11-r1.ebuild new file mode 100644 index 000000000..e52970d92 --- /dev/null +++ b/sci-mathematics/netgen/netgen-4.9.11-r1.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="2" + +inherit eutils versionator multilib flag-o-matic + +DESCRIPTION="NETGEN is an automatic 3d tetrahedral mesh generator" +HOMEPAGE="http://www.hpfem.jku.at/netgen/" +SRC_URI="mirror://sourceforge/netgen-mesher/${P}.tar.gz" + +LICENSE="LGPL-2.1" +KEYWORDS="~amd64 ~x86" +IUSE="opencascade jpeg -mpi -ffmpeg" +SLOT="0" + +DEPEND="dev-tcltk/tix + dev-tcltk/togl:1.7 + virtual/opengl + x11-libs/libXmu + opencascade? ( sci-libs/opencascade ) + ffmpeg? ( media-video/ffmpeg ) + jpeg? ( media-libs/jpeg ) + mpi? ( virtual/mpi ) " +RDEPEND="${DEPEND}" +# Note, MPI has not be tested. + +src_configure() { + # This is not the most clever way to deal with these flags + # but --disable-xxx does not seem to work correcly, so... + local myconf="" + + if use opencascade; then + myconf="${myconf} --enable-occ --with-occ=$CASROOT" + append-ldflags -L$CASROOT/lin/$(get_libdir) + fi + + use mpi && myconf="${myconf} --enable-parallel" + use ffmpeg && myconf="${myconf} --enable-ffmpeg" + use jpeg && myconf="${myconf} --enable-jpeglib" + + append-flags -I/usr/include/togl-1.7 + + econf \ + ${myconf} + + # This would be the more elegant way: +# econf \ +# $(use_enable opencascade occ) \ +# $(use_with opencascade "occ=$CASROOT") \ +# $(use_enable mpi parallel) \ +# $(use_enable ffmpeg) \ +# $(use_enable jpeg jpeglib) +} + +src_install() { + local NETGENDIR="/usr/share/netgen" + + echo -e "NETGENDIR=${NETGENDIR}" > ./99netgen + doenvd 99netgen + + emake DESTDIR="${D}" install || die "make install failed" + mv "${D}"/usr/bin/{*.tcl,*.ocf} "${D}${NETGENDIR}" + + # Install icon and .desktop for menu entry + doicon "${FILESDIR}"/${PN}.png || die "doicon failed" + domenu "${FILESDIR}"/${PN}.desktop || die "domenu failed" +} + +pkg_postinst() { + elog "Please make sure to update your environment variables:" + elog "env-update && source /etc/profile" + elog "Netgen ebuild is still under development." + elog "Help us improve the ebuild in:" + elog "http://bugs.gentoo.org/show_bug.cgi?id=155424" +} |