2013-08-17 10:57:52 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Libcppa < Formula
|
|
|
|
homepage 'http://libcppa.blogspot.it'
|
2014-02-11 23:20:26 +00:00
|
|
|
url 'http://github.com/Neverlord/libcppa/archive/V0.8.1.tar.gz'
|
|
|
|
sha1 'd4f096aae2bb72e254ad6df45edf3fb62370acaa'
|
2013-08-17 10:57:52 +00:00
|
|
|
|
|
|
|
depends_on :macos => :lion
|
|
|
|
depends_on 'cmake' => :build
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
fails_with :gcc do
|
|
|
|
cause 'libcppa requires a C++11 compliant compiler.'
|
|
|
|
end
|
|
|
|
|
|
|
|
fails_with :llvm do
|
|
|
|
cause 'libcppa requires a C++11 compliant compiler.'
|
|
|
|
end
|
|
|
|
|
|
|
|
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'
|
|
|
|
args << '--no-examples' unless build.with? 'examples'
|
2013-08-17 10:57:52 +00:00
|
|
|
|
|
|
|
system "./configure", *args
|
|
|
|
system "make"
|
|
|
|
system "make", "test"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
end
|