From e81fb9eddf4643a4b31b155403e1d475b6e5af17 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:10:27 -0600 Subject: Correct urls and handling of external git repos (#3890) --- CMakeFilters.cmake | 4 ++-- config/cmake/HDF5PluginCache.cmake | 9 +++++++-- config/cmake/cacheinit.cmake | 12 +++++++++--- release_docs/INSTALL_CMake.txt | 17 +++++++++++++---- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index 72f7f45..a9cba8f 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -41,8 +41,8 @@ if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT" OR HDF5_ALLOW_EXTERNAL_SUPPORT MAT if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT") set (ZLIB_URL ${ZLIB_GIT_URL} CACHE STRING "Path to zlib git repository") set (ZLIB_BRANCH ${ZLIB_GIT_BRANCH}) - set (SZIP_URL ${SZIP_GIT_URL} CACHE STRING "Path to szip git repository") - set (SZIP_BRANCH ${SZIP_GIT_BRANCH}) + set (SZIP_URL ${LIBAEC_GIT_URL} CACHE STRING "Path to szip git repository") + set (SZIP_BRANCH ${LIBAEC_GIT_BRANCH}) elseif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ") if (NOT TGZPATH) set (TGZPATH ${HDF5_SOURCE_DIR}) diff --git a/config/cmake/HDF5PluginCache.cmake b/config/cmake/HDF5PluginCache.cmake index 1407561..d299d9f 100644 --- a/config/cmake/HDF5PluginCache.cmake +++ b/config/cmake/HDF5PluginCache.cmake @@ -22,12 +22,17 @@ if (NOT DEFINED H5PL_ALLOW_EXTERNAL_SUPPORT) set (H5PL_ALLOW_EXTERNAL_SUPPORT "${HDF5_ALLOW_EXTERNAL_SUPPORT}" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) endif () +if (H5PL_ALLOW_EXTERNAL_SUPPORT MATCHES "GIT") + set (ENABLE_JPEG OFF CACHE BOOL "" FORCE) + set (ENABLE_LZF OFF CACHE BOOL "" FORCE) +endif () + if (NOT DEFINED H5PL_TGZPATH) set (H5PL_TGZPATH "${TGZPATH}" CACHE PATH "PATH for finding plugin tgz file" FORCE) endif () -set (H5PL_GIT_URL "https://github.com/HDFGroup/hdf5_plugins.git" CACHE STRING "Use plugins from HDF Group repository" FORCE) -set (H5PL_GIT_BRANCH "master" CACHE STRING "" FORCE) +set (H5PL_GIT_URL "${PLUGIN_GIT_URL}" CACHE STRING "Use plugins from HDF Group repository" FORCE) +set (H5PL_GIT_BRANCH "${PLUGIN_GIT_BRANCH}" CACHE STRING "" FORCE) set (H5PL_TGZ_NAME "${PLUGIN_TGZ_NAME}" CACHE STRING "Use plugins from compressed file" FORCE) diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index c7878e9..c91f98a 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -50,11 +50,15 @@ set (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE) set (ZLIB_TGZ_NAME "zlib-1.3.tar.gz" CACHE STRING "Use HDF5_ZLib from compressed file" FORCE) set (ZLIB_TGZ_ORIGPATH "https://github.com/madler/zlib/releases/download/v1.3" CACHE STRING "Use ZLIB from original location" FORCE) set (ZLIB_USE_LOCALCONTENT ON CACHE BOOL "Use local file for ZLIB FetchContent" FORCE) +set (ZLIB_GIT_URL "https://github.com/madler/zlib.git" CACHE STRING "Use ZLIB from GitHub repository" FORCE) +set (ZLIB_GIT_BRANCH "develop" CACHE STRING "" FORCE) set (LIBAEC_PACKAGE_NAME "libaec" CACHE STRING "Name of AEC SZIP package" FORCE) set (LIBAEC_TGZ_NAME "libaec-1.0.6.tar.gz" CACHE STRING "Use SZip AEC from compressed file" FORCE) set (LIBAEC_TGZ_ORIGPATH "https://github.com/MathisRosenhauer/libaec/releases/download/v1.0.6" CACHE STRING "Use LIBAEC from original location" FORCE) set (LIBAEC_USE_LOCALCONTENT ON CACHE BOOL "Use local file for LIBAEC FetchContent" FORCE) +set (LIBAEC_GIT_URL "https://github.com/MathisRosenhauer/libaec.git" CACHE STRING "Use LIBAEC from GitHub repository" FORCE) +set (LIBAEC_GIT_BRANCH "v1.0.6" CACHE STRING "" FORCE) ######################## # API test options @@ -71,6 +75,8 @@ set (PLUGIN_TGZ_ORIGPATH "https://github.com/HDFGroup/hdf5_plugins/releases/down set (PLUGIN_TGZ_NAME "hdf5_plugins-master.tar.gz" CACHE STRING "Use PLUGINS from compressed file" FORCE) set (PLUGIN_USE_LOCALCONTENT ON CACHE BOOL "Use local file for PLUGIN FetchContent" FORCE) set (PLUGIN_PACKAGE_NAME "pl" CACHE STRING "Name of PLUGIN package" FORCE) +set (PLUGIN_GIT_URL "https://github.com/HDFGroup/hdf5_plugins.git" CACHE STRING "Use plugins from HDF Group repository" FORCE) +set (PLUGIN_GIT_BRANCH "master" CACHE STRING "" FORCE) ############# # bitshuffle @@ -109,7 +115,7 @@ set (BLOSC_ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of BLOSC_ZLIB package" FO ######## set (BZ2_GIT_URL "https://github.com/libarchive/bzip2.git" CACHE STRING "Use BZ2 from GitHub repository" FORCE) -set (BZ2_GIT_BRANCH "master" CACHE STRING "" FORCE) +set (BZ2_GIT_BRANCH "bzip2-1.0.8" CACHE STRING "" FORCE) set (BZ2_TGZ_ORIGPATH "https://github.com/libarchive/bzip2/archive/refs/tags" CACHE STRING "Use PLUGINS from original location" FORCE) set (BZ2_TGZ_NAME "bzip2-bzip2-1.0.8.tar.gz" CACHE STRING "Use BZ2 from compressed file" FORCE) @@ -132,8 +138,8 @@ set (FPZIP_PACKAGE_NAME "fpzip" CACHE STRING "Name of FPZIP package" FORCE) # jpeg ####### -set (JPEG_GIT_URL "No repo www.ijg.org/files" CACHE STRING "Use JPEG from ILG" FORCE) -set (JPEG_GIT_BRANCH "v9e" CACHE STRING "" FORCE) +set (JPEG_GIT_URL "https://github.com/libjpeg-turbo/libjpeg-turbo.git" CACHE STRING "Use JPEG from TurboJPEG" FORCE) +set (JPEG_GIT_BRANCH "jpeg-9e" CACHE STRING "" FORCE) set (JPEG_TGZ_ORIGPATH "https://www.ijg.org/files" CACHE STRING "Use PLUGINS from original location" FORCE) set (JPEG_TGZ_NAME "jpegsrc.v9e.tar.gz" CACHE STRING "Use JPEG from compressed file" FORCE) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 965dd94..27c185d 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -299,8 +299,11 @@ IV. Further considerations options: HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="GIT" ZLIB_GIT_URL:STRING="https://some_location/zlib" + ZLIB_GIT_BRANCH="some_branch" SZIP_GIT_URL:STRING="https://some_location/szip" - where "some_location" is the URL to the GIT repository. Also set + SZIP_GIT_BRANCH="some_branch" + where "some_location" is the URL to the GIT repository and "some_branch" is + a branch in the repository, usually the default. Also set CMAKE_BUILD_TYPE to the configuration type. C. Use source packages from a compressed file by adding the following @@ -338,7 +341,9 @@ IV. Further considerations options: HDF5_ALLOW_EXTERNAL_SUPPORT:STRING="GIT" PLUGIN_GIT_URL:STRING="http://some_location/plugins" - where "some_location" is the URL to the GIT repository. Also set + PLUGIN_GIT_BRANCH="some_branch" + where "some_location" is the URL to the GIT repository and "some_branch" is + a branch in the repository, usually the default. Also set CMAKE_BUILD_TYPE to the configuration type. B. Use source packages from a compressed file by adding the following @@ -686,11 +691,15 @@ These five steps are described in detail below. configuration option: -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING="GIT" - The options to control the GIT URL (config/cmake/cacheinit.cmake file) are: + The options to control the GIT parameters (config/cmake/cacheinit.cmake file) are: ZLIB_GIT_URL:STRING="http://${git_url}/zlib" + ZLIB_GIT_BRANCH="${git_branch}" SZIP_GIT_URL:STRING="http://${git_url}/szip" + SZIP_GIT_BRANCH="${git_branch}" PLUGIN_GIT_URL:STRING="http://${git_url}/plugin" - ${git_url} should be changed to your location. Also define CMAKE_BUILD_TYPE + PLUGIN_GIT_BRANCH="${git_branch}" + ${git_url} should be changed to your location and ${git_branch} is + your branch in the repository. Also define CMAKE_BUILD_TYPE to be the configuration type. 3.2.2 Or the external libraries (zlib, szip and plugins) can be configured -- cgit v0.12