Class: Autobuild::InstalledPkgConfig

Inherits:
Package
  • Object
show all
Defined in:
lib/autobuild/packages/pkgconfig.rb

Instance Attribute Summary collapse

Attributes inherited from Package

#dependencies, #env, #failures, #importdir, #importer, #logdir, #name, #srcdir, #statistics, #update, #updated, #utilities

Instance Method Summary collapse

Methods inherited from Package

[], #add_env_op, #add_stat, #all_dependencies, #applied_post_install?, #apply_env, #apply_post_install, #checked_out?, clear, #depends_on, #depends_on?, #disable, #disable_doc, #disable_phases, #disabled?, #doc_dir, #doc_dir=, #doc_disabled, #doc_target_dir, #doc_target_dir=, #doc_task, each, #enable_doc, #env_add, #env_add_path, #env_add_prefix, #env_set, #env_source_after, #error, #failed?, #file, #find_in_path, #fingerprint, #full_env, #generates_doc?, #has_doc?, #import, #import=, #import_invoked?, #imported?, #in_dir, #inspect, #install, #install_doc, #install_invoked?, #installed?, #isolate_errors, #message, #method_missing, #parallel_build_level, #parallel_build_level=, #post_install, #prepare, #prepare_for_forced_build, #prepare_for_rebuild, #process_formatting_string, #progress, #progress_done, #progress_start, #provides, #resolve_dependency_env, #resolved_env, #respond_to_missing?, #run, #self_fingerprint, #source_tree, #task, #to_s, #update?, #update_environment, #updated?, #utility, #warn, #working_directory

Constructor Details

#initialize(name) ⇒ InstalledPkgConfig

Returns a new instance of InstalledPkgConfig.



7
8
9
10
11
# File 'lib/autobuild/packages/pkgconfig.rb', line 7

def initialize(name)
    @pkgconfig = PkgConfig.new(name)
    @prefix    = @pkgconfig.prefix
    super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Autobuild::Package

Instance Attribute Details

#pkgconfigObject (readonly)

Returns the value of attribute pkgconfig.



5
6
7
# File 'lib/autobuild/packages/pkgconfig.rb', line 5

def pkgconfig
  @pkgconfig
end

#prefixObject (readonly)

Returns the value of attribute prefix.



5
6
7
# File 'lib/autobuild/packages/pkgconfig.rb', line 5

def prefix
  @prefix
end

Instance Method Details

#installstampObject



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/autobuild/packages/pkgconfig.rb', line 13

def installstamp
    std_stamp = super
    return std_stamp if File.file?(std_stamp)

    pcfile = File.join(pkgconfig.prefix, "lib", "pkgconfig", "#{name}.pc")
    unless File.file?(pcfile)
        raise "cannot find the .pc file for #{name}, tried #{pcfile}"
    end

    pcfile
end