2020-11-17 08:49:39 +03:00
|
|
|
#!/bin/sh
|
|
|
|
set -eufx
|
|
|
|
|
2023-09-04 12:32:12 +03:00
|
|
|
# these are the packages necessary to run ./configure so config_ac.h is generated
|
2024-08-14 17:04:27 +03:00
|
|
|
PACKAGES="libpam0g-dev libxfixes-dev libxrandr-dev libxkbfile-dev nasm"
|
2022-09-03 03:50:56 +03:00
|
|
|
|
2023-09-04 10:27:21 +03:00
|
|
|
usage()
|
|
|
|
{
|
|
|
|
echo "** Usage: $0 <version-tag>"
|
|
|
|
echo " e.g. $0 1.90"
|
|
|
|
} >&2
|
|
|
|
|
|
|
|
if [ $# -ne 1 ]; then
|
|
|
|
usage
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
CPPCHECK_VER="$1"
|
|
|
|
|
2023-09-04 12:32:12 +03:00
|
|
|
apt-get update
|
|
|
|
|
2023-09-04 10:27:21 +03:00
|
|
|
case "$CPPCHECK_VER" in
|
|
|
|
1.*)
|
|
|
|
# no dependencies
|
|
|
|
;;
|
|
|
|
2.8 | 2.9 | 2.1*)
|
|
|
|
# Cppcheck 2.8 removed the dependency on z3
|
2023-09-09 20:50:16 +03:00
|
|
|
# Cppcheck 2.8 added optional support for utilizing Boost
|
|
|
|
PACKAGES="$PACKAGES libboost-container-dev"
|
2023-09-04 10:27:21 +03:00
|
|
|
;;
|
|
|
|
2.*)
|
2023-09-04 12:32:12 +03:00
|
|
|
PACKAGES="$PACKAGES libz3-dev z3"
|
2023-09-04 10:27:21 +03:00
|
|
|
;;
|
|
|
|
esac
|
2023-09-04 12:32:12 +03:00
|
|
|
|
|
|
|
apt-get -yq --no-install-suggests --no-install-recommends install $PACKAGES
|