Michel Dänzer | 3acd5a6 | 2020-06-01 19:08:30 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | set -e |
| 4 | set -o xtrace |
| 5 | |
| 6 | export DEBIAN_FRONTEND=noninteractive |
| 7 | |
| 8 | # Ephemeral packages (installed for this script and removed again at the end) |
| 9 | STABLE_EPHEMERAL=" \ |
Tomeu Vizoso | dcd171f | 2020-04-01 13:07:46 +0200 | [diff] [blame] | 10 | libpciaccess-dev:$arch |
Michel Dänzer | 3acd5a6 | 2020-06-01 19:08:30 +0200 | [diff] [blame] | 11 | " |
| 12 | |
| 13 | dpkg --add-architecture $arch |
| 14 | apt-get update |
| 15 | |
| 16 | apt-get install -y --no-remove \ |
| 17 | $STABLE_EPHEMERAL \ |
| 18 | crossbuild-essential-$arch \ |
| 19 | libelf-dev:$arch \ |
| 20 | libexpat1-dev:$arch \ |
| 21 | libffi-dev:$arch \ |
| 22 | libstdc++6:$arch \ |
Karol Herbst | 9660655 | 2020-07-14 17:49:00 +0200 | [diff] [blame] | 23 | libtinfo-dev:$arch \ |
| 24 | wget |
Michel Dänzer | 3acd5a6 | 2020-06-01 19:08:30 +0200 | [diff] [blame] | 25 | |
Tomeu Vizoso | dcd171f | 2020-04-01 13:07:46 +0200 | [diff] [blame] | 26 | if [[ $arch == "armhf" ]]; then |
| 27 | LLVM=llvm-7-dev |
| 28 | else |
| 29 | LLVM=llvm-8-dev |
| 30 | fi |
| 31 | |
Michel Dänzer | 3acd5a6 | 2020-06-01 19:08:30 +0200 | [diff] [blame] | 32 | apt-get install -y --no-remove -t buster-backports \ |
Tomeu Vizoso | dcd171f | 2020-04-01 13:07:46 +0200 | [diff] [blame] | 33 | $LLVM:$arch |
Michel Dänzer | 3acd5a6 | 2020-06-01 19:08:30 +0200 | [diff] [blame] | 34 | |
| 35 | . .gitlab-ci/create-cross-file.sh $arch |
| 36 | |
| 37 | |
| 38 | . .gitlab-ci/container/container_pre_build.sh |
| 39 | |
| 40 | |
| 41 | # dependencies where we want a specific version |
Tomeu Vizoso | 5d0ba8b | 2020-07-27 14:42:42 +0200 | [diff] [blame] | 42 | EXTRA_MESON_ARGS="--cross-file=/cross_file-${arch}.txt -D libdir=lib/$(dpkg-architecture -A $arch -qDEB_TARGET_MULTIARCH)" |
| 43 | . .gitlab-ci/build-libdrm.sh |
Michel Dänzer | 3acd5a6 | 2020-06-01 19:08:30 +0200 | [diff] [blame] | 44 | |
| 45 | apt-get purge -y \ |
| 46 | $STABLE_EPHEMERAL |
| 47 | |
| 48 | . .gitlab-ci/container/container_post_build.sh |