11require File . expand_path ( "../../Abstract/portable-formula" , __FILE__ )
22
33class PortableRuby < PortableFormula
4- desc "Portable ruby "
4+ desc "Powerful, clean, object-oriented scripting language "
55 homepage "https://www.ruby-lang.org/"
6- # This isn't the latest 2.3.3 but is the version shipped in macOS 10.13.
7- url "https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.3.tar.bz2"
8- mirror "http://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.3.tar.bz2"
9- sha256 "882e6146ed26c6e78c02342835f5d46b86de95f0dc4e16543294bc656594cc5b"
10- revision 2
6+ # This is the version shipped in macOS 10.13.6.
7+ url "https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.7.tar.bz2"
8+ mirror "http://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.7.tar.bz2"
9+ sha256 "18b12fafaf37d5f6c7139c1b445355aec76baa625a40300598a6c8597fc04d8e"
1110
1211 bottle do
1312 cellar :any_skip_relocation
@@ -28,23 +27,6 @@ class PortableRuby < PortableFormula
2827 depends_on "portable-zlib" => :build
2928 end
3029
31- # Fixes the static build: https://bugs.ruby-lang.org/issues/13413
32- # This has been backported into the 2.3 branch, but isn't in the
33- # release we're building.
34- patch do
35- url "https://github.com/ruby/ruby/commit/b3dbeb6e90f316584f70e33f6bfb9d83fa5f30d3.patch?full_index=1"
36- sha256 "17a6a37e500f3455bb85e6bd4b077228d7a32f63bf07ecf67248acbd3a5ea724"
37- end
38-
39- # Fixes the build of dir.c on 10.5 due to missing fgetattrlist:
40- # https://bugs.ruby-lang.org/issues/13573
41- # This has been backported into the 2.3 branch, but isn't in the
42- # release we're building.
43- patch do
44- url "https://github.com/ruby/ruby/commit/1c80c388d5bd48018c419a2ea3ed9f7b7514dfa3.patch?full_index=1"
45- sha256 "8ba0a24a36702d2cbc94aa73cb6f0b11793348b0158c11c8608e073c71601bb5"
46- end
47-
4830 def install
4931 # mcontext types had a member named `ss` instead of `__ss`
5032 # prior to Leopard; see
@@ -57,8 +39,8 @@ def install
5739 end
5840
5941 inreplace "vm_dump.c" do |s |
60- s . gsub! /uc_mcontext->__(ss)\. __(r\w \w )/ ,
61- "uc_mcontext->\1 .\2 "
42+ s . gsub! ( /uc_mcontext->__(ss)\. __(r\w \w )/ ,
43+ "uc_mcontext->\1 .\2 " )
6244 s . gsub! "mctx->__ss.__##reg" ,
6345 "mctx->ss.reg"
6446 # missing include in vm_dump; this is an ugly solution
@@ -67,14 +49,6 @@ def install
6749 end
6850 end
6951
70- # Fixes includedir inappropriately prefixed with SDKROOT:
71- # https://bugs.ruby-lang.org/issues/13572
72- # This has been backported into the 2.3 branch, but isn't in the
73- # release we're building and can't be cherry-picked cleanly.
74- inreplace "tool/mkconfig.rb" ,
75- "when /^includedir$/" ,
76- "when /^oldincludedir$/"
77-
7852 readline = Formula [ "portable-readline" ]
7953 libyaml = Formula [ "portable-libyaml" ]
8054 openssl = Formula [ "portable-openssl" ]
@@ -167,7 +141,7 @@ def install
167141 shell_output ( "#{ ruby } -ropenssl -e 'puts OpenSSL::Digest::SHA256.hexdigest(\" \" )'" ) . strip
168142 assert_match "200" ,
169143 shell_output ( "#{ ruby } -ropen-uri -e 'open(\" https://google.com\" ) { |f| puts f.status.first }'" ) . strip
170- system " #{ ruby } " , "-rdbm" , "-e" , "DBM.new('test')"
144+ system ruby , "-rdbm" , "-e" , "DBM.new('test')"
171145 system testpath /"bin/gem" , "environment"
172146 system testpath /"bin/gem" , "install" , "bundler"
173147 system testpath /"bin/bundle" , "init"
0 commit comments