From aa3744299b4b6f49730911dd771545d2e7d54aaf Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Mon, 26 Jun 2023 15:04:12 +0200 Subject: netcdf-c: apply patches (#38324) * netcdf-c: fix building on macOS * netcdf-c: add patch fixing multi-threaded HDF5 calls * netcdf-c: update patch url --- var/spack/repos/builtin/packages/netcdf-c/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/netcdf-c/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py index b837eca71e..0d0b8e4c8b 100644 --- a/var/spack/repos/builtin/packages/netcdf-c/package.py +++ b/var/spack/repos/builtin/packages/netcdf-c/package.py @@ -79,6 +79,18 @@ class NetcdfC(CMakePackage, AutotoolsPackage): ) _force_autoreconf_when.append("@4.8.1") + # See https://github.com/Unidata/netcdf-c/pull/2710 + # Versions 4.9.0 and 4.9.1 had a bug in the configure script, which worked to our benefit. + # The bug has been fixed in + # https://github.com/Unidata/netcdf-c/commit/267b26f1239310ca7ba8304315834939f7cc9886 and + # now we need a patch in cases when we build for macOS with DAP disabled: + patch( + "https://github.com/Unidata/netcdf-c/commit/cfe6231aa6b018062b443cbe2fd9073f15283344.patch?full_index=1", + sha256="4e105472de95a1bb5d8b0b910d6935ce9152777d4fe18b678b58347fa0122abc", + when="@4.9.2~dap platform=darwin", + ) + _force_autoreconf_when.append("@4.9.2~dap platform=darwin") + with when("@4.7.2"): # Fix headers # See https://github.com/Unidata/netcdf-c/pull/1505 @@ -99,6 +111,13 @@ class NetcdfC(CMakePackage, AutotoolsPackage): when="@4.9.0:4.9.1~mpi+parallel-netcdf", ) + # See https://github.com/Unidata/netcdf-c/issues/2674 + patch( + "https://github.com/Unidata/netcdf-c/commit/f8904d5a1d89420dde0f9d2c0e051ba08d08e086.patch?full_index=1", + sha256="0161eb870fdfaf61be9d70132c9447a537320342366362e76b8460c823bf95ca", + when="@4.9.0:4.9.2", + ) + variant("mpi", default=True, description="Enable parallel I/O for netcdf-4") variant("parallel-netcdf", default=False, description="Enable parallel I/O for classic files") variant("hdf4", default=False, description="Enable HDF4 support") -- cgit v1.2.3-60-g2f50