1 |
jlec 10/04/20 18:41:05 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: lapack-atlas-3.9.23-r3.ebuild |
5 |
Log: |
6 |
Fixing for prefix |
7 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.81 sci-libs/lapack-atlas/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/lapack-atlas/ChangeLog?rev=1.81&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/lapack-atlas/ChangeLog?rev=1.81&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/lapack-atlas/ChangeLog?r1=1.80&r2=1.81 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sci-libs/lapack-atlas/ChangeLog,v |
19 |
retrieving revision 1.80 |
20 |
retrieving revision 1.81 |
21 |
diff -u -r1.80 -r1.81 |
22 |
--- ChangeLog 15 Apr 2010 20:21:21 -0000 1.80 |
23 |
+++ ChangeLog 20 Apr 2010 18:41:05 -0000 1.81 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for sci-libs/lapack-atlas |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-atlas/ChangeLog,v 1.80 2010/04/15 20:21:21 jlec Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-atlas/ChangeLog,v 1.81 2010/04/20 18:41:05 jlec Exp $ |
29 |
+ |
30 |
+*lapack-atlas-3.9.23-r3 (20 Apr 2010) |
31 |
+ |
32 |
+ 20 Apr 2010; Justin Lecher <jlec@g.o> |
33 |
+ +lapack-atlas-3.9.23-r3.ebuild: |
34 |
+ Fixing for prefix |
35 |
|
36 |
*lapack-atlas-3.9.23-r2 (15 Apr 2010) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 sci-libs/lapack-atlas/lapack-atlas-3.9.23-r3.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/lapack-atlas/lapack-atlas-3.9.23-r3.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/lapack-atlas/lapack-atlas-3.9.23-r3.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: lapack-atlas-3.9.23-r3.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2010 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/sci-libs/lapack-atlas/lapack-atlas-3.9.23-r3.ebuild,v 1.1 2010/04/20 18:41:05 jlec Exp $ |
51 |
|
52 |
EAPI="3" |
53 |
|
54 |
inherit eutils flag-o-matic toolchain-funcs fortran autotools versionator |
55 |
|
56 |
MY_PN="${PN/lapack-/}" |
57 |
PATCH_V="3.9.21" |
58 |
L_PN="lapack" |
59 |
L_PV="3.1.1" |
60 |
BlasRelease=$(get_version_component_range 1-3) |
61 |
|
62 |
DESCRIPTION="F77 and C LAPACK implementations using available ATLAS routines" |
63 |
LICENSE="BSD" |
64 |
HOMEPAGE="http://math-atlas.sourceforge.net/" |
65 |
SRC_URI1="mirror://sourceforge/math-atlas/${MY_PN}${PV}.tar.bz2" |
66 |
SRC_URI2="http://www.netlib.org/${L_PN}/${L_PN}-lite-${L_PV}.tgz" |
67 |
SRC_URI="${SRC_URI1} ${SRC_URI2} |
68 |
mirror://gentoo/${MY_PN}-${PATCH_V}-shared-libs.2.patch.bz2 |
69 |
mirror://gentoo/${L_PN}-reference-${L_PV}-autotools.patch.bz2" |
70 |
|
71 |
SLOT="0" |
72 |
IUSE="doc" |
73 |
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" |
74 |
|
75 |
CDEPEND="virtual/blas |
76 |
virtual/cblas |
77 |
app-admin/eselect-lapack |
78 |
~sci-libs/blas-atlas-${BlasRelease}" |
79 |
DEPEND="${CDEPEND} |
80 |
dev-util/pkgconfig |
81 |
>=sys-devel/libtool-1.5" |
82 |
RDEPEND="${CDEPEND} |
83 |
doc? ( app-doc/lapack-docs )" |
84 |
|
85 |
FORTRAN="g77 gfortran ifc" |
86 |
|
87 |
S="${WORKDIR}/ATLAS" |
88 |
S_LAPACK="${WORKDIR}/${L_PN}-lite-${L_PV}" |
89 |
BLD_DIR="${S}/gentoo-build" |
90 |
RPATH="/usr/$(get_libdir)/${L_PN}/${MY_PN}" |
91 |
S_LAPACK="${WORKDIR}"/${L_PN}-lite-${L_PV} |
92 |
|
93 |
src_prepare() { |
94 |
epatch "${DISTDIR}"/${MY_PN}-${PATCH_V}-shared-libs.2.patch.bz2 |
95 |
epatch "${FILESDIR}"/${MY_PN}-asm-gentoo.patch |
96 |
epatch "${FILESDIR}"/${PN}-${PATCH_V}-lam.patch |
97 |
|
98 |
# make sure the compile picks up the proper includes |
99 |
sed -i \ |
100 |
-e "s|INCLUDES.*=|INCLUDES = -I${EPREFIX}/usr/include/atlas/|" \ |
101 |
"${S}"/CONFIG/src/SpewMakeInc.c \ |
102 |
|| die "failed to append proper includes" |
103 |
|
104 |
cp "${FILESDIR}"/eselect.lapack.atlas "${T}"/ |
105 |
sed -i -e "s:/usr:${EPREFIX}/usr:" \ |
106 |
"${T}"/eselect.lapack.atlas || die |
107 |
if [[ ${CHOST} == *-darwin* ]] ; then |
108 |
sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \ |
109 |
"${T}"/eselect.lapack.atlas || die |
110 |
sed -e /LIBTOOL/s/libtool/glibtool/ -i CONFIG/src/SpewMakeInc.c |
111 |
epatch "${FILESDIR}"/${PN}-3.9.3-darwin-make-top.patch |
112 |
fi |
113 |
|
114 |
mkdir "${BLD_DIR}" || die "failed to generate build directory" |
115 |
cd "${BLD_DIR}" |
116 |
cp "${FILESDIR}"/war . && chmod a+x war || die "failed to install war" |
117 |
sed -i -e '1c\#! '"${EPREFIX}"'/bin/bash' war |
118 |
cd "${S_LAPACK}" |
119 |
epatch "${WORKDIR}"/${L_PN}-reference-${L_PV}-autotools.patch |
120 |
epatch "${FILESDIR}"/${L_PN}-reference-${L_PV}-test-fix.patch |
121 |
eautoreconf |
122 |
} |
123 |
|
124 |
src_configure() { |
125 |
BLAS_LIBS="$(pkg-config --libs blas cblas)" |
126 |
|
127 |
cd "${BLD_DIR}" |
128 |
local archselect= |
129 |
if use amd64 || use ppc64; then |
130 |
archselect="-b 64" |
131 |
elif use alpha; then |
132 |
archselect="" |
133 |
else |
134 |
archselect="-b 32" |
135 |
fi |
136 |
|
137 |
# Remove -m64 on alpha, since the compiler doesn't support it |
138 |
use alpha && sed -i -e 's/-m64//g' "${S}"/CONFIG/src/probe_comp.c |
139 |
|
140 |
# unfortunately, atlas-3.9.0 chokes when passed |
141 |
# x86_64-pc-linux-gnu-gcc and friends instead of |
142 |
# plain gcc. Hence, we'll have to workaround this |
143 |
# until it is fixed by upstream |
144 |
local c_compiler=$(tc-getCC) |
145 |
if [[ "${c_compiler}" == *gcc* ]]; then |
146 |
c_compiler="gcc" |
147 |
fi |
148 |
|
149 |
../configure \ |
150 |
--cc="${c_compiler}" \ |
151 |
--cflags="${CFLAGS}" \ |
152 |
--prefix="${ED}"/usr \ |
153 |
--libdir="${ED}"/usr/$(get_libdir)/atlas \ |
154 |
--incdir="${ED}"/usr/include \ |
155 |
-C ac "${c_compiler}" -F ac "${CFLAGS}" \ |
156 |
-C if ${FORTRANC} -F if "${FFLAGS:-'-O2'}" \ |
157 |
-Ss pmake "\$(MAKE) ${MAKEOPTS}" \ |
158 |
-Si cputhrchk 0 ${archselect} \ |
159 |
|| die "configure failed" |
160 |
|
161 |
cd "${S_LAPACK}" |
162 |
# set up the testing routines |
163 |
sed -e "s:g77:${FORTRANC}:" \ |
164 |
-e "s:-funroll-all-loops -O3:${FFLAGS} ${BLAS_LIBS}:" \ |
165 |
-e "s:LOADOPTS =:LOADOPTS = ${LDFLAGS} ${BLAS_LIBS}:" \ |
166 |
-e "s:../../blas\$(PLAT).a:${BLAS_LIBS}:" \ |
167 |
-e "s:lapack\$(PLAT).a:SRC/.libs/liblapack.so -Wl,-rpath,${S_LAPACK}/SRC/.libs:" \ |
168 |
-e "s:EXT_ETIME$:INT_CPU_TIME:" \ |
169 |
make.inc.example > make.inc \ |
170 |
|| die "Failed to set up make.inc" |
171 |
cd "${S_LAPACK}" |
172 |
econf || die "Failed to configure reference lapack lib" |
173 |
} |
174 |
|
175 |
src_compile() { |
176 |
# build atlas' part of lapack |
177 |
cd "${BLD_DIR}" |
178 |
for d in src/lapack interfaces/lapack/C/src interfaces/lapack/F77/src interfaces/lapack/C2F/src; do |
179 |
cd "${BLD_DIR}"/${d} |
180 |
make lib || die "Failed to make lib in ${d}" |
181 |
done |
182 |
|
183 |
cd "${S_LAPACK}" |
184 |
emake || die "Failed to make reference lapack lib" |
185 |
|
186 |
cd "${S_LAPACK}"/SRC |
187 |
einfo "Copying liblapack.a/*.o to ${S_LAPACK}/SRC" |
188 |
cp -sf "${BLD_DIR}"/gentoo/liblapack.a/*.o . |
189 |
einfo "Copying liblapack.a/*.lo to ${S_LAPACK}/SRC" |
190 |
cp -sf "${BLD_DIR}"/gentoo/liblapack.a/*.lo . |
191 |
einfo "Copying liblapack.a/.libs/*.o to ${S_LAPACK}/SRC" |
192 |
cp -sf "${BLD_DIR}"/gentoo/liblapack.a/.libs/*.o .libs/ |
193 |
|
194 |
local flibs |
195 |
[[ ${FORTRANC} == gfortran ]] && flibs=-lgfortran |
196 |
[[ ${FORTRANC} == g77 ]] && flibs=-lg2c |
197 |
../libtool --mode=link --tag=F77 ${FORTRANC} ${LDFLAGS} \ |
198 |
"${BLAS_LIBS}" -latlas ${flibs} \ |
199 |
-o "${S_LAPACK}"/SRC/liblapack.la *.lo -rpath "${EPREFIX}/${RPATH}" \ |
200 |
|| die "Failed to create liblapack.la" |
201 |
|
202 |
# making pkg-config file |
203 |
sed -e "s:@LIBDIR@:$(get_libdir)/lapack/atlas:" \ |
204 |
-e "s:=/usr:=${EPREFIX}/usr:" \ |
205 |
-e "s:@PV@:${PV}:" \ |
206 |
-e "s:@EXTLIBS@:-lm ${flibs}:g" \ |
207 |
"${FILESDIR}"/lapack.pc.in > "${S}"/lapack.pc \ |
208 |
|| die "sed lapack.pc failed" |
209 |
} |
210 |
|
211 |
src_install () { |
212 |
dodir "${RPATH}" |
213 |
|
214 |
cd "${S_LAPACK}"/SRC |
215 |
../libtool --mode=install cp liblapack.la "${ED}/${RPATH}" \ |
216 |
|| die "Failed to install lapack-atlas library" |
217 |
|
218 |
ESELECT_PROF=atlas |
219 |
eselect lapack add $(get_libdir) "${T}"/eselect.lapack.atlas ${ESELECT_PROF} |
220 |
|
221 |
insinto /usr/include/atlas |
222 |
doins "${S}"/include/clapack.h || die "Failed to install clapack.h" |
223 |
dosym atlas/clapack.h /usr/include/clapack.h |
224 |
|
225 |
cd "${S}" |
226 |
dodoc README doc/AtlasCredits.txt doc/ChangeLog \ |
227 |
|| die "Failed to install docs" |
228 |
|
229 |
insinto /usr/$(get_libdir)/lapack/atlas |
230 |
doins "${S}"/lapack.pc || die "Failed to install lapack.pc" |
231 |
} |
232 |
|
233 |
src_test() { |
234 |
cd "${S_LAPACK}"/TESTING/MATGEN |
235 |
emake || die "Failed to create tmglib.a" |
236 |
cd .. |
237 |
emake || die "lapack-reference tests failed" |
238 |
} |
239 |
|
240 |
pkg_postinst() { |
241 |
local current_lib=$(eselect lapack show | cut -d' ' -f2) |
242 |
# this snippet works around the eselect bug #189942 and makes |
243 |
# sure that users upgrading from a previous lapack-atlas |
244 |
# version pick up the new pkg-config files |
245 |
if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then |
246 |
local configfile="${EROOT}"/etc/env.d/lapack/$(get_libdir)/config |
247 |
[[ -e ${configfile} ]] && rm -f ${configfile} |
248 |
eselect lapack set ${ESELECT_PROF} |
249 |
elog "lapack has been eselected to ${ESELECT_PROF}" |
250 |
else |
251 |
elog "Current eselected lapack is ${current_lib}" |
252 |
elog "To use blas ${ESELECT_PROF} implementation, you have to issue (as root):" |
253 |
elog "\t eselect lapack set ${ESELECT_PROF}" |
254 |
fi |
255 |
} |