homebrew-core/Formula/libplist.rb

45 lines
1.4 KiB
Ruby

require 'formula'
class Libplist < Formula
homepage 'http://cgit.sukimashita.com/libplist.git/'
url 'http://cgit.sukimashita.com/libplist.git/snapshot/libplist-1.10.tar.bz2'
sha1 'a642bb37eaa4bec428d0b2a4fa8399d80ee73a18'
head 'http://git.sukimashita.com/libplist.git'
bottle do
cellar :any
sha1 "65760247ede6c7a4ea469ebf823f146c244b303a" => :mavericks
sha1 "fbb4c635fa731899b746e94984e29d1cb8d1b971" => :mountain_lion
sha1 "8cd023361cea5865fd8e523b2db5f4b643c73b1c" => :lion
end
# Improve the default option descr. generated by `depends_on :python => :optional`
option 'with-python', 'Enable Cython Python bindings'
depends_on 'cmake' => :build
depends_on :python => :optional
depends_on 'Cython' => :python if build.with? 'python'
# Upstream patch for compilation on 10.9
patch do
url "https://github.com/libimobiledevice/libplist/commit/c56c8103f51c20c6fcf99e8bc9d83c380f503a1b.diff"
sha1 "fd9d0f4c15ee81ea589f826fd603281954f01df5"
end
def install
ENV.deparallelize # make fails on an 8-core Mac Pro
args = std_cmake_args
# Disable Swig Python bindings
args << "-DENABLE_SWIG='OFF'"
# Also disable Cython Python bindings if we're not building --with-python
args << "-DENABLE_CYTHON='OFF'" if build.without? 'python'
system "cmake", ".", "-DCMAKE_INSTALL_NAME_DIR=#{lib}", *args
system "make install"
end
end