Module: Rubycc::Pkgconf

Defined in:
lib/rubycc/pkgconf/cli.rb,
lib/rubycc/pkgconf/model.rb,
lib/rubycc/pkgconf/errors.rb,
lib/rubycc/pkgconf/parser.rb,
lib/rubycc/pkgconf/resolver.rb,
lib/rubycc/pkgconf/search_path.rb,
lib/rubycc/pkgconf/system_path_filter.rb

Defined Under Namespace

Modules: SearchPath Classes: Cli, NotFoundError, Package, ParseError, Parser, PkgconfError, Resolver, SystemPathFilter, UnsupportedError

Constant Summary collapse

PROG =
"rubycc-pkgconf"
KNOWN_OPTIONS =

The exact option vocabulary mkmf's mkmf.rb#pkg_config can invoke $PKGCONFIG with (tallied against this environment's mkmf.rb — see the Step 59 report): --exists to probe availability, and, as --#{option} for each entry of pkg_config's own *options argument or of its built-in default path, --modversion/--cflags/--cflags-only-I/ --cflags-only-other/--libs/--libs-only-l. No other pkg-config option (--static, --print-requires, ...) is in scope.

%w[exists modversion cflags cflags-only-I cflags-only-other libs libs-only-l].freeze

Class Method Summary collapse

Class Method Details

.run(argv, stdout: $stdout, stderr: $stderr, resolver: Resolver.new, filter: SystemPathFilter.new) ⇒ Object

Runs the shim for argv and returns the process exit status: 0 on success, 1 if a named module (or one of its Requires) cannot be found, the .pc text is malformed, or an unknown option/no module was given — the same pass/fail contract mkmf's xsystem(... "--exists" ...) and get calls rely on.



21
22
23
# File 'lib/rubycc/pkgconf/cli.rb', line 21

def self.run(argv, stdout: $stdout, stderr: $stderr, resolver: Resolver.new, filter: SystemPathFilter.new)
  Cli.new(argv, stdout: stdout, stderr: stderr, resolver: resolver, filter: filter).run
end