2013-08-17 10:57:52 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libcppa < Formula
|
|
|
|
homepage 'http://libcppa.blogspot.it'
|
2014-03-17 16:12:54 +00:00
|
|
|
url 'https://github.com/Neverlord/libcppa/archive/V0.8.1.tar.gz'
|
2014-02-11 23:20:26 +00:00
|
|
|
sha1 'd4f096aae2bb72e254ad6df45edf3fb62370acaa'
|
2013-08-17 10:57:52 +00:00
|
|
|
|
|
|
|
depends_on 'cmake' => :build
|
|
|
|
|
2014-04-05 04:16:09 +00:00
|
|
|
needs :cxx11
|
|
|
|
|
2013-08-17 10:57:52 +00:00
|
|
|
option 'with-opencl', 'Build with OpenCL actors'
|
2014-02-11 23:20:26 +00:00
|
|
|
option 'with-examples', 'Build examples'
|
2013-08-17 10:57:52 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--build-static
|
|
|
|
--disable-context-switching
|
|
|
|
]
|
|
|
|
|
2014-02-11 23:20:26 +00:00
|
|
|
args << '--with-opencl' if build.with? 'opencl'
|
2014-03-06 20:40:26 +00:00
|
|
|
args << '--no-examples' if build.without? 'examples'
|
2013-08-17 10:57:52 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
|
|
|
system "make"
|
|
|
|
system "make", "test"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
end
|