commit: 4506b053a4bd57ec14553db2375eb853dd819ae6 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> AuthorDate: Fri Feb 3 02:39:51 2017 +0000 Commit: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de> CommitDate: Fri Feb 3 02:39:51 2017 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=4506b053
sci-libs/blas-reference: version bump to 20161223 (3.7.0) Package-Manager: Portage-2.3.3, Repoman-2.3.1 .../blas-reference-20161223-r100.ebuild | 111 +++++++++++++++++++++ .../lapack-reference-3.7.0-fix-build-system.patch | 56 +++++++++++ 2 files changed, 167 insertions(+) diff --git a/sci-libs/blas-reference/blas-reference-20161223-r100.ebuild b/sci-libs/blas-reference/blas-reference-20161223-r100.ebuild new file mode 100644 index 0000000..3b6165c --- /dev/null +++ b/sci-libs/blas-reference/blas-reference-20161223-r100.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) + +NUMERIC_MODULE_NAME="refblas" + +inherit alternatives-2 cmake-utils eutils fortran-2 numeric-int64-multibuild python-any-r1 toolchain-funcs + +LPN=lapack +LPV=3.7.0 + +DESCRIPTION="Reference implementation of BLAS" +HOMEPAGE="http://www.netlib.org/lapack/" +SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz" + +LICENSE="BSD" +SLOT="0/${LPV}" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +IUSE="static-libs test" + +REQUIRED_USE="test? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="" +DEPEND="${RDEPEND} + test? ( ${PYTHON_DEPS} ) + virtual/pkgconfig" + +S="${WORKDIR}/${LPN}-${LPV}" +PATCHES=( "${FILESDIR}/lapack-reference-${LPV}-fix-build-system.patch" ) + +src_prepare() { + default + + # rename library to avoid collision with other blas implementations + # ${LIBNAME} and ${PROFNAME} are not defined here, they are in single + # quotes in the following seds. They are later set by defining cmake + # variables with -DPROFNAME etc in src_configure + sed -i \ + -e 's:\([^xc]\)blas:\1${LIBNAME}:g' \ + -e '/PROPERTIES/s:blas:${LIBNAME}:g' \ + CMakeLists.txt \ + BLAS/SRC/CMakeLists.txt || die + sed -i \ + -e '/Name: /s:blas:@PROFNAME@:' \ + -e 's:-lblas:-l@LIBNAME@:g' \ + BLAS/blas.pc.in || die + sed -i \ + -e 's:blas):${LIBNAME}):' \ + BLAS/TESTING/CMakeLists.txt || die + sed -i \ + -e 's:BINARY_DIR}/blas:BINARY_DIR}/${PROFNAME}:' \ + BLAS/CMakeLists.txt || die +} + +src_configure() { + blas_configure() { + local FCFLAGS="${FCFLAGS}" + append-fflags $($(tc-getPKG_CONFIG) --cflags ${blas_profname}) + append-fflags $(get_abi_CFLAGS) + append-fflags $(numeric-int64_get_fortran_int64_abi_fflags) + + local profname=$(numeric-int64_get_module_name) + local libname="${profname//-/_}" + + local mycmakeargs=( + -Wno-dev + -DPROFNAME="${profname}" + -DLIBNAME="${libname}" + -DUSE_OPTIMIZED_BLAS=OFF + -DCMAKE_Fortran_FLAGS="${FCFLAGS}" + -DLAPACK_PKGCONFIG_FFLAGS="$(numeric-int64_get_fortran_int64_abi_fflags)" + -DBUILD_TESTING="$(usex test)" + ) + if $(numeric-int64_is_static_build); then + mycmakeargs+=( + -DBUILD_SHARED_LIBS=OFF + -DBUILD_STATIC_LIBS=ON + ) + else + mycmakeargs+=( + -DBUILD_SHARED_LIBS=ON + -DBUILD_STATIC_LIBS=OFF + ) + fi + cmake-utils_src_configure + } + numeric-int64-multibuild_foreach_all_abi_variants blas_configure +} + +src_compile() { + local each target_dirs=( BLAS ) + use test && target_dirs+=( TESTING ) + for each in ${target_dirs[@]}; do + numeric-int64-multibuild_foreach_all_abi_variants \ + cmake-utils_src_compile -C ${each} + done + +} + +src_test() { + numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_test +} + +src_install() { + numeric-int64-multibuild_foreach_all_abi_variants cmake-utils_src_install -C BLAS + numeric-int64-multibuild_install_alternative blas reference +} diff --git a/sci-libs/blas-reference/files/lapack-reference-3.7.0-fix-build-system.patch b/sci-libs/blas-reference/files/lapack-reference-3.7.0-fix-build-system.patch new file mode 100644 index 0000000..70f7cb0 --- /dev/null +++ b/sci-libs/blas-reference/files/lapack-reference-3.7.0-fix-build-system.patch @@ -0,0 +1,56 @@ +diff --git a/BLAS/blas.pc.in b/BLAS/blas.pc.in +index 7fd6f1e..e52f3ad 100644 +--- a/BLAS/blas.pc.in ++++ b/BLAS/blas.pc.in +@@ -1,5 +1,7 @@ +-prefix=@prefix@ +-libdir=@libdir@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/include + + Name: BLAS + Description: FORTRAN reference implementation of BLAS Basic Linear Algebra Subprograms +diff --git a/CBLAS/cblas.pc.in b/CBLAS/cblas.pc.in +index 4a938fe..311aed9 100644 +--- a/CBLAS/cblas.pc.in ++++ b/CBLAS/cblas.pc.in +@@ -1,5 +1,7 @@ +-prefix=@prefix@ +-libdir=@libdir@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/include + + Name: CBLAS + Description: C Standard Interface to BLAS Basic Linear Algebra Subprograms +diff --git a/LAPACKE/lapacke.pc.in b/LAPACKE/lapacke.pc.in +index 028f8da..dc092b1 100644 +--- a/LAPACKE/lapacke.pc.in ++++ b/LAPACKE/lapacke.pc.in +@@ -1,5 +1,7 @@ +-prefix=@prefix@ +-libdir=@libdir@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/include + + Name: LAPACKE + Description: C Standard Interface to LAPACK Linear Algebra PACKage +diff --git a/lapack.pc.in b/lapack.pc.in +index 878efc2..2cca4c2 100644 +--- a/lapack.pc.in ++++ b/lapack.pc.in +@@ -1,5 +1,7 @@ +-prefix=@prefix@ +-libdir=@libdir@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@ ++includedir=${prefix}/include + + Name: LAPACK + Description: FORTRAN reference implementation of LAPACK Linear Algebra PACKage