1 |
bicatali 08/05/06 17:57:50 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: acml-4.1.0-r1.ebuild |
5 |
Log: |
6 |
Various fixes for x86 (bug #220321), re-added a default environment file according to use flags, pkgconfig recreated with proper libraries instead of always acml_mv |
7 |
(Portage version: 2.1.5_rc6) |
8 |
|
9 |
Revision Changes Path |
10 |
1.35 sci-libs/acml/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/acml/ChangeLog?rev=1.35&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/acml/ChangeLog?rev=1.35&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/acml/ChangeLog?r1=1.34&r2=1.35 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sci-libs/acml/ChangeLog,v |
19 |
retrieving revision 1.34 |
20 |
retrieving revision 1.35 |
21 |
diff -u -r1.34 -r1.35 |
22 |
--- ChangeLog 30 Apr 2008 12:03:34 -0000 1.34 |
23 |
+++ ChangeLog 6 May 2008 17:57:49 -0000 1.35 |
24 |
@@ -1,6 +1,14 @@ |
25 |
# ChangeLog for sci-libs/acml |
26 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/ChangeLog,v 1.34 2008/04/30 12:03:34 bicatali Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/ChangeLog,v 1.35 2008/05/06 17:57:49 bicatali Exp $ |
29 |
+ |
30 |
+*acml-4.1.0-r1 (06 May 2008) |
31 |
+ |
32 |
+ 06 May 2008; Sébastien Fabbro <bicatali@g.o> |
33 |
+ +acml-4.1.0-r1.ebuild: |
34 |
+ Various fixes for x86 (bug #220321), re-added a default environment file |
35 |
+ according to use flags, pkgconfig recreated with proper libraries instead |
36 |
+ of always acml_mv |
37 |
|
38 |
*acml-4.1.0 (30 Apr 2008) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 sci-libs/acml/acml-4.1.0-r1.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/acml/acml-4.1.0-r1.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/acml/acml-4.1.0-r1.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: acml-4.1.0-r1.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2008 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/acml-4.1.0-r1.ebuild,v 1.1 2008/05/06 17:57:49 bicatali Exp $ |
53 |
|
54 |
EAPI="1" |
55 |
|
56 |
inherit eutils toolchain-funcs fortran versionator |
57 |
|
58 |
MY_P=${PN}-$(replace_all_version_separators -) |
59 |
|
60 |
DESCRIPTION="AMD Core Math Library for x86 and amd64 CPUs" |
61 |
HOMEPAGE="http://developer.amd.com/acml.jsp" |
62 |
SRC_URI=" |
63 |
amd64? ( |
64 |
ifc? ( ${MY_P}-ifort-64bit.tgz |
65 |
int64? ( ${MY_P}-ifort-64bit-int64.tgz ) ) |
66 |
gfortran? ( ${MY_P}-gfortran-64bit.tgz |
67 |
int64? ( ${MY_P}-gfortran-64bit-int64.tgz ) ) |
68 |
!ifc? ( |
69 |
!gfortran? ( ${MY_P}-gfortran-64bit.tgz |
70 |
int64? ( ${MY_P}-gfortran-64bit-int64.tgz ) ) ) ) |
71 |
x86? ( ${MY_P}-ifort-32bit.tgz )" |
72 |
|
73 |
# Once gfortran builds appear, replace x86? |
74 |
# and remove the hack_x86 in the ebuild |
75 |
# x86? ( |
76 |
# ifc? ( ${MY_P}-ifort-32bit.tgz ) |
77 |
# gfortran? ( ${MY_P}-gfortran-32bit.tgz ) |
78 |
# !ifc? ( !gfortran ( ${MY_P}-gfortran-32bit.tgz ) ) )" |
79 |
|
80 |
IUSE="doc examples gfortran ifc int64 openmp test" |
81 |
KEYWORDS="~amd64 ~x86" |
82 |
|
83 |
RESTRICT="strip fetch" |
84 |
LICENSE="ACML" |
85 |
SLOT="0" |
86 |
|
87 |
# gfortran? ( sys-devel/gcc:4.2 ) |
88 |
# !gfortran? ( !ifc? ( sys-devel/gcc:4.2 ) ) ) |
89 |
# hack_x86 |
90 |
CDEPEND="ifc? ( dev-lang/ifc ) |
91 |
amd64? ( gfortran? ( sys-devel/gcc:4.2 ) |
92 |
!gfortran? ( !ifc? ( amd64? ( sys-devel/gcc:4.2 ) ) ) ) |
93 |
x86? ( dev-lang/ifc )" |
94 |
|
95 |
DEPEND="test? ( ${CDEPEND} ) |
96 |
app-admin/eselect-blas |
97 |
app-admin/eselect-lapack" |
98 |
|
99 |
RDEPEND="${CDEPEND} |
100 |
app-admin/eselect-blas |
101 |
app-admin/eselect-lapack |
102 |
doc? ( app-doc/blas-docs app-doc/lapack-docs )" |
103 |
|
104 |
S="${WORKDIR}" |
105 |
|
106 |
pkg_nofetch() { |
107 |
einfo "Please download the ACML from:" |
108 |
einfo "${HOMEPAGE}" |
109 |
einfo "and place it in ${DISTDIR}." |
110 |
einfo "The previous versions could be found at" |
111 |
einfo "http://developer.amd.com/acmlarchive.jsp" |
112 |
einfo "SRC=${A} $SRC_URI" |
113 |
} |
114 |
|
115 |
pkg_setup() { |
116 |
# hack_x86 |
117 |
if use x86 && ! use ifc; then |
118 |
ewarn "On x86 architectures, acml is only available with ifc." |
119 |
ewarn "Make sure you have proper licenses to use ifc" |
120 |
fi |
121 |
FORTRAN="" |
122 |
if use test; then |
123 |
use gfortran && FORTRAN="${FORTRAN} gfortran" |
124 |
use ifc && FORTRAN="${FORTRAN} ifc" |
125 |
use gfortran || use ifc || FORTRAN="gfortran" |
126 |
# hack_x86 |
127 |
use x86 && FORTRAN="ifc" |
128 |
fortran_pkg_setup |
129 |
# work around incomplete fortran eclass |
130 |
if use gfortran && |
131 |
[[ ${FORTRANC} == gfortran ]] && |
132 |
[[ $(gcc-version) != 4.2 ]] |
133 |
then |
134 |
eerror "You need gfortran-4.2 to test acml" |
135 |
eerror "Please use gcc-config to switch gcc version 4.2" |
136 |
die "gfortran check failed" |
137 |
fi |
138 |
fi |
139 |
# construct default profile dprof from default ddir |
140 |
local ddir=gfortran |
141 |
use ifc && ddir=ifort |
142 |
# hack_x86 |
143 |
use x86 && ddir=ifort32 || ddir=ifort64 |
144 |
#use x86 && ddir=${ddir}32 || ddir=${ddir}64 |
145 |
use openmp && ddir=${ddir}_mp |
146 |
use int64 && ddir=${ddir}_int64 |
147 |
ACML_DEFAULT_DIR=${ddir} |
148 |
} |
149 |
|
150 |
src_unpack() { |
151 |
unpack ${A} |
152 |
unpack ./contents-acml-*.tgz |
153 |
use openmp || rm -rf *_mp* |
154 |
} |
155 |
|
156 |
src_test() { |
157 |
# only testing with current chosen compiler |
158 |
for fdir in ${ACML_DEFAULT_DIR/_mp}*; do |
159 |
einfo "Testing acml in ${fdir}" |
160 |
for d in . acml_mv; do |
161 |
cd "${S}"/${fdir}/examples/${d} |
162 |
emake \ |
163 |
ACMLDIR="${S}"/${fdir} \ |
164 |
F77=${FORTRANC} \ |
165 |
CC="$(tc-getCC)" \ |
166 |
CPLUSPLUS="$(tc-getCXX)" \ |
167 |
|| die "emake test in ${fdir}/examples/${d} failed" |
168 |
emake clean |
169 |
done |
170 |
done |
171 |
} |
172 |
|
173 |
make_acml_profile_name() { |
174 |
local fort=${1%%[[:digit:]]*} |
175 |
local opt=${1#*[0-9][0-9]} |
176 |
echo ${PN}-${fort}${opt/mp/openmp} | tr '_' '-' |
177 |
} |
178 |
|
179 |
src_install() { |
180 |
# respect acml default install dir (and FHS) |
181 |
local instdir=/opt/${PN}${PV} |
182 |
dodir ${instdir} |
183 |
|
184 |
for lib in */lib; do |
185 |
local fdir=${lib%/*} |
186 |
# install acml |
187 |
use examples || rm -rf "${S}"/${fdir}/examples |
188 |
cp -pPR "${S}"/${fdir} "${D}"${instdir} || die "copy ${fdir} failed" |
189 |
|
190 |
# install profiles |
191 |
local prof=$(make_acml_profile_name ${fdir}) |
192 |
local acmldir=${instdir}/${fdir} |
193 |
local acmllibs="-lacml" |
194 |
local libname=${acmldir}/lib/libacml |
195 |
local extlibs |
196 |
local extflags |
197 |
[[ ${fdir} =~ int64 ]] && extflags="${extflags} -fdefault-integer-8" |
198 |
[[ ${fdir} =~ gfortran ]] && extlibs="${extlibs} -lgfortran" |
199 |
if [[ ${fdir} =~ _mp ]]; then |
200 |
[[ ${fdir} =~ ifort ]] && extlibs="${extlibs} -lguide" |
201 |
extlibs="${extlibs} -lpthread" |
202 |
extflags="${extflags} -fopenmp" |
203 |
acmllibs="-lacml_mp" |
204 |
libname=${libname}_mp |
205 |
fi |
206 |
use amd64 && acmllibs="${acmllibs} -lacml_mv" |
207 |
for x in blas lapack; do |
208 |
# pkgconfig files |
209 |
sed -e "s:@LIBDIR@:$(get_libdir):" \ |
210 |
-e "s:@PV@:${PV}:" \ |
211 |
-e "s:@ACMLDIR@:${acmldir}:g" \ |
212 |
-e "s:@ACMLLIBS@:${acmllibs}:g" \ |
213 |
-e "s:@EXTLIBS@:${extlibs}:g" \ |
214 |
-e "s:@EXTFLAGS@:${extflags}:g" \ |
215 |
"${FILESDIR}"/${x}.pc.in > ${x}.pc \ |
216 |
|| die "sed ${x}.pc failed" |
217 |
insinto ${acmldir}/lib |
218 |
doins ${x}.pc || die "doins ${x}.pc failed" |
219 |
|
220 |
# eselect files |
221 |
cat > eselect.${prof}.${x} <<-EOF |
222 |
${libname}.so /usr/@LIBDIR@/lib${l}.so.0 |
223 |
${libname}.so /usr/@LIBDIR@/lib${l}.so |
224 |
${libname}.a /usr/@LIBDIR@/lib${l}.a |
225 |
${acmldir}/lib/${x}.pc /usr/@LIBDIR@/pkgconfig/${x}.pc |
226 |
EOF |
227 |
eselect ${x} add $(get_libdir) eselect.${prof}.${x} ${prof} |
228 |
done |
229 |
done |
230 |
|
231 |
echo "LDPATH=${instdir}/${ACML_DEFAULT_DIR}/lib" > 35acml |
232 |
doenvd "${S}"/35acml || die "doenvd failed" |
233 |
use doc || rm -rf "${S}"/Doc/acml.pdf "${S}"/Doc/html |
234 |
cp -pPR "${S}"/Doc "${D}"${instdir} || die "copy doc failed" |
235 |
} |
236 |
|
237 |
pkg_postinst() { |
238 |
local dprof="$(make_acml_profile_name ${ACML_DEFAULT_DIR})" |
239 |
for x in blas lapack; do |
240 |
local cprof=$(eselect ${x} show | cut -d' ' -f2) |
241 |
if [[ ${cprof} == ${dprof} || -z ${cprof} ]]; then |
242 |
# work around eselect bug #189942 |
243 |
local configfile="${ROOT}"/etc/env.d/${x}/$(get_libdir)/config |
244 |
[[ -e ${configfile} ]] && rm -f ${configfile} |
245 |
eselect ${x} set ${dprof} |
246 |
elog "${x} has been eselected to ${dprof}" |
247 |
else |
248 |
elog "Current eselected ${x} implementation is ${cprof}" |
249 |
elog "To use you have one of ${PN}, issue (as root):" |
250 |
elog "\t eselect ${x} set <profile>" |
251 |
fi |
252 |
done |
253 |
} |
254 |
|
255 |
|
256 |
|
257 |
-- |
258 |
gentoo-commits@l.g.o mailing list |