summaryrefslogtreecommitdiff
path: root/scripts/prereq.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/prereq.sh')
-rwxr-xr-xscripts/prereq.sh75
1 files changed, 52 insertions, 23 deletions
diff --git a/scripts/prereq.sh b/scripts/prereq.sh
index bd0b525d8..717ddf15c 100755
--- a/scripts/prereq.sh
+++ b/scripts/prereq.sh
@@ -233,7 +233,7 @@ printf " ---> checking if bash is installed.. "
if which bash >/dev/null; then
printf "found\n"
printf " ---> checking if it is bash 4.x or 5.x.. "
- LC_ALL=C bash --version 2>/dev/null| grep -i "version \(4\|5\)" >/dev/null
+ LC_ALL=C bash --version 2>/dev/null| egrep -i 'version 4|5' >/dev/null
if [ $? -eq 0 ]; then
printf "yes\n"
else
@@ -304,14 +304,6 @@ if ! which git >/dev/null 2>&1; then
fi
printf "found\n"
-printf " ---> checking if pkg-config is installed.. "
-if ! which pkg-config >/dev/null 2>&1; then
- printf "not found\n"
- out=1
-else
- printf "found\n"
-fi
-
printf " ---> checking if ncurses is installed.. "
check_lxdialog=${topdir}/adk/config/lxdialog/check-lxdialog.sh
CURSES_CFLAGS=$(/bin/sh ${check_lxdialog} -ccflags | tr '\n' ' ')
@@ -359,8 +351,8 @@ else
echo "HOST_CXX:=${CXX}" >> $topdir/prereq.mk
fi
-echo "HOST_CFLAGS:=-O0 -g0" >> $topdir/prereq.mk
-echo "HOST_CXXFLAGS:=-O0 -g0" >> $topdir/prereq.mk
+echo "HOST_CFLAGS:=-O0 -g0 -fcommon" >> $topdir/prereq.mk
+echo "HOST_CXXFLAGS:=-O0 -g0 -fcommon" >> $topdir/prereq.mk
echo 'LANGUAGE:=C' >> $topdir/prereq.mk
echo 'LC_ALL:=C' >> $topdir/prereq.mk
echo "_PATH:=$PATH" >> $topdir/prereq.mk
@@ -626,15 +618,6 @@ else
host_build_cpio=1
fi
-printf " ---> checking if xz is installed.. "
-host_build_xz=0
-if ! which xz >/dev/null 2>&1; then
- printf "not found\n"
- host_build_xz=1
-else
- printf "found\n"
-fi
-
# optional
host_build_cdrtools=0
if ! which mkisofs >/dev/null 2>&1; then
@@ -651,6 +634,11 @@ if ! which lzma >/dev/null 2>&1; then
host_build_lzma=1
fi
+host_build_zstd=0
+if ! which zstd >/dev/null 2>&1; then
+ host_build_zstd=1
+fi
+
host_build_lz4=0
if ! which lz4c >/dev/null 2>&1; then
host_build_lz4=1
@@ -728,9 +716,6 @@ fi
if [ $host_build_cpio -eq 1 ]; then
printf "\t%s\n" "select ADK_HOST_BUILD_CPIO" >> $topdir/target/config/Config.in.prereq
fi
-if [ $host_build_xz -eq 1 ]; then
- printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq
-fi
# optional
if [ $host_build_cdrtools -eq 1 ]; then
printf "\t%s\n" "select ADK_HOST_BUILD_CDRTOOLS if ADK_HOST_NEED_CDRTOOLS" >> $topdir/target/config/Config.in.prereq
@@ -741,6 +726,9 @@ fi
if [ $host_build_lzma -eq 1 ]; then
printf "\t%s\n" "select ADK_HOST_BUILD_LZMA if ADK_HOST_NEED_LZMA" >> $topdir/target/config/Config.in.prereq
fi
+if [ $host_build_zstd -eq 1 ]; then
+ printf "\t%s\n" "select ADK_HOST_BUILD_ZSTD if ADK_HOST_NEED_ZSTD" >> $topdir/target/config/Config.in.prereq
+fi
if [ $host_build_lz4 -eq 1 ]; then
printf "\t%s\n" "select ADK_HOST_BUILD_LZ4 if ADK_HOST_NEED_LZ4" >> $topdir/target/config/Config.in.prereq
fi
@@ -802,6 +790,19 @@ if [ ! -f $topdir/.config ]; then
else
# scan host-tool prerequisites of certain packages before building.
. $topdir/.config
+
+ if [ -n "$ADK_PACKAGE_FIREFOX" ]; then
+ NEED_RUST="$NEED_RUST firefox"
+ fi
+ if [ -n "$ADK_PACKAGE_FIREFOX" ]; then
+ NEED_CARGO="$NEED_CARGO firefox"
+ fi
+ if [ -n "$ADK_PACKAGE_FIREFOX" ]; then
+ NEED_CLANG="$NEED_CLANG firefox"
+ fi
+ if [ -n "$ADK_PACKAGE_FIREFOX" ]; then
+ NEED_CBINDGEN="$NEED_CBINDGEN firefox"
+ fi
if [ -n "$ADK_PACKAGE_KODI" ]; then
NEED_JAVA="$NEED_JAVA kodi"
fi
@@ -898,6 +899,34 @@ else
fi
fi
+ if [ -n "$NEED_RUST" ]; then
+ if ! which rustc >/dev/null 2>&1; then
+ printf "You need rustc to build $NEED_RUST \n"
+ out=1
+ fi
+ fi
+
+ if [ -n "$NEED_CARGO" ]; then
+ if ! which cargo >/dev/null 2>&1; then
+ printf "You need cargo to build $NEED_CARGO \n"
+ out=1
+ fi
+ fi
+
+ if [ -n "$NEED_CLANG" ]; then
+ if ! which clang-13 >/dev/null 2>&1; then
+ printf "You need clang-13 to build $NEED_CLANG \n"
+ out=1
+ fi
+ fi
+
+ if [ -n "$NEED_CBINDGEN" ]; then
+ if ! which cbindgen >/dev/null 2>&1; then
+ printf "You need cbindgen to build $NEED_CBINDGEN \n"
+ out=1
+ fi
+ fi
+
if [ -n "$NEED_STATIC_LIBSTDCXX" ]; then
cat >test.c <<-'EOF'
#include <stdio.h>