summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorEric Brugger <brugger1@llnl.gov>2022-08-22 11:59:07 -0700
committerGitHub <noreply@github.com>2022-08-22 11:59:07 -0700
commitca9b2fe6ade9f9fb952127788111abbe20186575 (patch)
tree8b1ae5df4d5bc065a7faddefab1057a225e8b35f /var
parent70f0a725cc7053589577d9b168b6832c17ef11ec (diff)
downloadspack-ca9b2fe6ade9f9fb952127788111abbe20186575.tar.gz
spack-ca9b2fe6ade9f9fb952127788111abbe20186575.tar.bz2
spack-ca9b2fe6ade9f9fb952127788111abbe20186575.tar.xz
spack-ca9b2fe6ade9f9fb952127788111abbe20186575.zip
VisIt: Add patch to include jpeg library in install. (#32245)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/visit/cmake-findjpeg-3.3.patch40
-rw-r--r--var/spack/repos/builtin/packages/visit/cmake-findjpeg.patch44
-rw-r--r--var/spack/repos/builtin/packages/visit/package.py3
3 files changed, 87 insertions, 0 deletions
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),