From ca9b2fe6ade9f9fb952127788111abbe20186575 Mon Sep 17 00:00:00 2001 From: Eric Brugger Date: Mon, 22 Aug 2022 11:59:07 -0700 Subject: VisIt: Add patch to include jpeg library in install. (#32245) --- .../packages/visit/cmake-findjpeg-3.3.patch | 40 ++++++++++++++++++++ .../builtin/packages/visit/cmake-findjpeg.patch | 44 ++++++++++++++++++++++ var/spack/repos/builtin/packages/visit/package.py | 3 ++ 3 files changed, 87 insertions(+) create mode 100644 var/spack/repos/builtin/packages/visit/cmake-findjpeg-3.3.patch create mode 100644 var/spack/repos/builtin/packages/visit/cmake-findjpeg.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/visit/cmake-findjpeg-3.3.patch b/var/spack/repos/builtin/packages/visit/cmake-findjpeg-3.3.patch new file mode 100644 index 0000000000..5a942c608b --- /dev/null +++ b/var/spack/repos/builtin/packages/visit/cmake-findjpeg-3.3.patch @@ -0,0 +1,40 @@ +--- a/src/CMake/FindJPEG.cmake 2022-07-22 15:00:18.831409000 -0700 ++++ b/src/CMake/FindJPEG.cmake 2022-07-22 15:01:07.682528000 -0700 +@@ -25,5 +25,9 @@ + else() + SET_UP_THIRD_PARTY(JPEG LIBS jpeg) + endif() ++ELSE() ++ if (VISIT_JPEG_DIR) ++ SET_UP_THIRD_PARTY(JPEG LIBS jpeg) ++ endif() + ENDIF (WIN32) + +--- a/src/CMakeLists.txt 2022-08-09 12:01:55.564360000 -0700 ++++ b/src/CMakeLists.txt 2022-08-09 12:02:46.100508000 -0700 +@@ -895,10 +895,8 @@ + VISIT_3RDPARTY_VAR(ICET_DIR "Path containing the Ice-T library's include and lib") + + # Libraries some third-parties are dependent upon +-IF(WIN32) +- VISIT_3RDPARTY_VAR(JPEG_DIR "Path containing the jpeg library's include and lib") +- VISIT_3RDPARTY_VAR(SZIP_DIR "Path containing the szip library's include and lib") +-ENDIF(WIN32) ++VISIT_3RDPARTY_VAR(JPEG_DIR "Path containing the jpeg library's include and lib") ++VISIT_3RDPARTY_VAR(SZIP_DIR "Path containing the szip library's include and lib") + + # Define the options that let us pick I/O library installation locations. When + # the library option is defined then we also define the variable name passed as +@@ -1351,10 +1349,8 @@ + INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindZlib.cmake) + + # szip and jpeg +-IF(WIN32) +- INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindJPEG.cmake) +- INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindSzip.cmake) +-ENDIF(WIN32) ++INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindJPEG.cmake) ++INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindSzip.cmake) + + # dl and large file support. + IF(CMAKE_HOST_UNIX) diff --git a/var/spack/repos/builtin/packages/visit/cmake-findjpeg.patch b/var/spack/repos/builtin/packages/visit/cmake-findjpeg.patch new file mode 100644 index 0000000000..a607ddb113 --- /dev/null +++ b/var/spack/repos/builtin/packages/visit/cmake-findjpeg.patch @@ -0,0 +1,44 @@ +--- a/src/CMake/FindJPEG.cmake 2022-07-22 15:00:18.831409000 -0700 ++++ b/src/CMake/FindJPEG.cmake 2022-07-22 15:01:07.682528000 -0700 +@@ -25,5 +25,13 @@ + else() + SET_UP_THIRD_PARTY(JPEG lib include jpeg) + endif() ++ELSE() ++ if (VISIT_JPEG_DIR) ++ if(EXISTS ${JPEG_DIR}/lib) ++ SET_UP_THIRD_PARTY(JPEG lib include jpeg) ++ elseif(EXISTS ${JPEG_DIR}/lib64) ++ SET_UP_THIRD_PARTY(JPEG lib64 include jpeg) ++ endif() ++ endif() + ENDIF (WIN32) + +--- a/src/CMakeLists.txt 2022-08-09 12:01:55.564360000 -0700 ++++ b/src/CMakeLists.txt 2022-08-09 12:02:46.100508000 -0700 +@@ -895,10 +895,8 @@ + VISIT_3RDPARTY_VAR(ICET_DIR "Path containing the Ice-T library's include and lib") + + # Libraries some third-parties are dependent upon +-IF(WIN32) +- VISIT_3RDPARTY_VAR(JPEG_DIR "Path containing the jpeg library's include and lib") +- VISIT_3RDPARTY_VAR(SZIP_DIR "Path containing the szip library's include and lib") +-ENDIF(WIN32) ++VISIT_3RDPARTY_VAR(JPEG_DIR "Path containing the jpeg library's include and lib") ++VISIT_3RDPARTY_VAR(SZIP_DIR "Path containing the szip library's include and lib") + + # Define the options that let us pick I/O library installation locations. When + # the library option is defined then we also define the variable name passed as +@@ -1351,10 +1349,8 @@ + INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindZlib.cmake) + + # szip and jpeg +-IF(WIN32) +- INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindJPEG.cmake) +- INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindSzip.cmake) +-ENDIF(WIN32) ++INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindJPEG.cmake) ++INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindSzip.cmake) + + # dl and large file support. + IF(CMAKE_HOST_UNIX) diff --git a/var/spack/repos/builtin/packages/visit/package.py b/var/spack/repos/builtin/packages/visit/package.py index 6fe98c76fc..8519e1606f 100644 --- a/var/spack/repos/builtin/packages/visit/package.py +++ b/var/spack/repos/builtin/packages/visit/package.py @@ -88,6 +88,8 @@ class Visit(CMakePackage): patch("parallel-hdf5.patch", when="@3.0.1:3.2.2+hdf5+mpi") patch("parallel-hdf5-3.3.patch", when="@3.3.0:+hdf5+mpi") patch("cmake-findvtkh-3.3.patch", when="@3.3.0:+vtkm") + patch("cmake-findjpeg.patch", when="@3.1.0:3.2.2") + patch("cmake-findjpeg-3.3.patch", when="@3.3.0:") # Fix pthread and librt link errors patch("visit32-missing-link-libs.patch", when="@3.2") @@ -206,6 +208,7 @@ class Visit(CMakePackage): self.define("VTK_MINOR_VERSION", spec["vtk"].version[1]), self.define("VISIT_VTK_DIR", spec["vtk"].prefix), self.define("VISIT_ZLIB_DIR", spec["zlib"].prefix), + self.define("VISIT_JPEG_DIR", spec["jpeg"].prefix), self.define("VISIT_USE_GLEW", False), self.define("VISIT_CONFIG_SITE", "NONE"), self.define("VISIT_INSTALL_THIRD_PARTY", False), -- cgit v1.2.3-70-g09d2