summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <christoph.junghans@gmail.com>2017-09-27 15:39:33 -0600
committerscheibelp <scheibel1@llnl.gov>2017-09-27 14:39:33 -0700
commitf27aad68bf6ee80e0dfdd8042a5f2bd960c16381 (patch)
treecd4871deb0c2a5ff85399801699877e4a2fa9da4
parent83ab0625838e31e64d494351876d7af1b3ea2b73 (diff)
downloadspack-f27aad68bf6ee80e0dfdd8042a5f2bd960c16381.tar.gz
spack-f27aad68bf6ee80e0dfdd8042a5f2bd960c16381.tar.bz2
spack-f27aad68bf6ee80e0dfdd8042a5f2bd960c16381.tar.xz
spack-f27aad68bf6ee80e0dfdd8042a5f2bd960c16381.zip
flann: fix build for 1.8.1 (#5508)
* Update url_for_version for versions 1.8.1 and earlier * Add python dependency when +python is enabled
-rw-r--r--var/spack/repos/builtin/packages/flann/package.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/flann/package.py b/var/spack/repos/builtin/packages/flann/package.py
index ca79d3fe33..785717947d 100644
--- a/var/spack/repos/builtin/packages/flann/package.py
+++ b/var/spack/repos/builtin/packages/flann/package.py
@@ -46,11 +46,18 @@ class Flann(CMakePackage):
version('1.8.1', '1f51500e172f5e11fbda05f033858eb6')
version('1.8.0', '473150f592c2997e32d5ce31fd3c19a2')
+ def url_for_version(self, version):
+ if version > Version('1.8.1'):
+ return "https://github.com/mariusmuja/flann/archive/{0}.tar.gz".format(version)
+ else:
+ return "https://github.com/mariusmuja/flann/archive/{0}-src.tar.gz".format(version)
+
# Options available in the CMakeLists.txt
# Language bindings
variant("python", default=False,
description="Build the Python bindings. "
"Module: pyflann.")
+ extends('python', when='+python')
variant("matlab", default=False, description="Build the Matlab bindings.")
# default to true for C because it's a C++ library, nothing extra needed
variant("c", default=True, description="Build the C bindings.")
@@ -93,9 +100,10 @@ class Flann(CMakePackage):
),
"src/python/CMakeLists.txt")
# Fix the install location so that spack activate works
- filter_file("share/flann/python",
- site_packages_dir,
- "src/python/CMakeLists.txt")
+ if '+python' in self.spec:
+ filter_file("share/flann/python",
+ site_packages_dir,
+ "src/python/CMakeLists.txt")
# Hack. Don't install setup.py
filter_file("install( FILES",
"# install( FILES",