qt5-speech: replace hardcoded version in .cmake with placeholder and sed

This commit is contained in:
John 2022-11-20 16:38:39 +01:00
parent 0c4fceacd7
commit 9c02b751e2
2 changed files with 8 additions and 7 deletions

View File

@ -5,7 +5,7 @@ endif()
get_filename_component(_qt5TextToSpeech_install_prefix "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
# For backwards compatibility only. Use Qt5TextToSpeech_VERSION instead.
set(Qt5TextToSpeech_VERSION_STRING 5.15.5)
set(Qt5TextToSpeech_VERSION_STRING %%VERSION%%)
set(Qt5TextToSpeech_LIBRARIES Qt5::TextToSpeech)
@ -53,8 +53,8 @@ if (NOT TARGET Qt5::TextToSpeech)
set(_Qt5TextToSpeech_OWN_INCLUDE_DIRS "${_qt5TextToSpeech_install_prefix}/include/qt5/" "${_qt5TextToSpeech_install_prefix}/include/qt5/QtTextToSpeech")
set(Qt5TextToSpeech_PRIVATE_INCLUDE_DIRS
"${_qt5TextToSpeech_install_prefix}/include/qt5/QtTextToSpeech/5.15.5"
"${_qt5TextToSpeech_install_prefix}/include/qt5/QtTextToSpeech/5.15.5/QtTextToSpeech"
"${_qt5TextToSpeech_install_prefix}/include/qt5/QtTextToSpeech/%%VERSION%%"
"${_qt5TextToSpeech_install_prefix}/include/qt5/QtTextToSpeech/%%VERSION%%/QtTextToSpeech"
)
foreach(_dir ${_Qt5TextToSpeech_OWN_INCLUDE_DIRS})
@ -97,7 +97,7 @@ if (NOT TARGET Qt5::TextToSpeech)
foreach(_module_dep ${_Qt5TextToSpeech_MODULE_DEPENDENCIES})
if (NOT Qt5${_module_dep}_FOUND)
find_package(Qt5${_module_dep}
5.15.5 ${_Qt5TextToSpeech_FIND_VERSION_EXACT}
%%VERSION%% ${_Qt5TextToSpeech_FIND_VERSION_EXACT}
${_Qt5TextToSpeech_DEPENDENCIES_FIND_QUIET}
${_Qt5TextToSpeech_FIND_DEPENDENCIES_REQUIRED}
PATHS "${CMAKE_CURRENT_LIST_DIR}/.." NO_DEFAULT_PATH
@ -198,7 +198,7 @@ if (NOT TARGET Qt5::TextToSpeech)
endif()
endif()
_populate_TextToSpeech_target_properties(RELEASE "libQt5TextToSpeech.so.5.15.5" "" FALSE)
_populate_TextToSpeech_target_properties(RELEASE "libQt5TextToSpeech.so.%%VERSION%%" "" FALSE)

View File

@ -1,7 +1,7 @@
# Template file for 'qt5-speech'
pkgname=qt5-speech
version=5.15.7
revision=1
revision=2
_commit=d32f4a479d38a11f547598004b975f4356424a16
build_style=qmake
configure_args="-- -flite -flite-alsa -speechd"
@ -43,7 +43,8 @@ post_extract() {
}
post_install() {
vinstall ${FILESDIR}/Qt5TextToSpeechConfig.cmake 644 usr/lib/cmake/Qt5TextToSpeech
sed -e "s/%%VERSION%%/${version}/g" ${FILESDIR}/Qt5TextToSpeechConfig.cmake > \
${DESTDIR}/usr/lib/cmake/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake
}
qt5-speech-devel_package() {