summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/gsl/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/gsl/package.py')
-rw-r--r--var/spack/repos/builtin/packages/gsl/package.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gsl/package.py b/var/spack/repos/builtin/packages/gsl/package.py
index 3ad7b11971..fb81843c64 100644
--- a/var/spack/repos/builtin/packages/gsl/package.py
+++ b/var/spack/repos/builtin/packages/gsl/package.py
@@ -24,3 +24,31 @@ class Gsl(AutotoolsPackage, GNUMirrorPackage):
version('2.1', sha256='59ad06837397617f698975c494fe7b2b698739a59e2fcf830b776428938a0c66')
version('2.0', sha256='e361f0b19199b5e6c21922e9f16adf7eca8dd860842802424906d0f83485ca2d')
version('1.16', sha256='73bc2f51b90d2a780e6d266d43e487b3dbd78945dd0b04b14ca5980fe28d2f53')
+
+ variant('external-cblas', default=False, description='Build against external blas')
+
+ # from https://dev.gentoo.org/~mgorny/dist/gsl-2.3-cblas.patch.bz2
+ patch('gsl-2.3-cblas.patch', when="+external-cblas")
+
+ conflicts('+external-cblas', when="@:2.2.9999")
+ depends_on('m4', type='build', when='+external-cblas')
+ depends_on('autoconf', type='build', when='+external-cblas')
+ depends_on('automake', type='build', when='+external-cblas')
+ depends_on('libtool', type='build', when='+external-cblas')
+ depends_on('blas', when='+external-cblas')
+
+ @property
+ def force_autoreconf(self):
+ # The external cblas patch touches configure
+ return self.spec.satisfies('+external-cblas')
+
+ def configure_args(self):
+ configure_args = []
+ if self.spec.satisfies('+external-cblas'):
+ configure_args.append('--with-external-cblas')
+ configure_args.append('CBLAS_CFLAGS=%s'
+ % self.spec['blas'].headers.include_flags)
+ configure_args.append('CBLAS_LIBS=%s'
+ % self.spec['blas'].libs.ld_flags)
+
+ return configure_args