Skip to content

Commit

Permalink
Fix search_library_path() on Debian i386
Browse files Browse the repository at this point in the history
Fix #50
  • Loading branch information
TheTumultuousUnicornOfDarkness committed Jul 26, 2023
1 parent fb06e22 commit e3450bf
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions linuxdeploy-plugin-gtk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,15 @@ copy_lib_tree() {
done
}

get_triplet() {
if command -v dpkg-architecture > /dev/null; then
dpkg-architecture -qDEB_HOST_MULTIARCH
fi
}

search_library_path() {
PATH_ARRAY=(
"/usr/lib/$(uname -m)-linux-gnu"
"/usr/lib/$(get_triplet)"
"/usr/lib64"
"/usr/lib"
)
Expand All @@ -101,7 +107,7 @@ search_tool() {
fi

PATH_ARRAY=(
"/usr/lib/$(uname -m)-linux-gnu/$directory/$tool"
"/usr/lib/$(get_triplet)/$directory/$tool"
"/usr/lib64/$directory/$tool"
"/usr/lib/$directory/$tool"
"/usr/bin/$tool"
Expand Down Expand Up @@ -152,6 +158,14 @@ fi
APPDIR="$(realpath "$APPDIR")"
mkdir -p "$APPDIR"

. /etc/os-release
if [ "$ID" = "debian" ] || [ "$ID" = "ubuntu" ]; then
if ! command -v dpkg-architecture &>/dev/null; then
echo -e "$0: dpkg-architecture not found.\nInstall dpkg-dev then re-run the plugin."
exit 1
fi
fi

if command -v pkgconf > /dev/null; then
PKG_CONFIG="pkgconf"
elif command -v pkg-config > /dev/null; then
Expand Down

0 comments on commit e3450bf

Please sign in to comment.