From 12d523588d03b402b5b735962a4566c06bbf6d2f Mon Sep 17 00:00:00 2001 From: Adrian Ho Date: Thu, 5 Sep 2024 00:50:12 +0800 Subject: [PATCH] libedit: update 20240808-3.1 bottle. --- Formula/lib/libedit.rb | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Formula/lib/libedit.rb diff --git a/Formula/lib/libedit.rb b/Formula/lib/libedit.rb new file mode 100644 index 00000000000..3421b8e93cf --- /dev/null +++ b/Formula/lib/libedit.rb @@ -0,0 +1,42 @@ +class Libedit < Formula + desc "BSD-style licensed readline alternative" + homepage "https://thrysoee.dk/editline/" + url "https://thrysoee.dk/editline/libedit-20240808-3.1.tar.gz" + version "20240808-3.1" + sha256 "5f0573349d77c4a48967191cdd6634dd7aa5f6398c6a57fe037cc02696d6099f" + license "BSD-3-Clause" + + livecheck do + url :homepage + regex(/href=.*?libedit[._-]v?(\d{4,}-\d+(?:\.\d+)+)\.t/i) + end + + bottle do + root_url "https://github.com/gromgit/homebrew-core-aarch64_linux/releases/download/libedit-20240808-3.1" + sha256 cellar: :any_skip_relocation, aarch64_linux: "9bead488e065bc35bbb9c09118d24945fc86fe4460124962a153c16e371be5f0" + end + + keg_only :provided_by_macos + + uses_from_macos "ncurses" + + def install + system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}" + 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