# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit autotools eutils ELMER_ROOT="elmerfem" DESCRIPTION="Elmer is a collection of finite element programs, libraries, and visualization tools, meshgen2d" HOMEPAGE="http://www.csc.fi/english/pages/elmer" SRC_URI="mirror://sourceforge/${ELMER_ROOT}/${ELMER_ROOT}-${PV}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" IUSE="debug" DEPEND="sys-libs/glibc" RDEPEND="${DEPEND}" S="${WORKDIR}/${ELMER_ROOT}-${PV}/meshgen2d" src_unpack() { unpack ${A} cd "${S}" eautoreconf } src_compile() { cd "${S}" local myconf export FC="gfortran" export F77="gfortran" use debug && myconf="${myconf} --with-debug" || myconf="${myconf} --without-debug" econf $myconf || die "econf failed" emake || die "emake failed" } src_install() { emake DESTDIR="${D}" install || die "emake install failed" }