aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/libforensic1394.rb
blob: 6e5b2f5e1c060a6a23c2861859c602aa52ffe748 (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
class Libforensic1394 < Formula
  homepage "https://freddie.witherden.org/tools/libforensic1394/"
  url "https://freddie.witherden.org/tools/libforensic1394/releases/libforensic1394-0.2.tar.gz"
  sha1 "179526652977c291303e4f7edc3c7ed487eb0eca"
  head "git://git.freddie.witherden.org/forensic1394.git"

  bottle do
    cellar :any
    sha1 "325248a31ee7f4c57126d77afe4268cf572a9dc5" => :yosemite
    sha1 "311dddfc3d77a5ceb316fd909ad3cfae2268483b" => :mavericks
    sha1 "55ed86e44ef8c35019fc7e68743e0443b95cf2f7" => :mountain_lion
  end

  depends_on "cmake" => :build

  def install
    system "cmake", ".", *std_cmake_args
    system "make", "install"
  end

  test do
    (testpath/"test.c").write <<-EOS.undent
      #include <assert.h>
      #include <forensic1394.h>
      int main() {
        forensic1394_bus *bus;
        bus = forensic1394_alloc();
        assert(NULL != bus);
        forensic1394_destroy(bus);
        return 0;
      }
      EOS
    system ENV.cc, "test.c", "-L#{lib}", "-lforensic1394", "-o", "test"
    system "./test"
  end
end