Unverified Commit 9f879c1d authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

hdf5-blosc: 1.0.0 -> 1.0.1 (#414791)

parents e1e173ff 519c9061
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
--- a/CMakeLists.txt      2019-10-11 12:12:27.445417039 -0400
+++ b/CMakeLists.txt      2019-10-11 12:27:26.630691742 -0400
@@ -22,14 +22,6 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9ec0f23..35953d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,15 +24,6 @@ message("BLOSC_INSTALL_DIR='${BLOSC_INSTALL_DIR}'")
 message("BLOSC_CMAKE_ARGS='${BLOSC_CMAKE_ARGS}'")
 message("GIT_EXECUTABLE='${GIT_EXECUTABLE}'")

-ExternalProject_Add(project_blosc
-  PREFIX ${BLOSC_PREFIX}
-  GIT_REPOSITORY https://github.com/Blosc/c-blosc.git
-  GIT_TAG main
-  INSTALL_DIR ${BLOSC_INSTALL_DIR}
-  CMAKE_ARGS ${BLOSC_CMAKE_ARGS}
-)
@@ -15,10 +18,10 @@
 # sources
 set(SOURCES src/blosc_filter.c)
 set(PLUGIN_SOURCES src/blosc_filter.c src/blosc_plugin.c )
@@ -53,7 +45,6 @@
@@ -56,7 +47,6 @@ include_directories(${HDF5_INCLUDE_DIRS})
 # add blosc libraries
 add_library(blosc_shared SHARED IMPORTED)
 set_property(TARGET blosc_shared PROPERTY IMPORTED_LOCATION ${BLOSC_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}blosc${CMAKE_SHARED_LIBRARY_SUFFIX})
 set_property(TARGET blosc_shared PROPERTY IMPORTED_LOCATION ${BLOSC_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}blosc${CMAKE_SHARED_LIBRARY_SUFFIX})
-add_dependencies(blosc_shared project_blosc)
 include_directories(${BLOSC_INSTALL_DIR}/include)

+10 −3
Original line number Diff line number Diff line
@@ -5,17 +5,18 @@
  cmake,
  hdf5,
  fetchFromGitHub,
  nix-update-script,
}:

stdenv.mkDerivation rec {
  pname = "hdf5-blosc";
  version = "1.0.0";
  version = "1.0.1";

  src = fetchFromGitHub {
    owner = "Blosc";
    repo = "hdf5-blosc";
    rev = "v${version}";
    sha256 = "1nj2bm1v6ymm3fmyvhbn6ih5fgdiapavlfghh1pvbmhw71cysyqs";
    sha256 = "sha256-pM438hUEdzdZEGYxoKlBAHi1G27auj9uGSeiXwVPAE8=";
  };

  patches = [ ./no-external-blosc.patch ];
@@ -33,11 +34,13 @@ stdenv.mkDerivation rec {
  ];

  preConfigure = ''
    substituteInPlace CMakeLists.txt --replace 'set(BLOSC_INSTALL_DIR "''${CMAKE_CURRENT_BINARY_DIR}/blosc")' 'set(BLOSC_INSTALL_DIR "${c-blosc}")'
    substituteInPlace CMakeLists.txt --replace-fail 'set(BLOSC_INSTALL_DIR "''${CMAKE_CURRENT_BINARY_DIR}/blosc")' 'set(BLOSC_INSTALL_DIR "${c-blosc}")'
  '';

  cmakeFlags = [
    "-DPLUGIN_INSTALL_PATH=${placeholder "plugin"}/hdf5/lib/plugin"
    "-DCMAKE_INSTALL_LIBDIR=lib"
    "-DBUILD_TESTS=ON"
  ];

  postInstall = ''
@@ -45,6 +48,10 @@ stdenv.mkDerivation rec {
    substituteAll ${./blosc_filter.pc.in} $out/lib/pkgconfig/blosc_filter.pc
  '';

  doCheck = true;

  passthru.updateScript = nix-update-script { };

  meta = with lib; {
    description = "Filter for HDF5 that uses the Blosc compressor";
    homepage = "https://github.com/Blosc/hdf5-blosc";