diff options
author | Olivier Cessenat <cessenat@gmail.com> | 2024-04-18 18:18:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-18 10:18:05 -0600 |
commit | c69951d6e11137dedfc6bc43b9e043cd153d3884 (patch) | |
tree | 3f56373df5c005aeaa146ae4c657c2bfb2b239e0 /var | |
parent | f406f27d9cdcb73cf1e9bbf23b6959c27c4be08f (diff) | |
download | spack-c69951d6e11137dedfc6bc43b9e043cd153d3884.tar.gz spack-c69951d6e11137dedfc6bc43b9e043cd153d3884.tar.bz2 spack-c69951d6e11137dedfc6bc43b9e043cd153d3884.tar.xz spack-c69951d6e11137dedfc6bc43b9e043cd153d3884.zip |
gxsview: compiles against system qt and vtk on rhel8 (#43722)
* gxsview: compiles againts system qt and vtk on rhel8
* Update gxsview/package.py for blanks around operator
* Update gxsview/package.py import blank line
* Update gxsview/package.py for style
* Update gxsview/package.py checking vtk version
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/gxsview/package.py | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/gxsview/package.py b/var/spack/repos/builtin/packages/gxsview/package.py index ea45246d1c..a041847752 100644 --- a/var/spack/repos/builtin/packages/gxsview/package.py +++ b/var/spack/repos/builtin/packages/gxsview/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os + from spack.package import * @@ -51,11 +53,25 @@ class Gxsview(QMakePackage): vtk_suffix = self.spec["vtk"].version.up_to(2) vtk_lib_dir = self.spec["vtk"].prefix.lib vtk_include_dir = join_path(self.spec["vtk"].prefix.include, "vtk-{0}".format(vtk_suffix)) - args = [ - "VTK_LIB_DIR={0}".format(vtk_lib_dir), - "VTK_INC_DIR={0}".format(vtk_include_dir), - "VTK_MAJOR_VER={0}".format(str(vtk_suffix)), - ] + args = [] + if not os.path.exists(vtk_include_dir): + vtk_include_dir = join_path(self.spec["vtk"].prefix.include, "vtk") + args.append("VTK_NO_VER_SUFFIX=ON") + args.extend( + [ + "VTK_LIB_DIR={0}".format(vtk_lib_dir), + "VTK_INC_DIR={0}".format(vtk_include_dir), + "VTK_MAJOR_VER={0}".format(str(vtk_suffix)), + ] + ) + # Below to avoid undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()' + if self.spec.satisfies("%gcc@8.0:8.9") or self.spec.satisfies("%fj"): + if "^vtk@9:" in self.spec: + fic = "vtk9.pri" + else: + fic = "vtk8.pri" + with open(fic, "a") as fh: + fh.write("-lstdc++fs\n") return args def install(self, spec, prefix): |