tdlight-java-natives/.github/workflows/scripts/install_deps_linux_arm64_ssl1.sh
2023-05-12 01:34:32 +02:00

31 lines
1.7 KiB
Bash
Executable File

#!/bin/bash -ex
# Ubuntu 20.04
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture arm64
sed 's/deb http/deb \[arch=amd64,i386\] http/' -i /etc/apt/sources.list
echo "# tdlight multiarch" > /etc/apt/sources.list.d/tdlight-multiarch.list
echo "deb [arch=arm64,armhf,ppc64el,riscv64,s390x] http://ports.ubuntu.com/ $(lsb_release -cs) main universe restricted multiverse" >> /etc/apt/sources.list.d/tdlight-multiarch.list
echo "deb [arch=arm64,armhf,ppc64el,riscv64,s390x] http://ports.ubuntu.com/ $(lsb_release -cs)-updates main universe restricted multiverse" >> /etc/apt/sources.list.d/tdlight-multiarch.list
echo "deb [arch=arm64,armhf,ppc64el,riscv64,s390x] http://ports.ubuntu.com/ $(lsb_release -cs)-security main universe restricted multiverse" >> /etc/apt/sources.list.d/tdlight-multiarch.list
apt-get --assume-yes update
# Install and bypass a bug in the cross-platform libc++ packages
apt-get --assume-yes autoremove "libc++-10-dev:*" "libc++abi-10-dev:*" "libc++1-10:*" "libc++abi1-10:*" || true
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install libc++-10-dev:arm64 libc++abi-10-dev:arm64 libc++1-10:arm64 libc++abi1-10:arm64
cp --remove-destination \
/usr/lib/llvm-10/lib/{libc++abi.so,libc++abi.so.1.0,libc++.so,libc++.so.1.0} \
/usr/lib/aarch64-linux-gnu/ || true
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install clang-10 libc++-10-dev libc++abi-10-dev libc++1-10 libc++abi1-10
# End libc++ packages bugfix
# Add arm64 common files
apt-get download libclang-common-10-dev:arm64
dpkg-deb -xv libclang-common-10-dev_*_arm64.deb /
# Install dependencies
apt-get --assume-yes install libssl-dev:arm64 zlib1g-dev:arm64 openjdk-8-jdk-headless:arm64 libgcc-9-dev:arm64 libc6-dev:arm64 libunwind-dev:arm64