diff --git a/eb_hooks.py b/eb_hooks.py index 196b8c26..71237fd1 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -655,6 +655,29 @@ def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix): raise EasyBuildError("Qt5-specific hook triggered for non-Qt5 easyconfig?!") +def parse_hook_qt6_libinput(ec, eprefix): + """ + Add dependency on libinput to Qt6. + This is not included in upstream EasyBuild as it brings a dependency on system-d + """ + qt6_toolchain_version_to_libinput_version_map = {'14.3.0': '1.30.1'} + if ec.name == 'Qt6': + # Only enforcing from GCCcore 14.3.0 onwards for Qt6 6.9.3 onwards + if ec.toolchain.version >= LooseVersion('14.3.0'): + if ec.version >= LooseVersion('6.9.3'): + dep_names = [dep[0] for dep in ec['dependencies']] + if 'libinput' not in dep_names: + if ec.toolchain.version in qt6_toolchain_version_to_libinput_version_map.keys(): + libinput = ('libinput', qt6_toolchain_version_to_libinput_version_map[ec.toolchain.version]) + ec['dependencies'].append(libinput) + print_msg(f"Added {libinput} dependency for {ec.name} {ec.version}") + else: + raise EasyBuildError( + f"No libinput dependency found for {ec.name} {ec.version}, please update relevant Qt6 hook" + ) + else: + raise EasyBuildError("maturin-specific hook triggered for non-maturin easyconfig?!") + def parse_hook_maturin(ec, eprefix): """ Replace build dependency on Rust 1.88.0 by 1.91.1, @@ -2010,6 +2033,7 @@ def post_easyblock_hook(self, *args, **kwargs): 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, 'pybind11': parse_hook_pybind11_replace_catch2, 'Qt5': parse_hook_qt5_check_qtwebengine_disable, + 'Qt6': parse_hook_qt6_libinput, 'UCX': parse_hook_ucx_eprefix, }