Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
(PA-6422) Use platform=ruby to remove nokogiri workaround for macOS 1…
Browse files Browse the repository at this point in the history
…2 ARM

Now that we're patching homebrew's ruby 3.2.4 correctly, we can remove our
workaround and use platform=ruby as suggested in
https://nokogiri.org/tutorials/installing_nokogiri.html#installing-using-standard-system-libraries

Note --platform is an option to `gem install` so it comes before double dashes.
  • Loading branch information
joshcooper committed May 10, 2024
1 parent 9ba4799 commit e2f5148
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions configs/components/rubygem-nokogiri.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
component 'rubygem-nokogiri' do |pkg, _settings, _platform|
pkg.version '1.14.2'
pkg.sha256sum 'c765a74aac6cf430a710bb0b6038b8ee11f177393cd6ae8dadc7a44a6e2658b6'
# On macOS when we are not cross compiling we need to use runtime's libxml2 and libxslt
if platform.is_macos? && !platform.is_cross_compiled?
settings[:gem_install_options] = "-- --use-system-libraries \

settings[:gem_install_options] = "--platform=ruby -- \
--use-system-libraries \
--with-xml2-lib=#{settings[:libdir]} \
--with-xml2-include=#{settings[:includedir]}/libxml2 \
--with-xslt-lib=#{settings[:libdir]} \
--with-xslt-include=#{settings[:includedir]}"
end
instance_eval File.read('configs/components/_base-rubygem.rb')
pkg.build_requires 'rubygem-mini_portile2'
gem_home = settings[:gem_home]
Expand Down

0 comments on commit e2f5148

Please sign in to comment.