Skip to content

Commit

Permalink
libimobiledevice-glue 1.0.0 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealKeto committed Sep 20, 2023
1 parent ade33bc commit 93dff63
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Formula/lib/libimobiledevice-glue.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
class LibimobiledeviceGlue < Formula
desc "Library with common system API code for libimobiledevice projects"
homepage "https://libimobiledevice.org/"
url "https://github.com/libimobiledevice/libimobiledevice-glue/releases/download/1.0.0/libimobiledevice-glue-1.0.0.tar.bz2"
sha256 "160a70e2edc318312fc40b6a71f85bfdfabdfba10bcfc5bb6fb40ed95088f4a0"
license "LGPL-2.1-or-later"
head "https://github.com/libimobiledevice/libimobiledevice-glue.git", branch: "master"

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "pkg-config" => :build
depends_on "libplist"

def install
if build.head?
system "./autogen.sh", *std_configure_args, "--disable-silent-rules"
else
system "./configure", *std_configure_args, "--disable-silent-rules"
end
system "make", "install"
end

test do
(testpath/"test.c").write <<~EOS
#include "libimobiledevice-glue/utils.h"
int main(int argc, char* argv[]) {
char *uuid = generate_uuid();
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-limobiledevice-glue-1.0", "-o", "test"
system "./test"
end
end

0 comments on commit 93dff63

Please sign in to comment.