79 lines
2.5 KiB
Bash
79 lines
2.5 KiB
Bash
# Template file for 'qt5-speech'
|
|
pkgname=qt5-speech
|
|
version=5.15.4
|
|
revision=2
|
|
_commit=c8a1dadc46ccdbeaef45aa805a9dc98d4b3220bd
|
|
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 <me@johnnynator.dev>"
|
|
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=970ef98f9803965dfebbb1a06ec4a7978389cf20249afed4273e037e7d5ddcf9
|
|
|
|
_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
|
|
}
|
|
}
|