Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/gsl/
Date: Sun, 28 Oct 2018 06:21:20
Message-Id: 1540707669.66fede0cb8250476db850b329baa0cfe9df6d3c0.jlec@gentoo
1 commit: 66fede0cb8250476db850b329baa0cfe9df6d3c0
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 28 06:20:35 2018 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 28 06:21:09 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=66fede0c
7
8 sci-libs/gsl: Version Bump
9
10 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 sci-libs/gsl/gsl-2.5.ebuild | 78 +++++++++++++++++++++++++++++++++++++++++++++
14 1 file changed, 78 insertions(+)
15
16 diff --git a/sci-libs/gsl/gsl-2.5.ebuild b/sci-libs/gsl/gsl-2.5.ebuild
17 new file mode 100644
18 index 000000000..3dda7b878
19 --- /dev/null
20 +++ b/sci-libs/gsl/gsl-2.5.ebuild
21 @@ -0,0 +1,78 @@
22 +# Copyright 1999-2018 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +
27 +inherit alternatives-2 autotools flag-o-matic multilib-build numeric toolchain-funcs
28 +
29 +DESCRIPTION="GNU Scientific Library"
30 +HOMEPAGE="https://www.gnu.org/software/gsl/"
31 +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
32 +
33 +LICENSE="GPL-3"
34 +SLOT="0/23"
35 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
36 +IUSE="cblas-external static-libs"
37 +
38 +RDEPEND="cblas-external? ( >=virtual/cblas-2.0-r3[${MULTILIB_USEDEP}] )"
39 +DEPEND="${RDEPEND}
40 + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
41 +
42 +PATCHES=(
43 + "${FILESDIR}"/${PN}-2.3-cblas-external.patch
44 + )
45 +
46 +src_prepare() {
47 + default
48 + eautoreconf
49 + multilib_copy_sources
50 +}
51 +
52 +src_configure() {
53 + gsl_configure() {
54 + if use cblas-external; then
55 + export CBLAS_LIBS="$($(tc-getPKG_CONFIG) --libs cblas)"
56 + export CBLAS_CFLAGS="$($(tc-getPKG_CONFIG) --cflags cblas)"
57 + fi
58 + econf $(use_with cblas-external)
59 + }
60 + # fma flags, which can be enabled by -march=native, cause some tests to fail.
61 + # https://github.com/gentoo/sci/pull/815
62 + append-cflags $(test-flags-CC -mno-fma -mno-fma4)
63 +
64 + multilib_foreach_abi run_in_build_dir gsl_configure
65 +}
66 +
67 +src_compile() {
68 + multilib_foreach_abi run_in_build_dir default
69 +}
70 +
71 +src_test() {
72 + multilib_foreach_abi run_in_build_dir default
73 +}
74 +
75 +src_install() {
76 + gsl_install() {
77 + local libname=gslcblas
78 +
79 + create_pkgconfig \
80 + --name "${libname}" \
81 + --description "${PN} CBLAS implementation" \
82 + --libs "-l${libname}" \
83 + --libs-private "-lm" \
84 + --cflags "-I\${includedir}/${PN}" \
85 + --version "${PV}" \
86 + --url "${HOMEPAGE}" \
87 + "${libname}"
88 +
89 + GSL_ALTERNATIVES+=( /usr/$(get_libdir)/pkgconfig/cblas.pc ${libname}.pc )
90 +
91 + default
92 + }
93 + multilib_foreach_abi run_in_build_dir gsl_install
94 +
95 + # Don't add gsl as a cblas alternative if using cblas-external
96 + use cblas-external || alternatives_for cblas gsl 0 \
97 + ${GSL_ALTERNATIVES[@]} \
98 + /usr/include/cblas.h gsl/gsl_cblas.h
99 +}