# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit fortran FORTRAN="gfortran" DESCRIPTION="A full-potential linearised augmented-plane wave (FP-LAPW) code with many advanced features" HOMEPAGE="http://exciting.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tgz" LICENSE="GPL-2 LGPL-2.1" SLOT="0" KEYWORDS="~x86" IUSE="" RDEPEND="virtual/lapack virtual/blas" DEPEND="${RDEPEND}" S="${WORKDIR}/${PN}" src_unpack() { unpack ${A} cd "${S}" sed -i \ -e 's:^\(LIB_LPK=\).*:\1"-llapack -lblas":g' \ setup || die "setup sed failed" sed -i \ -e 's~^\(all:\).*~\1 fft exciting~g' \ src/Makefile || die "Makefile sed failed" } src_compile() { local SETUP="${T}/setup" cat >> ${SETUP} <<- EOF o ${FORTRANC} ${FFLAGS} ${FORTRANC} ${FFLAGS} EOF ./setup < ${SETUP} || die "setup failed" emake || die "emake failed" } src_install() { dobin src/${PN} src/eos/eos src/spacegroup/spacegroup src/species/species \ || die "dobin failed" newdoc src/eos/README README.eos || die "newdoc failed" dodoc README || die "dodoc failed" insinto /usr/share/doc/${PF} doins -r examples || die "examples failed" dodoc docs/*/* || die "dodoc failed" insinto /usr/share/${PN} doins -r species || die "species failed" } pkg_postinst() { elog "This release may be used for limited production, but please check" elog "the consistency of the results carefully." }