Sha256: de83418d2e332a0e97788513a655b60cfb5944ae8affcde83dce3c4c724460cb

Contents?: true

Size: 746 Bytes

Versions: 5

Compression:

Stored size: 746 Bytes

Contents

require 'autobuild/pkgconfig'

module Autobuild
    class InstalledPkgConfig < Package
        attr_reader :pkgconfig, :prefix

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

        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
    end

    def self.installed_pkgconfig(name, &block)
        InstalledPkgConfig.new(name, &block)
    end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
autobuild-1.24.0 lib/autobuild/packages/pkgconfig.rb
autobuild-1.23.1 lib/autobuild/packages/pkgconfig.rb
autobuild-1.23.0 lib/autobuild/packages/pkgconfig.rb
autobuild-1.22.1 lib/autobuild/packages/pkgconfig.rb
autobuild-1.22.0 lib/autobuild/packages/pkgconfig.rb