class CBuildGems::Build
Attributes
A hash with a value that is an array to binaries. @see Build#config_out
Returns an array for the YAML key c_flags
used to get data for compiler flags.
Returns a hash for the YAML key complier_opts
used to get data for compiler options. including the complier being used(gcc, clang etc.).
Returns a string with the name of the header file with the configuration macros.
Returns a hash for the YAML key config_out
used to get data for configuration output data such as binaries, version numbers, package URLs, and bug report URLs.
Returns a hash read in from the configuration YAML file.
A hash with a value that is an array to include header files. @see Build#complier_opts
A hash with a value that is an array to issues urls of the binaries. @see Build#config_out
A hash with a value that is an array to libs. @see Build#complier_opts
A hash with a value that is an array to package urls of the binaries. @see Build#config_out
Returns an array for the YAML key pkg_config
used to get data for packages that the software depends.
A hash with a value that is an array to pkg-config libs & flags. @see Build#complier_opts
A hash with a value that is an array to source code path. @see Build#complier_opts
A hash with a value that is an array to versions numbers of the binaries. @see Build#config_out
Public Class Methods
Executes a system command. It returns true if the command is succesful. It returns false if the command execution fails or gets a non zero exit status. If the former is true then the exit status in the built in global variable $? is printed to stdout. $? is either nil or Process::Status and in this case it will be Process::Status so it can used as needed following a failed execution.
@param exec_str [String] the system command string. @return [Bool] true or false.
# File lib/build.rb, line 57 def self.exec(exec_str) status = system(exec_str) case status when nil puts $? return false when false return status else return true end end
# File lib/build.rb, line 71 def initialize(config_yml) output = File.new(config_yml, 'r') @hash = YAML.load(output.read) output.close @config_out = @hash["config_out"] @c_flags = @hash["c_flags"] @config_header = @hash["config_header"] @pkg_config = @hash["pkg_config"] @config_files = @hash["config_files"] @complier_opts = @hash["complier_opts"] @bins = @config_out["bins"] @versions = @config_out["versions"] @package_urls = @config_out["package_urls"] @issues_urls = @config_out["issues_urls"] @pkgc = @complier_opts["pkg_config"] @include = @complier_opts["include"] @libs = @complier_opts["libs"] @src = @complier_opts["src"] end