Skip to content

Commit

Permalink
Merge pull request #2450 from Homebrew/revert-2036-rust-hack
Browse files Browse the repository at this point in the history
Revert "keg_relocate: Don't relocate dylib IDs containing metavariables."
  • Loading branch information
MikeMcQuaid authored Apr 4, 2017
2 parents 2ba53eb + 7151326 commit 36a3407
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Library/Homebrew/extend/os/mac/keg_relocate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,13 @@ def fixed_name(file, bad_name)
end
end

def filename_contains_metavariable?(fn)
fn =~ /^@(loader_|executable_|r)path/
end

def each_install_name_for(file, &block)
dylibs = file.dynamically_linked_libraries
dylibs.reject! { |fn| filename_contains_metavariable?(fn) }
dylibs.reject! { |fn| fn =~ /^@(loader_|executable_|r)path/ }
dylibs.each(&block)
end

def dylib_id_for(file)
return file.dylib_id if filename_contains_metavariable?(file.dylib_id)

# The new dylib ID should have the same basename as the old dylib ID, not
# the basename of the file itself.
basename = File.basename(file.dylib_id)
Expand Down

0 comments on commit 36a3407

Please sign in to comment.