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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat Feb 18 20:48:37 2006 UTC (14 years, 5 months ago) by kugelfang
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Removed obsolete and masked version.
(Portage version: 2.1_pre4-r1)

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-r1.ebuild,v 1.5 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 HOMEPAGE="http://www.netlib.org/blas/"
10 SRC_URI="http://www.netlib.org/blas/${Name}.tgz"
11
12 LICENSE="public-domain"
13 SLOT="0"
14 #KEYWORDS="~x86 ~amd64"
15 KEYWORDS="-*"
16 IUSE="ifc"
17
18 DEPEND="sci-libs/blas-config
19 >=sys-devel/libtool-1.5
20 ifc? ( dev-lang/ifc )"
21
22 RDEPEND="ifc? ( dev-lang/ifc )" # Need ifc runtime libraries
23
24 PROVIDE="virtual/blas"
25
26 S=${WORKDIR}
27
28 #TODO: detect 64bit size from compiler, not eclass
29 FORTRAN="g77 ifc" || FORTRAN="g77 f2c ifc" # No f2c on 64-bit systems yet :-/
30
31 ifc_info() {
32 if [ -z "${IFCFLAGS}" ]
33 then
34 einfo
35 einfo "You may want to set some ifc optimization flags by running this"
36 einfo "ebuild as, for example, \`IFCFLAGS=\"-O3 -tpp7 -xW\" emerge blas\`"
37 einfo "(Pentium 4 exclusive optimizations)."
38 einfo
39 einfo "ifc defaults to -O2, with code tuned for Pentium 4, but that"
40 einfo "will run on any processor."
41 einfo
42 einfo "Beware that ifc's -O3 is very aggressive, sometimes resulting in"
43 einfo "significantly worse performance."
44 einfo
45 epause 5
46 fi
47 }
48
49 pkg_setup() {
50 use ifc || if [ -z `which g77` ]; then
51 #if ifc is defined then the dep was already checked
52 eerror "No fortran compiler found on the system!"
53 eerror "Please add g77 to your USE flags and reemerge gcc!"
54 die
55 fi
56 }
57
58 src_unpack() {
59 unpack ${A}
60 cd ${S}
61 cp ${FILESDIR}/Makefile .
62 }
63
64 src_compile() {
65 # Profile information will be installed in TOP_PATH:
66 TOP_PATH=${DESTTREE}/lib/blas
67 # Libraries will be installed in RPATH:
68 RPATH=${TOP_PATH}/reference
69
70 if use ifc
71 then
72 ifc_info
73 make static FC="ifc" FFLAGS="${IFCFLAGS}"
74 ifc -shared ${IFCFLAGS} \
75 -Wl,-soname,libblas.so.0 -o libblas.so.0.0.0 *.lo
76 else
77 # libg2c is required to link to libblas.so using ifc:
78 make libs \
79 FC="g77" \
80 FFLAGS="${CFLAGS}" \
81 LIBTOOL_FLAGS="-rpath ${RPATH} -lg2c" \
82 || die
83 fi
84 }
85
86 src_install() {
87 if use ifc
88 then
89 strip --strip-unneeded libblas.so.0.0.0
90 strip --strip-debug libblas.a
91
92 exeinto ${RPATH}
93 doexe libblas.so.0.0.0
94 dosym libblas.so.0.0.0 ${RPATH}/libblas.so.0
95 dosym libblas.so.0.0.0 ${RPATH}/libblas.so
96
97 insinto ${RPATH}
98 doins libblas.a
99 else
100 dodir ${RPATH}
101 libtool install -s libblas.la ${D}/${RPATH}
102 fi
103
104 insinto ${TOP_PATH}
105 doins ${FILESDIR}/f77-reference
106 }
107
108 pkg_postinst() {
109 blas-config f77-reference
110 }

  ViewVC Help
Powered by ViewVC 1.1.20