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/"
|
2016-03-15 19:46:34 +00:00
|
|
|
url "https://github.com/actor-framework/actor-framework/archive/0.14.5.tar.gz"
|
|
|
|
sha256 "afc4bc928ecd7d017768e5c85b7300196aa5b70ef11d97e11b21a1ae28ce9d3f"
|
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
|
2016-03-16 01:48:07 +00:00
|
|
|
sha256 "5af9861630a48af1f2ca080971ca054b49e002722ff8c427383c86a49ece0a4b" => :el_capitan
|
|
|
|
sha256 "14594e9c59715838b582410ead87d7a1995338a02401865d02f8107805a050e3" => :yosemite
|
|
|
|
sha256 "c3385b1d17da35c69b69a1abaae9e99de541533ee8a31bff227060309e049816" => :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"
|
2015-12-07 21:25:03 +00:00
|
|
|
option "without-test", "skip unit tests (not recommended)"
|
|
|
|
|
|
|
|
deprecated_option "without-check" => "without-test"
|
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-12-07 21:25:03 +00:00
|
|
|
args = %W[--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-12-07 21:25:03 +00:00
|
|
|
system "./configure", *args
|
2013-08-17 10:57:52 +00:00
|
|
|
system "make"
|
2015-12-07 21:25:03 +00:00
|
|
|
system "make", "test" if build.with? "test"
|
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
|
2015-12-07 21:25:03 +00:00
|
|
|
system ENV.cxx, "-std=c++11", "-stdlib=libc++", "test.cpp",
|
|
|
|
"-lcaf_core", "-o", "test"
|
2015-01-08 09:08:38 +00:00
|
|
|
system "./test"
|
|
|
|
end
|
2013-08-17 10:57:52 +00:00
|
|
|
end
|