Merge pull request #230845 from sheepforce/hdf4-fortran
hdf4: enable fortran and netcdf support
This commit is contained in:
commit
8e0b0fa49f
|
@ -12,6 +12,9 @@
|
|||
, szip
|
||||
, javaSupport ? false
|
||||
, jdk
|
||||
, fortranSupport ? false
|
||||
, gfortran
|
||||
, netcdfSupport ? false
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hdf";
|
||||
|
@ -50,7 +53,7 @@ stdenv.mkDerivation rec {
|
|||
cmake
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
fixDarwinDylibNames
|
||||
];
|
||||
] ++ lib.optional fortranSupport gfortran;
|
||||
|
||||
buildInputs = [
|
||||
libjpeg
|
||||
|
@ -75,9 +78,8 @@ stdenv.mkDerivation rec {
|
|||
"-DHDF4_BUILD_UTILS=ON"
|
||||
"-DHDF4_BUILD_WITH_INSTALL_NAME=OFF"
|
||||
"-DHDF4_ENABLE_JPEG_LIB_SUPPORT=ON"
|
||||
"-DHDF4_ENABLE_NETCDF=OFF"
|
||||
"-DHDF4_ENABLE_NETCDF=${if netcdfSupport then "ON" else "OFF"}"
|
||||
"-DHDF4_ENABLE_Z_LIB_SUPPORT=ON"
|
||||
"-DHDF4_BUILD_FORTRAN=OFF"
|
||||
"-DJPEG_DIR=${libjpeg}"
|
||||
] ++ lib.optionals javaSupport [
|
||||
"-DHDF4_BUILD_JAVA=ON"
|
||||
|
@ -85,7 +87,13 @@ stdenv.mkDerivation rec {
|
|||
] ++ lib.optionals szipSupport [
|
||||
"-DHDF4_ENABLE_SZIP_ENCODING=ON"
|
||||
"-DHDF4_ENABLE_SZIP_SUPPORT=ON"
|
||||
];
|
||||
] ++ (if fortranSupport
|
||||
then [
|
||||
"-DHDF4_BUILD_FORTRAN=ON"
|
||||
"-DCMAKE_Fortran_FLAGS=-fallow-argument-mismatch"
|
||||
]
|
||||
else [ "-DHDF4_BUILD_FORTRAN=OFF" ]
|
||||
);
|
||||
|
||||
doCheck = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue