homebrew-core/Formula/libetpan.rb

34 lines
1 KiB
Ruby
Raw Normal View History

class Libetpan < Formula
desc "Portable mail library handling several protocols"
homepage "https://www.etpan.org/libetpan.html"
url "https://github.com/dinhviethoa/libetpan/archive/1.7.2.tar.gz"
sha256 "32797282a420f3174f4a679548e20fa2bb4acb404b827d62c2f44d3de4eb3120"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
def install
system "./autogen.sh", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make", "install"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <libetpan/libetpan.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char ** argv)
{
printf("version is %d.%d",libetpan_get_version_major(), libetpan_get_version_minor());
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-letpan", "-o", "test"
system "./test"
end
end