38 lines
1.2 KiB
Ruby
38 lines
1.2 KiB
Ruby
class Lzo < Formula
|
|
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"
|
|
|
|
bottle do
|
|
cellar :any
|
|
sha256 "26969f416ec79374e074f8434d6b7eece891fcbc8bee386e9bbd6d418149bc52" => :sierra
|
|
sha256 "77abd933fd899707c99b88731a743d5289cc6826bd4ff854a30e088fbbc61222" => :el_capitan
|
|
sha256 "0c3824de467014932ebdb3a2915a114de95036d7661c4d09df0c0191c9149e22" => :yosemite
|
|
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 <<-EOS.undent
|
|
#include <lzo/lzoconf.h>
|
|
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
printf("Testing LZO v%s in Homebrew.\\n",
|
|
LZO_VERSION_STRING);
|
|
return 0;
|
|
}
|
|
EOS
|
|
system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-o", "test"
|
|
assert_match "Testing LZO v#{version} in Homebrew.", shell_output("./test")
|
|
end
|
|
end
|