2020-05-03 21:21:58 +03:00
|
|
|
#!/bin/bash
|
2018-02-25 20:22:19 +03:00
|
|
|
|
2021-09-17 18:15:23 +03:00
|
|
|
if ! bash ./ci/check-rust-version.sh ; then
|
2021-03-29 06:26:07 +03:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-04-03 02:37:03 +03:00
|
|
|
if test -z "${SUDO+x}" && hash sudo 2>/dev/null; then
|
|
|
|
SUDO="sudo"
|
|
|
|
fi
|
|
|
|
|
2018-02-27 09:17:05 +03:00
|
|
|
# Centos may not have lsb_release installed
|
|
|
|
if test -e /etc/centos-release || test -e /etc/fedora-release; then
|
2020-05-04 18:21:30 +03:00
|
|
|
if test -x /bin/dnf ; then
|
2021-04-03 02:37:03 +03:00
|
|
|
YUM="$SUDO dnf"
|
2020-05-04 18:21:30 +03:00
|
|
|
else
|
2021-04-03 02:37:03 +03:00
|
|
|
YUM="$SUDO yum"
|
2020-05-04 18:21:30 +03:00
|
|
|
fi
|
2020-11-29 21:26:11 +03:00
|
|
|
# Fedora 33 moved some perl bits around
|
|
|
|
$YUM install -y perl-FindBin perl-File-Compare || true
|
2020-05-04 18:21:30 +03:00
|
|
|
$YUM install -y \
|
2019-11-10 06:46:37 +03:00
|
|
|
make \
|
2020-02-11 09:16:34 +03:00
|
|
|
gcc \
|
|
|
|
gcc-c++ \
|
2019-06-17 00:11:15 +03:00
|
|
|
fontconfig-devel \
|
2019-06-17 00:11:36 +03:00
|
|
|
openssl-devel \
|
2020-11-29 21:26:11 +03:00
|
|
|
perl-interpreter \
|
2020-02-11 09:16:34 +03:00
|
|
|
python3 \
|
2018-02-27 09:17:05 +03:00
|
|
|
libxcb-devel \
|
2019-02-23 09:11:25 +03:00
|
|
|
libxkbcommon-devel \
|
|
|
|
libxkbcommon-x11-devel \
|
2019-11-29 18:47:43 +03:00
|
|
|
wayland-devel \
|
2018-02-27 09:17:05 +03:00
|
|
|
mesa-libEGL-devel \
|
2021-08-20 06:51:56 +03:00
|
|
|
xcb-util-devel \
|
2019-06-17 00:11:15 +03:00
|
|
|
xcb-util-keysyms-devel \
|
2021-03-09 09:00:42 +03:00
|
|
|
xcb-util-image-devel \
|
2019-12-29 19:41:50 +03:00
|
|
|
xcb-util-wm-devel \
|
2019-12-30 01:03:09 +03:00
|
|
|
rpm-build \
|
|
|
|
redhat-lsb-core
|
2018-02-27 09:17:05 +03:00
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
2021-03-26 18:29:38 +03:00
|
|
|
if test -x /usr/bin/lsb_release && test `lsb_release -si` = "openSUSE"; then
|
2021-04-03 02:37:03 +03:00
|
|
|
ZYPPER="$SUDO zypper"
|
2021-09-05 23:06:50 +03:00
|
|
|
$ZYPPER install -yl perl-FindBin perl-File-Compare || true
|
|
|
|
$ZYPPER install -yl \
|
2021-03-19 09:33:38 +03:00
|
|
|
make \
|
|
|
|
gcc \
|
|
|
|
gcc-c++ \
|
|
|
|
fontconfig-devel \
|
|
|
|
openssl-devel \
|
|
|
|
perl \
|
|
|
|
python3 \
|
|
|
|
libxcb-devel \
|
|
|
|
libxkbcommon-devel \
|
|
|
|
libxkbcommon-x11-devel \
|
|
|
|
wayland-devel \
|
|
|
|
Mesa-libEGL-devel \
|
2021-08-20 06:51:56 +03:00
|
|
|
xcb-util-devel \
|
2021-03-19 09:33:38 +03:00
|
|
|
xcb-util-keysyms-devel \
|
|
|
|
xcb-util-image-devel \
|
|
|
|
xcb-util-wm-devel \
|
|
|
|
rpm-build
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
2020-05-03 21:21:58 +03:00
|
|
|
if test -e /etc/debian_version ; then
|
2021-04-03 02:37:03 +03:00
|
|
|
APT="$SUDO apt-get"
|
2021-08-20 06:51:56 +03:00
|
|
|
apt-cache show libxcb-util-dev > /dev/null 2>&1 && XCBUTIL="libxcb-util-dev" || XCBUTIL="libxcb-util0-dev"
|
2021-04-03 02:37:03 +03:00
|
|
|
$APT install -y \
|
2020-05-03 21:21:58 +03:00
|
|
|
bsdutils \
|
|
|
|
cmake \
|
2020-11-10 12:27:45 +03:00
|
|
|
dpkg-dev \
|
2020-05-03 21:21:58 +03:00
|
|
|
fakeroot \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
libegl1-mesa-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libfontconfig1-dev \
|
|
|
|
libwayland-dev \
|
2020-05-04 08:45:10 +03:00
|
|
|
libx11-xcb-dev \
|
2020-05-03 21:21:58 +03:00
|
|
|
libxcb-ewmh-dev \
|
|
|
|
libxcb-icccm4-dev \
|
2021-03-09 09:26:29 +03:00
|
|
|
libxcb-image0-dev \
|
2020-05-03 21:21:58 +03:00
|
|
|
libxcb-keysyms1-dev \
|
2021-03-09 09:54:25 +03:00
|
|
|
libxcb-render0-dev \
|
2020-05-03 21:21:58 +03:00
|
|
|
libxcb-xkb-dev \
|
|
|
|
libxkbcommon-dev \
|
|
|
|
libxkbcommon-x11-dev \
|
2021-08-20 06:51:56 +03:00
|
|
|
"$XCBUTIL" \
|
2020-05-03 21:21:58 +03:00
|
|
|
lsb-release \
|
|
|
|
python3 \
|
|
|
|
xdg-utils \
|
|
|
|
xorg-dev
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
2020-06-07 20:57:41 +03:00
|
|
|
if test -e /etc/arch-release ; then
|
2021-04-03 02:37:03 +03:00
|
|
|
PACMAN="$SUDO pacman"
|
|
|
|
$PACMAN -S --noconfirm --needed \
|
2021-11-09 18:47:16 +03:00
|
|
|
'base-devel' \
|
2020-06-07 20:57:41 +03:00
|
|
|
'cargo' \
|
|
|
|
'cmake' \
|
|
|
|
'fontconfig' \
|
|
|
|
'git' \
|
|
|
|
'hicolor-icon-theme' \
|
|
|
|
'libx11' \
|
|
|
|
'libxkbcommon-x11' \
|
|
|
|
'pkgconf' \
|
|
|
|
'python3' \
|
|
|
|
'rust' \
|
|
|
|
'wayland' \
|
2021-08-20 06:51:56 +03:00
|
|
|
'xcb-util' \
|
2021-03-09 09:26:29 +03:00
|
|
|
'xcb-util-image' \
|
2020-06-07 20:57:41 +03:00
|
|
|
'xcb-util-keysyms' \
|
|
|
|
'xcb-util-wm'
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
2020-05-03 21:21:58 +03:00
|
|
|
case $OSTYPE in
|
|
|
|
darwin*|msys)
|
|
|
|
exit 0
|
|
|
|
;;
|
2020-09-09 07:48:00 +03:00
|
|
|
freebsd*)
|
2021-04-03 02:37:03 +03:00
|
|
|
PKG="$SUDO pkg"
|
|
|
|
$PKG install -y \
|
2020-09-09 07:48:00 +03:00
|
|
|
cmake \
|
|
|
|
curl \
|
|
|
|
egl-wayland \
|
|
|
|
expat \
|
|
|
|
fontconfig \
|
|
|
|
gcc \
|
|
|
|
gettext \
|
|
|
|
git \
|
|
|
|
gmake \
|
|
|
|
libxcb \
|
|
|
|
libxkbcommon \
|
|
|
|
mesa-devel \
|
|
|
|
openssl \
|
|
|
|
p5-ExtUtils-MakeMaker \
|
|
|
|
perl5 \
|
|
|
|
pkgconf \
|
|
|
|
python3 \
|
|
|
|
rust \
|
|
|
|
wayland \
|
2021-08-20 06:51:56 +03:00
|
|
|
libxcb \
|
|
|
|
xcb-util \
|
2021-03-09 09:26:29 +03:00
|
|
|
xcb-util-image \
|
2020-09-09 07:48:00 +03:00
|
|
|
xcb-util-keysyms \
|
|
|
|
xcb-util-wm \
|
|
|
|
z \
|
|
|
|
zip
|
|
|
|
exit $?
|
|
|
|
;;
|
2018-02-25 20:22:19 +03:00
|
|
|
*)
|
|
|
|
echo "Please contribute the commands to install the deps"
|
|
|
|
echo "For `lsb_release -ds`"
|
2020-05-03 21:21:58 +03:00
|
|
|
exit 1
|
|
|
|
;;
|
2018-02-25 20:22:19 +03:00
|
|
|
esac
|