aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorHermiod2013-08-17 12:57:52 +0200
committerXiyue Deng2013-09-01 03:02:27 -0700
commitfbc33db7ccb678b3d13651775f327e6960a3a705 (patch)
treea83cabd2e234ac45ed6cdcb7f0213b0c49d1b6b9 /Library
parente75bf07601c685958a871444bbbd919998debce7 (diff)
downloadhomebrew-fbc33db7ccb678b3d13651775f327e6960a3a705.tar.bz2
libcppa: 0.7.1 - Actor Model implementation for C++11
Closes #21952. Signed-off-by: Xiyue Deng <manphiz@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/libcppa.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/Library/Formula/libcppa.rb b/Library/Formula/libcppa.rb
new file mode 100644
index 000000000..32082609e
--- /dev/null
+++ b/Library/Formula/libcppa.rb
@@ -0,0 +1,41 @@
+require 'formula'
+
+class Libcppa < Formula
+ homepage 'http://libcppa.blogspot.it'
+ url 'https://github.com/Neverlord/libcppa/archive/V0.7.1.tar.gz'
+ sha1 '0f1f685e94bfa16625370b978ff26deaf799b94e'
+
+ depends_on :macos => :lion
+ depends_on 'cmake' => :build
+
+ option 'with-opencl', 'Build with OpenCL actors'
+
+ def caveats
+ "Libcppa requires a C++11 compliant compiler"
+ end
+
+ 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
+ ]
+
+ if build.with? 'opencl'
+ args << "--with-opencl"
+ end
+
+ system "./configure", *args
+ system "make"
+ system "make", "test"
+ system "make", "install"
+ end
+end