2013-08-17 10:57:52 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libcppa < Formula
|
|
|
|
homepage 'http://libcppa.blogspot.it'
|
2014-05-05 20:24:04 +00:00
|
|
|
url 'http://github.com/Neverlord/libcppa/archive/V0.9.1.tar.gz'
|
|
|
|
sha1 '70ea94e25b508d85ee4899f9632eb71b79f17480'
|
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
|
2014-05-05 20:24:04 +00:00
|
|
|
ENV.cxx11
|
|
|
|
|
2013-08-17 10:57:52 +00:00
|
|
|
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
|