Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add build recipe for TCS

  • Loading branch information...
commit 5eb450c8691495dc7f36d1e1400881bfc87a9053 1 parent 2185058
Justin Baker authored April 21, 2012
30  config/interpreters/tcs.rb
... ...
@@ -0,0 +1,30 @@
  1
+require 'ostruct'
  2
+
  3
+module RubyInstaller
  4
+  INTERPRETERS << RubyTCS = OpenStruct.new(
  5
+    :version => 'tcs-trunk',
  6
+    :short_version => 'tcs',
  7
+    :checkout => 'https://github.com/thecodeshop/ruby.git',
  8
+    :branch => 'tcs-ruby_1_9_3',
  9
+    :checkout_target => 'downloads/tcs',
  10
+    :target => 'sandbox/tcs_1_9',
  11
+    :build_target => 'sandbox/tcs19_build',
  12
+    :install_target => 'sandbox/tcs19_mingw',
  13
+    :patches => 'resources/patches/ruby193',
  14
+    :configure_options => [
  15
+      '--enable-shared',
  16
+      '--disable-install-doc'
  17
+    ],
  18
+    :files => [],
  19
+    :dependencies => [
  20
+      :ffi, :gdbm, :iconv, :openssl, :pdcurses, :yaml, :zlib, :tcl, :tk
  21
+    ],
  22
+      :excludes => [
  23
+        'libcharset1.dll'
  24
+    ],
  25
+  )
  26
+
  27
+  if ENV['branch']
  28
+    RubyTCS.branch = ENV['branch']
  29
+  end
  30
+end
1  rakefile.rb
@@ -16,6 +16,7 @@
16 16
 
17 17
 # RubyInstaller configuration data
18 18
 require 'config/ruby_installer'
  19
+require 'config/interpreters/tcs'
19 20
 
20 21
 # DevKit configuration data
21 22
 require 'config/devkit'
82  recipes/interpreter/tcs.rake
... ...
@@ -0,0 +1,82 @@
  1
+require 'rake'
  2
+require 'rake/clean'
  3
+require 'pathname'
  4
+
  5
+
  6
+namespace(:interpreter) do
  7
+  namespace(:tcs) do
  8
+    package = RubyInstaller::RubyTCS
  9
+
  10
+    Rake::Task['interpreter:tcs:checkout'].clear
  11
+    task :checkout => "downloads" do |t|
  12
+      cd RubyInstaller::ROOT do
  13
+        # If is there already a checkout, update instead of checkout"
  14
+        unless File.exist?(File.join(RubyInstaller::ROOT, package.checkout_target, '.git'))
  15
+          sh "git clone #{package.checkout} #{package.checkout_target}"
  16
+        end
  17
+        cd package.checkout_target do
  18
+          sh "git checkout #{package.branch} && git pull"
  19
+        end
  20
+      end
  21
+    end
  22
+
  23
+    task :clean do
  24
+      rm_rf package.build_target
  25
+      rm_rf package.install_target
  26
+    end
  27
+
  28
+    task :download => [:sources]
  29
+
  30
+    Rake::Task['interpreter:tcs:sources'].clear
  31
+    task :sources do
  32
+
  33
+      unless ENV['LOCAL']
  34
+        Rake::Task["interpreter:#{package.short_version}:checkout"].invoke
  35
+      end
  36
+    end
  37
+
  38
+    Rake::Task['interpreter:tcs:extract'].clear
  39
+    task :extract => [:extract_utils] do
  40
+      if ENV['LOCAL']
  41
+        package.target = File.expand_path(File.join(ENV['LOCAL'], '.'))
  42
+      else
  43
+        package.target = File.expand_path(package.checkout_target)
  44
+      end
  45
+    end
  46
+  end
  47
+end
  48
+
  49
+desc "compile TCS Ruby"
  50
+task :tcs => [
  51
+  'interpreter:tcs:sources',
  52
+  'interpreter:tcs:extract',
  53
+  'interpreter:tcs:prepare',
  54
+  'interpreter:tcs:configure',
  55
+  'interpreter:tcs:compile',
  56
+  'interpreter:tcs:install'
  57
+]
  58
+
  59
+namespace :tcs do
  60
+  task :dependencies => ['interpreter:tcs:dependencies']
  61
+  task :clean => ['interpreter:tcs:clean']
  62
+end
  63
+
  64
+unless ENV["NOGEMS"]
  65
+  # Add rubygems to the chain
  66
+  task :tcs => [:rubygems19]
  67
+end
  68
+
  69
+# Add RubyGems operating system customization
  70
+task :tcs => ['tools:rubygems:hook19']
  71
+
  72
+# add Pure Readline to the chain
  73
+task :tcs => [:rbreadline]
  74
+task :tcs => ['dependencies:rbreadline:install19']
  75
+
  76
+# add tcl/tk installation
  77
+unless ENV["NOTK"]
  78
+  task :tcs => ["dependencies:tk:install19"]
  79
+end
  80
+
  81
+task :check19   => ['tcs:dependencies', 'interpreter:tcs:check']
  82
+task :irb19     => ['tcs:dependencies', 'interpreter:tcs:irb']

0 notes on commit 5eb450c

Please sign in to comment.
Something went wrong with that request. Please try again.