hdf4: 4.2.15 -> 4.3.0
Includes fixes for GCC 14.
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchpatch,
|
||||
fetchurl,
|
||||
fixDarwinDylibNames,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
ninja,
|
||||
libjpeg,
|
||||
@@ -21,22 +19,19 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hdf";
|
||||
version = "4.2.16-2";
|
||||
version = "4.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://support.hdfgroup.org/ftp/HDF/releases/HDF${finalAttrs.version}/src/hdf-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-xcMjS1ASJYrvLkQy9kmzHCGyYBWvuhhXrYNkDD8raSw=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "HDFGroup";
|
||||
repo = "hdf4";
|
||||
rev = "refs/tags/hdf${finalAttrs.version}";
|
||||
hash = "sha256-Q2VKwkp/iroStrOnwHI8d/dtMWkMoJesBVBVChwNa30=";
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
cmake
|
||||
ninja
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
fixDarwinDylibNames
|
||||
]
|
||||
++ lib.optional fortranSupport gfortran;
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
] ++ lib.optional fortranSupport gfortran;
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
@@ -47,23 +42,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ lib.optional szipSupport szip
|
||||
++ lib.optional uselibtirpc libtirpc;
|
||||
|
||||
preConfigure =
|
||||
lib.optionalString uselibtirpc ''
|
||||
# Make tirpc discovery work with CMAKE_PREFIX_PATH
|
||||
substituteInPlace config/cmake/FindXDR.cmake \
|
||||
--replace-fail 'find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATHS "/usr/include" "/usr/include/tirpc")' \
|
||||
'find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATH_SUFFIXES include/tirpc)'
|
||||
''
|
||||
+ lib.optionalString szipSupport ''
|
||||
export SZIP_INSTALL=${szip}
|
||||
'';
|
||||
|
||||
cmakeFlags =
|
||||
[
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
|
||||
(lib.cmakeBool "HDF4_BUILD_TOOLS" true)
|
||||
(lib.cmakeBool "HDF4_BUILD_UTILS" true)
|
||||
(lib.cmakeBool "HDF4_BUILD_WITH_INSTALL_NAME" false)
|
||||
(lib.cmakeBool "HDF4_BUILD_WITH_INSTALL_NAME" true)
|
||||
(lib.cmakeBool "HDF4_ENABLE_JPEG_LIB_SUPPORT" true)
|
||||
(lib.cmakeBool "HDF4_ENABLE_Z_LIB_SUPPORT" true)
|
||||
(lib.cmakeBool "HDF4_ENABLE_NETCDF" netcdfSupport)
|
||||
@@ -87,33 +71,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.cmakeFeature "H4_PRINTF_LL_TEST_RUN__TRYRUN_OUTPUT" "")
|
||||
];
|
||||
|
||||
env = lib.optionalAttrs stdenv.cc.isClang {
|
||||
NIX_CFLAGS_COMPILE = toString [
|
||||
"-Wno-error=implicit-function-declaration"
|
||||
"-Wno-error=implicit-int"
|
||||
];
|
||||
};
|
||||
|
||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
||||
|
||||
excludedTests = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"MFHDF_TEST-hdftest"
|
||||
"MFHDF_TEST-hdftest-shared"
|
||||
"HDP-dumpsds-18"
|
||||
"NC_TEST-nctest"
|
||||
];
|
||||
|
||||
checkPhase =
|
||||
let
|
||||
excludedTestsRegex = lib.optionalString (
|
||||
finalAttrs.excludedTests != [ ]
|
||||
) "(${lib.concatStringsSep "|" finalAttrs.excludedTests})";
|
||||
in
|
||||
''
|
||||
runHook preCheck
|
||||
ctest -E "${excludedTestsRegex}" --output-on-failure
|
||||
runHook postCheck
|
||||
'';
|
||||
doCheck = true;
|
||||
|
||||
outputs = [
|
||||
"bin"
|
||||
|
||||
Reference in New Issue
Block a user