From 9c02b751e2b2a5359631f17628df75157c7fb839 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 20 Nov 2022 16:38:39 +0100 Subject: [PATCH] qt5-speech: replace hardcoded version in .cmake with placeholder and sed --- srcpkgs/qt5-speech/files/Qt5TextToSpeechConfig.cmake | 10 +++++----- srcpkgs/qt5-speech/template | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/srcpkgs/qt5-speech/files/Qt5TextToSpeechConfig.cmake b/srcpkgs/qt5-speech/files/Qt5TextToSpeechConfig.cmake index 95f7b1e76ed..b3339eb60b2 100644 --- a/srcpkgs/qt5-speech/files/Qt5TextToSpeechConfig.cmake +++ b/srcpkgs/qt5-speech/files/Qt5TextToSpeechConfig.cmake @@ -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) diff --git a/srcpkgs/qt5-speech/template b/srcpkgs/qt5-speech/template index 9813986ed65..3ecd10d5065 100644 --- a/srcpkgs/qt5-speech/template +++ b/srcpkgs/qt5-speech/template @@ -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() {