33class PortableRuby < PortableFormula
44 desc "Powerful, clean, object-oriented scripting language"
55 homepage "https://www.ruby-lang.org/"
6- url "https://cache.ruby-lang.org/pub/ruby/3.1 /ruby-3.1.4 .tar.gz"
7- sha256 "a3d55879a0dfab1d7141fdf10d22a07dbf8e5cdc4415da1bde06127d5cc3c7b6 "
6+ url "https://cache.ruby-lang.org/pub/ruby/3.3 /ruby-3.3.1 .tar.gz"
7+ sha256 "8dc2af2802cc700cd182d5430726388ccf885b3f0a14fcd6a0f21ff249c9aa99 "
88 license "Ruby"
99
1010 depends_on "pkg-config" => :build
1111 depends_on "portable-libyaml" => :build
1212 depends_on "portable-openssl" => :build
1313
1414 on_linux do
15- depends_on "portable-libedit" => :build
1615 depends_on "portable-libffi" => :build
1716 depends_on "portable-libxcrypt" => :build
18- depends_on "portable-ncurses" => :build
1917 depends_on "portable-zlib" => :build
2018 end
2119
2220 def install
2321 libyaml = Formula [ "portable-libyaml" ]
2422 libxcrypt = Formula [ "portable-libxcrypt" ]
2523 openssl = Formula [ "portable-openssl" ]
26- libedit = Formula [ "portable-libedit" ]
2724 libffi = Formula [ "portable-libffi" ]
28- ncurses = Formula [ "portable-ncurses" ]
2925 zlib = Formula [ "portable-zlib" ]
3026
3127 args = portable_configure_args + %W[
@@ -34,15 +30,11 @@ def install
3430 --with-static-linked-ext
3531 --with-out-ext=win32,win32ole
3632 --without-gmp
37- --enable-libedit
3833 --disable-install-doc
3934 --disable-install-rdoc
4035 --disable-dependency-tracking
4136 ]
4237
43- # Correct MJIT_CC to not use superenv shim
44- args << "MJIT_CC=/usr/bin/#{ DevelopmentTools . default_compiler } "
45-
4638 # We don't specify OpenSSL as we want it to use the pkg-config, which `--with-openssl-dir` will disable
4739 args += %W[
4840 --with-libyaml-dir=#{ libyaml . opt_prefix }
@@ -52,16 +44,8 @@ def install
5244 ENV [ "XCFLAGS" ] = "-I#{ libxcrypt . opt_include } "
5345 ENV [ "XLDFLAGS" ] = "-L#{ libxcrypt . opt_lib } "
5446
55- # We want Ruby to link to our ncurses, instead of libtermcap in CentOS 5
56- inreplace "ext/readline/extconf.rb" do |s |
57- s . gsub! "dir_config('termcap')" , ""
58- s . gsub! 'have_library("termcap", "tgetnum") ||' , ""
59- end
60-
6147 args += %W[
62- --with-libedit-dir=#{ libedit . opt_prefix }
6348 --with-libffi-dir=#{ libffi . opt_prefix }
64- --with-ncurses-dir=#{ ncurses . opt_prefix }
6549 --with-zlib-dir=#{ zlib . opt_prefix }
6650 ]
6751
@@ -109,8 +93,6 @@ def install
10993 # C++ compiler might have been disabled because we break it with [email protected] builds 11094 s . sub! ( /(CONFIG\[ "CXX"\] = )"false"/ , '\\1"c++"' )
11195 end
112-
113- cp_r ncurses . share /"terminfo" , share /"terminfo"
11496 end
11597
11698 libexec . mkpath
@@ -130,7 +112,7 @@ def install
130112 assert_equal ruby . to_s , shell_output ( "#{ ruby } -e 'puts RbConfig.ruby'" ) . chomp
131113 assert_equal "3632233996" ,
132114 shell_output ( "#{ ruby } -rzlib -e 'puts Zlib.crc32(\" test\" )'" ) . chomp
133- assert_equal " \t \n \" \\ '`@$ ><=;|&{(" ,
115+ assert_equal " \t \n ` ><=;|&{(" ,
134116 shell_output ( "#{ ruby } -rreadline -e 'puts Readline.basic_word_break_characters'" ) . chomp
135117 assert_equal '{"a"=>"b"}' ,
136118 shell_output ( "#{ ruby } -ryaml -e 'puts YAML.load(\" a: b\" )'" ) . chomp
0 commit comments