module BuildRecipeCommons

LIBFXSCINTILLA_VERSION = ENV || ‘3.5.2’ LIBFXSCINTILLA_SOURCE_URI = “github.com/yetanothergeek/fxscintilla/archive/FXSCINTILLA-#{LIBFXSCINTILLA_VERSION.gsub(”.“,”_“)}.tar.gz”

Public Class Methods

new(name, version, files) click to toggle source
Calls superclass method
# File ext/fox16_c/extconf.rb, line 47
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["host"]
  self.patch_files = Dir[File.join(rootdir, "patches", self.name, self.version, "*.diff")].sort
end

Public Instance Methods

chdir_for_build() { || ... } click to toggle source

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.

# File ext/fox16_c/extconf.rb, line 63
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
cook_and_activate() click to toggle source
# File ext/fox16_c/extconf.rb, line 70
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
port_path() click to toggle source
# File ext/fox16_c/extconf.rb, line 56
def port_path
  "#{target}/#{RUBY_PLATFORM}"
end