9 git binutils meson pkgconf gcc linux-headers diffutils \
10 procps socat shadow sudo libgcrypt-dev texinfo gzip \
11 openssl-dev zlib-dev lzo-dev ncurses-dev readline-dev musl-dev lz4-dev vde2-dev
14 deps_linux_debian_mingw() {
16 mingw-w64 mingw-w64-tools \
18 libgcrypt-mingw-w64-dev \
22 deps_linux_debian_linux() {
23 if [ -n "$HOST" ]; then
24 dpkg --add-architecture "$HOST"
35 libncurses-dev:"$HOST" \
36 libreadline-dev:"$HOST" \
37 libgcrypt-dev:"$HOST" \
38 libminiupnpc-dev:"$HOST" \
39 libvdeplug-dev:"$HOST" \
42 if [ -n "$HOST" ]; then
43 apt-get install -y crossbuild-essential-"$HOST" qemu-user
50 export DEBIAN_FRONTEND=noninteractive
54 apt-get install -y git pkgconf diffutils sudo texinfo \
55 netcat-openbsd procps socat
58 if [ "$HOST" = mingw ]; then
59 deps_linux_debian_mingw "$@"
61 deps_linux_debian_linux "$@"
66 # Debian Buster ships an old version of meson (0.49).
67 # MinGW cross-compilation requires something newer than 0.55 that ships in Bullseye,
68 # or it fails when looking for dependencies in the OpenSSL wrap.
69 if [ "${ID:-}/${VERSION_CODENAME:-}" = debian/buster ] || [ "$HOST" = mingw ]; then
70 apt-get install -y python3 python3-pip ninja-build
73 apt-get install -y meson
78 if [ "$ID" != fedora ]; then
79 yum install -y epel-release
82 dnf install -y 'dnf-command(config-manager)'
83 dnf config-manager --enable powertools
90 git binutils make meson pkgconf gcc diffutils sudo texinfo-tex netcat procps systemd perl-IPC-Cmd \
91 findutils socat lzo-devel zlib-devel lz4-devel ncurses-devel readline-devel libgcrypt-devel "$@"
93 if yum info openssl11-devel; then
94 yum install -y openssl11-devel
96 dnf install -y openssl-devel
99 if yum info miniupnpc-devel; then
100 yum install -y miniupnpc-devel
105 src=/usr/local/src/openssl
110 git clone --depth 1 --branch openssl-3.0.2 https://github.com/openssl/openssl $src
113 ./Configure --prefix=$ssl3 --openssldir=$ssl3
117 if [ -f /etc/ld.so.conf ]; then
118 echo $ssl3/lib64 >>/etc/ld.so.conf
121 ldconfig -v $ssl3/lib64
132 deps_linux_alpine "$@"
136 deps_linux_debian "$@"
139 centos | almalinux | fedora)
149 brew install coreutils netcat lzo lz4 miniupnpc libgcrypt openssl meson "$@"
150 pip3 install --user compiledb
153 case "$(uname -s)" in
154 Linux) deps_linux "$@" ;;
155 Darwin) deps_macos "$@" ;;