File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,19 @@ task 'gem:native:prepare' do
107107 end
108108end
109109
110+ task 'install_darwin_mig' , [ :arch ] do |t , args |
111+ sh <<~EOT
112+ rm -rf bootstrap_cmds &&
113+ git clone --branch=cross_platform https://github.com/markmentovai/bootstrap_cmds &&
114+ cd bootstrap_cmds &&
115+ autoreconf --install &&
116+ sh configure &&
117+ make &&
118+ sed -E -i 's/^cppflags=(.*)/cppflags=(\\ 1 "-D#{ args [ :arch ] } " "-I\\ /opt\\ /osxcross\\ /target\\ /SDK\\ /MacOSX11.1.sdk\\ /usr\\ /include")/' migcom.tproj/mig.sh &&
119+ sudo make install
120+ EOT
121+ end
122+
110123CrossLibraries . each do |xlib |
111124 platform = xlib . platform
112125 desc "Build fat binary gem for platform #{ platform } "
@@ -118,6 +131,8 @@ CrossLibraries.each do |xlib|
118131 sudo apt-get update && sudo apt-get install -y bison flex &&
119132 (cp build/gem/gem-*.pem ~/.gem/ || true) &&
120133 bundle install --local &&
134+ #{ "rake install_darwin_mig[__arm64__]" if platform =~ /arm64-darwin/ }
135+ #{ "rake install_darwin_mig[__x86_64__]" if platform =~ /x86_64-darwin/ }
121136 rake native:#{ platform } pkg/#{ $gem_spec. full_name } -#{ platform } .gem MAKEOPTS=-j`nproc` RUBY_CC_VERSION=#{ RakeCompilerDock . ruby_cc_version ( "~>2.7" , "~>3.0" ) }
122137 EOT
123138 end
You can’t perform that action at this time.
0 commit comments