From bf4ad449bb1f69cf52894018546621f453a4c839 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Fri, 7 May 2021 14:11:11 +0100 Subject: [PATCH] formula_installer: set `HOMEBREW_RELOCATE_RPATHS` This enables `RPATH` relocation upon pouring bottles. Part of #11329. --- Library/Homebrew/formula_installer.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index b33601b826..a629bbd545 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -1156,7 +1156,11 @@ class FormulaInstaller end skip_linkage = formula.bottle_specification.skip_relocation? - keg.replace_placeholders_with_locations tab.changed_files, skip_linkage: skip_linkage + # TODO: Remove `with_env` when bottles are built with RPATH relocation enabled + # https://github.com/Homebrew/brew/issues/11329 + with_env(HOMEBREW_RELOCATE_RPATHS: "1") do + keg.replace_placeholders_with_locations tab.changed_files, skip_linkage: skip_linkage + end # fill in missing/outdated parts of the tab # keep in sync with Tab#to_bottle_json