Gentoo Archives: gentoo-commits

From: "Justin Lecher (jlec)" <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/gsl: ChangeLog gsl-1.14-r1.ebuild
Date: Fri, 25 Jun 2010 16:03:19
Message-Id: 20100625160316.46EAC2CF63@corvid.gentoo.org
1 jlec 10/06/25 16:03:16
2
3 Modified: ChangeLog
4 Added: gsl-1.14-r1.ebuild
5 Log:
6 Include static lib support, force to pic
7 (Portage version: 2.2_rc67/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.70 sci-libs/gsl/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/gsl/ChangeLog?rev=1.70&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/gsl/ChangeLog?rev=1.70&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/gsl/ChangeLog?r1=1.69&r2=1.70
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-libs/gsl/ChangeLog,v
19 retrieving revision 1.69
20 retrieving revision 1.70
21 diff -u -r1.69 -r1.70
22 --- ChangeLog 24 Jun 2010 21:07:08 -0000 1.69
23 +++ ChangeLog 25 Jun 2010 16:03:16 -0000 1.70
24 @@ -1,6 +1,11 @@
25 # ChangeLog for sci-libs/gsl
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/gsl/ChangeLog,v 1.69 2010/06/24 21:07:08 pacho Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/gsl/ChangeLog,v 1.70 2010/06/25 16:03:16 jlec Exp $
29 +
30 +*gsl-1.14-r1 (25 Jun 2010)
31 +
32 + 25 Jun 2010; Justin Lecher <jlec@g.o> +gsl-1.14-r1.ebuild:
33 + Include static lib support, force to pic
34
35 24 Jun 2010; Pacho Ramos <pacho@g.o> gsl-1.14.ebuild:
36 stable amd64, bug 325179
37
38
39
40 1.1 sci-libs/gsl/gsl-1.14-r1.ebuild
41
42 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/gsl/gsl-1.14-r1.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/gsl/gsl-1.14-r1.ebuild?rev=1.1&content-type=text/plain
44
45 Index: gsl-1.14-r1.ebuild
46 ===================================================================
47 # Copyright 1999-2010 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/sci-libs/gsl/gsl-1.14-r1.ebuild,v 1.1 2010/06/25 16:03:16 jlec Exp $
50
51 EAPI="3"
52
53 inherit eutils flag-o-matic autotools
54
55 DESCRIPTION="The GNU Scientific Library"
56 HOMEPAGE="http://www.gnu.org/software/gsl/"
57 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
58
59 LICENSE="GPL-3"
60 SLOT="0"
61 KEYWORDS="~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"
62 IUSE="cblas static-libs"
63
64 RDEPEND="cblas? ( virtual/cblas )"
65 DEPEND="${RDEPEND}
66 app-admin/eselect-cblas
67 dev-util/pkgconfig"
68
69 pkg_setup() {
70 ESELECT_PROF="gsl"
71 # prevent to use external cblas from a previously installed gsl
72 local current_lib=$(eselect cblas show | cut -d' ' -f2)
73 if use cblas && [[ ${current_lib} == gsl ]]; then
74 ewarn "USE flag cblas is set: linking gsl with an external cblas."
75 ewarn "However the current selected external cblas is gsl."
76 ewarn "Please install and/or eselect another cblas"
77 die "Circular gsl dependency"
78 fi
79 }
80
81 src_prepare() {
82 filter-flags -ffast-math
83 epatch "${FILESDIR}"/${P}-cblas.patch
84 eautoreconf
85
86 cp "${FILESDIR}"/eselect.cblas.gsl "${T}"/
87 sed -i -e "s:/usr:${EPREFIX}/usr:" "${T}"/eselect.cblas.gsl || die
88 if [[ ${CHOST} == *-darwin* ]] ; then
89 sed -i -e 's/\.so\([\.0-9]\+\)\?/\1.dylib/g' \
90 "${T}"/eselect.cblas.gsl || die
91 fi
92 }
93
94 src_configure() {
95 if use cblas; then
96 export CBLAS_LIBS="$(pkg-config --libs cblas)"
97 export CBLAS_CFLAGS="$(pkg-config --cflags cblas)"
98 fi
99 econf \
100 --with-pic \
101 --enable-shared \
102 $(use_with cblas) \
103 $(use_enable static-libs static)
104 }
105
106 src_install() {
107 emake install DESTDIR="${D}" || die "emake install failed."
108 dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO
109
110 # take care of pkgconfig file for cblas implementation.
111 sed -e "s/@LIBDIR@/$(get_libdir)/" \
112 -e "s/@PV@/${PV}/" \
113 -e "/^prefix=/s:=:=${EPREFIX}:" \
114 -e "/^libdir=/s:=:=${EPREFIX}:" \
115 "${FILESDIR}"/cblas.pc.in > cblas.pc \
116 || die "sed cblas.pc failed"
117 insinto /usr/$(get_libdir)/blas/gsl
118 doins cblas.pc || die "installing cblas.pc failed"
119 eselect cblas add $(get_libdir) "${T}"/eselect.cblas.gsl \
120 ${ESELECT_PROF}
121 }
122
123 pkg_postinst() {
124 local p=cblas
125 local current_lib=$(eselect ${p} show | cut -d' ' -f2)
126 if [[ ${current_lib} == ${ESELECT_PROF} || -z ${current_lib} ]]; then
127 # work around eselect bug #189942
128 local configfile="${EROOT}"/etc/env.d/${p}/$(get_libdir)/config
129 [[ -e ${configfile} ]] && rm -f ${configfile}
130 eselect ${p} set ${ESELECT_PROF}
131 elog "${p} has been eselected to ${ESELECT_PROF}"
132 else
133 elog "Current eselected ${p} is ${current_lib}"
134 elog "To use ${p} ${ESELECT_PROF} implementation, you have to issue (as root):"
135 elog "\t eselect ${p} set ${ESELECT_PROF}"
136 fi
137 }