Merge pull request #266076 from markuskowa/fix-netcdfcxx

netcdfcxx4: fix build, add patch for cmake
This commit is contained in:
markuskowa 2023-11-10 10:42:43 +01:00 committed by GitHub
commit 8458b6aa28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 60c699d..606b972 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -402,7 +402,7 @@ ELSE(MSVC)
FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED)
ENDIF(MSVC)
-CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5free_memory "" HAVE_H5FREE_MEMORY)
+CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARIES} H5free_memory "" HAVE_H5FREE_MEMORY)
IF(NOT HAVE_H5FREE_MEMORY)
MESSAGE(STATUS "Plugin support requires libhdf5 with H5Free support. Your libhdf5 install does not provide H5Free. Please install a newer version of libhdf5 if you require plugin compression support.")
SET(NC_HAS_DEF_VAR_FILTER "")

View File

@ -10,6 +10,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-GZ6n7dW3l8Kqrk2Xp2mxRTUWWQj0XEd2LDTG9EtrfhY=";
};
patches = [
# This fix is included upstream, remove with next upgrade
./cmake-h5free.patch
];
preConfigure = ''
cmakeFlags+="-Dabs_top_srcdir=$(readlink -f ./)"
'';
@ -28,5 +33,6 @@ stdenv.mkDerivation rec {
homepage = "https://www.unidata.ucar.edu/software/netcdf/";
license = lib.licenses.free;
platforms = lib.platforms.unix;
broken = stdenv.isDarwin;
};
}