Skip to content

Commit

Permalink
Merge pull request #572 from Morwenn/hdf5-1.10.6
Browse files Browse the repository at this point in the history
Add hdf5/1.10.6
  • Loading branch information
danimtb authored Jan 9, 2020
2 parents cc0f23b + 605e3e9 commit 9bdec3a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions recipes/hdf5/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ sources:
"1.10.5":
sha256: 22a4a48f94b013e9fd482c0bb0251de02ff9963787a107c5dde26a3f903b3b90
url: https://github.com/live-clones/hdf5/archive/hdf5-1_10_5.tar.gz
"1.10.6":
sha256: e524b374b1c6f14f1aa87595c0761608c861fe7838549dab84639ae564ff48e8
url: https://github.com/live-clones/hdf5/archive/hdf5-1_10_6.tar.gz
14 changes: 11 additions & 3 deletions recipes/hdf5/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,24 @@ def source(self):
os.rename(extracted_dir, self._source_subfolder)

# Strip the debug suffix from library names
if tools.Version(self.version) < "1.10.6":
suffix_var = "LIB_DEBUG_SUFFIX"
else:
suffix_var = "CMAKE_DEBUG_POSTFIX"
for suffix in ["_D", "_debug"]:
tools.replace_in_file(
os.path.join(self._source_subfolder, "config", "cmake_ext_mod", "HDFMacros.cmake"),
'set (LIB_DEBUG_SUFFIX "{}")'.format(suffix),
'set (LIB_DEBUG_SUFFIX "")'
'set ({} "{}")'.format(suffix_var, suffix),
'set ({} "")'.format(suffix_var)
)

def _configure_cmake(self):
cmake = CMake(self)

# Needed to avoid constructing the static libraries
if tools.Version(self.version) >= "1.10.6":
cmake.definitions["ONLY_SHARED_LIBS"] = self.options.shared

# Build only necessary modules
cmake.definitions["BUILD_TESTING"] = "OFF"
cmake.definitions["HDF5_BUILD_CPP_LIB"] = "ON"
Expand Down Expand Up @@ -103,7 +111,7 @@ def package(self):
os.remove(path)

# Manually remove the .a/.lib files if we are building in shared mode
if self.options.shared:
if self.options.shared and tools.Version(self.version) < "1.10.6":
wildcard_pattern = os.path.join(self.package_folder, "lib", "lib*")
for extension in [".a", ".lib"]:
for static_lib in glob.glob(wildcard_pattern + extension):
Expand Down
2 changes: 2 additions & 0 deletions recipes/hdf5/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ versions:
folder: all
1.10.5:
folder: all
1.10.6:
folder: all

0 comments on commit 9bdec3a

Please sign in to comment.