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

Contents of /sci-libs/gsl/gsl-1.9-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Jun 23 08:36:29 2010 UTC (9 years, 6 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Cleaned old versions
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/gsl/gsl-1.9-r1.ebuild,v 1.4 2008/01/09 16:15:02 jer Exp $
4
5 inherit eutils flag-o-matic toolchain-funcs autotools
6
7 DESCRIPTION="The GNU Scientific Library"
8 HOMEPAGE="http://www.gnu.org/software/gsl/"
9 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~alpha amd64 ~hppa ~ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
14 IUSE=""
15
16 RDEPEND="app-admin/eselect-cblas"
17 DEPEND="${RDEPEND}"
18
19 pkg_setup() {
20 # icc-10.0.025 did not pass some tests
21 if [[ $(tc-getCC) == icc ]]; then
22 eerror "icc known to fail tests. Revert to safer gcc and re-emerge."
23 die "gsl does not work when compiled with icc"
24 fi
25 }
26
27 src_unpack() {
28 unpack ${A}
29 cd "${S}"
30 # fix for as-needed
31 epatch "${FILESDIR}"/gsl-1.6-deps.diff
32 eautoreconf
33 }
34
35 src_compile() {
36 replace-cpu-flags k6 k6-2 k6-3 i586
37 filter-flags -ffast-math
38
39 econf || die "econf failed"
40 emake || die 'emake failed.'
41 }
42
43 src_install() {
44 emake install DESTDIR="${D}" || die "emake install failed."
45 dodoc AUTHORS BUGS ChangeLog NEWS README SUPPORT \
46 THANKS TODO || die "dodoc failed"
47
48 # take care of pkgconfig file for cblas implementation.
49 sed -e "s/@LIBDIR@/$(get_libdir)/" \
50 -e "s/@PV@/${PV}/" \
51 "${FILESDIR}"/cblas.pc.in > cblas.pc \
52 || die "sed cblas.pc failed"
53 insinto /usr/$(get_libdir)/blas/gsl
54 doins cblas.pc || die "installing cblas.pc failed"
55 ESELECT_PROF=gsl
56 eselect cblas add $(get_libdir) "${FILESDIR}"/eselect.cblas.gsl ${ESELECT_PROF}
57 }
58
59 pkg_postinst() {
60 local p=cblas
61 local current_lib=$(eselect ${p} show | cut -d' ' -f2)
62 if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then
63 # work around eselect bug #189942
64 local configfile="${ROOT}"/etc/env.d/${p}/$(get_libdir)/config
65 [[ -e ${configfile} ]] && rm -f ${configfile}
66 eselect ${p} set ${ESELECT_PROF}
67 elog "${p} has been eselected to ${ESELECT_PROF}"
68 else
69 elog "Current eselected ${p} is ${current_lib}"
70 elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):"
71 elog "\t eselect ${p} set ${ESELECT_PROF}"
72 fi
73 }

  ViewVC Help
Powered by ViewVC 1.1.20