From febcdddf966987bd0d14642b90dbbdb08a7f2bf6 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Sun, 7 Nov 2021 23:32:18 -0500 Subject: [PATCH 1/3] `Keg::Relocation`: allow `-I`, `-L`, `-isystem` prefixes --- Library/Homebrew/keg_relocate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb index a19eca11a2..772acd21b6 100644 --- a/Library/Homebrew/keg_relocate.rb +++ b/Library/Homebrew/keg_relocate.rb @@ -12,7 +12,7 @@ class Keg class Relocation extend T::Sig - RELOCATABLE_PATH_REGEX_PREFIX = /(? Date: Mon, 8 Nov 2021 00:44:57 -0500 Subject: [PATCH 2/3] Add `-F` to allowed prefixes Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> --- Library/Homebrew/keg_relocate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb index 772acd21b6..eaa3f3582b 100644 --- a/Library/Homebrew/keg_relocate.rb +++ b/Library/Homebrew/keg_relocate.rb @@ -12,7 +12,7 @@ class Keg class Relocation extend T::Sig - RELOCATABLE_PATH_REGEX_PREFIX = /(?:(?<=-I|-L|-isystem)|(? Date: Mon, 8 Nov 2021 20:18:25 -0500 Subject: [PATCH 3/3] Fix tests --- Library/Homebrew/test/keg_relocate/relocation_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/test/keg_relocate/relocation_spec.rb b/Library/Homebrew/test/keg_relocate/relocation_spec.rb index c4e0e43a69..36cdbdc18a 100644 --- a/Library/Homebrew/test/keg_relocate/relocation_spec.rb +++ b/Library/Homebrew/test/keg_relocate/relocation_spec.rb @@ -12,8 +12,8 @@ describe Keg::Relocation do let(:cellar_placeholder) { "@@HOMEBREW_CELLAR@@" } let(:repository_placeholder) { "@@HOMEBREW_REPOSITORY@@" } let(:library_placeholder) { "@@HOMEBREW_LIBRARY@@" } - let(:escaped_prefix) { /(?