gitlab-ci: generate meson cross-files earlier
[mesa.git] / .gitlab-ci / debian-install.sh
index 2acdaf438ee06312f12dab2eec459a6a63d21481..eb4a37ee1e021947850e3018dc5e9a4be39d33ed 100644 (file)
@@ -72,17 +72,11 @@ apt-get install -y \
       libgtk-3-dev \
       python-mako \
       python3-mako \
-      meson \
-      scons
-
-# autotools build deps
-apt-get install -y \
-      automake \
-      libtool \
       bison \
       flex \
       gettext \
-      make
+      meson \
+      scons
 
 # Cross-build Mesa deps
 for arch in $CROSS_ARCHITECTURES; do
@@ -213,11 +207,21 @@ apt-get install -y ccache
 # We need xmllint to validate the XML files in Mesa
 apt-get install -y libxml2-utils
 
+
+# Generate cross build files for Meson
+for arch in $CROSS_ARCHITECTURES; do
+  cross_file="/cross_file-$arch.txt"
+  /usr/share/meson/debcrossgen --arch "$arch" -o "$cross_file"
+  # Work around a bug in debcrossgen that should be fixed in the next release
+  if [ "$arch" = "i386" ]; then
+    sed -i "s|cpu_family = 'i686'|cpu_family = 'x86'|g" "$cross_file"
+  fi
+done
+
+
 # Remove unused packages
 apt-get purge -y \
-      automake \
       git \
-      libtool \
       curl \
       unzip \
       gnupg