%global framework ktexteditor Name: kf6-%{framework} Version: 6.29.0 Release: 2%{?dist} Summary: KDE Frameworks 6 Tier 3 full text editor component License: LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later URL: https://invent.kde.org/frameworks/%{framework} Source0: https://download.kde.org/%{stable_kf6}/frameworks/%{majmin_ver_kf6}/%{framework}-%{version}.tar.xz BuildRequires: extra-cmake-modules >= %{version} BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: cmake(KF6Archive) BuildRequires: cmake(KF6Config) BuildRequires: cmake(KF6GuiAddons) BuildRequires: cmake(KF6I18n) BuildRequires: cmake(KF6IconThemes) BuildRequires: cmake(KF6KIO) BuildRequires: cmake(KF6Parts) BuildRequires: cmake(KF6ColorScheme) BuildRequires: kf6-rpm-macros BuildRequires: pkgconfig(Qt6Widgets) BuildRequires: pkgconfig(Qt6PrintSupport) BuildRequires: pkgconfig(Qt6Qml) BuildRequires: pkgconfig(Qt6Xml) BuildRequires: cmake(Qt6LinguistTools) BuildRequires: cmake(KF6SyntaxHighlighting) BuildRequires: pkgconfig(editorconfig) BuildRequires: pkgconfig(xkbcommon) BuildRequires: git-core Requires: kde-filesystem Requires: git-core %description %{summary}. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} Requires: cmake(KF6Parts) Requires: cmake(KF6SyntaxHighlighting) %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %autosetup -n %{framework}-%{version} -p1 # Real upstream hard-requires Qt6TextToSpeech (a "say selected text" menu # feature). qt6-qtspeech itself only builds against Qt6::Multimedia # (return()s early otherwise), and qt6-qtmultimedia is not packaged on # this distro either -- building the whole Multimedia+Speech stack for # one accessibility menu action is disproportionate, so this drops the # TextToSpeech dependency: removes it from the required Qt6 components # and the link line, and empties out setupSpeechActions() (the 4 menu # actions + their handler) so no QTextToSpeech symbol is referenced # anywhere in the build. python3 - <<'PYEOF' import re def sub_file(path, pattern, repl, count=1): with open(path) as f: text = f.read() new_text, n = re.subn(pattern, repl, text, count=count) assert n == count, f"expected {count} replacement(s) in {path}, got {n}" with open(path, "w") as f: f.write(new_text) sub_file( "CMakeLists.txt", r"find_package\(Qt6 \$\{REQUIRED_QT_VERSION\} NO_MODULE REQUIRED Core Widgets Qml PrintSupport TextToSpeech\)", "find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Core Widgets Qml PrintSupport)", ) sub_file( "src/CMakeLists.txt", r" Qt6::PrintSupport\n Qt6::TextToSpeech\n", " Qt6::PrintSupport\n", ) sub_file( "src/utils/kateglobal.h", r"class QTextToSpeech;\n", "", ) sub_file( "src/utils/kateglobal.h", r" /\*\*\n \* text to speech engine to be use by the view actions, constructed on demand\.\n \* @param view the view that want to use it\n \*/\n QTextToSpeech \*speechEngine\(KTextEditor::ViewPrivate \*view\);\n\n", "", ) sub_file( "src/utils/kateglobal.h", r" /\*\*\n \* Was the view that started the current speak output destroyed\?\n \*/\n void speechEngineUserDestoyed\(\);\n\n /\*\*\n \* Speech error occurred\.\n \* @param view view to signal error to\n \* @param errorString error to show\n \*/\n void speechError\(KTextEditor::ViewPrivate \*view, const QString &errorString\);\n\n", "", ) sub_file( "src/utils/kateglobal.h", r" /\*\*\n \* text to speech engine to be use by the view actions, constructed on demand\n \*/\n QTextToSpeech \*m_speechEngine = nullptr;\n\n /\*\*\n \* view that triggered last speech action\n \* used to show error messages and to stop output on view destruction\n \*/\n QPointer m_speechEngineLastUser;\n\n", "", ) sub_file( "src/utils/kateglobal.cpp", r"#include \n", "", ) with open("src/utils/kateglobal.cpp") as f: _t = f.read() _t2 = re.sub( r"QTextToSpeech \*KTextEditor::EditorPrivate::speechEngine\(KTextEditor::ViewPrivate \*view\)\n\{.*?\n\}\n\nvoid KTextEditor::EditorPrivate::speechEngineUserDestoyed\(\)\n\{.*?\n\}\n\nvoid KTextEditor::EditorPrivate::speechError\(KTextEditor::ViewPrivate \*view, const QString &errorString\)\n\{.*?\n\}\n", "", _t, count=1, flags=re.DOTALL, ) assert _t2 != _t, "speechEngine/speechEngineUserDestoyed/speechError block not removed from kateglobal.cpp" with open("src/utils/kateglobal.cpp", "w") as f: f.write(_t2) sub_file( "src/view/kateview.cpp", r"#include \n", "", ) with open("src/view/kateview.cpp") as f: _t = f.read() _t2 = re.sub( r"void KTextEditor::ViewPrivate::setupSpeechActions\(\)\n\{.*?\n\}\n", "void KTextEditor::ViewPrivate::setupSpeechActions()\n{\n}\n", _t, count=1, flags=re.DOTALL, ) assert _t2 != _t, "setupSpeechActions() body not emptied in kateview.cpp" with open("src/view/kateview.cpp", "w") as f: f.write(_t2) print("ktexteditor: TextToSpeech dependency removed") PYEOF %build %cmake_kf6 %cmake_build_kf6 %install %cmake_install_kf6 mkdir -p %{buildroot}%{_kf6_qtplugindir}/ktexteditor %files %exclude %{_datadir}/locale/*/LC_MESSAGES/*.qm %exclude %{_datadir}/locale/*/LC_MESSAGES/*.mo %dir %{_kf6_plugindir}/parts/ %doc README.md %license LICENSES/*.txt %{_kf6_datadir}/dbus-1/system-services/org.kde.ktexteditor6.katetextbuffer.service %{_kf6_datadir}/dbus-1/system.d/org.kde.ktexteditor6.katetextbuffer.conf %{_kf6_datadir}/polkit-1/actions/org.kde.ktexteditor6.katetextbuffer.policy %{_kf6_datadir}/qlogging-categories6/%{framework}.* %{_kf6_libdir}/libKF6TextEditor.so.* %{_kf6_plugindir}/parts/katepart.so %{_kf6_qtplugindir}/ktexteditor/ %{_kf6_libexecdir}/kauth/kauth_ktexteditor_helper %{_kf6_bindir}/ktexteditor-script-tester6 %files devel %{_kf6_datadir}/kdevappwizard/templates/ktexteditor6-plugin.tar.bz2 %{_kf6_includedir}/KTextEditor/ %{_kf6_libdir}/cmake/KF6TextEditor/ %{_kf6_libdir}/libKF6TextEditor.so %changelog * Sat Aug 29 2026 Smech - 6.29.0-2 - Dropped %%{_kf6_datadir}/katepart5/ (directory genuinely not produced by this build) * Sat Aug 29 2026 Smech - 6.29.0-1 - Real upstream source, kde-filesystem, %exclude wildcard, dropped doc/html subpackages; surgically dropped Qt6TextToSpeech (genuinely absent, and its own dependency chain requires qt6-qtmultimedia which is also absent) via a %%prep source patch removing the one isolated "say selected text" feature rather than pulling in two more Qt modules for it