summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/armadillo/package.py
diff options
context:
space:
mode:
authorStephen McDowell <svenevs@users.noreply.github.com>2017-09-10 22:04:02 -0400
committerTodd Gamblin <tgamblin@llnl.gov>2017-09-10 16:04:02 -1000
commitbe2be8c70e2a2ec4932810b7144d45bdc8e81699 (patch)
treef2e198f5e89a711805c3a4d38eb037155f147ba0 /var/spack/repos/builtin/packages/armadillo/package.py
parent7d5f12be70980c6ce1452c7f232baa3dc251be7d (diff)
downloadspack-be2be8c70e2a2ec4932810b7144d45bdc8e81699.tar.gz
spack-be2be8c70e2a2ec4932810b7144d45bdc8e81699.tar.bz2
spack-be2be8c70e2a2ec4932810b7144d45bdc8e81699.tar.xz
spack-be2be8c70e2a2ec4932810b7144d45bdc8e81699.zip
fix armadillo macro expansions (#5268)
* fix armadillo macro expansions - most compilers `#define linux 1` - armadillo does raw pasting of include directories in code - this means macro expansion of `linux-x86_64` -> `1-x86_64` - new version, previous download url seems broken - lib64 instead of lib? - needs verification, was required for intel, works for others * flake8: two spaces is modules, one for classes * add some explanation of how the patch works * use p1 patch file with -U0 to prepend undef linux * armadillo v8.100.1
Diffstat (limited to 'var/spack/repos/builtin/packages/armadillo/package.py')
-rw-r--r--var/spack/repos/builtin/packages/armadillo/package.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/armadillo/package.py b/var/spack/repos/builtin/packages/armadillo/package.py
index 2658171925..71f72ac7e6 100644
--- a/var/spack/repos/builtin/packages/armadillo/package.py
+++ b/var/spack/repos/builtin/packages/armadillo/package.py
@@ -33,6 +33,9 @@ class Armadillo(CMakePackage):
homepage = "http://arma.sourceforge.net/"
url = "http://sourceforge.net/projects/arma/files/armadillo-7.200.1.tar.xz"
+ version('8.100.1', 'd9762d6f097e0451d0cfadfbda295e7c')
+ version('7.950.1', 'c06eb38b12cae49cab0ce05f96147147')
+ # NOTE: v7.900.1 download url seems broken is no v7.950.1?
version('7.900.1', '5ef71763bd429a3d481499878351f3be')
version('7.500.0', '7d316fdf3c3c7ea92b64704180ae315d')
version('7.200.2', 'b21585372d67a8876117fd515d8cf0a2')
@@ -47,11 +50,17 @@ class Armadillo(CMakePackage):
depends_on('superlu@5.2:')
depends_on('hdf5', when='+hdf5')
+ # Adds an `#undef linux` to prevent preprocessor expansion of include
+ # directories with `linux` in them getting transformed into a 1.
+ # E.g. `/path/linux-x86_64/dir` -> `/path/1-x86_64/dir` if/when a linux
+ # platform's compiler is adding `#define linux 1`.
+ patch('undef_linux.patch', when='platform=linux')
+
def cmake_args(self):
spec = self.spec
arpack = find_libraries('libarpack', root=spec[
- 'arpack-ng'].prefix.lib, shared=True)
+ 'arpack-ng'].prefix.lib64, shared=True)
superlu = find_libraries('libsuperlu', root=spec[
'superlu'].prefix, shared=False, recurse=True)
return [