build(grantlee): install xkb dev deps and extend Qt5->Qt6 CMake pattern replacements (resources/translations)
This commit is contained in:
1 parent
13d52cd995
commit
3dad1d54ba
1 file changed
+9
@@ -15,6 +15,12 @@ if ! git clone --depth 1 https://github.com/steveire/grantlee.git grantlee; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure dev packages required for building (xkb headers etc.)
|
||||
if command -v sudo >/dev/null 2>&1; then
|
||||
sudo apt-get update -y || true
|
||||
sudo apt-get install -y --no-install-recommends libxkbcommon-dev libxkbcommon-x11-dev pkg-config || true
|
||||
fi
|
||||
|
||||
pushd grantlee >/dev/null
|
||||
# Backup relevant files
|
||||
git ls-files | grep -E "CMakeLists.txt|\\.cmake$" | xargs -r -n1 -I{} cp {} {}.bak || true
|
||||
@@ -27,6 +33,9 @@ patterns = [
|
||||
(re.compile(r'find_package\s*\(\s*Qt5[^)]*\)', re.M), 'find_package(Qt6 REQUIRED COMPONENTS Core Widgets)'),
|
||||
(re.compile(r'Qt5::'), 'Qt6::'),
|
||||
(re.compile(r'QT5_WRAP_CPP'), 'QT_WRAP_CPP'),
|
||||
(re.compile(r'qt5_add_resources'), 'qt_add_resources'),
|
||||
(re.compile(r'qt5_add_translations'), 'qt_add_translations'),
|
||||
(re.compile(r'qt5_add_translation'), 'qt_add_translation'),
|
||||
]
|
||||
for p in Path('.').rglob('*'):
|
||||
if p.is_file() and (p.name=='CMakeLists.txt' or p.suffix=='.cmake'):
|
||||
|
||||
Reference in new issue
Block a user