class BuildRecipe

Public Class Methods

new(name, version, files) click to toggle source
Calls superclass method
# File ext/extconf.rb, line 40
def initialize(name, version, files)
        super(name, version)
        self.files = files
        rootdir = File.expand_path('../..', __FILE__)
        self.target = File.join(rootdir, "ports")
        self.patch_files = Dir[File.join(target, "patches", self.name, self.version, "*.patch")].sort
end

Public Instance Methods

configure_prefix() click to toggle source

Add “–prefix=/”, to avoid our actual build install path compiled into the binary. Instead use DESTDIR variable of make to set our install path.

# File ext/extconf.rb, line 54
def configure_prefix
        "--prefix="
end
cook_and_activate() click to toggle source
# File ext/extconf.rb, line 58
def cook_and_activate
        checkpoint = File.join(self.target, "#{self.name}-#{self.version}-#{RUBY_PLATFORM}.installed")
        unless File.exist?(checkpoint)
                self.cook
                FileUtils.touch checkpoint
        end
        self.activate
        self
end
port_path() click to toggle source
# File ext/extconf.rb, line 48
def port_path
        "#{target}/#{RUBY_PLATFORM}"
end