From c673b9245c0dc1bab450dbdc56a55c7d74435af1 Mon Sep 17 00:00:00 2001 From: Cameron Rutherford Date: Tue, 12 Dec 2023 11:17:26 -0500 Subject: exago: Add v1.2.0 and patches for builds without python or tests. (#41350) Co-authored-by: Satish Balay --- .../repos/builtin/packages/exago/exago-1.1.0.patch | 21 ++++++++++++ .../repos/builtin/packages/exago/exago-1.3.0.patch | 37 ++++++++++++++++++++ .../repos/builtin/packages/exago/exago-1.5.0.patch | 39 ++++++++++++++++++++++ var/spack/repos/builtin/packages/exago/package.py | 7 ++++ 4 files changed, 104 insertions(+) create mode 100644 var/spack/repos/builtin/packages/exago/exago-1.1.0.patch create mode 100644 var/spack/repos/builtin/packages/exago/exago-1.3.0.patch create mode 100644 var/spack/repos/builtin/packages/exago/exago-1.5.0.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/exago/exago-1.1.0.patch b/var/spack/repos/builtin/packages/exago/exago-1.1.0.patch new file mode 100644 index 0000000000..2af6044f02 --- /dev/null +++ b/var/spack/repos/builtin/packages/exago/exago-1.1.0.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d0e8ed18..3225509c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -366,10 +366,13 @@ else() + endif() + endif() + +-include(ExaGOCheckPython) + if(EXAGO_ENABLE_PYTHON) ++ include(ExaGOCheckPython) + add_subdirectory(interfaces/python) + endif() + +-# Build tests +-add_subdirectory(tests) ++if(EXAGO_RUN_TESTS) ++ # Build tests ++ add_subdirectory(tests) ++endif() ++ diff --git a/var/spack/repos/builtin/packages/exago/exago-1.3.0.patch b/var/spack/repos/builtin/packages/exago/exago-1.3.0.patch new file mode 100644 index 0000000000..e245a96422 --- /dev/null +++ b/var/spack/repos/builtin/packages/exago/exago-1.3.0.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7d6ef668..7a1c4702 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -222,11 +222,13 @@ endif(EXAGO_ENABLE_GPU) + if(EXAGO_ENABLE_PETSC) + include(FindPkgConfig) + # Include petsc package path in pkg_config_path ++ set(PKG_CONFIG_PATH_save $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} + ${PETSC_DIR}/lib/pkgconfig:${PETSC_DIR}/${PETSC_ARCH}/lib/pkgconfig + ) + pkg_check_modules(PETSC REQUIRED IMPORTED_TARGET PETSc) + set(EXAGO_HAVE_PETSC 1) ++ set(ENV{PKG_CONFIG_PATH} ${PKG_CONFIG_PATH_save}) + endif() + + # Set install rpath to the locations where EXAGO and PETSc libraries reside. +@@ -394,12 +396,15 @@ else() + endif() + endif() + +-include(ExaGOCheckPython) + if(EXAGO_ENABLE_PYTHON) ++ include(ExaGOCheckPython) + # Build pybind11 target manually + add_subdirectory(tpl/pybind11) + add_subdirectory(interfaces/python) + endif() + +-# Build tests +-add_subdirectory(tests) ++if(EXAGO_RUN_TESTS) ++ # Build tests ++ add_subdirectory(tests) ++endif() ++ diff --git a/var/spack/repos/builtin/packages/exago/exago-1.5.0.patch b/var/spack/repos/builtin/packages/exago/exago-1.5.0.patch new file mode 100644 index 0000000000..3d9d5afc41 --- /dev/null +++ b/var/spack/repos/builtin/packages/exago/exago-1.5.0.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ba8e145f..89dd3327 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -217,11 +217,13 @@ endif(EXAGO_ENABLE_GPU) + if(EXAGO_ENABLE_PETSC) + include(FindPkgConfig) + # Include petsc package path in pkg_config_path ++ set(PKG_CONFIG_PATH_save $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} + ${PETSC_DIR}/lib/pkgconfig:${PETSC_DIR}/${PETSC_ARCH}/lib/pkgconfig + ) + pkg_check_modules(PETSC REQUIRED IMPORTED_TARGET PETSc) + set(EXAGO_HAVE_PETSC 1) ++ set(ENV{PKG_CONFIG_PATH} ${PKG_CONFIG_PATH_save}) + endif() + + # Set install rpath to the locations where EXAGO and PETSc libraries reside. +@@ -392,15 +394,17 @@ else() + endif() + endif() + +-include(ExaGOCheckPython) + if(EXAGO_ENABLE_PYTHON) ++ include(ExaGOCheckPython) + # Build pybind11 target manually + add_subdirectory(tpl/pybind11) + add_subdirectory(interfaces/python) + endif() + +-# Build tests +-add_subdirectory(tests) ++if(EXAGO_RUN_TESTS) ++ # Build tests ++ add_subdirectory(tests) ++endif() + + if((NOT EXAGO_ENABLE_IPOPT) AND (NOT EXAGO_ENABLE_HIOP)) + message( diff --git a/var/spack/repos/builtin/packages/exago/package.py b/var/spack/repos/builtin/packages/exago/package.py index 415a27e077..b3fc23b31b 100644 --- a/var/spack/repos/builtin/packages/exago/package.py +++ b/var/spack/repos/builtin/packages/exago/package.py @@ -35,6 +35,9 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): version( "1.3.0", tag="v1.3.0", commit="58b039d746a6eac8e84b0afc01354cd58caec485", submodules=True ) + version( + "1.2.0", tag="v1.2.0", commit="255a214ec747b7bdde7a6d8151c083067b4d0907", submodules=True + ) version( "1.1.2", tag="v1.1.2", commit="db3bb16e19c09e01402071623258dae4d13e5133", submodules=True ) @@ -180,7 +183,11 @@ class Exago(CMakePackage, CudaPackage, ROCmPackage): depends_on("umpire {0}".format(rocm_dep), when="+raja {0}".format(rocm_dep)) depends_on("camp {0}".format(rocm_dep), when="+raja {0}".format(rocm_dep)) + # CMake patches to support ~python and ~testing patch("exago-1.6.0.patch", when="@1.6.0") + patch("exago-1.5.0.patch", when="@1.5.0:1.5.1") + patch("exago-1.3.0.patch", when="@1.3.0:1.4.1") + patch("exago-1.1.0.patch", when="@1.1.0:1.2.0") flag_handler = build_system_flags -- cgit v1.2.3-70-g09d2