From 78837a9b813b9581020169e5af3eaa9a76da2871 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Wed, 14 Apr 2021 15:27:56 -0400 Subject: [PATCH] Only install libtool-bin if the libtool binary is a separate package. --- install-minetest-build-deps.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/install-minetest-build-deps.sh b/install-minetest-build-deps.sh index 1d0f960..2272a8f 100755 --- a/install-minetest-build-deps.sh +++ b/install-minetest-build-deps.sh @@ -64,7 +64,7 @@ if [ ! -z "$this_apt" ]; then libbz2-dev libc6-dev-i386 libedit-dev libexpat1-dev \ libgmp-dev libjpeg-dev libltdl-dev libncurses5-dev \ libogg-dev libopenal-dev libpng-dev libreadline-dev \ - libsqlite3-dev libssl-dev libtool libtool-bin \ + libsqlite3-dev libssl-dev libtool \ libvorbis-dev libx11-dev libxxf86vm-dev lynx \ nano nettle-dev p7zip-full patch \ perl pkg-config python3 python3-dev \ @@ -79,6 +79,23 @@ if [ ! -z "$this_apt" ]; then libxml-parser-perl \ xserver-xorg-dev \ ; + if [ ! -f "`command -v libtool`" ]; then + . /etc/os-release + if [ ! -z "$VERSION_ID" ]; then + if [ -f "`command -v bc`" ]; then + # bc is bash calculator (-l: mathlib) + if [ `echo "$VERSION_ID>14.04" | bc -l` = 1 ]; then + sudo $this_apt -y install libtool-bin + # ^ not necessary on Trusty (See + # ). + fi + else + echo "* WARNING: The bc command isn't present, so the libtool-bin package will be skipped (it is only in Ubuntu >14.04 [not known in 15.x])" + fi + else + echo "* WARNING: VERSION_ID is not in /etc/os-release, so the libtool-bin package will be skipped (it is only in Ubuntu >14.04 [not known in 15.x])" + fi + fi #libcurl4-openssl-dev: for announce to work