mirror of
https://github.com/wez/wezterm.git
synced 2024-11-14 03:16:09 +03:00
ae78c7d6c4
Support Gentoo
184 lines
3.5 KiB
Bash
Executable File
184 lines
3.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if ! bash ./ci/check-rust-version.sh ; then
|
|
exit 1
|
|
fi
|
|
|
|
if test -z "${SUDO+x}" && hash sudo 2>/dev/null; then
|
|
SUDO="sudo"
|
|
fi
|
|
|
|
# Centos may not have lsb_release installed (or even available at all)
|
|
if test -e /etc/centos-release || test -e /etc/fedora-release; then
|
|
if test -x /bin/dnf ; then
|
|
YUM="$SUDO dnf"
|
|
else
|
|
YUM="$SUDO yum"
|
|
fi
|
|
# Fedora 33 moved some perl bits around
|
|
$YUM install -y perl-FindBin perl-File-Compare || true
|
|
$YUM install -y \
|
|
make \
|
|
gcc \
|
|
gcc-c++ \
|
|
fontconfig-devel \
|
|
openssl-devel \
|
|
perl-interpreter \
|
|
python3 \
|
|
libxcb-devel \
|
|
libxkbcommon-devel \
|
|
libxkbcommon-x11-devel \
|
|
wayland-devel \
|
|
mesa-libEGL-devel \
|
|
xcb-util-devel \
|
|
xcb-util-keysyms-devel \
|
|
xcb-util-image-devel \
|
|
xcb-util-wm-devel \
|
|
rpm-build
|
|
exit $?
|
|
fi
|
|
|
|
if test -x /usr/bin/lsb_release && test `lsb_release -si` = "openSUSE"; then
|
|
ZYPPER="$SUDO zypper"
|
|
$ZYPPER install -yl perl-FindBin perl-File-Compare || true
|
|
$ZYPPER install -yl \
|
|
make \
|
|
gcc \
|
|
gcc-c++ \
|
|
fontconfig-devel \
|
|
openssl-devel \
|
|
perl \
|
|
python3 \
|
|
libxcb-devel \
|
|
libxkbcommon-devel \
|
|
libxkbcommon-x11-devel \
|
|
wayland-devel \
|
|
Mesa-libEGL-devel \
|
|
xcb-util-devel \
|
|
xcb-util-keysyms-devel \
|
|
xcb-util-image-devel \
|
|
xcb-util-wm-devel \
|
|
rpm-build
|
|
exit $?
|
|
fi
|
|
|
|
if test -e /etc/debian_version ; then
|
|
APT="$SUDO apt-get"
|
|
apt-cache show libxcb-util-dev > /dev/null 2>&1 && XCBUTIL="libxcb-util-dev" || XCBUTIL="libxcb-util0-dev"
|
|
$APT install -y \
|
|
bsdutils \
|
|
cmake \
|
|
dpkg-dev \
|
|
fakeroot \
|
|
gcc \
|
|
g++ \
|
|
libegl1-mesa-dev \
|
|
libssl-dev \
|
|
libfontconfig1-dev \
|
|
libwayland-dev \
|
|
libx11-xcb-dev \
|
|
libxcb-ewmh-dev \
|
|
libxcb-icccm4-dev \
|
|
libxcb-image0-dev \
|
|
libxcb-keysyms1-dev \
|
|
libxcb-randr0-dev \
|
|
libxcb-render0-dev \
|
|
libxcb-xkb-dev \
|
|
libxkbcommon-dev \
|
|
libxkbcommon-x11-dev \
|
|
"$XCBUTIL" \
|
|
lsb-release \
|
|
python3 \
|
|
xdg-utils \
|
|
xorg-dev
|
|
exit $?
|
|
fi
|
|
|
|
if test -e /etc/arch-release ; then
|
|
PACMAN="$SUDO pacman"
|
|
$PACMAN -S --noconfirm --needed \
|
|
'base-devel' \
|
|
'cargo' \
|
|
'cmake' \
|
|
'fontconfig' \
|
|
'git' \
|
|
'hicolor-icon-theme' \
|
|
'libx11' \
|
|
'libxkbcommon-x11' \
|
|
'pkgconf' \
|
|
'python3' \
|
|
'rust' \
|
|
'wayland' \
|
|
'xcb-util' \
|
|
'xcb-util-image' \
|
|
'xcb-util-keysyms' \
|
|
'xcb-util-wm'
|
|
exit $?
|
|
fi
|
|
|
|
if test -e /etc/gentoo-release ; then
|
|
portageq envvar USE | xargs -n 1 | grep '^X$' \
|
|
|| (echo 'X is not found in USE flags' && exit 1)
|
|
EMERGE="$SUDO emerge"
|
|
$EMERGE --select \
|
|
'cmake' \
|
|
'fontconfig' \
|
|
'openssl' \
|
|
'git' \
|
|
'libX11' \
|
|
'libxkbcommon' \
|
|
'pkgconf' \
|
|
'python' \
|
|
'perl' \
|
|
'wayland' \
|
|
'mesa' \
|
|
'xcb-util' \
|
|
'xcb-util-image' \
|
|
'xcb-util-keysyms' \
|
|
'xcb-util-wm'
|
|
exit $?
|
|
fi
|
|
|
|
case $OSTYPE in
|
|
darwin*|msys)
|
|
exit 0
|
|
;;
|
|
freebsd*)
|
|
PKG="$SUDO pkg"
|
|
$PKG install -y \
|
|
cmake \
|
|
curl \
|
|
egl-wayland \
|
|
expat \
|
|
fontconfig \
|
|
gcc \
|
|
gettext \
|
|
git \
|
|
gmake \
|
|
libxcb \
|
|
libxkbcommon \
|
|
mesa-devel \
|
|
openssl \
|
|
p5-ExtUtils-MakeMaker \
|
|
perl5 \
|
|
pkgconf \
|
|
python3 \
|
|
rust \
|
|
wayland \
|
|
libxcb \
|
|
xcb-util \
|
|
xcb-util-image \
|
|
xcb-util-keysyms \
|
|
xcb-util-wm \
|
|
z \
|
|
zip
|
|
exit $?
|
|
;;
|
|
*)
|
|
echo "Please contribute the commands to install the deps"
|
|
echo "For `lsb_release -ds`"
|
|
cat /etc/os-release
|
|
exit 1
|
|
;;
|
|
esac
|