Skip to content

Commit

Permalink
libedit: update 20240808-3.1 bottle.
Browse files Browse the repository at this point in the history
  • Loading branch information
gromgit committed Sep 4, 2024
1 parent e9b0b5c commit 12d5235
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Formula/lib/libedit.rb
Original file line number Diff line number Diff line change
@@ -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 <stdio.h>
#include <histedit.h>
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

0 comments on commit 12d5235

Please sign in to comment.