commit: 7fc25873fec545a84886b8520fad8a6d1e13e4f1 Author: Pavel Denisov <pavel.a.denisov <AT> gmail <DOT> com> AuthorDate: Thu Nov 19 23:22:59 2015 +0000 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> CommitDate: Thu Nov 19 23:22:59 2015 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=7fc25873
sci-misc/kaldi: Add pkg_pretend() to check for suitable CBLAS provider Package-Manager: portage-2.2.24 sci-misc/kaldi/kaldi-0_p20151106.ebuild | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sci-misc/kaldi/kaldi-0_p20151106.ebuild b/sci-misc/kaldi/kaldi-0_p20151106.ebuild index e2e0bb6..9657cef 100644 --- a/sci-misc/kaldi/kaldi-0_p20151106.ebuild +++ b/sci-misc/kaldi/kaldi-0_p20151106.ebuild @@ -29,6 +29,14 @@ DEPEND="${RDEPEND} # user is (usually) not in the video group RESTRICT="test? ( cuda? ( userpriv ) )" +pkg_pretend() { + local cblas_provider=$(eselect cblas show) + + if [[ ! ${cblas_provider} =~ (atlas|mkl|openblas) ]]; then + die "Build with '${cblas_provider}' CBLAS is not supported" + fi +} + src_prepare() { epatch \ "${FILESDIR}"/Makefile.patch \ @@ -66,14 +74,12 @@ src_configure() { local cblas_provider=$(eselect cblas show) - if [[ ${cblas_provider} =~ "atlas" ]]; then + if [[ ${cblas_provider} =~ atlas ]]; then append-cxxflags -DHAVE_ATLAS - elif [[ ${cblas_provider} =~ "mkl" ]]; then + elif [[ ${cblas_provider} =~ mkl ]]; then append-cxxflags -DHAVE_MKL - elif [[ ${cblas_provider} =~ "openblas" ]]; then + elif [[ ${cblas_provider} =~ openblas ]]; then append-cxxflags -DHAVE_OPENBLAS $($(tc-getPKG_CONFIG) --cflags lapacke) - else - die "Build with ${cblas_provider} CBLAS is not supported" fi use test || append-cxxflags -DNDEBUG