Permalink
Browse files

Split gem into -java and normal versions, so JRuby doesn't attempt to…

… build native ext it will never use.
  • Loading branch information...
1 parent 4d76b32 commit 8171865f27aa1fecb27641b0580d5342077a26c7 @headius committed Sep 6, 2011
Showing with 7 additions and 2 deletions.
  1. +7 −2 atomic.gemspec
View
@@ -7,10 +7,15 @@ Gem::Specification.new do |s|
s.date = Time.now.strftime('%Y-%m-%d')
s.description = "An atomic reference implementation for JRuby and green or GIL-threaded impls"
s.email = ["headius@headius.com", "mental@rydia.net"]
- s.files = Dir['{lib,examples,test,ext}/**/*'] + Dir['{*.txt,*.gemspec,Rakefile}']
s.homepage = "http://github.com/headius/ruby-atomic"
s.require_paths = ["lib"]
s.summary = "An atomic reference implementation for JRuby and green or GIL-threaded impls"
s.test_files = Dir["test/test*.rb"]
- s.extensions = 'ext/extconf.rb'
+ if defined?(JRUBY_VERSION)
+ s.files = Dir['{lib,examples,test}/**/*'] + Dir['{*.txt,*.gemspec,Rakefile}']
+ s.platform = 'java'
+ else
+ s.files = Dir['{lib,examples,test,ext}/**/*'] + Dir['{*.txt,*.gemspec,Rakefile}']
+ s.extensions = 'ext/extconf.rb'
+ end
end

0 comments on commit 8171865

Please sign in to comment.