Skip to content

Commit

Permalink
(..) Only override rbconfig when cross compiling
Browse files Browse the repository at this point in the history
Need to think about this, see ruby-3.2.2 line 238
  • Loading branch information
joshcooper committed Jul 21, 2023
1 parent 3d1828f commit 5433e19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
6 changes: 2 additions & 4 deletions configs/components/_base-ruby-augeas.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@
pkg.environment "CONFIGURE_ARGS", '--vendor'
pkg.environment "PKG_CONFIG_PATH", "#{File.join(settings[:libdir], 'pkgconfig')}:/usr/lib/pkgconfig"

if platform.is_solaris?
if platform.architecture == 'sparc'
pkg.environment "RUBY", host_ruby
end
if platform.is_cross_compiled? && platform.is_solaris?
ruby = "#{host_ruby} -r#{settings[:datadir]}/doc/rbconfig-#{ruby_version}-orig.rb"
pkg.environment "RUBY", host_ruby
elsif platform.is_cross_compiled?
if platform.is_linux? || platform.is_macos?
pkg.environment "RUBY", host_ruby
Expand Down
11 changes: 3 additions & 8 deletions configs/components/ruby-shadow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,17 @@
pkg.ref "refs/tags/2.5.0"

pkg.build_requires "ruby-#{settings[:ruby_version]}"
pkg.environment "PATH", "$(PATH):/usr/ccs/bin:/usr/sfw/bin"
pkg.environment "PATH", "$(PATH):/opt/pl-build-tools/bin:/usr/ccs/bin:/usr/sfw/bin"
pkg.environment "CONFIGURE_ARGS", '--vendor'

if platform.is_solaris?
if platform.architecture == 'sparc'
pkg.environment "RUBY", settings[:host_ruby]
end
ruby = "#{settings[:host_ruby]} -r#{settings[:datadir]}/doc/rbconfig-#{settings[:ruby_version]}-orig.rb"
elsif platform.is_cross_compiled?
if platform.is_cross_compiled?
pkg.environment "RUBY", settings[:host_ruby]
ruby = "#{settings[:host_ruby]} -r#{settings[:datadir]}/doc/rbconfig-#{settings[:ruby_version]}-orig.rb"
else
ruby = File.join(settings[:ruby_bindir], 'ruby')
end

matchdata = platform.settings[:ruby_version].match /(\d+)\.(\d+)\.\d+/
matchdata = platform.settings[:ruby_version].match(/(\d+)\.(\d+)\.\d+/)
ruby_major_version = matchdata[1].to_i
if ruby_major_version >= 3
base = "resources/patches/ruby_32"
Expand Down

0 comments on commit 5433e19

Please sign in to comment.