From d679e46ada34eba7be354bc53e6499da27932bf2 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Wed, 9 Aug 2023 09:09:09 +0200
Subject: [PATCH] CONFIG: adjust rpath values (#2948)

- drop compile-time paths for FOAM_SITE_LIBBIN and FOAM_LIBBIN as well.
  The handling of 'site' is likely too fragile if anything is relocated.
  The project libraries are covered via @loader_path anyhow.
---
 wmake/rules/darwin64Clang/rpath | 26 +++-----------------------
 1 file changed, 3 insertions(+), 23 deletions(-)

diff --git a/wmake/rules/darwin64Clang/rpath b/wmake/rules/darwin64Clang/rpath
index e29f5f96366..834b8f16934 100644
--- a/wmake/rules/darwin64Clang/rpath
+++ b/wmake/rules/darwin64Clang/rpath
@@ -9,22 +9,7 @@ endif
 
 PROJECT_RPATH :=
 
-# No user libraries (FOAM_USER_LIBBIN) - too fragile
-
-# group libraries
-ifneq (,$(strip $(FOAM_SITE_LIBBIN)))
-    PROJECT_RPATH += -rpath $(FOAM_SITE_LIBBIN)
-endif
-
-# project libraries - serial and mpi-specific
-ifneq (,$(strip $(FOAM_LIBBIN)))
-    ifneq (dummy,$(strip $(FOAM_MPI)))
-        PROJECT_RPATH += -rpath $(FOAM_LIBBIN)/$(FOAM_MPI)
-    endif
-    PROJECT_RPATH += -rpath $(FOAM_LIBBIN)
-endif
-
-# ThirdParty serial and mpi-specific libraries
+# ThirdParty libraries (FOAM_EXT_LIBBIN) : mpi-specific and serial
 ifneq (,$(strip $(FOAM_EXT_LIBBIN)))
     ifneq (dummy,$(strip $(FOAM_MPI)))
         PROJECT_RPATH += -rpath $(FOAM_EXT_LIBBIN)/$(FOAM_MPI)
@@ -32,19 +17,14 @@ ifneq (,$(strip $(FOAM_EXT_LIBBIN)))
     PROJECT_RPATH += -rpath $(FOAM_EXT_LIBBIN)
 endif
 
-
-# Largely as above, but with MacOS relative rpath:
-# Encode as @loader_path and recompose as @executable_path as needed
-
+# project libraries (FOAM_LIBBIN) : mpi-specific and serial
+# encode as @loader_path and recompose as @executable_path as needed
 ifneq (dummy,$(strip $(FOAM_MPI)))
     PROJECT_RPATH += -rpath @loader_path/$(FOAM_MPI)
 endif
 PROJECT_RPATH += -rpath @loader_path
 
 # Fallback for stubs libraries (largely for missing MPI) - to be found last
-ifneq (,$(strip $(FOAM_LIBBIN)))
-    PROJECT_RPATH += -rpath $(FOAM_LIBBIN)/dummy
-endif
 PROJECT_RPATH += -rpath @loader_path/dummy
 
 #------------------------------------------------------------------------------
-- 
GitLab