diff options
Diffstat (limited to 'kde-apps/kpimtextedit/files/kpimtextedit-21.12.3-speech-optional-3.patch')
| -rw-r--r-- | kde-apps/kpimtextedit/files/kpimtextedit-21.12.3-speech-optional-3.patch | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/kde-apps/kpimtextedit/files/kpimtextedit-21.12.3-speech-optional-3.patch b/kde-apps/kpimtextedit/files/kpimtextedit-21.12.3-speech-optional-3.patch new file mode 100644 index 00000000000..617864cd7b0 --- /dev/null +++ b/kde-apps/kpimtextedit/files/kpimtextedit-21.12.3-speech-optional-3.patch @@ -0,0 +1,100 @@ +From b248e11f0c6f4e389052e616e6dd262135a23f3c Mon Sep 17 00:00:00 2001 +From: Laurent Montel <montel@kde.org> +Date: Mon, 14 Feb 2022 18:58:34 +0100 +Subject: [PATCH] Add info about texttospeech support + +--- + CMakeLists.txt | 7 +++++-- + kpimtextedit-texttospeech.h.cmake | 2 ++ + src/CMakeLists.txt | 11 ++++++----- + 3 files changed, 14 insertions(+), 8 deletions(-) + create mode 100644 kpimtextedit-texttospeech.h.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b1c48c8..a00bdeb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -82,10 +82,13 @@ set_package_properties(Qt5TextToSpeech PROPERTIES DESCRIPTION + TYPE OPTIONAL + ) + if(TARGET Qt5::TextToSpeech) +- set(HAVE_TEXT_TO_SPEECH_SUPPORT TRUE) +- add_definitions(-DHAVE_TEXT_TO_SPEECH_SUPPORT) ++ add_definitions(-DHAVE_TEXT_TO_SPEECH_SUPPORT) ++ set(KPIMTEXTEDIT_TEXT_TO_SPEECH TRUE) + endif() + ++configure_file(kpimtextedit-texttospeech.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kpimtextedit-texttospeech.h ) ++ ++ + if(BUILD_TESTING) + find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Test) + add_definitions(-DBUILD_TESTING) +diff --git a/kpimtextedit-texttospeech.h.cmake b/kpimtextedit-texttospeech.h.cmake +new file mode 100644 +index 0000000..c82af97 +--- /dev/null ++++ b/kpimtextedit-texttospeech.h.cmake +@@ -0,0 +1,2 @@ ++#cmakedefine01 KPIMTEXTEDIT_TEXT_TO_SPEECH ++ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3e24a2f..4e02e5f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -53,7 +53,7 @@ target_sources(KF5PimTextEdit PRIVATE + composer-ng/richtextcomposeremailquotehighlighter.h + composer-ng/richtextcomposerwidget.h + ) +-if (HAVE_TEXT_TO_SPEECH_SUPPORT) ++if (KPIMTEXTEDIT_TEXT_TO_SPEECH) + target_sources(KF5PimTextEdit PRIVATE + texttospeech/texttospeech.cpp + texttospeech/texttospeechwidget.cpp +@@ -168,7 +168,7 @@ target_link_libraries(KF5PimTextEdit + KF5::I18n + KF5::SyntaxHighlighting + ) +-if (HAVE_TEXT_TO_SPEECH_SUPPORT) ++if (KPIMTEXTEDIT_TEXT_TO_SPEECH) + target_link_libraries(KF5PimTextEdit + PRIVATE + Qt5::TextToSpeech +@@ -245,7 +245,7 @@ ecm_generate_headers(KPimTextEdit_CamelCasetexteditor_commonwidget_HEADERS + ) + + +-if (HAVE_TEXT_TO_SPEECH_SUPPORT) ++if (KPIMTEXTEDIT_TEXT_TO_SPEECH) + ecm_generate_headers(KPimTextEdit_CamelCasetexttospeechs_HEADERS + HEADER_NAMES + TextToSpeech +@@ -274,7 +274,7 @@ ecm_generate_headers(KPimTextEdit_Camelcasecomposerng_HEADERS + + + ########### install files ############### +-if (HAVE_TEXT_TO_SPEECH_SUPPORT) ++if (KPIMTEXTEDIT_TEXT_TO_SPEECH) + install(FILES + ${KPimTextEdit_texttospeechs_HEADERS} + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KPIMTextEdit/kpimtextedit +@@ -289,6 +289,7 @@ endif() + + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/kpimtextedit_export.h ++ ${CMAKE_CURRENT_BINARY_DIR}/../kpimtextedit-texttospeech.h + ${kpimtextedit_HEADERS} + ${KPimTextEdit_richtexteditor_HEADERS} + ${KPimTextEdit_texteditor_commonwidget_HEADERS} +@@ -321,7 +322,7 @@ if (BUILD_TESTING) + add_subdirectory(texteditor/commonwidget/autotests) + add_subdirectory(texteditor/plaintexteditor/tests) + add_subdirectory(texteditor/richtexteditor/tests) +- if (HAVE_TEXT_TO_SPEECH_SUPPORT) ++ if (KPIMTEXTEDIT_TEXT_TO_SPEECH) + add_subdirectory(texttospeech/autotests) + add_subdirectory(texttospeech/tests) + endif() +-- +GitLab + |
