Sha256: ef2a3d73c00f26dbf00e77ee64338014f12d92ad210aa257c27cc78130eb8b5c

Contents?: true

Size: 1.22 KB

Versions: 52

Compression:

Stored size: 1.22 KB

Contents

require "rake/clean"
require "rake/extensioncompiler"
require "mini_portile"

$recipes = {}

$recipes[:sqlite3] = MiniPortile.new "sqlite3", BINARY_VERSION
$recipes[:sqlite3].files << "http://sqlite.org/sqlite-autoconf-#{URL_VERSION}.tar.gz"

namespace :ports do
  directory "ports"

  desc "Install port sqlite3 #{$recipes[:sqlite3].version}"
  task :sqlite3 => ["ports"] do |t|
    recipe = $recipes[:sqlite3]
    checkpoint = "ports/.#{recipe.name}-#{recipe.version}-#{recipe.host}.installed"

    unless File.exist?(checkpoint)
      cflags = "-O2 -DSQLITE_ENABLE_COLUMN_METADATA"
      cflags << " -fPIC" if recipe.host.include?("x86_64")
      recipe.configure_options << "CFLAGS='#{cflags}'"
      recipe.cook
      touch checkpoint
    end

    recipe.activate
  end
end

if RUBY_PLATFORM =~ /mingw/
  Rake::Task['compile'].prerequisites.unshift "ports:sqlite3"
end

if ENV["USE_MINI_PORTILE"] == "true"
  Rake::Task["compile"].prerequisites.unshift "ports:sqlite3"
end

task :cross do
  host = ENV.fetch("HOST", Rake::ExtensionCompiler.mingw_host)
  $recipes.each do |_, recipe|
    recipe.host = host
  end

  # hook compile task with dependencies
  Rake::Task["compile"].prerequisites.unshift "ports:sqlite3"
end

CLOBBER.include("ports")

Version data entries

52 entries across 46 versions & 7 rubygems

Version Path
challah-1.0.0.beta vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.9.1.beta.3 vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.9.1.beta vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.9.0 vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-rolls-0.2.0 vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.8.3 vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
femto-sqlite3-1.3.7 tasks/vendor_sqlite3.rake
challah-0.8.1 vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-rolls-0.1.0 vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-rolls-0.1.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.8.0.pre vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.7.1 vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.7.0 vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.7.0.pre2 vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.7.0.pre vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.6.2 vendor/bundle/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake
challah-0.6.2 vendor/bundle/gems/sqlite3-1.3.5/tasks/vendor_sqlite3.rake
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6/tasks/vendor_sqlite3.rake