-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libedit: update 20240808-3.1 bottle.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |