1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

switch to using jeweler from newgem/hoe

This commit is contained in:
Charles Lowell 2010-02-11 16:39:51 -06:00
parent 46884208ed
commit 9c81b461fa
4 changed files with 692 additions and 1239 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,32 +1,45 @@
require 'rubygems' require 'rubygems'
gem 'hoe', '>= 2.1.0'
require 'hoe' UPSTREAM = "ext/v8/upstream"
require 'fileutils' SCONS = "#{UPSTREAM}/scons"
V8_SRC = "#{UPSTREAM}/2.0.6"
begin begin
require './lib/v8' require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = gemspec.rubyforge_project = "therubyracer"
gemspec.version = "0.4.9"
gemspec.summary = "Embed the V8 Javascript interpreter into Ruby"
gemspec.description = "Call javascript code and manipulate javascript objects from ruby. Call ruby code and manipulate ruby objects from javascript."
gemspec.email = "cowboyd@thefrontside.net"
gemspec.homepage = "http://github.com/cowboyd/therubyracer"
gemspec.authors = ["Charles Lowell", "Bill Robertson"]
gemspec.extra_rdoc_files = ["README.rdoc"]
gemspec.files.exclude "ext/**/test/*", "ext/**/samples/*", "ext/**/benchmarks/*", "ext/**/*.o", "ext/**/*.o", "#{SCONS}/build", "#{SCONS}/install"
end
rescue LoadError rescue LoadError
#it will fail to load if we don't have the extensions compiled yet puts "Jeweler not available. Install it with: gem install jeweler"
end end
gem 'rake-compiler', '>= 0.4.1' begin
require "rake/extensiontask" gem 'rake-compiler', '>= 0.4.1'
require "rake/extensiontask"
Rake::ExtensionTask.new("v8", eval("#{Rake.application.jeweler.gemspec.to_ruby}")) do |ext|
Hoe.plugin :newgem ext.lib_dir = "lib/v8"
ext.source_pattern = "*.{cpp,h}"
# Generate all the Rake tasks end
# Run 'rake -T' to see list of generated tasks (from gem root directory) rescue LoadError
$hoe = Hoe.spec 'therubyracer' do puts "Rake Compiler not available. Install it with: gem install rake-compiler"
developer 'Charles Lowell', 'cowboyd@thefrontside.net'
developer 'Bill Robertson', 'billrobertson42@gmail.com'
self.rubyforge_name = self.name
self.spec_extras = { :extensions => ["ext/v8/extconf.rb"] }
self.clean_globs << "lib/v8/*.{o,so,bundle,a,log,dll}"
end end
UPSTREAM_SRC = File.dirname(__FILE__) + "/ext/v8/upstream" desc "Build gem"
SCONS_SRC = "#{UPSTREAM_SRC}/scons" task :gem => :build
V8_SRC = "#{UPSTREAM_SRC}/2.0.6"
desc "Do not call this, call gem instead."
task :build
task "clean-v8" => "clean" do task "clean-v8" => "clean" do
sh "rm -f #{V8_SRC}/libv8.a" sh "rm -f #{V8_SRC}/libv8.a"
@ -35,20 +48,7 @@ task "clean-v8" => "clean" do
sh "rm -rf #{V8_SRC}/obj" sh "rm -rf #{V8_SRC}/obj"
end end
Rake::ExtensionTask.new("v8", $hoe.spec) do |ext|
ext.lib_dir = "lib/v8"
ext.source_pattern = "*.{cpp,h}"
end
task :clean do task :clean do
sh "rm -f ext/v8/Makefile" sh "rm -f ext/v8/Makefile"
sh "rm -rf pkg"
end end
require 'newgem/tasks'
Dir['tasks/**/*.rake'].each { |t| load t }
# TODO - want other tests/tasks run by default? Add them to the list
# remove_task :default
# task :default => [:spec, :features]

View file

@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
module V8 module V8
VERSION = '0.4.8' VERSION = '0.4.9'
require 'v8/v8' #native glue require 'v8/v8' #native glue
require 'v8/to' require 'v8/to'
require 'v8/context' require 'v8/context'

File diff suppressed because one or more lines are too long