From 59ef06f24b2a8eaebcc46966435625bf55ee55a3 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 20 Mar 2023 21:14:09 -0400 Subject: [PATCH] I swear this is a new edge case --- share/brewkit/fix-machos.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/brewkit/fix-machos.rb b/share/brewkit/fix-machos.rb index 3b161ccd..abde1f70 100755 --- a/share/brewkit/fix-machos.rb +++ b/share/brewkit/fix-machos.rb @@ -150,11 +150,13 @@ def fix_install_names return if bad_names.empty? def fix_tea_prefix s - puts s s = Pathname.new(s).relative_path_from(Pathname.new($tea_prefix)) s = s.sub(%r{/v(\d+)\.(\d+\.)+\d+[a-z]?/}, '/v\1/') - s = s.sub(%r{[-.]\d+(\.\d+)*\.dylib$}, '.dylib') #FIXME we need to figure this out by resolving links and shit - puts s + + #FIXME we need to figure this out by resolving links and shit + ss = s.sub(%r{[-.]\d+(\.\d+)*\.dylib$}, '.dylib') + s = ss if File.exist? ss + s = "@rpath/#{s}" return s end