diff --git a/var/spack/repos/builtin/packages/py-pyside2/package.py b/var/spack/repos/builtin/packages/py-pyside2/package.py index e6ee1f8cc8..b13f0c1aac 100644 --- a/var/spack/repos/builtin/packages/py-pyside2/package.py +++ b/var/spack/repos/builtin/packages/py-pyside2/package.py @@ -54,7 +54,7 @@ class PyPyside2(PythonPackage): depends_on("cmake@3.1:", type="build") # libclang versioning from sources/shiboken2/doc/gettingstarted.rst depends_on("llvm@6", type="build", when="@5.12:5.13") - depends_on("llvm@10", type="build", when="@5.15") + depends_on("llvm@10:", type="build", when="@5.15:") depends_on("py-setuptools", type="build") depends_on("py-packaging", type="build") depends_on("py-wheel", type="build") @@ -69,6 +69,23 @@ class PyPyside2(PythonPackage): depends_on("libxslt@1.1.19:", when="+doc", type="build") depends_on("py-sphinx", when="+doc", type="build") + def patch(self): + filter_file( + "=${shiboken_include_dirs}", + ":".join( + [ + "=${shiboken_include_dirs}", + self.spec["qt"]["glx"]["libglx"].prefix.include, + self.spec["qt"]["libxcb"].prefix.include, + ] + ), + "sources/pyside2/cmake/Macros/PySideModules.cmake", + string=True, + ) + + def setup_build_environment(self, env): + env.set("LLVM_INSTALL_DIR", self.spec["llvm"].prefix) + def install_options(self, spec, prefix): args = [ "--parallel={0}".format(make_jobs),