/[gentoo-x86]/sci-libs/blas-reference/blas-reference-20070226-r3.ebuild
Gentoo

Contents of /sci-libs/blas-reference/blas-reference-20070226-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Mar 31 20:10:55 2015 UTC (3 years, 3 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -3 lines
Update dependency after package move of eselect modules to app-eselect.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-reference/blas-reference-20070226-r3.ebuild,v 1.1 2013/02/27 06:53:32 jlec Exp $
4
5 EAPI=3
6
7 inherit eutils fortran-2 autotools multilib flag-o-matic toolchain-funcs
8
9 LAPACKPV="3.1.1"
10 LAPACKPN="lapack-lite"
11
12 DESCRIPTION="Basic Linear Algebra Subprograms F77 reference implementations"
13 HOMEPAGE="http://www.netlib.org/blas/"
14 SRC_URI="http://www.netlib.org/lapack/${LAPACKPN}-${LAPACKPV}.tgz"
15
16 LICENSE="BSD"
17 SLOT="0"
18 KEYWORDS=""
19 IUSE="doc"
20
21 DEPEND="app-eselect/eselect-blas"
22 RDEPEND="${DEPEND}
23 doc? ( app-doc/blas-docs )"
24
25 S="${WORKDIR}/${LAPACKPN}-${LAPACKPV}"
26
27 src_prepare() {
28 ESELECT_PROF=reference
29 epatch \
30 "${FILESDIR}"/${P}-autotool.patch \
31 "${FILESDIR}"/${P}-pkg-config.patch
32 eautoreconf
33
34 cp "${FILESDIR}"/eselect.blas.reference-ng "${T}"/eselect.blas.reference || die
35 sed -i -e "s:/usr:${EPREFIX}/usr:" "${T}"/eselect.blas.reference || die
36 if [[ ${CHOST} == *-darwin* ]] ; then
37 sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \
38 "${T}"/eselect.blas.reference || die
39 fi
40 }
41
42 src_configure() {
43 econf \
44 --libdir="${EPREFIX}"/usr/$(get_libdir)/blas/reference
45 }
46
47 src_compile() {
48 emake LDFLAGS="${LDFLAGS}" || die "emake failed"
49 }
50
51 src_install() {
52 emake DESTDIR="${D}" install || die "emake install failed"
53 eselect blas add $(get_libdir) "${T}"/eselect.blas.reference ${ESELECT_PROF}
54 }
55
56 pkg_postinst() {
57 local p=blas
58 local current_lib=$(eselect ${p} show | cut -d' ' -f2)
59 if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then
60 # work around eselect bug #189942
61 local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config
62 [[ -e ${configfile} ]] && rm -f ${configfile}
63 eselect ${p} set ${ESELECT_PROF}
64 elog "${p} has been eselected to ${ESELECT_PROF}"
65 else
66 elog "Current eselected ${p} is ${current_lib}"
67 elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):"
68 elog "\t eselect ${p} set ${ESELECT_PROF}"
69 fi
70 }

  ViewVC Help
Powered by ViewVC 1.1.20