From 540e57f02686bad7125a951d14784e8fcc896e26 Mon Sep 17 00:00:00 2001 From: Josh Sixsmith Date: Fri, 25 Mar 2016 18:27:02 +1100 Subject: Upload of GDAL, kealib, openjpeg, py-tuiview package builds. --- var/spack/repos/builtin/packages/gdal/package.py | 69 ++++++++++++++++++++++ var/spack/repos/builtin/packages/kealib/package.py | 35 +++++++++++ .../repos/builtin/packages/openjpeg/package.py | 26 ++++++++ .../repos/builtin/packages/py-tuiview/package.py | 19 ++++++ 4 files changed, 149 insertions(+) create mode 100644 var/spack/repos/builtin/packages/gdal/package.py create mode 100644 var/spack/repos/builtin/packages/kealib/package.py create mode 100644 var/spack/repos/builtin/packages/openjpeg/package.py create mode 100644 var/spack/repos/builtin/packages/py-tuiview/package.py diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py new file mode 100644 index 0000000000..4f1f1ec2dd --- /dev/null +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -0,0 +1,69 @@ +from spack import * + +class Gdal(Package): + """ + GDAL is a translator library for raster and vector geospatial + data formats that is released under an X/MIT style Open Source + license by the Open Source Geospatial Foundation. As a library, + it presents a single raster abstract data model and vector + abstract data model to the calling application for all supported + formats. It also comes with a variety of useful command line + utilities for data translation and processing + """ + + homepage = "http://www.gdal.org/" + url = "http://download.osgeo.org/gdal/2.0.2/gdal-2.0.2.tar.gz" + list_url = "http://download.osgeo.org/gdal/" + list_depth = 2 + + version('2.0.2', '573865f3f59ba7b4f8f4cddf223b52a5') + + extends('python') + + variant('hdf5', default=False, description='Enable HDF5 support') + variant('hdf', default=False, description='Enable HDF4 support') + variant('openjpeg', default=False, description='Enable JPEG2000 support') + variant('geos', default=False, description='Enable GEOS support') + variant('kea', default=False, description='Enable KEA support') + variant('netcdf', default=False, description='Enable netcdf support') + + depends_on('swig') + depends_on("hdf5", when='+hdf5') + depends_on("hdf", when='+hdf') + depends_on("openjpeg", when='+openjpeg') + depends_on("geos", when='+geos') + depends_on("kealib", when='+kea') + depends_on("netcdf", when='+netcdf') + depends_on("libtiff") + depends_on("libpng") + depends_on("zlib") + depends_on("proj") + depends_on("py-numpy") + + parallel = False + + def install(self, spec, prefix): + args = [] + args.append("--prefix=%s" % prefix) + args.append("--with-liblzma=yes") + args.append("--with-zlib=%s" % spec['zlib'].prefix) + args.append("--with-python=%s" % spec['python'].prefix.bin + "/python") + args.append("--without-libtool") + + if '+geos' in spec: + args.append('--with-geos=yes') + if '+hdf' in spec: + args.append('--with-hdf4=%s' % spec['hdf'].prefix) + if '+hdf5' in spec: + args.append('--with-hdf5=%s' % spec['hdf5'].prefix) + if '+openjpeg' in spec: + args.append('--with-openjpeg=%s' % spec['openjpeg'].prefix) + if '+kea' in spec: + args.append('--with-kea=yes') + if '+netcdf' in spec: + args.append('--with-netcdf=%s' % spec['netcdf'].prefix) + + configure(*args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/kealib/package.py b/var/spack/repos/builtin/packages/kealib/package.py new file mode 100644 index 0000000000..475d21e1d8 --- /dev/null +++ b/var/spack/repos/builtin/packages/kealib/package.py @@ -0,0 +1,35 @@ +from spack import * + +class Kealib(Package): + """An HDF5 Based Raster File Format + + KEALib provides an implementation of the GDAL data model. + The format supports raster attribute tables, image pyramids, + meta-data and in-built statistics while also handling very + large files and compression throughout. + + Based on the HDF5 standard, it also provides a base from which + other formats can be derived and is a good choice for long + term data archiving. An independent software library (libkea) + provides complete access to the KEA image format and a GDAL + driver allowing KEA images to be used from any GDAL supported software. + + Development work on this project has been funded by Landcare Research. + """ + homepage = "http://kealib.org/" + url = "https://bitbucket.org/chchrsc/kealib/get/kealib-1.4.5.tar.gz" + + version('1.4.5', '112e9c42d980b2d2987a3c15d0833a5d') + + depends_on("hdf5") + + def install(self, spec, prefix): + with working_dir('trunk', create=False): + cmake_args = [] + cmake_args.append("-DCMAKE_INSTALL_PREFIX=%s" % prefix) + cmake_args.append("-DHDF5_INCLUDE_DIR=%s" % spec['hdf5'].prefix.include) + cmake_args.append("-DHDF5_LIB_PATH=%s" % spec['hdf5'].prefix.lib) + cmake('.', *cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/openjpeg/package.py b/var/spack/repos/builtin/packages/openjpeg/package.py new file mode 100644 index 0000000000..afec197d11 --- /dev/null +++ b/var/spack/repos/builtin/packages/openjpeg/package.py @@ -0,0 +1,26 @@ +from spack import * + +class Openjpeg(Package): + """ + OpenJPEG is an open-source JPEG 2000 codec written in C language. + It has been developed in order to promote the use of JPEG 2000, a + still-image compression standard from the Joint Photographic + Experts Group (JPEG). + Since April 2015, it is officially recognized by ISO/IEC and + ITU-T as a JPEG 2000 Reference Software. + """ + homepage = "https://github.com/uclouvain/openjpeg" + url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz" + + version('2.1' , '3e1c451c087f8462955426da38aa3b3d') + version('2.0.1', '105876ed43ff7dbb2f90b41b5a43cfa5') + version('2.0' , 'cdf266530fee8af87454f15feb619609') + version('1.5.2', '545f98923430369a6b046ef3632ef95c') + version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e') + + + def install(self, spec, prefix): + cmake('.', *std_cmake_args) + + make() + make("install") diff --git a/var/spack/repos/builtin/packages/py-tuiview/package.py b/var/spack/repos/builtin/packages/py-tuiview/package.py new file mode 100644 index 0000000000..984b4196b1 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tuiview/package.py @@ -0,0 +1,19 @@ +from spack import * + +class PyTuiview(Package): + """ + TuiView is a lightweight raster GIS with powerful raster attribute + table manipulation abilities. + """ + homepage = "https://bitbucket.org/chchrsc/tuiview" + url = "https://bitbucket.org/chchrsc/tuiview/get/tuiview-1.1.7.tar.gz" + + version('1.1.7', '4b3b38a820cc239c8ab4a181ac5d4c30') + + extends("python") + depends_on("py-pyqt") + depends_on("py-numpy") + depends_on("gdal") + + def install(self, spec, prefix): + python('setup.py', 'install', '--prefix=%s' % prefix) -- cgit v1.2.3-70-g09d2