Created
August 2, 2017 16:47
-
-
Save Haraguroicha/0dee2ee29c7376999178c5392080c16e to your computer and use it in GitHub Desktop.
Library to communicate with iOS devices natively (enable debug code)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Libimobiledevice < Formula | |
desc "Library to communicate with iOS devices natively" | |
homepage "http://www.libimobiledevice.org/" | |
url "http://www.libimobiledevice.org/downloads/libimobiledevice-1.2.0.tar.bz2" | |
sha256 "786b0de0875053bf61b5531a86ae8119e320edab724fc62fe2150cc931f11037" | |
revision 2 | |
bottle do | |
cellar :any | |
sha256 "7440711e4b0b3c52a1b543b770b18de751a362086419ded9310f55fe104f546f" => :sierra | |
sha256 "03715926236f2e946de067f87bde7876335b1ffe8267747b54e60e729dcd3548" => :el_capitan | |
sha256 "5b97af6571b290a889d4627fdc6eb63a6eaf83adeda40f4e9aaca765010bd017" => :yosemite | |
end | |
option "with-debug", "With debug code" | |
option "with-ios11", "With iOS 11 support patch" | |
def configure_args | |
args = %W[] | |
args << "enable-debug-code" if build.with?("debug") | |
args.map { |a| "--#{a}" } | |
end | |
head do | |
url "https://git.libimobiledevice.org/libimobiledevice.git" | |
depends_on "autoconf" => :build | |
depends_on "automake" => :build | |
depends_on "libtool" => :build | |
depends_on "libxml2" | |
end | |
if build.with?("ios11") | |
patch do | |
url "https://gist.githubusercontent.com/nikias/b351bf633d62703e0ff4f2fee9628401/raw/dbdf7bed1bb416ab0c1b80d32056591ad1bf3e7f/validate_pair_fix.diff" | |
sha256 "a093af09d1ccd5ca2804b9573990cf62bafa2f1ebbec36d223307b3c26db6c0e" | |
end | |
end | |
depends_on "pkg-config" => :build | |
depends_on "libtasn1" | |
depends_on "libplist" | |
depends_on "usbmuxd" | |
depends_on "openssl" | |
def install | |
system "./autogen.sh" | |
system "./configure", "--disable-dependency-tracking", | |
"--disable-silent-rules", | |
"--prefix=#{prefix}", | |
# As long as libplist builds without Cython | |
# bindings, libimobiledevice must as well. | |
"--without-cython", | |
*configure_args | |
system "make", "install" | |
end | |
test do | |
system "#{bin}/idevicedate", "--help" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
brew install https://gist.github.com/Haraguroicha/0dee2ee29c7376999178c5392080c16e/raw/libimobiledevice.rb --HEAD --with-ios11 --with-debug