aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Denisov <pavel.a.denisov@gmail.com>2015-11-19 19:22:59 -0400
committerPavel Denisov <pavel.a.denisov@gmail.com>2015-11-19 19:22:59 -0400
commit7fc25873fec545a84886b8520fad8a6d1e13e4f1 (patch)
treeffa3364fe7b9ddd0b66cbc1d14601c5377e1b71b /sci-misc/kaldi
parentsci-misc/kaldi: Switch to user-selected BLAS/LAPACK (diff)
downloadsci-7fc25873fec545a84886b8520fad8a6d1e13e4f1.tar.gz
sci-7fc25873fec545a84886b8520fad8a6d1e13e4f1.tar.bz2
sci-7fc25873fec545a84886b8520fad8a6d1e13e4f1.zip
sci-misc/kaldi: Add pkg_pretend() to check for suitable CBLAS provider
Package-Manager: portage-2.2.24
Diffstat (limited to 'sci-misc/kaldi')
-rw-r--r--sci-misc/kaldi/kaldi-0_p20151106.ebuild16
1 files changed, 11 insertions, 5 deletions
diff --git a/sci-misc/kaldi/kaldi-0_p20151106.ebuild b/sci-misc/kaldi/kaldi-0_p20151106.ebuild
index e2e0bb69c..9657ceff5 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