Module: OS::Linux::DependencyCollector Private

Included in:
DependencyCollector
Defined in:
extend/os/linux/dependency_collector.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

#gcc_dep_if_needed(related_formula_names) ⇒ Dependency?

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:

  • related_formula_names (Set<String>)

Returns:



10
11
12
13
14
15
16
17
18
19
# File 'extend/os/linux/dependency_collector.rb', line 10

def gcc_dep_if_needed(related_formula_names)
  # gcc is required for libgcc_s.so.1 if glibc or gcc are too old
  return unless ::DevelopmentTools.needs_build_formulae?
  return if building_global_dep_tree?
  return if related_formula_names.include?(GCC)
  return if global_dep_tree[GCC]&.intersect?(related_formula_names)
  return unless formula_for(GCC)

  Dependency.new(GCC, [:implicit])
end

#glibc_dep_if_needed(related_formula_names) ⇒ Dependency?

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:

  • related_formula_names (Set<String>)

Returns:



22
23
24
25
26
27
28
29
30
# File 'extend/os/linux/dependency_collector.rb', line 22

def glibc_dep_if_needed(related_formula_names)
  return unless ::DevelopmentTools.needs_libc_formula?
  return if building_global_dep_tree?
  return if related_formula_names.include?(GLIBC)
  return if global_dep_tree[GLIBC]&.intersect?(related_formula_names)
  return unless formula_for(GLIBC)

  Dependency.new(GLIBC, [:implicit])
end