Files

46 lines
1.4 KiB
Ruby

class Lzo < Formula
bottle do
root_url "https://homebrew.mirror.ygg/bottles"
sha256 cellar: :any, arm64_sequoia: "6bb0401c41a18fd37071ec9591fe053a808f07552ff7ea22542faa470eb8e589"
sha256 cellar: :any, arm64_tahoe: "9863be33af38858d028657bdfbceaff00465b23a9857ce6ed93e2ad24f6adbd8"
sha256 cellar: :any_skip_relocation, x86_64_linux: "8413f94bb69f337f7e1837e7f525e703cac105d27ceeb29de5c08c7bbfa77b29"
end
desc "Real-time data compression library"
homepage "https://www.oberhumer.com/opensource/lzo/"
url "https://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz"
sha256 "c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072"
license "GPL-2.0-or-later"
livecheck do
url "https://www.oberhumer.com/opensource/lzo/download/"
regex(/href=.*?lzo[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
def install
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--enable-shared"
system "make"
system "make", "check"
system "make", "install"
end
test do
(testpath/"test.c").write <<~C
#include <lzo/lzoconf.h>
#include <stdio.h>
int main()
{
printf("Testing LZO v%s in Homebrew.\\n",
LZO_VERSION_STRING);
return 0;
}
C
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-o", "test"
assert_match "Testing LZO v#{version} in Homebrew.", shell_output("./test")
end
end