# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ V="v${PV}" N="`echo \"${PN}\" | tr a-z A-Z`" DESCRIPTION="Set of routines for solving unsymmetric sparse linear systems using the Unsymmetric MultiFrontal method" HOMEPAGE="http://www.cise.ufl.edu/research/sparse/umfpack/" SRC_URI="http://www.cise.ufl.edu/research/sparse/umfpack/${V}/${N}${V}.tar.gz" LICENSE="UMFPACK" SLOT="0" KEYWORDS="~x86" IUSE="atlas" DEPEND="atlas? ( >=sci-libs/atlas-3.4.1 )" S="${WORKDIR}/${N}${V}" src_compile() { cd ${S}/AMD/Make sed -i -e "s:# include ../Make/Make.linux:include ../Make/Make.linux:g" \ Make.include use atlas && sed -i -e "s:CONFIG =:CONFIG = -DCBLAS:g" \ -e "s:LIB = -lgoto -lxerbla -lfrtbegin -lg2c -lm:LIB = -lcblas -latlas -lm:g" \ Make.linux use atlas || sed -i -e "s:CONFIG =:CONFIG = -DNBLAS:g" \ -e "s:LIB = -lgoto -lxerbla -lfrtbegin -lg2c -lm:LIB = -lm:g" \ Make.linux cd ${S}/UMFPACK make lib || die } src_install() { cd ${S}/UMFPACK/Lib dolib.a *.a cd ${S}/AMD/Lib dolib.a *.a dodir /usr/include/umfpack || die insinto /usr/include/umfpack cd ${S}/UMFPACK/Include doins *.h cd ${S}/AMD/Include doins *.h }