libv8 3.11.8.11 → 3.11.8.12
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +8 -2
- data/ext/libv8/builder.rb +16 -2
- data/lib/libv8/version.rb +1 -1
- data/libv8.gemspec +1 -0
- metadata +20 -7
- data/lib/libv8/fpic-on-freebsd-amd64.patch +0 -16
- data/patches/gcc42-on-freebsd.patch +0 -14
- data/patches/src_platform-freebsd.cc.patch +0 -10
data/Rakefile
CHANGED
@@ -28,7 +28,6 @@ task :checkout do
|
|
28
28
|
# Based on: https://chromiumcodereview.appspot.com/10079030/patch/1/2
|
29
29
|
sh "patch -N -p0 -d vendor/v8 < patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch"
|
30
30
|
sh "patch -N -p1 -d vendor/v8 < patches/fPIC-on-x64.patch"
|
31
|
-
sh "patch -N -p1 -d vendor/v8 < patches/gcc42-on-freebsd.patch" if RUBY_PLATFORM.include?("freebsd") && !system("pkg_info | grep gcc-4")
|
32
31
|
end
|
33
32
|
|
34
33
|
desc "compile v8 via the ruby extension mechanism"
|
@@ -42,7 +41,7 @@ task :manual_compile do
|
|
42
41
|
require File.expand_path '../ext/libv8/arch.rb', __FILE__
|
43
42
|
include Libv8::Arch
|
44
43
|
Dir.chdir(V8_Source) do
|
45
|
-
sh %Q{#{make} -j2 #{libv8_arch}.release
|
44
|
+
sh %Q{#{make} -j2 #{libv8_arch}.release ARFLAGS.target=crs}
|
46
45
|
end
|
47
46
|
end
|
48
47
|
|
@@ -81,5 +80,12 @@ task :clean do
|
|
81
80
|
sh "cd #{V8_Source} && git checkout -f && git clean -dxf"
|
82
81
|
end
|
83
82
|
|
83
|
+
desc "build a binary on heroku (you must have vulcan configured for this)"
|
84
|
+
task :vulcan => directory("tmp/vulcan") do
|
85
|
+
Dir.chdir('tmp/vulcan') do
|
86
|
+
sh "vulcan build -v -c 'LANG=en_US.UTF-8 export BIN=/`pwd`/bin && export GEM=$BIN/gem && curl https://s3.amazonaws.com/heroku-buildpack-ruby/ruby-1.9.3.tgz > ruby-1.9.3.tgz && tar xf ruby-1.9.3.tgz && cd /tmp && $GEM fetch libv8 --platform=ruby --version=#{Libv8::VERSION} && $GEM unpack libv8*.gem && $GEM install bundler -n $BIN --no-ri --no-rdoc && cd libv8-#{Libv8::VERSION} && $BIN/bundle && $BIN/bundle exec rake binary' -p /tmp/libv8-#{Libv8::VERSION}"
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
84
90
|
task :default => [:checkout, :compile, :spec]
|
85
91
|
task :build => [:clean, :checkout]
|
data/ext/libv8/builder.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'mkmf'
|
1
2
|
require File.expand_path '../compiler', __FILE__
|
2
3
|
require File.expand_path '../arch', __FILE__
|
3
4
|
require File.expand_path '../make', __FILE__
|
@@ -8,11 +9,24 @@ module Libv8
|
|
8
9
|
include Libv8::Compiler
|
9
10
|
include Libv8::Make
|
10
11
|
|
11
|
-
def
|
12
|
+
def make_flags(*flags)
|
12
13
|
profile = enable_config('debug') ? 'debug' : 'release'
|
13
14
|
|
15
|
+
# FreeBSD uses gcc 4.2 by default which leads to
|
16
|
+
# compilation failures due to warnings about aliasing.
|
17
|
+
# http://svnweb.freebsd.org/ports/head/lang/v8/Makefile?view=markup
|
18
|
+
flags << "strictaliasing=off" if RUBY_PLATFORM.include?("freebsd") and !check_gcc_compiler(compiler)
|
19
|
+
|
20
|
+
# Fix Malformed archive issue caused by GYP creating thin archives by
|
21
|
+
# default.
|
22
|
+
flags << "ARFLAGS.target=crs"
|
23
|
+
|
24
|
+
"#{libv8_arch}.#{profile} #{flags.join ' '}"
|
25
|
+
end
|
26
|
+
|
27
|
+
def build_libv8!
|
14
28
|
Dir.chdir(File.expand_path '../../../vendor/v8', __FILE__) do
|
15
|
-
puts `env CXX=#{compiler} LINK=#{compiler} #{make} #{
|
29
|
+
puts `env CXX=#{compiler} LINK=#{compiler} #{make} #{make_flags}`
|
16
30
|
end
|
17
31
|
return $?.exitstatus
|
18
32
|
end
|
data/lib/libv8/version.rb
CHANGED
data/libv8.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libv8
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.11.8.
|
4
|
+
version: 3.11.8.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -75,6 +75,22 @@ dependencies:
|
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: vulcan
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
78
94
|
description: Distributes the V8 JavaScript engine in binary and source forms in order
|
79
95
|
to support fast builds of The Ruby Racer
|
80
96
|
email:
|
@@ -98,13 +114,10 @@ files:
|
|
98
114
|
- ext/libv8/make.rb
|
99
115
|
- ext/libv8/paths.rb
|
100
116
|
- lib/libv8.rb
|
101
|
-
- lib/libv8/fpic-on-freebsd-amd64.patch
|
102
117
|
- lib/libv8/version.rb
|
103
118
|
- libv8.gemspec
|
104
119
|
- patches/add-freebsd9-and-freebsd10-to-gyp-GetFlavor.patch
|
105
120
|
- patches/fPIC-on-x64.patch
|
106
|
-
- patches/gcc42-on-freebsd.patch
|
107
|
-
- patches/src_platform-freebsd.cc.patch
|
108
121
|
- spec/location_spec.rb
|
109
122
|
- spec/spec_helper.rb
|
110
123
|
- thefrontside.png
|
@@ -2534,7 +2547,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2534
2547
|
version: '0'
|
2535
2548
|
segments:
|
2536
2549
|
- 0
|
2537
|
-
hash:
|
2550
|
+
hash: 2128360318782201251
|
2538
2551
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2539
2552
|
none: false
|
2540
2553
|
requirements:
|
@@ -2543,7 +2556,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2543
2556
|
version: '0'
|
2544
2557
|
segments:
|
2545
2558
|
- 0
|
2546
|
-
hash:
|
2559
|
+
hash: 2128360318782201251
|
2547
2560
|
requirements: []
|
2548
2561
|
rubyforge_project: libv8
|
2549
2562
|
rubygems_version: 1.8.24
|
@@ -1,16 +0,0 @@
|
|
1
|
-
diff --git a/SConstruct b/SConstruct
|
2
|
-
index 4a7e182..b462335 100644
|
3
|
-
--- a/SConstruct
|
4
|
-
+++ b/SConstruct
|
5
|
-
@@ -124,6 +124,10 @@ LIBRARY_FLAGS = {
|
6
|
-
'LIBPATH' : ['/usr/local/lib'],
|
7
|
-
'CCFLAGS': ['-ansi'],
|
8
|
-
- 'LIBS': ['execinfo']
|
9
|
-
+ 'LIBS': ['execinfo'],
|
10
|
-
+ 'arch:x64': {
|
11
|
-
+ 'CCFLAGS': ['-fPIC'],
|
12
|
-
+ 'CXXFLAGS': ['-fPIC']
|
13
|
-
+ },
|
14
|
-
},
|
15
|
-
'os:openbsd': {
|
16
|
-
'CPPPATH' : ['/usr/local/include'],
|
@@ -1,14 +0,0 @@
|
|
1
|
-
diff --git a/build/standalone.gypi b/build/standalone.gypi
|
2
|
-
index ebdf557..c7a59bc 100644
|
3
|
-
--- a/build/standalone.gypi
|
4
|
-
+++ b/build/standalone.gypi
|
5
|
-
@@ -98,6 +98,9 @@
|
6
|
-
[ 'OS=="linux"', {
|
7
|
-
'cflags': [ '-ansi' ],
|
8
|
-
}],
|
9
|
-
+ [ 'OS=="freebsd"', {
|
10
|
-
+ 'cflags': [ '-fno-strict-aliasing', ],
|
11
|
-
+ }],
|
12
|
-
[ 'visibility=="hidden"', {
|
13
|
-
'cflags': [ '-fvisibility=hidden' ],
|
14
|
-
}],
|
@@ -1,10 +0,0 @@
|
|
1
|
-
--- src/platform-freebsd.cc.orig 2012-05-12 16:47:50.556202492 +0100
|
2
|
-
+++ src/platform-freebsd.cc 2012-05-12 16:37:59.924934272 +0100
|
3
|
-
@@ -554,6 +554,7 @@
|
4
|
-
ASSERT(result == 0);
|
5
|
-
result = pthread_mutex_init(&mutex_, &attrs);
|
6
|
-
ASSERT(result == 0);
|
7
|
-
+ USE(result);
|
8
|
-
}
|
9
|
-
|
10
|
-
virtual ~FreeBSDMutex() { pthread_mutex_destroy(&mutex_); }
|