/[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.4 - (show annotations) (download)
Mon May 15 06:41:19 2006 UTC (12 years, 2 months ago) by spyderous
Branch: MAIN
Changes since 1.3: +2 -2 lines
Keyword ~ppc.
(Portage version: 2.1_rc1-r2)

1 # Copyright 1999-2006 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-r2.ebuild,v 1.3 2006/01/29 16:22:30 blubb 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="~amd64 ~ppc ~x86"
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 .
51 }
52
53 src_compile() {
54 # Profile information will be installed in TOP_PATH:
55 TOP_PATH="${DESTTREE}"/lib/blas
56 # Libraries will be installed in RPATH:
57 RPATH="${TOP_PATH}"/reference
58
59 if use ifc; then
60 ifc_info
61 make static FC="ifc" FFLAGS="${IFCFLAGS}" || die
62 libtool --tag=F77 --mode=link ifc -shared ${IFCFLAGS} \
63 -Wl,-soname,libblas.so.0 -o libblas.so.0.0.0 *.lo || die
64 else
65 # libg2c is required to link to libblas.so using ifc:
66 make libs FC="g77" FFLAGS="${CFLAGS}" \
67 LIBTOOL_FLAGS="-rpath ${RPATH} -lg2c" || die
68 fi
69 }
70
71 src_install() {
72 if use ifc; then
73 strip --strip-unneeded libblas.so.0.0.0 || die
74 strip --strip-debug libblas.a || die
75
76 exeinto ${RPATH}
77 doexe libblas.so.0.0.0 || die
78 dosym libblas.so.0.0.0 ${RPATH}/libblas.so.0 || die
79 dosym libblas.so.0.0.0 ${RPATH}/libblas.so || die
80
81 insinto ${RPATH}
82 doins libblas.a || die
83 else
84 dodir ${RPATH} || die
85 libtool install -s libblas.la ${D}/${RPATH} || die
86 fi
87
88 insinto ${TOP_PATH}
89 doins ${FILESDIR}/f77-reference || die
90 }
91
92 pkg_postinst() {
93 blas-config f77-reference
94 }

  ViewVC Help
Powered by ViewVC 1.1.20