From 01c24df8f02c2860313d7c31ad0dc4479e16e3c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Eric=20M=C3=BCller?= <mueller@kip.uni-heidelberg.de>
Date: Thu, 7 Mar 2024 12:49:24 +0100
Subject: [PATCH] fix(bazel): build on ju{suf,reca}

---
 packages/bazel/package.py | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/packages/bazel/package.py b/packages/bazel/package.py
index 72e562ca..c9119da8 100644
--- a/packages/bazel/package.py
+++ b/packages/bazel/package.py
@@ -439,7 +439,9 @@ class Bazel(Package):
     patch("cc_configure-0.3.0.patch", when="@0.3:0.4")
 
     # Set CC and CXX
-    patch("compile-0.29.patch", when="@0.29:")
+    # begin EBRAINS: modified, bring upstream after checking since when this is breaking the build
+    patch("compile-0.29.patch", when="@0.29:5.3")
+    # end EBRAINS
     patch("compile-0.21.patch", when="@0.21:0.28")
     patch("compile-0.16.patch", when="@0.16:0.20")
     patch("compile-0.13.patch", when="@0.13:0.15")
@@ -527,8 +529,11 @@ class Bazel(Package):
             "--color=no --host_javabase=@local_jdk//:jdk"
             # Enable verbose output for failures
             " --verbose_failures"
-            # expose LD_LIBRARY_PATH (to fix protoc runtime error during build)
-            " --action_env=LD_LIBRARY_PATH"
+            # begin EBRAINS: modified, bring upstream after checking since when the compile-x.patch is breaking the build
+            # expose CC and CXX (the spack compiler wrappers)
+            " --action_env=CC"
+            " --action_env=CXX"
+            # end EBRAINS
             " --jobs={0}".format(make_jobs),
         )
 
-- 
GitLab