diff --git a/Formula/portable-libedit.rb b/Formula/portable-libedit.rb deleted file mode 100644 index b64fe59..0000000 --- a/Formula/portable-libedit.rb +++ /dev/null @@ -1,36 +0,0 @@ -require File.expand_path("../Abstract/portable-formula", __dir__) - -class PortableLibedit < PortableFormula - desc "BSD-style licensed readline alternative" - homepage "https://thrysoee.dk/editline/" - url "https://thrysoee.dk/editline/libedit-20230828-3.1.tar.gz" - version "20230828-3.1" - sha256 "4ee8182b6e569290e7d1f44f0f78dac8716b35f656b76528f699c69c98814dad" - license "BSD-3-Clause" - - on_linux do - depends_on "portable-ncurses" => :build - end - - def install - system "./configure", *portable_configure_args, - *std_configure_args, - "--enable-static", - "--disable-shared", - "--disable-examples" - system "make", "install" - end - - test do - (testpath/"test.c").write <<~EOS - #include - #include - int main(int argc, char *argv[]) { - EditLine *el = el_init(argv[0], stdin, stdout, stderr); - return (el == NULL); - } - EOS - system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-ledit", "-I#{include}" - system "./test" - end -end diff --git a/Formula/portable-ncurses.rb b/Formula/portable-ncurses.rb deleted file mode 100644 index 9cec077..0000000 --- a/Formula/portable-ncurses.rb +++ /dev/null @@ -1,75 +0,0 @@ -require File.expand_path("../Abstract/portable-formula", __dir__) - -class PortableNcurses < PortableFormula - desc "Text-based UI library" - homepage "https://invisible-island.net/ncurses/announce.html" - url "https://ftp.gnu.org/gnu/ncurses/ncurses-6.5.tar.gz" - mirror "https://invisible-mirror.net/archives/ncurses/ncurses-6.5.tar.gz" - mirror "ftp://ftp.invisible-island.net/ncurses/ncurses-6.5.tar.gz" - mirror "https://ftpmirror.gnu.org/ncurses/ncurses-6.5.tar.gz" - sha256 "136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6" - license "MIT" - - depends_on "pkg-config" => :build - - def install - # Workaround for - # macOS: mkdir: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/12: Operation not permitted - # Linux: configure: error: expected a pathname, not "" - (lib/"pkgconfig").mkpath - - system "./configure", *portable_configure_args, - "--disable-dependency-tracking", - "--prefix=#{prefix}", - "--enable-static", - "--disable-shared", - "--without-ada", - "--without-cxx-binding", - "--without-manpages", - "--without-progs", - "--without-tests", - "--enable-pc-files", - "--with-pkg-config-libdir=#{lib}/pkgconfig", - "--enable-sigwinch", - "--enable-symlinks", - "--enable-widec", - "--with-gpm=no" - - system "make", "install" - make_libncurses_symlinks - end - - def make_libncurses_symlinks - major = version.major.to_s - - %w[form menu ncurses panel].each do |name| - lib.install_symlink "lib#{name}w.a" => "lib#{name}.a" - lib.install_symlink "lib#{name}w_g.a" => "lib#{name}_g.a" - end - - lib.install_symlink "libncurses.a" => "libcurses.a" - - (lib/"pkgconfig").install_symlink "ncursesw.pc" => "ncurses.pc" - - bin.install_symlink "ncursesw#{major}-config" => "ncurses#{major}-config" - - include.install_symlink "ncursesw" => "ncurses" - include.install_symlink [ - "ncursesw/curses.h", "ncursesw/form.h", "ncursesw/ncurses.h", - "ncursesw/panel.h", "ncursesw/term.h", "ncursesw/termcap.h" - ] - end - - test do - (testpath/"test.c").write <<~EOS - #include - int main() - { - tgetnum(""); - return 0; - } - EOS - system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lncurses", "-o", "test" - system "./test" - end -end diff --git a/Formula/portable-ruby.rb b/Formula/portable-ruby.rb index dd59bf1..43428e1 100644 --- a/Formula/portable-ruby.rb +++ b/Formula/portable-ruby.rb @@ -3,8 +3,8 @@ class PortableRuby < PortableFormula desc "Powerful, clean, object-oriented scripting language" homepage "https://www.ruby-lang.org/" - url "https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.4.tar.gz" - sha256 "a3d55879a0dfab1d7141fdf10d22a07dbf8e5cdc4415da1bde06127d5cc3c7b6" + url "https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.1.tar.gz" + sha256 "8dc2af2802cc700cd182d5430726388ccf885b3f0a14fcd6a0f21ff249c9aa99" license "Ruby" depends_on "pkg-config" => :build @@ -12,10 +12,8 @@ class PortableRuby < PortableFormula depends_on "portable-openssl" => :build on_linux do - depends_on "portable-libedit" => :build depends_on "portable-libffi" => :build depends_on "portable-libxcrypt" => :build - depends_on "portable-ncurses" => :build depends_on "portable-zlib" => :build end @@ -23,9 +21,7 @@ def install libyaml = Formula["portable-libyaml"] libxcrypt = Formula["portable-libxcrypt"] openssl = Formula["portable-openssl"] - libedit = Formula["portable-libedit"] libffi = Formula["portable-libffi"] - ncurses = Formula["portable-ncurses"] zlib = Formula["portable-zlib"] args = portable_configure_args + %W[ @@ -34,15 +30,11 @@ def install --with-static-linked-ext --with-out-ext=win32,win32ole --without-gmp - --enable-libedit --disable-install-doc --disable-install-rdoc --disable-dependency-tracking ] - # Correct MJIT_CC to not use superenv shim - args << "MJIT_CC=/usr/bin/#{DevelopmentTools.default_compiler}" - # We don't specify OpenSSL as we want it to use the pkg-config, which `--with-openssl-dir` will disable args += %W[ --with-libyaml-dir=#{libyaml.opt_prefix} @@ -52,16 +44,8 @@ def install ENV["XCFLAGS"] = "-I#{libxcrypt.opt_include}" ENV["XLDFLAGS"] = "-L#{libxcrypt.opt_lib}" - # We want Ruby to link to our ncurses, instead of libtermcap in CentOS 5 - inreplace "ext/readline/extconf.rb" do |s| - s.gsub! "dir_config('termcap')", "" - s.gsub! 'have_library("termcap", "tgetnum") ||', "" - end - args += %W[ - --with-libedit-dir=#{libedit.opt_prefix} --with-libffi-dir=#{libffi.opt_prefix} - --with-ncurses-dir=#{ncurses.opt_prefix} --with-zlib-dir=#{zlib.opt_prefix} ] @@ -109,8 +93,6 @@ def install # C++ compiler might have been disabled because we break it with glibc@2.13 builds s.sub!(/(CONFIG\["CXX"\] = )"false"/, '\\1"c++"') end - - cp_r ncurses.share/"terminfo", share/"terminfo" end libexec.mkpath @@ -130,7 +112,7 @@ def install assert_equal ruby.to_s, shell_output("#{ruby} -e 'puts RbConfig.ruby'").chomp assert_equal "3632233996", shell_output("#{ruby} -rzlib -e 'puts Zlib.crc32(\"test\")'").chomp - assert_equal " \t\n\"\\'`@$><=;|&{(", + assert_equal " \t\n`><=;|&{(", shell_output("#{ruby} -rreadline -e 'puts Readline.basic_word_break_characters'").chomp assert_equal '{"a"=>"b"}', shell_output("#{ruby} -ryaml -e 'puts YAML.load(\"a: b\")'").chomp