2015-08-09 12:10:20 +00:00
|
|
|
class Caf < Formula
|
|
|
|
# Renamed from libccpa
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Implementation of the Actor Model for C++"
|
2014-10-31 13:20:28 +00:00
|
|
|
homepage "http://actor-framework.org/"
|
2015-11-25 16:27:36 +00:00
|
|
|
url "https://github.com/actor-framework/actor-framework/archive/0.14.4.tar.gz"
|
|
|
|
sha256 "7e77b1edc708ac66be3ab2ba29506681458422e59a2e1b3cd801152ba345fb00"
|
2015-03-12 12:04:16 +00:00
|
|
|
head "https://github.com/actor-framework/actor-framework.git",
|
|
|
|
:branch => "develop"
|
2013-08-17 10:57:52 +00:00
|
|
|
|
2014-06-02 12:15:25 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-11-25 16:36:09 +00:00
|
|
|
sha256 "c161ba6878e220bd41ba3b387e04c9af5148a11ca76fda4b12cf90c3ad7f285c" => :el_capitan
|
|
|
|
sha256 "058410d9287e31c1c5bc956749dd88b3756429fddcae9626fa3cf4fb0a482a6d" => :yosemite
|
|
|
|
sha256 "cce3011d963e53ac1fe86e0155d76d6396b676066ddbf0c4aa7f9ea9917abd08" => :mavericks
|
2014-06-02 12:15:25 +00:00
|
|
|
end
|
|
|
|
|
2014-04-05 04:16:09 +00:00
|
|
|
needs :cxx11
|
|
|
|
|
2015-01-08 09:08:38 +00:00
|
|
|
option "with-opencl", "build with support for OpenCL actors"
|
|
|
|
option "without-check", "skip unit tests (not recommended)"
|
2013-08-17 10:57:52 +00:00
|
|
|
|
2015-08-09 12:10:20 +00:00
|
|
|
depends_on "cmake" => :build
|
|
|
|
|
2013-08-17 10:57:52 +00:00
|
|
|
def install
|
2015-01-08 09:08:38 +00:00
|
|
|
args = %W[./configure --prefix=#{prefix} --no-examples --build-static]
|
2014-10-31 13:20:28 +00:00
|
|
|
args << "--no-opencl" if build.without? "opencl"
|
2013-08-17 10:57:52 +00:00
|
|
|
|
2015-01-08 09:08:38 +00:00
|
|
|
system *args
|
2013-08-17 10:57:52 +00:00
|
|
|
system "make"
|
2014-10-31 13:20:28 +00:00
|
|
|
system "make", "test" if build.with? "check"
|
2013-08-17 10:57:52 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
2015-01-08 09:08:38 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.cpp").write <<-EOS.undent
|
|
|
|
#include <iostream>
|
|
|
|
#include <caf/all.hpp>
|
|
|
|
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
|
2013-08-17 10:57:52 +00:00
|
|
|
end
|