diff options
author | Charles Oliver Nutter <headius@headius.com> | 2023-02-08 17:02:08 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-21 19:50:49 +0900 |
commit | b572f2436c70bef75126fe4e30910af75056f5f0 (patch) | |
tree | f7530865ed451a6a69147056629f0897030e9d7f /ext | |
parent | bc101f0fc1772e85ee074fe78a6b672dc5f175c5 (diff) | |
download | ruby-b572f2436c70bef75126fe4e30910af75056f5f0.tar.gz |
[ruby/openssl] Stub gemspec for JRuby
JRuby has its own implementation of the `openssl` library in
jruby-openssl. The simplest way for us to allow users to set
openssl as a gem dependency is to ship a stub gem that just
depends on jruby-openssl. This patch adds that to the gemspec.
Additional work may be required to fit this stub gem into the test
and release process.
See #20 for more details.
https://github.com/ruby/openssl/commit/74ccaa5e18
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/openssl.gemspec | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/openssl/openssl.gemspec b/ext/openssl/openssl.gemspec index 8d83b69193..3a2f64f676 100644 --- a/ext/openssl/openssl.gemspec +++ b/ext/openssl/openssl.gemspec @@ -8,9 +8,15 @@ Gem::Specification.new do |spec| spec.homepage = "https://github.com/ruby/openssl" spec.license = "Ruby" - spec.files = Dir["lib/**/*.rb", "ext/**/*.{c,h,rb}", "*.md", "BSDL", "LICENSE.txt"] - spec.require_paths = ["lib"] - spec.extensions = ["ext/openssl/extconf.rb"] + if Gem::Platform === spec.platform and spec.platform =~ 'java' or RUBY_ENGINE == 'jruby' + spec.platform = "java" + spec.files = [] + spec.add_runtime_dependency('jruby-openssl', '~> 0.14') + else + spec.files = Dir["lib/**/*.rb", "ext/**/*.{c,h,rb}", "*.md", "BSDL", "LICENSE.txt"] + spec.require_paths = ["lib"] + spec.extensions = ["ext/openssl/extconf.rb"] + end spec.extra_rdoc_files = Dir["*.md"] spec.rdoc_options = ["--main", "README.md"] |