hdf4: fix build on darwin
The fix here is to not include libtirc on Darwin, on which platform the library is unavailable.
This commit is contained in:
parent
d897e8e0eb
commit
0f4be28af5
|
@ -8,7 +8,8 @@
|
||||||
, zlib
|
, zlib
|
||||||
, szip ? null
|
, szip ? null
|
||||||
}:
|
}:
|
||||||
|
let uselibtirpc = stdenv.isLinux;
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "hdf";
|
pname = "hdf";
|
||||||
version = "4.2.15";
|
version = "4.2.15";
|
||||||
|
@ -49,12 +50,13 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libjpeg
|
libjpeg
|
||||||
libtirpc
|
|
||||||
szip
|
szip
|
||||||
zlib
|
zlib
|
||||||
|
] ++ stdenv.lib.optionals uselibtirpc [
|
||||||
|
libtirpc
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = stdenv.lib.optionalString uselibtirpc ''
|
||||||
# Make tirpc discovery work with CMAKE_PREFIX_PATH
|
# Make tirpc discovery work with CMAKE_PREFIX_PATH
|
||||||
substituteInPlace config/cmake/FindXDR.cmake \
|
substituteInPlace config/cmake/FindXDR.cmake \
|
||||||
--replace 'find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATHS "/usr/include" "/usr/include/tirpc")' \
|
--replace 'find_path(XDR_INCLUDE_DIR NAMES rpc/types.h PATHS "/usr/include" "/usr/include/tirpc")' \
|
||||||
|
|
Loading…
Reference in New Issue