Skip to content

Commit 12d5235

Browse files
committed
libedit: update 20240808-3.1 bottle.
1 parent e9b0b5c commit 12d5235

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Formula/lib/libedit.rb

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
class Libedit < Formula
2+
desc "BSD-style licensed readline alternative"
3+
homepage "https://thrysoee.dk/editline/"
4+
url "https://thrysoee.dk/editline/libedit-20240808-3.1.tar.gz"
5+
version "20240808-3.1"
6+
sha256 "5f0573349d77c4a48967191cdd6634dd7aa5f6398c6a57fe037cc02696d6099f"
7+
license "BSD-3-Clause"
8+
9+
livecheck do
10+
url :homepage
11+
regex(/href=.*?libedit[._-]v?(\d{4,}-\d+(?:\.\d+)+)\.t/i)
12+
end
13+
14+
bottle do
15+
root_url "https://github.com/gromgit/homebrew-core-aarch64_linux/releases/download/libedit-20240808-3.1"
16+
sha256 cellar: :any_skip_relocation, aarch64_linux: "9bead488e065bc35bbb9c09118d24945fc86fe4460124962a153c16e371be5f0"
17+
end
18+
19+
keg_only :provided_by_macos
20+
21+
uses_from_macos "ncurses"
22+
23+
def install
24+
system "./configure", "--disable-dependency-tracking",
25+
"--disable-silent-rules",
26+
"--prefix=#{prefix}"
27+
system "make", "install"
28+
end
29+
30+
test do
31+
(testpath/"test.c").write <<~EOS
32+
#include <stdio.h>
33+
#include <histedit.h>
34+
int main(int argc, char *argv[]) {
35+
EditLine *el = el_init(argv[0], stdin, stdout, stderr);
36+
return (el == NULL);
37+
}
38+
EOS
39+
system ENV.cc, "test.c", "-o", "test", "-L#{lib}", "-ledit", "-I#{include}"
40+
system "./test"
41+
end
42+
end

0 commit comments

Comments
 (0)