# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="Fortran 95 Interface to LAPACK (Linear Algebra PACKage)" HOMEPAGE="http://www.netlib.org/lapack95/index.html" SRC_URI="http://www.netlib.org/lapack95/${PN}.tgz" LICENSE="lapack" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="sys-devel/libtool dev-lang/ifc" RDEPEND="virtual/lapack" S=${WORKDIR}/LAPACK95 src_unpack() { unpack ${A} epatch ${FILESDIR}/lapack95-gentoo.patch } src_compile() { # Library will be installed in RPATH: RPATH=${DESTTREE}/lib # ifc enables -O2 by default. You can set higher optimizations and # procesesor specific flags in IFC_FLAGS, but since this is just a wrapper # lib to F77 lapack, you probably won't gain much by doing so: IFC_FLAGS="-u -mp" cd ${S}/SRC make single_double_complex_dcomplex \ FC="libtool --mode=compile ifc -FR" \ FC1="libtool --mode=compile ifc -FI" \ OPTS0="${IFC_FLAGS}" \ || die ifc -shared ${IFC_FLAGS} *.lo -llapack \ -Wl,-soname -Wl,liblapack95.so.0 -o liblapack95.so.0.0.0 \ ar cru liblapack95.a *.o ranlib liblapack95.a } src_install() { cd ${S}/SRC strip --strip-unneeded liblapack95.so.0.0.0 strip --strip-debug liblapack95.a dolib.so liblapack95.so.0.0.0 dolib.a liblapack95.a dosym liblapack95.so.0.0.0 ${RPATH}/liblapack95.so.0 dosym liblapack95.so.0.0.0 ${RPATH}/liblapack95.so insinto ${DESTTREE}/include/lapack95 doins *.mod } pkg_postinst() { einfo einfo "Documentation for LAPACK95 is available online at:" einfo "http://www.netlib.org/lapack95/lug95/" einfo einfo "Module files are installed in /usr/include/lapack95, so compile" einfo "with -I/usr/include/lapack95." einfo einfo "To link with the shared library, simply specify" einfo einfo "-llapack95" einfo einfo "Note: there is no need to specify -llapack and/or -lblas." einfo "The LAPACK and BLAS libraries set by lapack-config and blas-config" einfo "will be pulled in automatically if you use the shared versions." einfo }