commit: 66fede0cb8250476db850b329baa0cfe9df6d3c0 Author: Justin Lecher <jlec <AT> gentoo <DOT> org> AuthorDate: Sun Oct 28 06:20:35 2018 +0000 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> CommitDate: Sun Oct 28 06:21:09 2018 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=66fede0c
sci-libs/gsl: Version Bump Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 sci-libs/gsl/gsl-2.5.ebuild | 78 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/sci-libs/gsl/gsl-2.5.ebuild b/sci-libs/gsl/gsl-2.5.ebuild new file mode 100644 index 000000000..3dda7b878 --- /dev/null +++ b/sci-libs/gsl/gsl-2.5.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit alternatives-2 autotools flag-o-matic multilib-build numeric toolchain-funcs + +DESCRIPTION="GNU Scientific Library" +HOMEPAGE="https://www.gnu.org/software/gsl/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0/23" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="cblas-external static-libs" + +RDEPEND="cblas-external? ( >=virtual/cblas-2.0-r3[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]" + +PATCHES=( + "${FILESDIR}"/${PN}-2.3-cblas-external.patch + ) + +src_prepare() { + default + eautoreconf + multilib_copy_sources +} + +src_configure() { + gsl_configure() { + if use cblas-external; then + export CBLAS_LIBS="$($(tc-getPKG_CONFIG) --libs cblas)" + export CBLAS_CFLAGS="$($(tc-getPKG_CONFIG) --cflags cblas)" + fi + econf $(use_with cblas-external) + } + # fma flags, which can be enabled by -march=native, cause some tests to fail. + # https://github.com/gentoo/sci/pull/815 + append-cflags $(test-flags-CC -mno-fma -mno-fma4) + + multilib_foreach_abi run_in_build_dir gsl_configure +} + +src_compile() { + multilib_foreach_abi run_in_build_dir default +} + +src_test() { + multilib_foreach_abi run_in_build_dir default +} + +src_install() { + gsl_install() { + local libname=gslcblas + + create_pkgconfig \ + --name "${libname}" \ + --description "${PN} CBLAS implementation" \ + --libs "-l${libname}" \ + --libs-private "-lm" \ + --cflags "-I\${includedir}/${PN}" \ + --version "${PV}" \ + --url "${HOMEPAGE}" \ + "${libname}" + + GSL_ALTERNATIVES+=( /usr/$(get_libdir)/pkgconfig/cblas.pc ${libname}.pc ) + + default + } + multilib_foreach_abi run_in_build_dir gsl_install + + # Don't add gsl as a cblas alternative if using cblas-external + use cblas-external || alternatives_for cblas gsl 0 \ + ${GSL_ALTERNATIVES[@]} \ + /usr/include/cblas.h gsl/gsl_cblas.h +}
