module BuildRecipeCommons
Public Class Methods
Source
# File ext/fox16_c/extconf.rb, line 48 def initialize(name, version, files) super(name, version) self.files = files rootdir = File.expand_path('../../..', __FILE__) self.target = File.join(rootdir, "ports") self.host = RbConfig::CONFIG["CC"].match(/(.*)-/)[1] self.patch_files = Dir[File.join(rootdir, "patches", self.name, self.version, "*.patch")].sort end
Calls superclass method
Public Instance Methods
Source
# File ext/fox16_c/extconf.rb, line 64 def chdir_for_build build_dir = ENV['RCD_HOST_RUBY_PLATFORM'].to_s =~ /mingw|mswin|cygwin/ ? '/tmp' : '.' Dir.chdir(build_dir) do yield end end
When using rake-compiler-dock on Windows, the underlying Virtualbox shared folders don’t support symlinks, but libiconv expects it for a build on Linux. We work around this limitation by using the temp dir for cooking.
Source
# File ext/fox16_c/extconf.rb, line 71 def cook_and_activate checkpoint = File.join(self.target, "#{self.name}-#{self.version}-#{RUBY_PLATFORM}.installed") unless File.exist?(checkpoint) chdir_for_build do self.cook end FileUtils.touch checkpoint end self.activate self end
Source
# File ext/fox16_c/extconf.rb, line 57 def port_path "#{target}/#{RUBY_PLATFORM}" end