aboutsummaryrefslogtreecommitdiff
path: root/resources/scripts
diff options
context:
space:
mode:
authorKlemens Nanni <contact@autoboot.org>2016-03-09 14:09:04 +0100
committerFrancis Rowe <info@gluglug.org.uk>2016-03-11 01:08:22 +0000
commitc64485ec850ca901f1c7adde48e19bb84397e591 (patch)
treeabd812ce9e342ec255256ac6faaf580381604391 /resources/scripts
parente15beed400f3ced1ba2c60fb78232de177a05e30 (diff)
downloadlibrebootfr-c64485ec850ca901f1c7adde48e19bb84397e591.tar.gz
librebootfr-c64485ec850ca901f1c7adde48e19bb84397e591.zip
build/dependencies: Check architecture only once
Diffstat (limited to 'resources/scripts')
-rwxr-xr-xresources/scripts/helpers/build/dependencies/parabola23
-rwxr-xr-xresources/scripts/helpers/build/dependencies/trisquel724
2 files changed, 21 insertions, 26 deletions
diff --git a/resources/scripts/helpers/build/dependencies/parabola b/resources/scripts/helpers/build/dependencies/parabola
index 6a14e10a..8102f262 100755
--- a/resources/scripts/helpers/build/dependencies/parabola
+++ b/resources/scripts/helpers/build/dependencies/parabola
@@ -57,12 +57,14 @@ pacman -S arm-none-eabi-gcc
pacman -S --needed libpciaccess
+[ "$(uname -i)" = x86_64 ] || [ "$(uname -m)" = x86_64 ]
+arch=${?}
+
# For cross-compiling i686 target on x86_64 host.
-if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ]
- then
- printf "Cross-Compiling: You are running on 64-bit architecture, however 32-bit libraries are needed\n"
- pacman -Sl --needed multilib 1&>/dev/null || (printf "You must enable the multilib repository in /etc/pacman.conf first\n"; exit 1)
- pacman -S --needed gcc{,-libs}-multilib lib32-{lib{ltdl,pciaccess,stdc++5},glibc,fakeroot}
+if ["${arch}" -eq 0 ]; then
+ printf "Cross-Compiling: You are running on 64-bit architecture, however 32-bit libraries are needed\n"
+ pacman -Sl multilib 1&>/dev/null || (printf "You must enable the multilib repository in /etc/pacman.conf first\n"; exit 1)
+ pacman -S --needed gcc-multilib gcc-libs-multilib lib32-libltdl lib32-libpciaccess lib32-libstdc++5 lib32-glibc lib32-fakeroot
fi
# Memtest86+ build dependencies
@@ -83,15 +85,12 @@ pacman -S ncurses doxygen iasl gdb flex bison
# pacman -S git base-devel
# For cross-compiling i686 target on x86_64 host.
-if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ]
- then
- printf "Cross-Compiling: You are running on 64-bit architecture, however 32-bit libraries are needed\n"
- pacman -S --needed lib32-ncurses
+if ["${arch}" -eq 0 ]; then
+ printf "Cross-Compiling: You are running on 64-bit architecture, however 32-bit libraries are needed\n"
+ pacman -S --needed lib32-ncurses
fi
-# GRUB build dependencies (also requires build-essential, bison and flex)
-# ------------------------------------------------------------
-
+# GRUB2 build dependencies (also requires build-essential, bison and flex)
# pacman -S --needed base-devel bison flex
printf "GRUB: Fonts, (crypto) filesystem support, automake, etc.\n"
diff --git a/resources/scripts/helpers/build/dependencies/trisquel7 b/resources/scripts/helpers/build/dependencies/trisquel7
index 04b931de..f379e049 100755
--- a/resources/scripts/helpers/build/dependencies/trisquel7
+++ b/resources/scripts/helpers/build/dependencies/trisquel7
@@ -51,13 +51,15 @@ apt-get -y install build-essential
# for cross-compiling ARM binaries
apt-get -y install gcc-arm-linux-gnueabi
+[ "$(uname -i)" = x86_64 ] || [ "$(uname -m)" = x86_64 ]
+arch=${?}
+
# For cross-compiling i686 target on x86_64 host.
-if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ]
- then
- apt-get -y install gcc-multilib libc6-i386 libc6-dev-i386
- apt-get -y install lib32stdc++6 g++-multilib dh-autoreconf
- # recommended, but not sure what for:
- apt-get -y install lib32tinfo-dev texi2html
+if [ "${arch}" -eq 0 ]; then
+ apt-get -y install gcc-multilib libc6-i386 libc6-dev-i386
+ apt-get -y install lib32stdc++6 g++-multilib dh-autoreconf
+ # recommended, but not sure what for:
+ apt-get -y install lib32tinfo-dev texi2html
fi
# Memtest86+ build dependencies
@@ -76,10 +78,7 @@ apt-get -y install build-essential
apt-get -y install libncurses5-dev doxygen iasl gdb flex bison build-essential git libssl-dev
# For cross-compiling i686 target on x86_64 host.
-if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ]
- then
- apt-get -y install lib32ncurses5-dev
-fi
+[ "${arch}" -eq 0 ] && apt-get -y install lib32ncurses5-dev
# GRUB build dependencies (also requires build-essential, bison and flex)
# ------------------------------------------------------------
@@ -97,7 +96,4 @@ apt-get -y install build-essential
apt-get -y install libpci-dev pciutils zlib1g-dev libftdi-dev build-essential
# For cross-compiling i686 target on x86_64 host.
-if [ "$(uname -i)" = "x86_64" ] || [ "$(uname -m)" = "x86_64" ]
- then
- apt-get -y install lib32z1-dev
-fi
+[ "${arch}" -eq 0 ] && apt-get -y install lib32z1-dev