Object
# File lib/pkg-config.rb, line 43 def clear_configure_args_cache @native_pkg_config = nil @custom_override_variables = nil end
# File lib/pkg-config.rb, line 39 def custom_override_variables @custom_override_variables ||= with_config("override-variables", "") end
# File lib/pkg-config.rb, line 34 def native_pkg_config @native_pkg_config ||= guess_native_pkg_config end
# File lib/pkg-config.rb, line 110 def initialize(name, options={}) @name = name @options = options path = @options[:path] || ENV["PKG_CONFIG_PATH"] @paths = [path, guess_default_path].compact.join(SEPARATOR).split(SEPARATOR) @paths.unshift(*(@options[:paths] || [])) @paths = normalize_paths(@paths) @msvc_syntax = @options[:msvc_syntax] @variables = @declarations = nil override_variables = self.class.custom_override_variables @override_variables = parse_override_variables(override_variables) default_override_variables = @options[:override_variables] || {} @override_variables = default_override_variables.merge(@override_variables) end
# File lib/pkg-config.rb, line 137 def cflags path_flags, other_flags = collect_cflags (other_flags + path_flags).join(" ") end
# File lib/pkg-config.rb, line 142 def cflags_only_I collect_cflags[0].join(" ") end
# File lib/pkg-config.rb, line 184 def declaration(name) parse_pc if @declarations.nil? expand_value(@declarations[name]) end
# File lib/pkg-config.rb, line 175 def description declaration("Description") end
# File lib/pkg-config.rb, line 146 def libs path_flags, other_flags = collect_libs (path_flags + other_flags).join(" ") end
# File lib/pkg-config.rb, line 161 def libs_only_L collect_libs[0].find_all do |arg| if @msvc_syntax /\A\/libpath:/ =~ arg else /\A-L/ =~ arg end end.join(" ") end
# File lib/pkg-config.rb, line 151 def libs_only_l collect_libs[1].find_all do |arg| if @msvc_syntax /\.lib\z/ =~ arg else /\A-l/ =~ arg end end.join(" ") end
# File lib/pkg-config.rb, line 189 def pc_path @paths.each do |path| _pc_path = File.join(path, "#{@name}.pc") return _pc_path if File.exist?(_pc_path) end nil end
# File lib/pkg-config.rb, line 129 def requires parse_requires(declaration("Requires")) end
# File lib/pkg-config.rb, line 133 def requires_private parse_requires(declaration("Requires.private")) end
Generated with the Darkfish Rdoc Generator 2.