8b627c40af
KF6 frameworks: 44 frameworks bumped from 6.10.0/6.26.0 to 6.27.0 (latest stable). All switched to download.kde.org canonical release URLs with BLAKE3 hashes. KDE Plasma packages bumped to 6.7.2 (latest stable): - breeze 6.3.4→6.7.2 - plasma-workspace 6.3.4→6.7.2 - kf6-kwayland 6.3.4→6.7.2 - kf6-plasma-activities 6.6.5→6.7.2 Other graphics libs bumped to latest stable: - libxkbcommon 1.9.2→1.11.0 - seatd-redox 0.9.3→0.10.1 (URL switched to gitlab.freedesktop.org) - plasma-wayland-protocols 1.16.0→1.21.0 All BLAKE3 hashes computed from actual upstream tarballs.
87 lines
2.8 KiB
TOML
87 lines
2.8 KiB
TOML
#TODO: KTextEditor — KDE text editor component (KParts-based). Wraps katepart.
|
|
[source]
|
|
tar = "https://download.kde.org/stable/frameworks/6.27/ktexteditor-6.27.0.tar.xz"
|
|
blake3 = "496708ea99bf9e3c19359d0f4186ad14f03e71c10f9e1337f12cd38688a1bb27"
|
|
|
|
[build]
|
|
template = "custom"
|
|
dependencies = [
|
|
"qtbase",
|
|
"kf6-extra-cmake-modules",
|
|
"kf6-karchive",
|
|
"kf6-kconfig",
|
|
"kf6-kguiaddons",
|
|
"kf6-ki18n",
|
|
"kf6-kio",
|
|
"kf6-parts",
|
|
"kf6-sonnet",
|
|
"kf6-syntaxhighlighting",
|
|
]
|
|
script = """
|
|
DYNAMIC_INIT
|
|
|
|
HOST_BUILD="${COOKBOOK_ROOT}/build/qt-host-build"
|
|
source "${COOKBOOK_ROOT}/local/scripts/lib/qt-sysroot.sh"
|
|
|
|
redbear_qt_link_sysroot_dirs "${COOKBOOK_SYSROOT}" plugins mkspecs metatypes modules
|
|
|
|
# Disable QTextToSpeech include unconditionally in all files
|
|
for f in "${COOKBOOK_SOURCE}/src/view/kateview.cpp" "${COOKBOOK_SOURCE}/src/utils/kateglobal.cpp" "${COOKBOOK_SOURCE}/src/utils/kateglobal.h"; do
|
|
[ -f "$f" ] || continue
|
|
done
|
|
# Disable speechEngine usage in kateview.cpp and kateglobal.cpp
|
|
python3 - <<'PY'
|
|
import os
|
|
# Replace the entire speechEngine function body to return nullptr
|
|
p = os.environ["COOKBOOK_SOURCE"] + "/src/utils/kateglobal.cpp"
|
|
text = open(p).read()
|
|
old_marker = "QTextToSpeech *KTextEditor::EditorPrivate::speechEngine("
|
|
idx = text.find(old_marker)
|
|
if idx >= 0:
|
|
# Find the opening { and the matching }
|
|
brace_count = 0
|
|
started = False
|
|
end_idx = idx
|
|
for i in range(idx, len(text)):
|
|
if text[i] == '{':
|
|
brace_count += 1
|
|
started = True
|
|
elif text[i] == '}':
|
|
brace_count -= 1
|
|
if started and brace_count == 0:
|
|
end_idx = i + 1
|
|
break
|
|
if end_idx > idx:
|
|
replacement = "QTextToSpeech *KTextEditor::EditorPrivate::speechEngine(KTextEditor::ViewPrivate *view) { Q_UNUSED(view); return nullptr; }"
|
|
text = text[:idx] + replacement + text[end_idx:]
|
|
open(p, "w").write(text)
|
|
# In kateview.cpp, also handle lambda functions that use speechEngine
|
|
p2 = os.environ["COOKBOOK_SOURCE"] + "/src/view/kateview.cpp"
|
|
text2 = open(p2).read()
|
|
text2 = text2.replace("EditorPrivate::self()->speechEngine(this)->", "if (false) (QTextToSpeech*)nullptr->")
|
|
open(p2, "w").write(text2)
|
|
PY
|
|
|
|
rm -f CMakeCache.txt
|
|
rm -rf CMakeFiles
|
|
|
|
cmake "${COOKBOOK_SOURCE}" \\
|
|
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \\
|
|
-DQT_HOST_PATH="${HOST_BUILD}" \\
|
|
-DCMAKE_INSTALL_PREFIX=/usr \\
|
|
-DCMAKE_BUILD_TYPE=Release \\
|
|
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \\
|
|
-DBUILD_TESTING=OFF \\
|
|
-DBUILD_QCH=OFF \\
|
|
-DBUILD_PYTHON_BINDINGS=OFF \\
|
|
-Wno-dev
|
|
|
|
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
|
cmake --install . --prefix "${COOKBOOK_STAGE}/usr"
|
|
|
|
for lib in "${COOKBOOK_STAGE}/usr/lib/"libKF6*.so.*; do
|
|
[ -f "${lib}" ] || continue
|
|
patchelf --remove-rpath "${lib}" 2>/dev/null || true
|
|
done
|
|
"""
|