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' # 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' def patches # Upstream patch for compilation on 10.9 "https://github.com/libimobiledevice/libplist/commit/c56c8103f51c20c6fcf99e8bc9d83c380f503a1b.patch" 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