From b58bf0c96513f3a3fa30da051f3dd24c99ad0c25 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Mon, 3 Jun 2024 17:42:04 +0200
Subject: [PATCH] CI / macOS: Workaround for bug in Xcode 15.3 which does not
 include m4

See:
- https://github.com/Homebrew/homebrew-core/issues/165388
- https://trac.macports.org/ticket/69639

(cherry picked from commit 31080eed6ce6c623863850d4e2da5f8317f2b5d0)
---
 .gitlab-ci.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9cc7b3f4..233406fc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -48,6 +48,9 @@ build_macos_x86_64:
   tags:
     - macOS
   script:
+    # Workaround for bug in Xcode 15.3 which does not include m4
+    # See https://github.com/Homebrew/homebrew-core/issues/165388 and https://trac.macports.org/ticket/69639
+    - export PATH="/usr/local/opt/m4/bin/:$PATH"
     - arch -x86_64 meson setup -D buildtype=release --native-file scripts/homebrew-native-x86_64.ini build
     - arch -x86_64 meson compile -C build -v
   artifacts:
@@ -60,6 +63,9 @@ build_macos_arm64:
     - macOS
   script:
     - export PATH="/opt/homebrew/bin:$PATH"
+    # Workaround for bug in Xcode 15.3 which does not include m4
+    # See https://github.com/Homebrew/homebrew-core/issues/165388 and https://trac.macports.org/ticket/69639
+    - export PATH="/opt/homebrew/opt/m4/bin/:$PATH"
     - arch -arm64 meson setup -D buildtype=release --native-file scripts/homebrew-native-arm64.ini build
     - arch -arm64 meson compile -C build -v
   artifacts:
-- 
GitLab