diff options
author | gienah <gienah@gentoo.org> | 2014-10-13 21:15:29 +1100 |
---|---|---|
committer | gienah <gienah@gentoo.org> | 2014-10-13 21:15:29 +1100 |
commit | a66c7efa4b8dd9b09ba5dad0fa2609b5543f6d4a (patch) | |
tree | 1d162660158ee27887f04c82cc47b83762748a18 /sci-libs/blas-reference/blas-reference-20131116.ebuild | |
parent | Refactor to lapack-reference use the fortran-int64.eclass. Add the virtual to... (diff) | |
download | sci-a66c7efa4b8dd9b09ba5dad0fa2609b5543f6d4a.tar.gz sci-a66c7efa4b8dd9b09ba5dad0fa2609b5543f6d4a.tar.bz2 sci-a66c7efa4b8dd9b09ba5dad0fa2609b5543f6d4a.zip |
multilib int64 multibuild blas-reference
Diffstat (limited to 'sci-libs/blas-reference/blas-reference-20131116.ebuild')
-rw-r--r--[l---------] | sci-libs/blas-reference/blas-reference-20131116.ebuild | 79 |
1 files changed, 78 insertions, 1 deletions
diff --git a/sci-libs/blas-reference/blas-reference-20131116.ebuild b/sci-libs/blas-reference/blas-reference-20131116.ebuild index 28324bd7a..2b3cb9aca 120000..100644 --- a/sci-libs/blas-reference/blas-reference-20131116.ebuild +++ b/sci-libs/blas-reference/blas-reference-20131116.ebuild @@ -1 +1,78 @@ -blas-reference-99999999.ebuild
\ No newline at end of file +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit fortran-2 cmake-utils alternatives-2 + +LPN=lapack +LPV=3.5.0 + +if [[ ${PV} == "99999999" ]] ; then + ESVN_REPO_URI="https://icl.cs.utk.edu/svn/lapack-dev/${LPN}/trunk" + inherit subversion + KEYWORDS="" +else + SRC_URI="http://www.netlib.org/${LPN}/${LPN}-${LPV}.tgz" + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="Reference implementation of BLAS" +HOMEPAGE="http://www.netlib.org/lapack/" + +LICENSE="BSD" +SLOT="0" +IUSE="static-libs test" + +S="${WORKDIR}/${LPN}-${LPV}" + +src_prepare() { + # rename library to avoid collision with other blas implementations + sed -i \ + -e 's:blas:refblas:g' \ + CMakeLists.txt BLAS/blas.pc.in \ + BLAS/{SRC,TESTING}/CMakeLists.txt || die + sed -i \ + -e 's:BINARY_DIR}/blas:BINARY_DIR}/refblas:' \ + BLAS/CMakeLists.txt || die + use static-libs && mkdir "${WORKDIR}/${PN}_static" +} + +src_configure() { + blas_configure() { + local mycmakeargs=( + -DUSE_OPTIMIZED_BLAS=OFF + $(cmake-utils_use_build test TESTING) + $@ + ) + cmake-utils_src_configure + } + + blas_configure -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF + use static-libs && \ + CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" blas_configure \ + -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +} + +src_compile() { + cmake-utils_src_compile -C BLAS + use static-libs && CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" \ + cmake-utils_src_compile -C BLAS +} + +src_test() { + pushd "${CMAKE_BUILD_DIR}/BLAS" > /dev/null + local ctestargs + [[ -n ${TEST_VERBOSE} ]] && ctestargs="--extra-verbose --output-on-failure" + ctest ${ctestargs} || die + popd > /dev/null +} + +src_install() { + cmake-utils_src_install -C BLAS + use static-libs && CMAKE_BUILD_DIR="${WORKDIR}/${PN}_static" \ + cmake-utils_src_install -C BLAS + alternatives_for blas reference 0 \ + /usr/$(get_libdir)/pkgconfig/blas.pc refblas.pc +} |