tdlight-java-natives/.github/workflows/scripts/install_deps_linux_armhf_ss...

30 lines
1.8 KiB
Bash
Executable File

#!/bin/bash -ex
# Ubuntu 22.04
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture armhf
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++-14-dev:*" "libc++abi-14-dev:*" "libc++1-14:*" "libc++abi1-14:*" "libunwind-14-dev:*" "libunwind-14:*" || true
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install libc++-14-dev:armhf libc++abi-14-dev:armhf libc++1-14:armhf libc++abi1-14:armhf libunwind-14-dev:armhf libunwind-14:armhf
# shellcheck disable=SC2016
find /usr/lib/armhf-linux-gnu/ -lname "*llvm-14*" -print0 | xargs -0 -i sh -c 'cp --remove-destination $(readlink -e "{}") "{}" '
apt-get --assume-yes -o Dpkg::Options::="--force-overwrite" install clang-14 libc++-14-dev libc++abi-14-dev libc++1-14 libc++abi1-14 libunwind-14-dev libunwind-14
# End libc++ packages bugfix
# Add armhf common files
apt-get download libclang-common-14-dev:armhf
dpkg-deb -xv libclang-common-14-dev_*_armhf.deb /
# Install dependencies
apt-get --assume-yes install libssl-dev:armhf zlib1g-dev:armhf openjdk-17-jdk-headless:armhf libgcc-12-dev:armhf libc6-dev:armhf