Skip to content

Commit 94b7531

Browse files
committed
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.)
1 parent d4a7a70 commit 94b7531

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ShellScripts/Linux/install_deps_root.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ run_script() {
5151
if ! install_package espeak-ng-dev; then
5252
return 1
5353
fi
54+
# Some distributions put the data in arch-specific paths
55+
HOSTARCH="$(usr/bin/arch 2>/dev/null || echo x86_64)"
5456
if [ ! -d /usr/share/espeak-ng-data ]; then
5557
if [ ! -d /usr/local/share/espeak-ng-data ]; then
56-
if [ ! -d /usr/lib/x86_64-linux-gnu/espeak-ng-data ]; then
57-
echo "❌ espeak-ng-data not in /usr/share, /usr/local/share or /usr/lib/x86_64-linux-gnu!"
58+
if [ ! -d /usr/lib/"$HOSTARCH"-linux-gnu/espeak-ng-data ]; then
59+
echo "❌ espeak-ng-data not in /usr/share, /usr/local/share or /usr/lib/$HOST_ARCH-linux-gnu!"
5860
return 1
5961
fi
6062
fi

ShellScripts/common/post_build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@ run_script() {
5858
cp -rfu "$MINGW_PREFIX/share/espeak-ng-data" "$PROGDIR/Resources"
5959
else
6060
# Linux modern search paths for espeak-ng-data
61+
# Some distributions put the data in arch-specific paths, so check for them
6162
SEARCH_PATHS=(
6263
"/usr/local/share/espeak-ng-data"
63-
"/usr/lib/x86_64-linux-gnu/espeak-ng-data"
64+
"/usr/lib/$(/usr/bin/arch 2>/dev/null || echo x86_64)-linux-gnu/espeak-ng-data"
6465
"/usr/share/espeak-ng-data"
6566
"/app/share/espeak-ng-data"
6667
)

0 commit comments

Comments
 (0)