blob: 1154a490eb4a97f4cb78e1c91ce341ec812fb667 [file] [log] [blame]
Michel Dänzer3acd5a62020-06-01 19:08:30 +02001#!/bin/bash
2
3set -e
4set -o xtrace
5
6export DEBIAN_FRONTEND=noninteractive
7
8# Ephemeral packages (installed for this script and removed again at the end)
9STABLE_EPHEMERAL=" \
Tomeu Vizosodcd171f2020-04-01 13:07:46 +020010 libpciaccess-dev:$arch
Michel Dänzer3acd5a62020-06-01 19:08:30 +020011 "
12
13dpkg --add-architecture $arch
14apt-get update
15
16apt-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 Herbst96606552020-07-14 17:49:00 +020023 libtinfo-dev:$arch \
24 wget
Michel Dänzer3acd5a62020-06-01 19:08:30 +020025
Tomeu Vizosodcd171f2020-04-01 13:07:46 +020026if [[ $arch == "armhf" ]]; then
27 LLVM=llvm-7-dev
28else
29 LLVM=llvm-8-dev
30fi
31
Michel Dänzer3acd5a62020-06-01 19:08:30 +020032apt-get install -y --no-remove -t buster-backports \
Tomeu Vizosodcd171f2020-04-01 13:07:46 +020033 $LLVM:$arch
Michel Dänzer3acd5a62020-06-01 19:08:30 +020034
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 Vizoso5d0ba8b2020-07-27 14:42:42 +020042EXTRA_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änzer3acd5a62020-06-01 19:08:30 +020044
45apt-get purge -y \
46 $STABLE_EPHEMERAL
47
48. .gitlab-ci/container/container_post_build.sh