class Caf < Formula # Renamed from libccpa desc "Implementation of the Actor Model for C++" homepage "http://actor-framework.org/" url "https://github.com/actor-framework/actor-framework/archive/0.14.4.tar.gz" sha256 "7e77b1edc708ac66be3ab2ba29506681458422e59a2e1b3cd801152ba345fb00" head "https://github.com/actor-framework/actor-framework.git", :branch => "develop" bottle do cellar :any sha256 "c161ba6878e220bd41ba3b387e04c9af5148a11ca76fda4b12cf90c3ad7f285c" => :el_capitan sha256 "058410d9287e31c1c5bc956749dd88b3756429fddcae9626fa3cf4fb0a482a6d" => :yosemite sha256 "cce3011d963e53ac1fe86e0155d76d6396b676066ddbf0c4aa7f9ea9917abd08" => :mavericks end needs :cxx11 option "with-opencl", "build with support for OpenCL actors" option "without-check", "skip unit tests (not recommended)" depends_on "cmake" => :build def install args = %W[./configure --prefix=#{prefix} --no-examples --build-static] args << "--no-opencl" if build.without? "opencl" system *args system "make" system "make", "test" if build.with? "check" system "make", "install" end test do (testpath/"test.cpp").write <<-EOS.undent #include #include using namespace caf; int main() { scoped_actor self; self->spawn([] { std::cout << "test" << std::endl; }); self->await_all_other_actors_done(); return 0; } EOS system *%W[#{ENV.cxx} -std=c++11 -stdlib=libc++ test.cpp -lcaf_core -o test] system "./test" end end