Skip to content

Commit

Permalink
Squashed 'src/hdf5-blosc/' changes from bd8ee59..949947a
Browse files Browse the repository at this point in the history
949947a Update release notes for 1.0.1
e2f7493 Merge pull request silx-kit#17 from zayfod/master
aaae50a Merge pull request silx-kit#33 from lgarrison/fix-cmake-libdir
ba20858 cmake: fix build on systems where the libdir is lib64
9683f7d Merge pull request silx-kit#24 from bhawkins/fix-link
c0d81ef Merge pull request silx-kit#32 from matchy233/fix/warnings
cd04690 Merge pull request silx-kit#31 from mkitti/master
526e3f4 Fix warnings related to const for blosc_filter.c
b80cacd Fix branch name of c-blosc repository in CMakeLists
ff32d8a Allow for HDF5_ROOT and set blosc tag to main
ec0d1ab Fix link to HDF5 docs.
6d60f33 Added freeing of memory, allocated by register_blosc().

git-subtree-dir: src/hdf5-blosc
git-subtree-split: 949947a5516bb987570c900c51866a7a50fb2dd7
  • Loading branch information
t20100 committed Jul 4, 2024
1 parent 8e4310c commit 70a7c2b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 2.8.10)
cmake_policy(SET CMP0074 NEW)
project(blosc_hdf5)
include(ExternalProject)
include(GNUInstallDirs)

# options
option(BUILD_TESTS
Expand All @@ -9,7 +11,7 @@ option(BUILD_TESTS
option(BUILD_PLUGIN
"Build dynamically loadable plugin for HDF5 version > 1.8.11" ON)
if(BUILD_PLUGIN)
set(PLUGIN_INSTALL_PATH "/usr/local/hdf5/lib/plugin" CACHE PATH
set(PLUGIN_INSTALL_PATH "/usr/local/hdf5/lib/plugin" CACHE PATH
"Where to install the dynamic HDF5-plugin")
endif(BUILD_PLUGIN)

Expand All @@ -25,6 +27,7 @@ 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}
)
Expand Down Expand Up @@ -52,7 +55,7 @@ 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)

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Instead of just linking this Blosc filter into your HDF5 application, it is poss
it as a system-wide HDF5 plugin (with HDF5 1.8.11 or later). This is useful because it allows
*every* HDF5-using program on your system to transparently read Blosc-compressed HDF5 files.

As described in the `HDF5 plugin documentation <https://www.hdfgroup.org/HDF5/doc/Advanced/DynamicallyLoadedFilters/HDF5DynamicallyLoadedFilters.pdf>`_, you just need to compile the Blosc plugin into a shared library and
As described in the `HDF5 plugin documentation <https://portal.hdfgroup.org/display/HDF5/HDF5+Dynamically+Loaded+Filters>`_, you just need to compile the Blosc plugin into a shared library and
copy it to the plugin directory (which defaults to ``/usr/local/hdf5/lib/plugin`` on non-Windows systems).

Following the ``cmake`` instructions below produces a ``libH5Zblosc.so`` shared library
Expand Down
9 changes: 9 additions & 0 deletions RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
:Contact: francesc@blosc.org
:URL: http://www.blosc.org

Changes from 1.0.0 to 1.0.1
===========================

- Fix warnings related to const for blosc_filter.c. Thanks to
@matchy233. Closes #34.

- Fix build on systems where the libdir is lib64 instead of lib. Thanks to
Lehman Garrison.


Changes from 0.0.1 to 1.0.0
===========================
Expand Down
4 changes: 2 additions & 2 deletions src/blosc_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ size_t blosc_filter(unsigned flags, size_t cd_nelmts,
int doshuffle = 1; /* Shuffle default */
int compcode; /* Blosc compressor */
int code;
char* compname = "blosclz"; /* The compressor by default */
char* complist;
const char* compname = "blosclz"; /* The compressor by default */
const char* complist;
char errmsg[256];

/* Filter params that are always set */
Expand Down
2 changes: 2 additions & 0 deletions src/example.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ int main(){
/* Register the filter with the library */
r = register_blosc(&version, &date);
printf("Blosc version info: %s (%s)\n", version, date);
free(version);
free(date);

if(r<0) goto failed;

Expand Down

0 comments on commit 70a7c2b

Please sign in to comment.