OLD | NEW |
1 require 'rubygems' | 1 require 'rubygems' |
2 require 'rake/gempackagetask' | 2 require 'rake/gempackagetask' |
3 require 'rubygems/specification' | 3 require 'rubygems/specification' |
4 require 'date' | 4 require 'date' |
5 require 'erb' | 5 require 'erb' |
6 require 'fileutils' | 6 require 'fileutils' |
7 | 7 |
8 ROOT = File.expand_path(File.dirname(__FILE__)) | 8 ROOT = File.expand_path(File.dirname(__FILE__)) |
9 require "#{ROOT}/lib/appengine-jruby-jars" | 9 require "#{ROOT}/lib/appengine-jruby-jars" |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 check_system("jar", "xf", File.join(ROOT, JRUBY_COMPLETE)) | 63 check_system("jar", "xf", File.join(ROOT, JRUBY_COMPLETE)) |
64 chdir(one_eight) do | 64 chdir(one_eight) do |
65 gems_files = Dir.glob("rubygems*") | 65 gems_files = Dir.glob("rubygems*") |
66 check_system('jar', 'cf', File.join(ROOT, RUBYGEMS_JAR), *gems_files) | 66 check_system('jar', 'cf', File.join(ROOT, RUBYGEMS_JAR), *gems_files) |
67 rm_rf(gems_files) | 67 rm_rf(gems_files) |
68 end | 68 end |
69 rm_rf("META-INF/jruby.home/lib/ruby/gems") | 69 rm_rf("META-INF/jruby.home/lib/ruby/gems") |
70 rm_rf("META-INF/jruby.home/lib/ruby/site_ruby/shared/ffi") | 70 rm_rf("META-INF/jruby.home/lib/ruby/site_ruby/shared/ffi") |
71 rm_rf("org/jruby/ext/ffi") | 71 rm_rf("org/jruby/ext/ffi") |
72 rm_rf("com/kenai/jffi") | 72 rm_rf("com/kenai/jffi") |
| 73 # patch JavaClass to avoid setAccessible penalty |
| 74 hacked = Dir.glob('../mod/jruby-1.4.0/build/classes/jruby/' + |
| 75 'org/jruby/javasupport/JavaClass*.class') |
| 76 cp_r(hacked, 'org/jruby/javasupport') |
73 # prune the limited openssl warning | 77 # prune the limited openssl warning |
74 if JRUBY_VERSION.eql?('1.4.0') | 78 if JRUBY_VERSION.eql?('1.4.0') |
75 nice_file = '__fixed__' | 79 nice_file = '__fixed__' |
76 warn_file = "#{shared}/jruby/openssl/builtin.rb" | 80 warn_file = "#{shared}/jruby/openssl/builtin.rb" |
77 all_lines = IO.readlines(warn_file) | 81 all_lines = IO.readlines(warn_file) |
78 open(nice_file, 'w') do |file| | 82 open(nice_file, 'w') do |file| |
79 file.puts(all_lines[0..-5] + all_lines[-2..-1]) | 83 file.puts(all_lines[0..-5] + all_lines[-2..-1]) |
80 end | 84 end |
81 mv(nice_file, warn_file) | 85 mv(nice_file, warn_file) |
82 end | 86 end |
(...skipping 26 matching lines...) Expand all Loading... |
109 task :install => [:package] do | 113 task :install => [:package] do |
110 sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}} | 114 sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}} |
111 end | 115 end |
112 | 116 |
113 desc "create a gemspec file" | 117 desc "create a gemspec file" |
114 task :make_spec do | 118 task :make_spec do |
115 open("#{GEM}.gemspec", "w") do |file| | 119 open("#{GEM}.gemspec", "w") do |file| |
116 file.puts spec.to_ruby | 120 file.puts spec.to_ruby |
117 end | 121 end |
118 end | 122 end |
OLD | NEW |