aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libcppa.rb
blob: 4f4546c47a6ee34465ae46bc075f0e084d168952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require 'formula'

class Libcppa < Formula
  homepage 'http://libcppa.blogspot.it'
  url 'http://github.com/Neverlord/libcppa/archive/V0.8.1.tar.gz'
  sha1 'd4f096aae2bb72e254ad6df45edf3fb62370acaa'

  depends_on :macos => :lion
  depends_on 'cmake' => :build

  option 'with-opencl', 'Build with OpenCL actors'
  option 'with-examples', 'Build examples'

  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
    ]

    args << '--with-opencl' if build.with? 'opencl'
    args << '--no-examples' if build.without? 'examples'

    system "./configure", *args
    system "make"
    system "make", "test"
    system "make", "install"
  end
end