diff options
author | Sinan <sbulutw@gmail.com> | 2019-08-31 12:39:51 -0700 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-08-31 14:39:51 -0500 |
commit | da481128129fe4ce38c54e82011b347a2ec10d08 (patch) | |
tree | 4a434195765408330207cb229e5c86170c098061 | |
parent | 1461c90bd1f1901536f864d139146ff1dc507737 (diff) | |
download | spack-da481128129fe4ce38c54e82011b347a2ec10d08.tar.gz spack-da481128129fe4ce38c54e82011b347a2ec10d08.tar.bz2 spack-da481128129fe4ce38c54e82011b347a2ec10d08.tar.xz spack-da481128129fe4ce38c54e82011b347a2ec10d08.zip |
new package: pktools (#12611)
* new package: pktools
* rename and enable utilities
* enable build with FANN
* add variants, dependencies
* expcitly turn off options when not in use
-rw-r--r-- | var/spack/repos/builtin/packages/pktools/package.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/pktools/package.py b/var/spack/repos/builtin/packages/pktools/package.py new file mode 100644 index 0000000000..db60c3ddc8 --- /dev/null +++ b/var/spack/repos/builtin/packages/pktools/package.py @@ -0,0 +1,42 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * + + +class Pktools(CMakePackage): + """Processing Kernel for geospatial data""" + + homepage = "http://pktools.nongnu.org/html/index.html" + url = "http://download.savannah.gnu.org/releases/pktools/pktools-2.6.7.tar.gz" + + version('2.6.7.1', sha256='519b6a500ce3c5ef3793c1cda1f5377f13b7d7591b5ccc376b2bd1de4bd4f7e5') + version('2.6.7', sha256='f566647e93037cc01cebfe17ea554d798177fe5081887c70223dcca817f4fe7f') + + variant('fann', default=True, description='Build with libfann to enable related programs') + variant('liblas', default=False, description='Build with libLAS support') + + depends_on('gdal') + depends_on('gsl') + depends_on('armadillo') + depends_on('nlopt') + depends_on('boost') + depends_on('fann', when='+fann') + depends_on('liblas', when='+liblas') + + def cmake_args(self): + args = [] + args.append('-DCMAKE_CXX_STANDARD=11') + args.append('-DPKTOOLS_WITH_UTILITIES=ON') + if '+fann' in self.spec: + args.append('-DBUILD_WITH_FANN=ON') + else: + args.append('-DBUILD_WITH_FANN=OFF') + if '+liblas' in self.spec: + args.append('-DBUILD_WITH_LIBLAS=ON') + else: + args.append('-DBUILD_WITH_LIBLAS=OFF') + return args |