hdf4: enable fortran and netcdf support
hdf4: fortran disabled by default hdf4: fix formatting hdf4: optional netcdf support hdf4: disable fortran by default
This commit is contained in:
parent
9cc20733c0
commit
4a33d3980c
|
@ -12,6 +12,9 @@
|
||||||
, szip
|
, szip
|
||||||
, javaSupport ? false
|
, javaSupport ? false
|
||||||
, jdk
|
, jdk
|
||||||
|
, fortranSupport ? false
|
||||||
|
, gfortran
|
||||||
|
, netcdfSupport ? false
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "hdf";
|
pname = "hdf";
|
||||||
|
@ -50,7 +53,7 @@ stdenv.mkDerivation rec {
|
||||||
cmake
|
cmake
|
||||||
] ++ lib.optionals stdenv.isDarwin [
|
] ++ lib.optionals stdenv.isDarwin [
|
||||||
fixDarwinDylibNames
|
fixDarwinDylibNames
|
||||||
];
|
] ++ lib.optional fortranSupport gfortran;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libjpeg
|
libjpeg
|
||||||
|
@ -75,9 +78,8 @@ stdenv.mkDerivation rec {
|
||||||
"-DHDF4_BUILD_UTILS=ON"
|
"-DHDF4_BUILD_UTILS=ON"
|
||||||
"-DHDF4_BUILD_WITH_INSTALL_NAME=OFF"
|
"-DHDF4_BUILD_WITH_INSTALL_NAME=OFF"
|
||||||
"-DHDF4_ENABLE_JPEG_LIB_SUPPORT=ON"
|
"-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_ENABLE_Z_LIB_SUPPORT=ON"
|
||||||
"-DHDF4_BUILD_FORTRAN=OFF"
|
|
||||||
"-DJPEG_DIR=${libjpeg}"
|
"-DJPEG_DIR=${libjpeg}"
|
||||||
] ++ lib.optionals javaSupport [
|
] ++ lib.optionals javaSupport [
|
||||||
"-DHDF4_BUILD_JAVA=ON"
|
"-DHDF4_BUILD_JAVA=ON"
|
||||||
|
@ -85,7 +87,13 @@ stdenv.mkDerivation rec {
|
||||||
] ++ lib.optionals szipSupport [
|
] ++ lib.optionals szipSupport [
|
||||||
"-DHDF4_ENABLE_SZIP_ENCODING=ON"
|
"-DHDF4_ENABLE_SZIP_ENCODING=ON"
|
||||||
"-DHDF4_ENABLE_SZIP_SUPPORT=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;
|
doCheck = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue