class BuildRecipe
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 49 def initialize(name, version, files) super(name, version) self.files = files rootdir = File.expand_path('../../..', __FILE__) self.target = File.join(rootdir, "ports") # Prefer host_alias over host in order to use i586-mingw32msvc as # correct compiler prefix for cross build, but use host if not set. self.host = consolidated_host(RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]) 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 79 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
configure_defaults()
click to toggle source
# File ext/fox16_c/extconf.rb, line 64 def configure_defaults [ "--host=#{host}", # build for specific target (host) "--disable-static", "--enable-shared", ] end
consolidated_host(name)
click to toggle source
# File ext/fox16_c/extconf.rb, line 60 def consolidated_host(name) name.gsub('i686-pc-mingw32', 'i586-mingw32msvc') end
cook_and_activate()
click to toggle source
# File ext/fox16_c/extconf.rb, line 86 def cook_and_activate checkpoint = File.join(self.target, "#{self.name}-#{self.version}-#{self.host}.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 72 def port_path "#{target}/#{host}" end