Module: OS::Mac::Keg::ClassMethods Private

Defined in:
extend/os/mac/keg.rb,
extend/os/mac/keg_relocate.rb

This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

Instance Method Summary collapse

Instance Method Details

#file_linked_libraries(file, string) ⇒ Object

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.



12
13
14
15
16
17
18
19
20
# File 'extend/os/mac/keg_relocate.rb', line 12

def file_linked_libraries(file, string)
  # Check dynamic library linkage. Importantly, do not perform for static
  # libraries, which will falsely report "linkage" to themselves.
  if file.mach_o_executable? || file.dylib? || file.mach_o_bundle?
    file.dynamically_linked_libraries.select { |lib| lib.include? string }
  else
    []
  end
end


12
13
14
# File 'extend/os/mac/keg.rb', line 12

def keg_link_directories
  @keg_link_directories ||= (super + ["Frameworks"]).freeze
end

#must_be_writable_directoriesObject



30
31
32
33
34
35
# File 'extend/os/mac/keg.rb', line 30

def must_be_writable_directories
  @must_be_writable_directories ||= (
    super +
    [HOMEBREW_PREFIX/"Frameworks"]
  ).sort.uniq.freeze
end

#must_exist_directoriesObject



23
24
25
26
27
28
# File 'extend/os/mac/keg.rb', line 23

def must_exist_directories
  @must_exist_directories = (
    super +
    [HOMEBREW_PREFIX/"Frameworks"]
  ).sort.uniq.freeze
end

#must_exist_subdirectoriesObject



16
17
18
19
20
21
# File 'extend/os/mac/keg.rb', line 16

def must_exist_subdirectories
  @must_exist_subdirectories ||= (
    super +
    [HOMEBREW_PREFIX/"Frameworks"]
  ).sort.uniq.freeze
end