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) ⇒ Array<String>

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.

Parameters:

Returns:



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'extend/os/mac/keg_relocate.rb', line 13

def file_linked_libraries(file, string)
  file = MachOPathname.wrap(file)

  # Check dynamic library linkage. Importantly, do not perform for static
  # libraries, which will falsely report "linkage" to themselves.
  # Only the raw load-command names matter: resolving `@rpath` or
  # `@loader_path` references against the live keg turns
  # relocatable-by-construction linkage into absolute build-prefix
  # paths and wrongly pins bottles, while genuinely unplaceholdered
  # names contain the prefix in their raw form already.
  if file.mach_o_executable? || file.dylib? || file.mach_o_bundle?
    file.dynamically_linked_libraries(resolve_variable_references: false).select { |lib| lib.include? string }
  else
    []
  end
end

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.

Returns:



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

def keg_link_directories
  @keg_link_directories ||= T.let([*super, "Frameworks"].freeze, T.nilable(T::Array[String]))
end

#must_be_writable_directories ⇒ Array<::Pathname>

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.

Returns:



28
29
30
# File 'extend/os/mac/keg.rb', line 28

def must_be_writable_directories
  @must_be_writable_directories ||= T.let(with_frameworks_directory(super), T.nilable(T::Array[::Pathname]))
end

#must_exist_directories ⇒ Array<::Pathname>

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.

Returns:



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

def must_exist_directories
  @must_exist_directories ||= T.let(with_frameworks_directory(super), T.nilable(T::Array[::Pathname]))
end

#must_exist_subdirectories ⇒ Array<::Pathname>

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.

Returns:



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

def must_exist_subdirectories
  @must_exist_subdirectories ||= T.let(with_frameworks_directory(super), T.nilable(T::Array[::Pathname]))
end