# Template file for 'qt5-speech' pkgname=qt5-speech version=5.15.5 revision=1 _commit=e76b23ad707077647cdb4282cf35a71776efa0f0 wrksrc="qtspeech-${_commit}" build_style=qmake configure_args="-- -flite -flite-alsa -speechd" hostmakedepends="qt5-qmake perl qt5-host-tools pkg-config" makedepends="qt5-tools-devel speech-dispatcher-devel flite-devel alsa-lib-devel qt5-multimedia-devel" short_desc="Cross-platform application and UI framework (QT5) - Speech component" maintainer="John " license="GPL-3.0-or-later, LGPL-3.0-or-later" homepage="https://qt.io/" distfiles="https://invent.kde.org/qt/qt/qtspeech/-/archive/${_commit}.tar.gz" checksum=5dcf10add2118729a0951a15bc353c8b6fe4d441baf9503766bc5ee0a7a9d6fa _cleanup_wrksrc_leak() { if [ -d "${PKGDESTDIR}/usr/lib/cmake" ]; then # Replace references to ${wrksrc} in cmake files sed -i ${PKGDESTDIR}/usr/lib/cmake/*/*.cmake \ -e "s;${wrksrc}/host;/usr/lib/qt5;g" \ -e "s;devices/void-${XBPS_CROSS_TRIPLET}-g++;linux-g++;g" fi if [ -d "${PKGDESTDIR}/usr/lib/pkgconfig" ]; then # Replace references to ${wrksrc} in pkgconfig files sed -i ${PKGDESTDIR}/usr/lib/pkgconfig/*.pc \ -e "s;${wrksrc}/host;/usr/lib/qt5;g" \ -e "s;devices/void-${XBPS_CROSS_TRIPLET}-g++;linux-g++;g" fi # Remove QMAKE_PRL_BUILD_DIR from hint files for static libraries # and replace references to ${wrksrc} find ${PKGDESTDIR} -iname "*.prl" -exec sed -i "{}" \ -e "/^QMAKE_PRL_BUILD_DIR/d" \ -e "s;-L${wrksrc}/qtbase/lib;-L/usr/lib;g" \; # Replace ${wrksrc} in project include files find ${PKGDESTDIR} -iname "*.pri" -exec sed -i "{}" \ -e "s;${wrksrc}/qtbase;/usr/lib/qt5;g" \; } post_extract() { mkdir .git } post_install() { vinstall ${FILESDIR}/Qt5TextToSpeechConfig.cmake 644 usr/lib/cmake/Qt5TextToSpeech } qt5-speech-devel_package() { depends="qt5-devel>=${version} ${sourcepkg}>=${version}_${revision} ${sourcepkg}-plugin-speechd>=${version}_${revision} ${sourcepkg}-plugin-flite>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/include vmove usr/lib/cmake vmove usr/lib/pkgconfig vmove usr/lib/qt5/mkspecs vmove "usr/lib/*.so" vmove "usr/lib/*.prl" _cleanup_wrksrc_leak } } qt5-speech-plugin-speechd_package() { short_desc+=" - Speech dispatcher Plugin" pkg_install() { vmove usr/lib/qt5/plugins/texttospeech/libqtexttospeech_speechd.so } } qt5-speech-plugin-flite_package() { short_desc+=" - Flite Plugin" pkg_install() { vmove usr/lib/qt5/plugins/texttospeech/libqttexttospeech_flite.so } }