Access to information from pkg-config(1)
The module name
The module version
Create a PkgConfig object for the package
name Raises PkgConfig::NotFound if the module does
not exist
# File lib/autobuild/pkgconfig.rb, line 16 def initialize(name) if !system("pkg-config --exists #{name}") raise NotFound.new(name) end @name = name @version = %xpkg-config --modversion #{name}`.chomp.strip @actions = Hash.new @variables = Hash.new end
# File lib/autobuild/pkgconfig.rb, line 35 def method_missing(varname, *args, &proc) if args.empty? @variables[varname] ||= %xpkg-config --variable=#{varname} #{name}`.chomp.strip else super(varname, *args, &proc) end end