Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e1532ffd9a0c
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ce21a14ab6f9
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Jul 28, 2016

  1. Copy the full SHA
    a4c78b9 View commit details

Commits on Aug 12, 2016

  1. Merge pull request #4031 from joankaradimov/capybara-webkit-compatibi…

    …lity
    
    Make JRuby compatible with capybara-webkit (and possibly other gems)
    headius authored Aug 12, 2016
    Copy the full SHA
    ce21a14 View commit details
Showing with 2,735 additions and 4 deletions.
  1. +10 −2 core/src/main/java/org/jruby/ext/rbconfig/RbConfigLibrary.java
  2. +1 −1 lib/pom.rb
  3. +1 −0 lib/pom.xml
  4. +1 −0 lib/ruby/include/ruby.h
  5. +2,722 −1 lib/ruby/stdlib/mkmf.rb
12 changes: 10 additions & 2 deletions core/src/main/java/org/jruby/ext/rbconfig/RbConfigLibrary.java
Original file line number Diff line number Diff line change
@@ -258,6 +258,10 @@ public void load(Ruby runtime, boolean wrap) {
setConfig(configHash, "host_vendor", System.getProperty("java.vendor"));
setConfig(configHash, "host_cpu", getArchitecture());

String host = String.format("%s-%s-%s", getOSName(), System.getProperty("java.vendor"), getArchitecture());
setConfig(configHash, "host", host);
setConfig(configHash, "host_alias", host);

setConfig(configHash, "target_os", getOSName());

setConfig(configHash, "target_cpu", getArchitecture());
@@ -282,7 +286,7 @@ public void load(Ruby runtime, boolean wrap) {


String shareDir = newFile(normalizedHome, "share").getPath();
String includeDir = newFile(normalizedHome, "lib/native/" + getOSName()).getPath();
String includeDir = newFile(normalizedHome, "lib/ruby/include").getPath();

String vendorDirGeneral = getVendorDirGeneral(runtime);
String siteDirGeneral = getSiteDirGeneral(runtime);
@@ -313,6 +317,7 @@ public void load(Ruby runtime, boolean wrap) {
setConfig(configHash, "archdir", archDir);
setConfig(configHash, "topdir", archDir);
setConfig(configHash, "includedir", includeDir);
setConfig(configHash, "rubyhdrdir", includeDir);
setConfig(configHash, "configure_args", "");
setConfig(configHash, "datadir", shareDir);
setConfig(configHash, "mandir", newFile(normalizedHome, "man").getPath());
@@ -401,20 +406,22 @@ private static void setupMakefileConfig(RubyModule configModule, RubyHash mkmfHa
// A few platform specific values
if (Platform.IS_WINDOWS) {
ldflags += " -L" + newFile(normalizedHome, "lib/native/" + (Platform.IS_64_BIT ? "x86_64" : "i386") + "-Windows").getPath();
ldflags += " -ljruby-cext";
ldsharedflags += " $(if $(filter-out -g -g0,$(debugflags)),,-s)";
dldflags = "-Wl,--enable-auto-image-base,--enable-auto-import $(DEFFILE)";
archflags += " -march=native -mtune=native";
setConfig(mkmfHash, "DLEXT", "dll");
setConfig(mkmfHash, "EXEEXT", ".exe");
} else if (Platform.IS_MAC) {
ldsharedflags = " -dynamic -bundle -undefined dynamic_lookup ";
cflags = " -fPIC -DTARGET_RT_MAC_CFM=0 " + cflags;
archflags = " -arch " + Platform.ARCH;
cppflags = " -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE " + cppflags;
setConfig(mkmfHash, "DLEXT", "bundle");
setConfig(mkmfHash, "EXEEXT", "");
} else {
cflags = " -fPIC " + cflags;
setConfig(mkmfHash, "DLEXT", "so");
setConfig(mkmfHash, "EXEEXT", "");
}

String libext = "a";
@@ -443,6 +450,7 @@ private static void setupMakefileConfig(RubyModule configModule, RubyHash mkmfHa
setConfig(mkmfHash, "LDSHARED", cc + ldsharedflags);
setConfig(mkmfHash, "LDSHAREDXX", cxx + ldsharedflags);
setConfig(mkmfHash, "RUBY_PLATFORM", getOSName());
setConfig(mkmfHash, "RUBY_SO_NAME", "jruby");
setConfig(mkmfHash, "CC", cc);
setConfig(mkmfHash, "CPP", cpp);
setConfig(mkmfHash, "CXX", cxx);
2 changes: 1 addition & 1 deletion lib/pom.rb
Original file line number Diff line number Diff line change
@@ -293,7 +293,7 @@ def installer.ensure_required_ruby_version_met; end

resource do
directory '${basedir}/..'
includes 'bin/ast*', 'bin/gem*', 'bin/irb*', 'bin/jgem*', 'bin/jirb*', 'bin/jruby*', 'bin/rake*', 'bin/ri*', 'bin/rdoc*', 'bin/testrb*', 'lib/ruby/stdlib/**', 'lib/ruby/truffle/**'
includes 'bin/ast*', 'bin/gem*', 'bin/irb*', 'bin/jgem*', 'bin/jirb*', 'bin/jruby*', 'bin/rake*', 'bin/ri*', 'bin/rdoc*', 'bin/testrb*', 'lib/ruby/include/**', 'lib/ruby/stdlib/**', 'lib/ruby/truffle/**'
excludes 'bin/jruby', 'bin/jruby*_*', 'bin/jruby*-*', '**/.*',
'lib/ruby/stdlib/rubygems/defaults/jruby_native.rb',
'lib/ruby/stdlib/gauntlet*.rb' # gauntlet_rdoc.rb, gauntlet_rubygems.rb
1 change: 1 addition & 0 deletions lib/pom.xml
Original file line number Diff line number Diff line change
@@ -239,6 +239,7 @@ DO NOT MODIFIY - GENERATED CODE
<include>bin/ri*</include>
<include>bin/rdoc*</include>
<include>bin/testrb*</include>
<include>lib/ruby/include/**</include>
<include>lib/ruby/stdlib/**</include>
<include>lib/ruby/truffle/**</include>
</includes>
1 change: 1 addition & 0 deletions lib/ruby/include/ruby.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#error JRuby does not support native extensions
2,723 changes: 2,722 additions & 1 deletion lib/ruby/stdlib/mkmf.rb

Large diffs are not rendered by default.