From 94b7531a047121a9e8ae9315454fc2903c52746a Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Tue, 3 Mar 2026 00:16:57 +0000 Subject: [PATCH] Don't assume x86_64 when looking for espeak-ng-data. On Debian-like systems, the data is stored in an architecture-dependent location, so on aarch64 the usual location is /usr/share/aarch64-linux-gnu. (Almost certainly safe to assume *-linux-gnu, so this patch still does that.) --- ShellScripts/Linux/install_deps_root.sh | 6 ++++-- ShellScripts/common/post_build.sh | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ShellScripts/Linux/install_deps_root.sh b/ShellScripts/Linux/install_deps_root.sh index 80ce78d7b..3ec014f37 100755 --- a/ShellScripts/Linux/install_deps_root.sh +++ b/ShellScripts/Linux/install_deps_root.sh @@ -51,10 +51,12 @@ run_script() { if ! install_package espeak-ng-dev; then return 1 fi + # Some distributions put the data in arch-specific paths + HOSTARCH="$(usr/bin/arch 2>/dev/null || echo x86_64)" if [ ! -d /usr/share/espeak-ng-data ]; then if [ ! -d /usr/local/share/espeak-ng-data ]; then - if [ ! -d /usr/lib/x86_64-linux-gnu/espeak-ng-data ]; then - echo "❌ espeak-ng-data not in /usr/share, /usr/local/share or /usr/lib/x86_64-linux-gnu!" + if [ ! -d /usr/lib/"$HOSTARCH"-linux-gnu/espeak-ng-data ]; then + echo "❌ espeak-ng-data not in /usr/share, /usr/local/share or /usr/lib/$HOST_ARCH-linux-gnu!" return 1 fi fi diff --git a/ShellScripts/common/post_build.sh b/ShellScripts/common/post_build.sh index 2910e77cb..840de9852 100755 --- a/ShellScripts/common/post_build.sh +++ b/ShellScripts/common/post_build.sh @@ -58,9 +58,10 @@ run_script() { cp -rfu "$MINGW_PREFIX/share/espeak-ng-data" "$PROGDIR/Resources" else # Linux modern search paths for espeak-ng-data + # Some distributions put the data in arch-specific paths, so check for them SEARCH_PATHS=( "/usr/local/share/espeak-ng-data" - "/usr/lib/x86_64-linux-gnu/espeak-ng-data" + "/usr/lib/$(/usr/bin/arch 2>/dev/null || echo x86_64)-linux-gnu/espeak-ng-data" "/usr/share/espeak-ng-data" "/app/share/espeak-ng-data" )