2020-04-27 22:50:56 +00:00
|
|
|
#!/bin/bash
|
2020-10-30 22:31:46 +00:00
|
|
|
# Copyright 2019-2020, Mesa contributors
|
2024-05-03 19:02:32 +00:00
|
|
|
# Copyright 2020-2024, Collabora, Ltd.
|
2020-10-30 22:31:46 +00:00
|
|
|
# SPDX-License-Identifier: MIT
|
2020-04-27 22:50:56 +00:00
|
|
|
|
2024-05-03 19:02:32 +00:00
|
|
|
# Based on https://gitlab.freedesktop.org/mesa/mesa/-/blob/2e100bd69b67cbb70b8a8e813ed866618a2252ca/.gitlab-ci/container/cross_build.sh
|
2020-04-27 22:50:56 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
set -o xtrace
|
|
|
|
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
CROSS_ARCHITECTURES="i386"
|
|
|
|
for arch in $CROSS_ARCHITECTURES; do
|
|
|
|
dpkg --add-architecture $arch
|
|
|
|
done
|
|
|
|
|
|
|
|
apt-get update
|
|
|
|
|
|
|
|
for arch in $CROSS_ARCHITECTURES; do
|
|
|
|
# OpenCV and libuvc aren't on this list because
|
|
|
|
# they apparently can't be installed in both architectures at once
|
|
|
|
apt-get install -y --no-install-recommends --no-remove \
|
2024-05-03 19:02:32 +00:00
|
|
|
"crossbuild-essential-${arch}" \
|
|
|
|
"libelf-dev:${arch}" \
|
|
|
|
"libegl1-mesa-dev:${arch}" \
|
|
|
|
"libgl1-mesa-dev:${arch}" \
|
|
|
|
"libglvnd-dev:${arch}" \
|
|
|
|
"libhidapi-dev:${arch}" \
|
|
|
|
"libudev-dev:${arch}" \
|
|
|
|
"libusb-1.0-0-dev:${arch}" \
|
|
|
|
"libv4l-dev:${arch}" \
|
|
|
|
"libvulkan-dev:${arch}" \
|
|
|
|
"libwayland-dev:${arch}" \
|
|
|
|
"libx11-dev:${arch}" \
|
|
|
|
"libxcb-randr0-dev:${arch}" \
|
|
|
|
"libxrandr-dev:${arch}" \
|
|
|
|
"libxxf86vm-dev:${arch}"
|
2020-04-27 22:50:56 +00:00
|
|
|
|
|
|
|
if [ "$arch" != "i386" ]; then
|
2024-05-03 19:02:32 +00:00
|
|
|
mkdir "/var/cache/apt/archives/${arch}"
|
2020-04-27 22:50:56 +00:00
|
|
|
apt-get install -y --no-remove \
|
2024-05-03 19:02:32 +00:00
|
|
|
"libstdc++6:${arch}"
|
2020-04-27 22:50:56 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
# for 64bit windows cross-builds
|
|
|
|
# apt-get install -y --no-remove \
|
|
|
|
# libz-mingw-w64-dev \
|
|
|
|
# mingw-w64 \
|
|
|
|
# wine \
|
|
|
|
# wine32 \
|
|
|
|
# wine64
|
|
|
|
|
|
|
|
|
|
|
|
apt-get autoremove -y --purge
|
|
|
|
apt-get clean
|