/[gentoo-x86]/sci-libs/blas-reference/blas-reference-19940131-r2.ebuild
Gentoo

Contents of /sci-libs/blas-reference/blas-reference-19940131-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sun Nov 13 05:42:14 2005 UTC (13 years ago) by ribosome
Branch: MAIN
Migrated to fortran.eclass (bug #65950)
(Portage version: 2.0.51.22-r3)

1 ribosome 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3     # $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-reference/blas-reference-19940131-r1.ebuild,v 1.4 2005/05/05 02:44:35 vapier Exp $
4    
5     inherit eutils fortran
6    
7     Name="blas"
8     DESCRIPTION="FORTRAN reference implementation of the BLAS (linear algebra lib)"
9     LICENSE="public-domain"
10     HOMEPAGE="http://www.netlib.org/blas/"
11     SRC_URI="http://www.netlib.org/blas/${Name}.tgz"
12    
13     SLOT="0"
14     IUSE="ifc"
15     KEYWORDS="~x86 ~amd64"
16    
17     DEPEND="sci-libs/blas-config
18     >=sys-devel/libtool-1.5
19     ifc? ( dev-lang/ifc )"
20    
21     RDEPEND="ifc? ( dev-lang/ifc )" # Need ifc runtime libraries
22    
23     PROVIDE="virtual/blas"
24    
25     #TODO: detect 64bit size from compiler, not eclass
26     FORTRAN="g77 ifc" || FORTRAN="g77 f2c ifc" # No f2c on 64-bit systems yet :-/
27    
28     S="${WORKDIR}"
29    
30     ifc_info() {
31     if [ -z "${IFCFLAGS}" ]
32     then
33     einfo
34     einfo "You may want to set some ifc optimization flags by running this"
35     einfo "ebuild as, for example, \`IFCFLAGS=\"-O3 -tpp7 -xW\" emerge blas\`"
36     einfo "(Pentium 4 exclusive optimizations)."
37     einfo
38     einfo "ifc defaults to -O2, with code tuned for Pentium 4, but that"
39     einfo "will run on any processor."
40     einfo
41     einfo "Beware that ifc's -O3 is very aggressive, sometimes resulting in"
42     einfo "significantly worse performance."
43     einfo
44     fi
45     }
46    
47     src_unpack() {
48     unpack ${A}
49     cd "${S}"
50     cp "${FILESDIR}"/Makefile.gz .
51     gunzip Makefile.gz
52     }
53    
54     src_compile() {
55     # Profile information will be installed in TOP_PATH:
56     TOP_PATH="${DESTTREE}"/lib/blas
57     # Libraries will be installed in RPATH:
58     RPATH="${TOP_PATH}"/reference
59    
60     if use ifc; then
61     ifc_info
62     make static FC="ifc" FFLAGS="${IFCFLAGS}" || die
63     ifc -shared ${IFCFLAGS} -Wl,-soname,libblas.so.0 \
64     -o libblas.so.0.0.0 *.lo || die
65     else
66     # libg2c is required to link to libblas.so using ifc:
67     make libs FC="g77" FFLAGS="${CFLAGS}" \
68     LIBTOOL_FLAGS="-rpath ${RPATH} -lg2c" || die
69     fi
70     }
71    
72     src_install() {
73     if use ifc; then
74     strip --strip-unneeded libblas.so.0.0.0 || die
75     strip --strip-debug libblas.a || die
76    
77     exeinto ${RPATH}
78     doexe libblas.so.0.0.0 || die
79     dosym libblas.so.0.0.0 ${RPATH}/libblas.so.0 || die
80     dosym libblas.so.0.0.0 ${RPATH}/libblas.so || die
81    
82     insinto ${RPATH}
83     doins libblas.a || die
84     else
85     dodir ${RPATH} || die
86     libtool install -s libblas.la ${D}/${RPATH} || die
87     fi
88    
89     insinto ${TOP_PATH}
90     doins ${FILESDIR}/f77-reference || die
91     }
92    
93     pkg_postinst() {
94     blas-config f77-reference
95     }

  ViewVC Help
Powered by ViewVC 1.1.20