/[gentoo-x86]/sci-libs/acml/acml-3.1.0-r1.ebuild
Gentoo

Contents of /sci-libs/acml/acml-3.1.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Oct 9 22:06:21 2007 UTC (12 years, 9 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Removed old versions. Work around eselect bug #189942.
(Portage version: 2.1.3.12)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/acml/acml-3.1.0-r1.ebuild,v 1.5 2007/07/02 15:25:55 peper Exp $
4
5 inherit eutils
6
7 DESCRIPTION="AMD Core Math Library (ACML) for x86 and amd64 CPUs"
8 HOMEPAGE="http://developer.amd.com/acml.aspx"
9
10 MY_PV=${PV//\./\-}
11 S=${WORKDIR}
12
13 SRC_URI="amd64? ( acml-${MY_PV}-gnu-64bit.tgz )
14 x86? ( acml-${MY_PV}-gnu-32bit.tgz )"
15 RESTRICT="fetch strip"
16 IUSE="sse sse2"
17 LICENSE="ACML"
18 KEYWORDS="~amd64 ~x86"
19 SLOT="0"
20 RDEPEND="virtual/libc
21 app-admin/eselect-blas
22 app-admin/eselect-cblas
23 app-admin/eselect-lapack"
24 PROVIDE="virtual/blas
25 virtual/lapack"
26
27 src_unpack() {
28 unpack ${A}
29 if [ "${ARCH}" == "amd64" ] ; then
30 export BITS="64"
31 elif [ "${ARCH}" == "x86" ] ; then
32 export BITS="32"
33 if ! use sse2 ; then
34 use sse \
35 && export SUFFIX="_nosse2" \
36 || export SUFFIX="_nosse"
37 fi
38 fi
39 (DISTDIR="${S}" unpack contents-acml-${MY_PV}-gnu-${BITS}bit.tgz)
40
41 mv Doc doc
42 }
43
44 src_compile() {
45 return
46 }
47
48 src_install() {
49 # Documentation
50 cd ${S}/doc
51 dodoc acml.*
52
53 # Headers
54 mkdir -p ${D}/usr/include/acml/
55 cp ${S}/gnu${BITS}${SUFFIX}/include/* ${D}/usr/include/acml/ \
56 || die "Could not copy header file"
57 cd ${D}/usr/include
58 ln -s acml/acml.h acml.h
59
60 # Libraries
61 mkdir -p ${D}/usr/$(get_libdir)/
62 cp ${S}/gnu${BITS}${SUFFIX}/lib/* ${D}/usr/$(get_libdir)/ \
63 || die "Could not copy library files"
64 unset SUFFIX
65
66 # eselect files
67 eselect blas add $(get_libdir) ${FILESDIR}/eselect.blas acml
68 eselect cblas add $(get_libdir) ${FILESDIR}/eselect.cblas acml
69 eselect lapack add $(get_libdir) ${FILESDIR}/eselect.lapack acml
70 }
71
72 pkg_postinst() {
73 if [[ -z "$(eselect blas show)" ]]; then
74 eselect blas set acml
75 fi
76 if [[ -z "$(eselect cblas show)" ]]; then
77 eselect cblas set acml
78 fi
79 if [[ -z "$(eselect lapack show)" ]]; then
80 eselect lapack set acml
81 fi
82
83 elog "To use ACML's BLAS features, you have to issue (as root):"
84 elog "\n\teselect blas set acml"
85 elog "To use ACML's CBLAS features, you have to issue (as root):"
86 elog "\n\teselect cblas set acml"
87 elog "To use ACML's LAPACK features, you have to issue (as root):"
88 elog "\n\teselect lapack set acml"
89 }

  ViewVC Help
Powered by ViewVC 1.1.20