New package: HDFView (#17707)

* HDFView

* adds support for version 3.1.1
This commit is contained in:
Julius-Plehn 2020-08-06 16:02:40 +02:00 committed by GitHub
parent 9dbe1d7776
commit f3ec1d445d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 64 additions and 0 deletions

View file

@ -57,6 +57,7 @@ class Hdf5(AutotoolsPackage):
variant('hl', default=False, description='Enable the high-level library')
variant('cxx', default=False, description='Enable C++ support')
variant('fortran', default=False, description='Enable Fortran support')
variant('java', default=False, description='Enable Java support')
variant('threadsafe', default=False,
description='Enable thread-safe capabilities')
@ -78,6 +79,7 @@ class Hdf5(AutotoolsPackage):
depends_on('m4', type='build', when='@develop')
depends_on('mpi', when='+mpi')
depends_on('java', when='+java')
# numactl does not currently build on darwin
if sys.platform != 'darwin':
depends_on('numactl', when='+mpi+fortran')
@ -237,6 +239,7 @@ def configure_args(self):
extra_args += self.enable_or_disable('cxx')
extra_args += self.enable_or_disable('hl')
extra_args += self.enable_or_disable('fortran')
extra_args += self.enable_or_disable('java')
api = self.spec.variants['api'].value
if api != 'none':

View file

@ -0,0 +1,12 @@
diff --git a/build.xml b/build_fixed.xml
index f0f2c3f..c486cbb 100644
--- a/build.xml
+++ b/build_fixed.xml
@@ -943,7 +943,6 @@
<!-- Generate list of needed Java modules by using `jdeps` on all JAR files in the release directory -->
<apply executable="@{java.bindir}/jdeps" output="${build.dir}/jdeps.pre" append="true" >
<arg value="--print-module-deps" />
- <arg value="--ignore-missing-deps" />
<fileset dir="${release.dir}/lib" includes="**/*.jar" />
</apply>

View file

@ -0,0 +1,49 @@
# Copyright 2013-2020 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 *
import os
class Hdfview(Package):
"""HDFView is a visual tool written in Java for browsing
and editing HDF (HDF5 and HDF4) files."""
homepage = "https://www.hdfgroup.org/downloads/hdfview/"
url = "https://s3.amazonaws.com/hdf-wordpress-1/wp-content/uploads/manual/HDFView/hdfview-3.0.tar.gz"
version('3.1.1', sha256='1cfd127ebb4c3b0ab1cfe54649a410fc7a1c2d73f45564697d3729f4aa6b0ba3',
url='https://support.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfview-3.1.1/src/hdfview-3.1.1.tar.gz')
version('3.0', sha256='e2a16d3842d8947f3d4f154ee9f48a106c7f445914a9e626a53976d678a0e934')
# unknown flag: --ignore-missing-deps
patch('fix_build.patch', when='@3.1.1')
depends_on('ant', type='build')
depends_on('hdf5 +java')
depends_on('hdf +java -external-xdr +shared')
def install(self, spec, prefix):
env['HDF5LIBS'] = spec['hdf5'].prefix
env['HDFLIBS'] = spec['hdf'].prefix
ant = which('ant')
ant('-Dbuild.debug=false', 'deploy')
dir_version = os.listdir('build/HDF_Group/HDFView/')[0]
path = 'build/HDF_Group/HDFView/{0}/'.format(dir_version)
hdfview = '{0}/{1}'.format(path, 'hdfview.sh')
filter_file(
r'\$dir',
prefix,
hdfview
)
mkdirp(prefix.bin)
install(hdfview, prefix.bin.hdfview)
chmod = which('chmod')
chmod('+x', self.prefix.bin.hdfview)
install_tree(path, prefix)