Skip to content

Commit 1be9eb4

Browse files
authored
Merge pull request #221 from ocaisa/qt6_libinput
Add libinput as dependency for Qt6 for GCCcore/14.3.0+
2 parents df5ca06 + 2c88dd9 commit 1be9eb4

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

eb_hooks.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,29 @@ def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix):
655655
raise EasyBuildError("Qt5-specific hook triggered for non-Qt5 easyconfig?!")
656656

657657

658+
def parse_hook_qt6_libinput(ec, eprefix):
659+
"""
660+
Add dependency on libinput to Qt6.
661+
This is not included in upstream EasyBuild as it brings a dependency on system-d
662+
"""
663+
qt6_toolchain_version_to_libinput_version_map = {'14.3.0': '1.30.1'}
664+
if ec.name == 'Qt6':
665+
# Only enforcing from GCCcore 14.3.0 onwards for Qt6 6.9.3 onwards
666+
if ec.toolchain.version >= LooseVersion('14.3.0'):
667+
if ec.version >= LooseVersion('6.9.3'):
668+
dep_names = [dep[0] for dep in ec['dependencies']]
669+
if 'libinput' not in dep_names:
670+
if ec.toolchain.version in qt6_toolchain_version_to_libinput_version_map.keys():
671+
libinput = ('libinput', qt6_toolchain_version_to_libinput_version_map[ec.toolchain.version])
672+
ec['dependencies'].append(libinput)
673+
print_msg(f"Added {libinput} dependency for {ec.name} {ec.version}")
674+
else:
675+
raise EasyBuildError(
676+
f"No libinput dependency found for {ec.name} {ec.version}, please update relevant Qt6 hook"
677+
)
678+
else:
679+
raise EasyBuildError(f"Qt6-specific hook triggered for non-Qt6 easyconfig?!")
680+
658681
def parse_hook_maturin(ec, eprefix):
659682
"""
660683
Replace build dependency on Rust 1.88.0 by 1.91.1,
@@ -2010,6 +2033,7 @@ def post_easyblock_hook(self, *args, **kwargs):
20102033
'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors,
20112034
'pybind11': parse_hook_pybind11_replace_catch2,
20122035
'Qt5': parse_hook_qt5_check_qtwebengine_disable,
2036+
'Qt6': parse_hook_qt6_libinput,
20132037
'UCX': parse_hook_ucx_eprefix,
20142038
}
20152039

0 commit comments

Comments
 (0)