blob: 0c9e5e5742c8bac57740d88f1aea3b60cf0f2cd2 (
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 | require "formula"
class Libplist < Formula
  homepage "http://www.libimobiledevice.org"
  url "http://www.libimobiledevice.org/downloads/libplist-1.12.tar.bz2"
  sha1 "48f071c723387637ef2cc2980d4ca0627aab067b"
  bottle do
    cellar :any
    sha1 "abd1c58c509b305549310367feab44bca513d647" => :yosemite
    sha1 "e7bf9fbf14a51449b6b8dd5c2f084ace824f553f" => :mavericks
    sha1 "40172d50d4c836931dbfd38700a9088842c56b6c" => :mountain_lion
  end
  head do
    url "http://git.sukimashita.com/libplist.git"
    depends_on "automake" => :build
    depends_on "autoconf" => :build
    depends_on "libtool" => :build
  end
  option "with-python", "Enable Cython Python bindings"
  depends_on "pkg-config" => :build
  depends_on "libxml2"
  depends_on :python => :optional
  resource "cython" do
    url "http://cython.org/release/Cython-0.21.tar.gz"
    sha1 "f5784539870715e33b51374e9c4451ff6ff21c7f"
  end
  def install
    ENV.deparallelize
    args = %W[
      --disable-dependency-tracking
      --disable-silent-rules
      --prefix=#{prefix}
    ]
    if build.with? "python"
      resource("cython").stage do
        ENV.prepend_create_path "PYTHONPATH", buildpath+"lib/python2.7/site-packages"
        system "python", "setup.py", "build", "install", "--prefix=#{buildpath}",
                 "--single-version-externally-managed", "--record=installed.txt"
      end
      ENV.prepend_path "PATH", "#{buildpath}/bin"
    else
      args << "--without-cython"
    end
    system "./autogen.sh" if build.head?
    system "./configure", *args
    system "make", "install"
  end
end
 |