1 |
jlec 10/04/28 07:28:46 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: blas-atlas-3.9.23-r4.ebuild |
5 |
Removed: blas-atlas-3.9.23-r3.ebuild |
6 |
Log: |
7 |
Fixes installation of broken .la files, #316863 |
8 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.101 sci-libs/blas-atlas/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/blas-atlas/ChangeLog?rev=1.101&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/blas-atlas/ChangeLog?rev=1.101&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/blas-atlas/ChangeLog?r1=1.100&r2=1.101 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/ChangeLog,v |
20 |
retrieving revision 1.100 |
21 |
retrieving revision 1.101 |
22 |
diff -u -r1.100 -r1.101 |
23 |
--- ChangeLog 20 Apr 2010 18:26:51 -0000 1.100 |
24 |
+++ ChangeLog 28 Apr 2010 07:28:46 -0000 1.101 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for sci-libs/blas-atlas |
27 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/ChangeLog,v 1.100 2010/04/20 18:26:51 jlec Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/ChangeLog,v 1.101 2010/04/28 07:28:46 jlec Exp $ |
30 |
+ |
31 |
+*blas-atlas-3.9.23-r4 (28 Apr 2010) |
32 |
+ |
33 |
+ 28 Apr 2010; Justin Lecher <jlec@g.o> -blas-atlas-3.9.23-r3.ebuild, |
34 |
+ +blas-atlas-3.9.23-r4.ebuild: |
35 |
+ Fixes installation of broken .la files, #316863 |
36 |
|
37 |
*blas-atlas-3.9.23-r3 (20 Apr 2010) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 sci-libs/blas-atlas/blas-atlas-3.9.23-r4.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/blas-atlas/blas-atlas-3.9.23-r4.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/blas-atlas/blas-atlas-3.9.23-r4.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: blas-atlas-3.9.23-r4.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2010 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/blas-atlas-3.9.23-r4.ebuild,v 1.1 2010/04/28 07:28:46 jlec Exp $ |
52 |
|
53 |
EAPI="3" |
54 |
|
55 |
inherit eutils toolchain-funcs fortran multilib |
56 |
|
57 |
DESCRIPTION="Automatically Tuned Linear Algebra Software BLAS implementation" |
58 |
HOMEPAGE="http://math-atlas.sourceforge.net/" |
59 |
MY_PN=${PN/blas-/} |
60 |
PATCH_V="3.9.21" |
61 |
SRC_URI="mirror://sourceforge/math-atlas/${MY_PN}${PV}.tar.bz2 |
62 |
mirror://gentoo/${MY_PN}-${PATCH_V}-shared-libs.2.patch.bz2" |
63 |
|
64 |
LICENSE="BSD" |
65 |
SLOT="0" |
66 |
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" |
67 |
IUSE="doc" |
68 |
|
69 |
RDEPEND="app-admin/eselect-blas |
70 |
app-admin/eselect-cblas |
71 |
doc? ( app-doc/blas-docs )" |
72 |
DEPEND="app-admin/eselect-blas |
73 |
app-admin/eselect-cblas |
74 |
>=sys-devel/libtool-1.5" |
75 |
|
76 |
S="${WORKDIR}/ATLAS" |
77 |
BLD_DIR="${S}"/gentoo-build |
78 |
RPATH=/usr/$(get_libdir)/blas |
79 |
|
80 |
pkg_setup() { |
81 |
# icc won't compile (as of icc-10.0.026) |
82 |
# and will blow out $PORTAGE_TMPDIR |
83 |
if [[ $(tc-getCC) = icc* ]]; then |
84 |
eerror "icc compiler is not supported with sci-libs/blas-atlas" |
85 |
die "blas-atlas won't compile with icc" |
86 |
fi |
87 |
|
88 |
FORTRAN="g77 gfortran ifc" |
89 |
fortran_pkg_setup |
90 |
echo |
91 |
ewarn "Please make sure to disable CPU throttling completely" |
92 |
ewarn "during the compile of blas-atlas. Otherwise, all atlas" |
93 |
ewarn "generated timings will be completely random and the" |
94 |
ewarn "performance of the resulting libraries will be degraded" |
95 |
ewarn "considerably." |
96 |
echo |
97 |
ewarn "For users of <=gcc-4.1 only:" |
98 |
ewarn "If you experience failing SANITY tests during" |
99 |
ewarn "atlas' compile please try passing -mfpmath=387; this" |
100 |
ewarn "option might also result in much better performance" |
101 |
ewarn "than using then sse instruction set depending on your" |
102 |
ewarn "CPU." |
103 |
echo |
104 |
ewarn "If blas-atlas fails during linking with a message" |
105 |
ewarn "'relocation R_X86_64_32 .... recompile with -fPIC.'" |
106 |
ewarn "please re-emerge libtool and then try again." |
107 |
echo |
108 |
} |
109 |
|
110 |
src_prepare() { |
111 |
epatch "${DISTDIR}"/${MY_PN}-${PATCH_V}-shared-libs.2.patch.bz2 |
112 |
epatch "${FILESDIR}"/${MY_PN}-${PV}-ger-fix.patch |
113 |
epatch "${FILESDIR}"/${MY_PN}-asm-gentoo.patch |
114 |
|
115 |
cp "${FILESDIR}"/eselect.{,c}blas.{,threaded-}atlas "${T}"/ |
116 |
sed -i -e "s:/usr:${EPREFIX}/usr:" \ |
117 |
"${T}"/eselect.{,c}blas.{,threaded-}atlas || die |
118 |
if [[ ${CHOST} == *-darwin* ]] ; then |
119 |
sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \ |
120 |
"${T}"/eselect.{,c}blas.{,threaded-}atlas || die |
121 |
sed -e /LIBTOOL/s/libtool/glibtool/ -i CONFIG/src/SpewMakeInc.c |
122 |
epatch "${FILESDIR}"/${PN}-3.9.3-darwin-make-top.patch |
123 |
fi |
124 |
|
125 |
mkdir "${BLD_DIR}" || die "failed to generate build directory" |
126 |
cd "${BLD_DIR}" |
127 |
cp "${FILESDIR}"/war . && chmod a+x war || die "failed to install war" |
128 |
sed -i -e '1c\#!'"${EPREFIX}"'/bin/bash' war || die |
129 |
} |
130 |
|
131 |
src_configure() { |
132 |
cd "${BLD_DIR}" |
133 |
local archselect= |
134 |
if use amd64 || use ppc64; then |
135 |
archselect="-b 64" |
136 |
elif use alpha; then |
137 |
archselect="" |
138 |
else |
139 |
archselect="-b 32" |
140 |
fi |
141 |
|
142 |
# Remove -m64 on alpha, since the compiler doesn't support it |
143 |
use alpha && sed -i -e 's/-m64//g' "${S}"/CONFIG/src/probe_comp.c |
144 |
|
145 |
# unfortunately, atlas-3.9.0 chokes when passed |
146 |
# x86_64-pc-linux-gnu-gcc and friends instead of |
147 |
# plain gcc. Hence, we'll have to workaround this |
148 |
# until it is fixed by upstream |
149 |
local c_compiler=$(tc-getCC) |
150 |
if [[ "${c_compiler}" == *gcc* ]]; then |
151 |
c_compiler="gcc" |
152 |
fi |
153 |
|
154 |
../configure \ |
155 |
--cc="${c_compiler}" \ |
156 |
--cflags="${CFLAGS}" \ |
157 |
--prefix="${ED}"/usr \ |
158 |
--libdir="${ED}"/usr/$(get_libdir)/atlas \ |
159 |
--incdir="${ED}"/usr/include \ |
160 |
-C ac "${c_compiler}" -F ac "${CFLAGS}" \ |
161 |
-C if ${FORTRANC} -F if "${FFLAGS:-'-O2'}" \ |
162 |
-Ss pmake "\$(MAKE) ${MAKEOPTS}" \ |
163 |
-Si cputhrchk 0 ${archselect} \ |
164 |
|| die "configure failed" |
165 |
|
166 |
# fix LDFLAGS |
167 |
sed -e "s|LDFLAGS =.*|LDFLAGS = ${LDFLAGS}|" \ |
168 |
-i "${BLD_DIR}"/Make.inc |
169 |
} |
170 |
|
171 |
src_compile() { |
172 |
cd "${BLD_DIR}" |
173 |
|
174 |
# atlas does its own parallel builds |
175 |
# â and it fails parallel make, bug #294172 |
176 |
emake -j1 || die "emake failed" |
177 |
|
178 |
emake -j1 \ |
179 |
LIBDIR=$(get_libdir) \ |
180 |
RPATH="${EPREFIX}/${RPATH}"/atlas \ |
181 |
shared || die "failed to build shared libraries" |
182 |
|
183 |
# build shared libraries of threaded libraries if applicable |
184 |
if [[ -d gentoo/libptcblas.a ]]; then |
185 |
emake -j1 \ |
186 |
LIBDIR=$(get_libdir) \ |
187 |
RPATH="${EPREFIX}${RPATH}"/threaded-atlas \ |
188 |
ptshared || die "failed to build threaded shared libraries" |
189 |
fi |
190 |
} |
191 |
|
192 |
src_test() { |
193 |
# make check does not work because |
194 |
# we don't build lapack libs |
195 |
for i in F77 C; do |
196 |
einfo "Testing ${i} interface" |
197 |
cd "${BLD_DIR}"/interfaces/blas/${i}/testing |
198 |
make sanity_test || die "emake tests for ${i} failed" |
199 |
if [[ -d "${BLD_DIR}"/gentoo/libptf77blas.a ]]; then |
200 |
make ptsanity_test || die "emake tests threaded for ${i}failed" |
201 |
fi |
202 |
done |
203 |
echo "Timing ATLAS" |
204 |
cd "${BLD_DIR}" |
205 |
emake time || die "emake time failed" |
206 |
} |
207 |
|
208 |
src_install () { |
209 |
dodir "${RPATH}"/atlas |
210 |
cd "${BLD_DIR}"/gentoo/libs |
211 |
cp -P libatlas* "${ED}"/usr/$(get_libdir) \ |
212 |
|| die "Failed to install libatlas" |
213 |
|
214 |
# pkgconfig files |
215 |
local extlibs="-lm" |
216 |
local threadlibs |
217 |
[[ ${FORTRANC} == gfortran ]] && extlibs="${extlibs} -lgfortran" |
218 |
[[ ${FORTRANC} == g77 ]] && extlibs="${extlibs} -lg2c" |
219 |
cp "${FILESDIR}"/blas.pc.in blas.pc |
220 |
cp "${FILESDIR}"/cblas.pc.in cblas.pc |
221 |
sed -i \ |
222 |
-e "s:=/usr:=${EPREFIX}/usr:" \ |
223 |
-e "s:@LIBDIR@:$(get_libdir)/blas/atlas:" \ |
224 |
-e "s:@PV@:${PV}:" \ |
225 |
-e "s:@EXTLIBS@:${extlibs}:g" \ |
226 |
-e "s:@THREADLIBS@:${threadlibs}:g" \ |
227 |
*blas.pc || die "sed *blas.pc failed" |
228 |
|
229 |
cp -P *blas* "${ED}/${RPATH}"/atlas \ |
230 |
|| die "Failed to install blas/cblas" |
231 |
|
232 |
ESELECT_PROF=atlas |
233 |
eselect blas add $(get_libdir) "${T}"/eselect.blas.atlas ${ESELECT_PROF} |
234 |
eselect cblas add $(get_libdir) "${T}"/eselect.cblas.atlas ${ESELECT_PROF} |
235 |
|
236 |
if [[ -d "${BLD_DIR}"/gentoo/threaded-libs ]]; then |
237 |
dodir "${RPATH}"/threaded-atlas |
238 |
cd "${BLD_DIR}"/gentoo/threaded-libs |
239 |
|
240 |
# pkgconfig files |
241 |
cp "${FILESDIR}"/blas.pc.in blas.pc |
242 |
cp "${FILESDIR}"/cblas.pc.in cblas.pc |
243 |
threadlibs="-lpthread" |
244 |
sed -i \ |
245 |
-e "s:=/usr:=${EPREFIX}/usr:" \ |
246 |
-e "s:@LIBDIR@:$(get_libdir)/blas/threaded-atlas:" \ |
247 |
-e "s:@PV@:${PV}:" \ |
248 |
-e "s:@EXTLIBS@:${extlibs}:g" \ |
249 |
-e "s:@THREADLIBS@:${threadlibs}:g" \ |
250 |
*blas.pc || die "sed *blas.pc failed" |
251 |
|
252 |
cp -P * "${ED}/${RPATH}"/threaded-atlas \ |
253 |
|| die "Failed to install threaded atlas" |
254 |
ESELECT_PROF=atlas-threads |
255 |
|
256 |
eselect blas add $(get_libdir) "${T}"/eselect.blas.threaded-atlas ${ESELECT_PROF} |
257 |
eselect cblas add $(get_libdir) "${T}"/eselect.cblas.threaded-atlas ${ESELECT_PROF} |
258 |
fi |
259 |
|
260 |
insinto /usr/include/atlas |
261 |
doins \ |
262 |
"${S}"/include/cblas.h \ |
263 |
"${S}"/include/atlas_misc.h \ |
264 |
"${S}"/include/atlas_enum.h \ |
265 |
"${S}"/include/atlas_aux.h \ |
266 |
|| die "failed to install headers" |
267 |
|
268 |
# These headers contain the architecture-specific |
269 |
# optimizations determined by ATLAS. The atlas-lapack build |
270 |
# is much shorter if they are available, so save them: |
271 |
doins "${BLD_DIR}"/include/*.h \ |
272 |
|| die "failed to install timing headers" |
273 |
|
274 |
sed \ |
275 |
-e "s:L/usr/:L${EPREFIX}/usr/:g" \ |
276 |
-e "s: /usr/lib: ${EPREFIX}/usr/lib:g" \ |
277 |
-i \ |
278 |
${ED}/usr/$(get_libdir)/*.la \ |
279 |
${ED}/usr/$(get_libdir)/blas/*/*.la \ |
280 |
|| die |
281 |
|
282 |
# some docs |
283 |
cd "${S}"/doc |
284 |
dodoc INDEX.txt AtlasCredits.txt ChangeLog || die "dodoc failed" |
285 |
# atlas specific doc (blas generic docs installed by blas-docs) |
286 |
if use doc; then |
287 |
insinto /usr/share/doc/${PF} |
288 |
doins atlas*pdf cblasqref.pdf || die "doins docs failed" |
289 |
fi |
290 |
} |
291 |
|
292 |
pkg_postinst() { |
293 |
for p in blas cblas; do |
294 |
local current_p=$(eselect ${p} show | cut -d' ' -f2) |
295 |
# this snippet works around the eselect bug #189942 and makes |
296 |
# sure that users upgrading from a previous blas-atlas |
297 |
# version pick up the new pkg-config files |
298 |
if [[ ${current_p} == ${ESELECT_PROF} \ |
299 |
|| ${current_p} == "threaded-atlas" \ |
300 |
|| -z ${current_p} ]]; then |
301 |
local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config |
302 |
[[ -e ${configfile} ]] && rm -f ${configfile} |
303 |
eselect ${p} set ${ESELECT_PROF} |
304 |
elog "${p} has been eselected to ${ESELECT_PROF}" |
305 |
else |
306 |
elog "Current eselected ${p} is ${current_p}" |
307 |
elog "To use the ${p} ${ESELECT_PROF} implementation, you have to issue (as root):" |
308 |
elog "\t eselect ${p} set ${ESELECT_PROF}" |
309 |
fi |
310 |
done |
311 |
} |