summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSinan <sbulutw@gmail.com>2019-09-04 07:20:38 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2019-09-04 09:20:38 -0500
commitd7ef97392c1161c6ec588ebdf7ca14c2a6fce942 (patch)
treea06fb51f501340a86d500b290dd69aeb33779b9a /var
parent6b619daef36b2d780bb6b3e32ec3d89a4f011faf (diff)
downloadspack-d7ef97392c1161c6ec588ebdf7ca14c2a6fce942.tar.gz
spack-d7ef97392c1161c6ec588ebdf7ca14c2a6fce942.tar.bz2
spack-d7ef97392c1161c6ec588ebdf7ca14c2a6fce942.tar.xz
spack-d7ef97392c1161c6ec588ebdf7ca14c2a6fce942.zip
new package: liblas (#12619)
* new package: liblas * explicitly disable build options * fix indentation
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/liblas/package.py54
1 files changed, 54 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/liblas/package.py b/var/spack/repos/builtin/packages/liblas/package.py
new file mode 100644
index 0000000000..99d7c3b7b9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/liblas/package.py
@@ -0,0 +1,54 @@
+# 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 Liblas(CMakePackage):
+ """libLAS is a C/C++ library for reading and writing the very common
+ LAS LiDAR format.
+ """
+
+ homepage = "https://liblas.org/"
+ url = "http://download.osgeo.org/liblas/libLAS-1.8.1.tar.bz2"
+
+ version('1.8.1', sha256='9adb4a98c63b461ed2bc82e214ae522cbd809cff578f28511122efe6c7ea4e76')
+
+ # libLAS linkage of GDAL and libgeotiff enhances spatial coordinate system
+ # description and provides data reprojection support.
+ # Ref.: https://liblas.org/compilation.html#optional-libraries
+ variant('endian', default=False, description='Build with "Endian-aware" option')
+ variant('gdal', default=False, description='Build with GDAL for enhanced performance')
+ variant('geotiff', default=True, description='Build with GeoTIFF for enhanced performance')
+ variant('laszip', default=False, description='Build with LasZip')
+
+ depends_on('libgeotiff')
+ depends_on('boost@:1.69.0')
+ depends_on('laszip', when='+laszip')
+ depends_on('gdal', when='+gdal')
+
+ def cmake_args(self):
+ args = []
+ if '+endian' in self.spec:
+ args.append('-DWITH_ENDIANAWARE=ON')
+ else:
+ args.append('-DWITH_ENDIANAWARE=OFF')
+
+ if '+gdal' in self.spec:
+ args.append('-DWITH_GDAL=ON')
+ else:
+ args.append('-DWITH_GDAL=OFF')
+
+ if '+geotiff' in self.spec:
+ args.append('-DWITH_GEOTIFF=ON')
+ else:
+ args.append('-DWITH_GEOTIFF=OFF')
+
+ if '+laszip' in self.spec:
+ args.append('-DWITH_LASZIP=ON')
+ else:
+ args.append('-DWITH_LASZIP=OFF')
+
+ return args