Module: OS::Linux::Formula Private

Extended by:
T::Helpers
Included in:
Formula
Defined in:
extend/os/linux/formula.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

#add_global_deps_to_spec(spec) ⇒ void

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.

This method returns an undefined value.

Parameters:



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'extend/os/linux/formula.rb', line 30

def add_global_deps_to_spec(spec)
  return unless ::DevelopmentTools.needs_build_formulae?

  @global_deps ||= begin
    dependency_collector = spec.dependency_collector
    related_formula_names = Set.new([
      name,
      *aliases,
      *versioned_formulae_names,
    ])
    [
      dependency_collector.gcc_dep_if_needed(related_formula_names),
      dependency_collector.glibc_dep_if_needed(related_formula_names),
    ].compact.freeze
  end
  @global_deps.each { |dep| spec.dependency_collector.add(dep) }
end

#deuniversalize_machos(*targets) ⇒ void

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.

This method returns an undefined value.

Parameters:



27
# File 'extend/os/linux/formula.rb', line 27

def deuniversalize_machos(*targets); end

#loader_pathString

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:



22
23
24
# File 'extend/os/linux/formula.rb', line 22

def loader_path
  "$ORIGIN"
end

#shared_library(name, version = nil) ⇒ 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:

  • name (String)
  • version (String, Integer, nil) (defaults to: nil)

Returns:



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

def shared_library(name, version = nil)
  suffix = if version == "*" || (name == "*" && version.blank?)
    "{,.*}"
  elsif version.present?
    ".#{version}"
  end
  "#{name}.so#{suffix}"
end

#valid_platform?Boolean

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:

  • (Boolean)


49
50
51
# File 'extend/os/linux/formula.rb', line 49

def valid_platform?
  requirements.none?(MacOSRequirement)
end