Class: BuildRecipe
- Inherits:
-
MiniPortile
- Object
- MiniPortile
- BuildRecipe
- Defined in:
- ext/tiny_tds/extconf.rb
Instance Attribute Summary collapse
-
#gem_platform ⇒ Object
Returns the value of attribute gem_platform.
Instance Method Summary collapse
- #cook_and_activate ⇒ Object
-
#initialize(name, version, files) ⇒ BuildRecipe
constructor
A new instance of BuildRecipe.
-
#port_path ⇒ Object
this will yield all ports into the same directory, making our path configuration for the linker easier.
Constructor Details
#initialize(name, version, files) ⇒ BuildRecipe
Returns a new instance of BuildRecipe.
23 24 25 26 27 28 29 |
# File 'ext/tiny_tds/extconf.rb', line 23 def initialize(name, version, files) super(name, version) self.files = files rootdir = File.("../../..", __FILE__) self.target = File.join(rootdir, "ports") self.patch_files = Dir[File.join("patches", self.name, self.version, "*.patch")].sort end |
Instance Attribute Details
#gem_platform ⇒ Object
Returns the value of attribute gem_platform.
21 22 23 |
# File 'ext/tiny_tds/extconf.rb', line 21 def gem_platform @gem_platform end |
Instance Method Details
#cook_and_activate ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'ext/tiny_tds/extconf.rb', line 36 def cook_and_activate checkpoint = File.join(target, "#{name}-#{version}-#{gem_platform}.installed") unless File.exist?(checkpoint) cook FileUtils.touch checkpoint end activate self end |
#port_path ⇒ Object
this will yield all ports into the same directory, making our path configuration for the linker easier
32 33 34 |
# File 'ext/tiny_tds/extconf.rb', line 32 def port_path "#{@target}/#{gem_platform}" end |