diff options
author | Josef Kemetmüller <josef.kemetmueller@gmail.com> | 2021-01-03 21:46:55 +0100 |
---|---|---|
committer | Frederik Rietdijk <freddyrietdijk@fridh.nl> | 2021-01-04 09:32:50 +0100 |
commit | 311addecb8bf50310688fba7980f41801d6d7be3 (patch) | |
tree | 0e0f65d8a68e648a4034fd630d26569963481296 /pkgs/tools/misc/hdf4 | |
parent | cf0e54722de364691e529fa994d238b8d49e1708 (diff) |
hdf4: Fix aarch64 build
The last glibc bump did break the aarch64 build of hdf4. We fix it by adding the libtirpc dependency, which was previously part of glibc. Fixes: #108340
Diffstat (limited to 'pkgs/tools/misc/hdf4')
-rw-r--r-- | pkgs/tools/misc/hdf4/default.nix | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/pkgs/tools/misc/hdf4/default.nix b/pkgs/tools/misc/hdf4/default.nix index b15eba8b7bc3d..a1aff8575279e 100644 --- a/pkgs/tools/misc/hdf4/default.nix +++ b/pkgs/tools/misc/hdf4/default.nix @@ -4,6 +4,7 @@ , fixDarwinDylibNames , cmake , libjpeg +, libtirpc , zlib , szip ? null }: @@ -16,6 +17,30 @@ stdenv.mkDerivation rec { sha256 = "04nbgfxyj5jg4d6sr28162cxbfwqgv0sa7vz1ayzvm8wbbpkbq5x"; }; + patches = [ + # Note that the PPC, SPARC and s390 patches are only needed so the aarch64 patch applies cleanly + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/hdf/raw/edbe5f49646b609f5bc9aeeee5a2be47e9556e8c/f/hdf-ppc.patch"; + sha256 = "0dbbfpsvvqzy9zyfv38gd81zzc44gxjib9sd8scxqnkkqprj6jq0"; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/hdf/raw/edbe5f49646b609f5bc9aeeee5a2be47e9556e8c/f/hdf-4.2.4-sparc.patch"; + sha256 = "0ip4prcjpa404clm87ib7l71605mws54x9492n9pbz5yb51r9aqh"; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/hdf/raw/edbe5f49646b609f5bc9aeeee5a2be47e9556e8c/f/hdf-s390.patch"; + sha256 = "0aiqbr4s1l19y3r3y4wjd5fkv9cfc8rlr4apbh1p0d57wyvqa7i3"; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/hdf/raw/edbe5f49646b609f5bc9aeeee5a2be47e9556e8c/f/hdf-arm.patch"; + sha256 = "157k1avvkpf3x89m1fv4a1kgab6k3jv74rskazrmjivgzav4qaw3"; + }) + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/hdf/raw/edbe5f49646b609f5bc9aeeee5a2be47e9556e8c/f/hdf-aarch64.patch"; + sha256 = "112svcsilk16ybbsi8ywnxfl2p1v44zh3rfn4ijnl8z08vfqrvvs"; + }) + ]; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optionals stdenv.isDarwin [ @@ -24,11 +49,19 @@ stdenv.mkDerivation rec { buildInputs = [ libjpeg + libtirpc szip zlib ]; - preConfigure = stdenv.lib.optionalString (szip != null) "export SZIP_INSTALL=${szip}"; + preConfigure = '' + # Make tirpc discovery work with CMAKE_PREFIX_PATH + substituteInPlace config/cmake/FindXDR.cmake \ + --replace '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)' + '' + stdenv.lib.optionalString (szip != null) '' + export SZIP_INSTALL=${szip} + ''; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" |