mirror of
https://github.com/rubyjs/libv8
synced 2023-03-27 23:21:48 -04:00
Merge pull request #38 from stereobooster/small_improvements
Small improvements
This commit is contained in:
commit
d07cf34415
3 changed files with 18 additions and 9 deletions
|
@ -18,8 +18,6 @@ That depends on your platform. Right now, we support the following platforms.
|
|||
* x86_64-linux
|
||||
* x86-linux
|
||||
|
||||
> **Note**: Gentoo amd64 users may need to tweak their environment. see [issue 8](/fractaloop/libv8/issues/8)
|
||||
|
||||
If you don't see your platform on this list, first, make sure that it installs from source, and second
|
||||
talk to us about setting up a binary distro for you.
|
||||
|
||||
|
@ -27,11 +25,11 @@ talk to us about setting up a binary distro for you.
|
|||
### What if I can't install from source?
|
||||
|
||||
|
||||
If you can fix the [Makefile](https://github.com/fractaloop/libv8/blob/master/lib/libv8/Makefile) so that it correctly compiles for your platform, we'll pull it right in!
|
||||
If you can fix the "Makefile" so that it correctly compiles for your platform, we'll pull it right in!
|
||||
|
||||
To get the source, these commands will get you started:
|
||||
|
||||
git clone git@github.com:fractaloop/libv8
|
||||
git clone git@github.com:cowboyd/libv8
|
||||
cd libv8
|
||||
git submodule update --init
|
||||
bundle install
|
||||
|
@ -47,7 +45,7 @@ reliably to all the different platforms proved to be a challenge to say the leas
|
|||
We got tired of waiting 5 minutes for v8 to compile every time we installed that gem.
|
||||
|
||||
### Sponsored by
|
||||
<a href="http://thefrontside.net"></a>
|
||||
<a href="http://thefrontside.net"></a>
|
||||
|
||||
### License
|
||||
|
||||
|
|
18
Rakefile
18
Rakefile
|
@ -39,11 +39,21 @@ task :manual_compile do
|
|||
end
|
||||
end
|
||||
|
||||
desc "build a binary gem"
|
||||
task :binary => :compile do
|
||||
def get_binary_gemspec(platform = RUBY_PLATFORM)
|
||||
gemspec = eval(File.read('libv8.gemspec'))
|
||||
gemspec.extensions.clear
|
||||
gemspec.platform = Gem::Platform.new(RUBY_PLATFORM)
|
||||
gemspec.platform = Gem::Platform.new(platform)
|
||||
gemspec
|
||||
end
|
||||
|
||||
begin
|
||||
binary_gem_name = File.basename get_binary_gemspec.cache_file
|
||||
rescue
|
||||
binary_gem_name = ''
|
||||
end
|
||||
|
||||
desc "build a binary gem #{binary_gem_name}"
|
||||
task :binary => :compile do
|
||||
gemspec = get_binary_gemspec
|
||||
|
||||
# We don't need most things for the binary
|
||||
gemspec.files = ['lib/libv8.rb', 'ext/libv8/arch.rb', 'lib/libv8/version.rb']
|
||||
|
|
|
@ -11,3 +11,4 @@ include Libv8::Compiler
|
|||
Dir.chdir(File.expand_path '../../../vendor/v8', __FILE__) do
|
||||
puts `env CXX=#{compiler} LINK=#{compiler} #{make} #{libv8_arch}.release GYPFLAGS="-Dhost_arch=#{libv8_arch}"`
|
||||
end
|
||||
exit $?.exitstatus
|
||||
|
|
Loading…
Add table
Reference in a new issue