Sha256: 48ff1f4aefa64c48e940706f8872604548844e8e952f5742103207f9f0a6d2e7

Contents?: true

Size: 957 Bytes

Versions: 46

Compression:

Stored size: 957 Bytes

Contents

# encoding: UTF-8
require 'mini_portile2'
require 'fileutils'
require 'rbconfig'

module Ports
  class Recipe < MiniPortile
    def cook
      checkpoint = "ports/#{name}-#{version}-#{host}.installed"

      unless File.exist? checkpoint
        super
        FileUtils.touch checkpoint
      end
    end

    private

    def configure_defaults
      [
        "--host=#{@host}",
        '--disable-static',
        '--enable-shared'
      ]
    end

    def windows?
      host =~ /mswin|mingw32/
    end

    def system_host
      RbConfig::CONFIG['host']
    end

    def cross_build?
      host != system_host
    end

    def get_patches(libname, version)
      patches = []
  
      patch_path = File.expand_path(
        File.join('..','..','..','patches',libname,version), 
        __FILE__
      )

      patches.concat(Dir[File.join(patch_path, '*.patch')].sort)
      patches.concat(Dir[File.join(patch_path, '*.diff')].sort)
    end
  end
end

Version data entries

46 entries across 46 versions & 2 rubygems

Version Path
tiny_tds-2.1.5-x64-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.5-x86-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.5 tasks/ports/recipe.rb
tiny_tds-2.1.4-x64-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.4-x86-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.4 tasks/ports/recipe.rb
tiny_tds-2.1.4.pre2-x64-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.4.pre2-x86-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.4.pre2 tasks/ports/recipe.rb
tiny_tds-2.1.4.pre-x64-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.4.pre-x86-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.4.pre tasks/ports/recipe.rb
tiny_tds-2.1.3-x64-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.3-x86-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.3 tasks/ports/recipe.rb
tiny_tds-2.1.3.pre-x86-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.3.pre-x64-mingw32 tasks/ports/recipe.rb
tiny_tds-2.1.3.pre tasks/ports/recipe.rb
vm_tiny_tds-2.1.2 tasks/ports/recipe.rb
tiny_tds-2.1.2-x86-mingw32 tasks/ports/recipe.rb