/[gentoo-x86]/sci-libs/gsl/gsl-1.14.ebuild
Gentoo

Diff of /sci-libs/gsl/gsl-1.14.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.7 Revision 1.8
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sci-libs/gsl/gsl-1.14.ebuild,v 1.7 2010/07/18 13:57:30 nixnut Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sci-libs/gsl/gsl-1.14.ebuild,v 1.8 2010/08/09 09:32:55 xarthisius Exp $
4 4
5EAPI="3" 5EAPI="3"
6 6
7inherit eutils flag-o-matic autotools 7inherit eutils flag-o-matic autotools
8 8
10HOMEPAGE="http://www.gnu.org/software/gsl/" 10HOMEPAGE="http://www.gnu.org/software/gsl/"
11SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" 11SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
12 12
13LICENSE="GPL-3" 13LICENSE="GPL-3"
14SLOT="0" 14SLOT="0"
15KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris" 15KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~x86-macos ~sparc-solaris ~x86-solaris"
16IUSE="cblas" 16IUSE="cblas-external"
17 17
18RDEPEND="cblas? ( virtual/cblas )" 18RDEPEND="cblas-external? ( virtual/cblas )"
19DEPEND="${RDEPEND} 19DEPEND="${RDEPEND}
20 app-admin/eselect-cblas 20 app-admin/eselect-cblas
21 dev-util/pkgconfig" 21 dev-util/pkgconfig"
22 22
23pkg_setup() { 23pkg_setup() {
24 ESELECT_PROF="gsl" 24 ESELECT_PROF="gsl"
25 # prevent to use external cblas from a previously installed gsl 25 # prevent to use external cblas from a previously installed gsl
26 local current_lib=$(eselect cblas show | cut -d' ' -f2) 26 local current_lib=$(eselect cblas show | cut -d' ' -f2)
27 if use cblas && [[ ${current_lib} == gsl ]]; then 27 if use cblas-external && [[ ${current_lib} == gsl ]]; then
28 ewarn "USE flag cblas is set: linking gsl with an external cblas." 28 ewarn "USE flag cblas-external is set: linking gsl with an external cblas."
29 ewarn "However the current selected external cblas is gsl." 29 ewarn "However the current selected external cblas is gsl."
30 ewarn "Please install and/or eselect another cblas" 30 ewarn "Please install and/or eselect another cblas"
31 die "Circular gsl dependency" 31 die "Circular gsl dependency"
32 fi 32 fi
33} 33}
44 "${T}"/eselect.cblas.gsl || die 44 "${T}"/eselect.cblas.gsl || die
45 fi 45 fi
46} 46}
47 47
48src_configure() { 48src_configure() {
49 if use cblas; then 49 if use cblas-external; then
50 export CBLAS_LIBS="$(pkg-config --libs cblas)" 50 export CBLAS_LIBS="$(pkg-config --libs cblas)"
51 export CBLAS_CFLAGS="$(pkg-config --cflags cblas)" 51 export CBLAS_CFLAGS="$(pkg-config --cflags cblas)"
52 fi 52 fi
53 econf $(use_with cblas) 53 econf $(use_with cblas-external cblas)
54} 54}
55 55
56src_install() { 56src_install() {
57 emake install DESTDIR="${D}" || die "emake install failed." 57 emake install DESTDIR="${D}" || die "emake install failed."
58 dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO 58 dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20