/[gentoo-x86]/app-sci/lapack-reference/lapack-reference-3.0.ebuild
Gentoo

Contents of /app-sci/lapack-reference/lapack-reference-3.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Wed Dec 29 18:29:15 2004 UTC (9 years, 7 months ago) by ribosome
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Moved to sci-libs/lapack-reference.

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-sci/lapack-reference/lapack-reference-3.0.ebuild,v 1.5 2004/09/06 00:02:22 ciaranm Exp $
4
5 inherit eutils
6
7 MyPN=${PN/-reference/}
8
9 DESCRIPTION="FORTRAN reference implementation of LAPACK Linear Algebra PACKage"
10 HOMEPAGE="http://www.netlib.org/lapack/index.html"
11 SRC_URI="http://www.netlib.org/lapack/${MyPN}.tgz
12 mirror://gentoo/${MyPN}-20020531-20021004.patch.bz2
13 mirror://gentoo/${MyPN}-gentoo.patch"
14
15 LICENSE="lapack"
16 SLOT="0"
17 KEYWORDS="~x86 ~amd64"
18 IUSE="ifc"
19
20 DEPEND="sys-devel/libtool
21 app-sci/lapack-config
22 ifc? ( dev-lang/ifc )"
23
24 RDEPEND="virtual/blas
25 ifc? ( dev-lang/ifc )" # Need ifc runtime libraries
26
27 PROVIDE="virtual/lapack"
28
29 S=${WORKDIR}/LAPACK
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 # This version of lapack *can* be build completely with ifc
51 use ifc || \
52 if [ -z `which g77` ]; then
53 eerror "g77 not found on the system!"
54 eerror "Please add f77 to your USE flags and reemerge gcc!"
55 die
56 fi
57 }
58
59 src_unpack() {
60 unpack ${A}
61 epatch ${DISTDIR}/lapack-20020531-20021004.patch.bz2
62 epatch ${DISTDIR}/lapack-gentoo.patch
63 }
64
65 src_compile() {
66 TOP_PATH=${DESTTREE}/lib/lapack
67 # Library will be installed in RPATH:
68 RPATH=${TOP_PATH}/reference
69
70 if use ifc
71 then
72 FC="ifc"
73 FFLAGS="${IFCFLAGS}"
74 NOOPT="-O0" # Do NOT change this. It is applied to two files with
75 # routines to determine machine constants.
76 ifc_info
77 else
78 FC="g77"
79 FFLAGS="${CFLAGS}"
80 NOOPT=""
81 # libg2c is required to link with liblapack.so using ifc:
82 DEP_LIBS="-lg2c"
83 fi
84
85 DEP_LIBS="${DEP_LIBS} -lblas"
86
87 cd ${S}/SRC
88 make all \
89 FORTRAN="libtool --mode=compile --tag=F77 ${FC}"\
90 OPTS="${FFLAGS}"\
91 NOOPT="${NOOPT}" \
92 || die
93
94 if use ifc
95 then
96 ${FC} -shared ${FFLAGS} *.lo ${DEP_LIBS} \
97 -Wl,-soname -Wl,liblapack.so.0 -o liblapack.so.0.0.0 \
98 -Vaxlib # Intel portability library that provides the etime function
99 ar cru liblapack.a *.o
100 ranlib liblapack.a
101 else
102 libtool --mode=link --tag=CC ${FC} ${FFLAGS} -o liblapack.la *.lo \
103 -rpath ${RPATH} ${DEP_LIBS}
104 fi
105 }
106
107 src_install() {
108 dodir ${RPATH}
109
110 cd ${S}/SRC
111
112 if use ifc
113 then
114 strip --strip-unneeded liblapack.so.0.0.0
115 strip --strip-debug liblapack.a
116
117 exeinto ${RPATH}
118 doexe liblapack.so.0.0.0
119 dosym liblapack.so.0.0.0 ${RPATH}/liblapack.so.0
120 dosym liblapack.so.0.0.0 ${RPATH}/liblapack.so
121
122 insinto ${RPATH}
123 doins liblapack.a
124 else
125 libtool --mode=install install -s liblapack.la ${D}/${RPATH}
126 fi
127
128 insinto ${TOP_PATH}
129 doins ${FILESDIR}/f77-reference
130
131 dodoc ${S}/README
132 }
133
134 pkg_postinst() {
135 ${DESTTREE}/bin/lapack-config reference
136 }

  ViewVC Help
Powered by ViewVC 1.1.20