Skip to content
Snippets Groups Projects
Unverified Commit 6e63ff16 authored by Carson Woods's avatar Carson Woods Committed by GitHub
Browse files

netcdf-fortran: add new variants (#16046)

* Add additional variants to netcdf-fortran

* Fix duplicate variant

* Clean up variants based on review feedback

* Addtional variant changes

* Convert jna variant to single line

* Fix proper version constraints for jna variant
parent 4ed5cee9
Branches
Tags
No related merge requests found
...@@ -61,6 +61,7 @@ def url_for_version(self, version): ...@@ -61,6 +61,7 @@ def url_for_version(self, version):
description='Produce position-independent code (for shared libs)') description='Produce position-independent code (for shared libs)')
variant('shared', default=True, description='Enable shared library') variant('shared', default=True, description='Enable shared library')
variant('dap', default=False, description='Enable DAP support') variant('dap', default=False, description='Enable DAP support')
variant('jna', default=False, description='Enable JNA support')
# It's unclear if cdmremote can be enabled if '--enable-netcdf-4' is passed # It's unclear if cdmremote can be enabled if '--enable-netcdf-4' is passed
# to the configure script. Since netcdf-4 support is mandatory we comment # to the configure script. Since netcdf-4 support is mandatory we comment
...@@ -181,6 +182,9 @@ def configure_args(self): ...@@ -181,6 +182,9 @@ def configure_args(self):
else: else:
config_args.append('--disable-parallel4') config_args.append('--disable-parallel4')
if self.spec.satisfies('@4.3.2:'):
config_args += self.enable_or_disable('jna')
# Starting version 4.1.3, --with-hdf5= and other such configure options # Starting version 4.1.3, --with-hdf5= and other such configure options
# are removed. Variables CPPFLAGS, LDFLAGS, and LD_LIBRARY_PATH must be # are removed. Variables CPPFLAGS, LDFLAGS, and LD_LIBRARY_PATH must be
# used instead. # used instead.
......
...@@ -27,6 +27,7 @@ class NetcdfFortran(AutotoolsPackage): ...@@ -27,6 +27,7 @@ class NetcdfFortran(AutotoolsPackage):
variant('pic', default=True, variant('pic', default=True,
description='Produce position-independent code (for shared libs)') description='Produce position-independent code (for shared libs)')
variant('shared', default=True, description='Enable shared library') variant('shared', default=True, description='Enable shared library')
variant('doc', default=False, description='Enable building docs')
# We need to build with MPI wrappers if parallel I/O features is enabled: # We need to build with MPI wrappers if parallel I/O features is enabled:
# https://www.unidata.ucar.edu/software/netcdf/docs/building_netcdf_fortran.html # https://www.unidata.ucar.edu/software/netcdf/docs/building_netcdf_fortran.html
...@@ -34,6 +35,7 @@ class NetcdfFortran(AutotoolsPackage): ...@@ -34,6 +35,7 @@ class NetcdfFortran(AutotoolsPackage):
depends_on('netcdf-c~mpi', when='~mpi') depends_on('netcdf-c~mpi', when='~mpi')
depends_on('netcdf-c+mpi', when='+mpi') depends_on('netcdf-c+mpi', when='+mpi')
depends_on('doxygen', when='+doc', type='build')
# The default libtool.m4 is too old to handle NAG compiler properly: # The default libtool.m4 is too old to handle NAG compiler properly:
# https://github.com/Unidata/netcdf-fortran/issues/94 # https://github.com/Unidata/netcdf-fortran/issues/94
...@@ -120,6 +122,11 @@ def configure_args(self): ...@@ -120,6 +122,11 @@ def configure_args(self):
config_args.append('FC=%s' % self.spec['mpi'].mpifc) config_args.append('FC=%s' % self.spec['mpi'].mpifc)
config_args.append('F77=%s' % self.spec['mpi'].mpif77) config_args.append('F77=%s' % self.spec['mpi'].mpif77)
if '+doc' in self.spec:
config_args.append('--enable-doxygen')
else:
config_args.append('--disable-doxygen')
return config_args return config_args
@when('@:4.4.5') @when('@:4.4.5')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment