aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libcppa.rb
blob: 3f8db7d0624ed638395a524e0ff3b1b83cbb0bef (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
38
require "formula"

class Libcppa < Formula
  homepage "http://libcppa.blogspot.it"
  url "http://github.com/Neverlord/libcppa/archive/V0.9.4.tar.gz"
  sha1 "eba8002f087e55498edc0bf996fb7f211d7feec6"

  bottle do
    cellar :any
    sha1 "a90dee39274040acf70868ccc636e8c14e7c7ad5" => :mavericks
    sha1 "3ef83c6fad796a1e50f6fd417b81825a44f606d5" => :mountain_lion
  end

  depends_on "cmake" => :build

  needs :cxx11

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

  def install
    ENV.cxx11

    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