homebrew-core/Formula/etl.rb

31 lines
879 B
Ruby
Raw Normal View History

2011-03-10 05:11:03 +00:00
class Etl < Formula
desc "Extensible Template Library"
2015-01-02 01:03:12 +00:00
homepage "http://synfig.org"
2015-05-21 13:40:56 +00:00
url "https://downloads.sourceforge.net/project/synfig/releases/1.0/source/ETL-0.04.18.tar.gz"
sha256 "53953e477a37d2e870e3be4b22f519474c24537b0e6eb1633e3402273a684a98"
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
2015-05-21 13:40:56 +00:00
system "make", "install"
end
test do
(testpath/"test.cpp").write <<-EOS.undent
#include <ETL/misc>
int main(int argc, char *argv[])
{
int rv = etl::ceil_to_int(5.5);
return 6 - rv;
}
EOS
flags = (ENV.cflags || "").split + (ENV.cppflags || "").split + (ENV.ldflags || "").split
flags += %W[
-I#{include}
-lpthread
]
system ENV.cxx, "test.cpp", "-o", "test", *flags
system "./test"
end
end