New comment by zenny on void-packages repository https://github.com/void-linux/void-packages/issues/26349#issuecomment-781905495 Comment: > @zenny is this still necessary given work on #27193 on espeak-ng? > Yep, because espeak-ng produces robotic voice whereas rhvoice has more natural output. > The `build` and `package` functions aren't doing anything, void uses `do_build` and `do_install` for this functionality. You don't really need them, though. Just make `post_install` with > > ``` > ln -s "../lib/speech-dispatcher-modules/sd_rhvoice" "${DESTDIR}/usr/bin/sd_rhvoice" ``` # Template file for 'RHVoice' pkgname=rhvoice version=1.2.3 revision=1 wrksrc="RHVoice-${version}" build_style=scons depends="speech-dispatcher libpulseaudio" makedepends="scons portaudio libao" optdepends="'portaudio: for portaudio backend' 'libao: for ao backend'" backup="etc/RHVoice/RHVoice.conf" short_desc="Free and open source speech synthesizer for Russian and other languages" maintainer="zenny " license="GPL-3.0-or-later" homepage="https://github.com/Olga-Yakovleva/RHVoice" distfiles="https://github.com/Olga-Yakovleva/RHVoice/archive/${version}.tar.gz" checksum=d104f20dc75fcd133d21751a6e894d34b423e12e4784350b4b9573c727fb71cd do_build() { cd "$wrksrc/RHVoice-${version}" scons prefix="/usr" sysconfdir="/etc" CPPFLAGS="$CPPFLAGS" CCFLAGS="$CFLAGS" \ LINKFLAGS="$LDFLAGS" } post_install() { cd "$wrksrc/RHVoice-${version}" mkdir -p "${DESTDIR}/usr/lib/speech-dispatcher-modules" scons install DESTDIR="${DESTDIR}" prefix="/usr" sysconfdir="/etc" \ CPPFLAGS="$CPPFLAGS" CCFLAGS="$CFLAGS" LINKFLAGS="$LDFLAGS" ln -s "../lib/speech-dispatcher-modules/sd_rhvoice" "${DESTDIR}/usr/bin/sd_rhvoice" } ``` With above, error reported were missing `[runtime] speech-dispatcher-0.10.1_3` among others: ``` $ ./xbps-src pkg rhvoice => xbps-src: updating repositories for host (x86_64)... [*] Updating repository `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ... [*] Updating repository `https://alpha.de.repo.voidlinux.org/current/nonfree/x86_64-repodata' ... [*] Updating repository `https://alpha.de.repo.voidlinux.org/current/debug/x86_64-repodata' ... [*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/x86_64-repodata' ... [*] Updating repository `https://alpha.de.repo.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ... => xbps-src: updating software in / masterdir... => xbps-src: cleaning up / masterdir... => rhvoice-1.2.3_1: removing autodeps, please wait... => rhvoice-1.2.3_1: building [scons] for x86_64... [host] scons-4.0.1_2: found (https://alpha.de.repo.voidlinux.org/current) [target] scons-4.0.1_2: found (https://alpha.de.repo.voidlinux.org/current) [target] portaudio-190600.20161030_6: found (https://alpha.de.repo.voidlinux.org/current) [target] libao-1.2.2_1: found (https://alpha.de.repo.voidlinux.org/current) [runtime] speech-dispatcher-0.10.1_3: not found [runtime] libpulseaudio-14.2_1: found (https://alpha.de.repo.voidlinux.org/current) => rhvoice-1.2.3_1: installing host dependencies: scons-4.0.1_2 ... => rhvoice-1.2.3_1: installing target dependencies: scons-4.0.1_2 portaudio-190600.20161030_6 libao-1.2.2_1 ... => rhvoice-1.2.3_1: running pre-build hook: 02-script-wrapper ... => rhvoice-1.2.3_1: running do_build ... /void-packages/srcpkgs/rhvoice/template: line 20: cd: /builddir/RHVoice-1.2.3/RHVoice-1.2.3: No such file or directory => ERROR: rhvoice-1.2.3_1: do_build: 'cd "$wrksrc/RHVoice-${version}"' exited with 1 => ERROR: in do_build() at srcpkgs/rhvoice/template:20 ``` > > and you should be good. Cheers,