|
| 1 | +class Libtatsu < Formula |
| 2 | + desc "Library handling the communication with Apple's Tatsu Signing Server (TSS)" |
| 3 | + homepage "https://libimobiledevice.org/" |
| 4 | + url "https://github.com/libimobiledevice/libtatsu/releases/download/1.0.4/libtatsu-1.0.4.tar.bz2" |
| 5 | + sha256 "08094e58364858360e1743648581d9bad055ba3b06e398c660e481ebe0ae20b3" |
| 6 | + license "LGPL-2.1-or-later" |
| 7 | + head "https://github.com/libimobiledevice/libtatsu.git", branch: "master" |
| 8 | + |
| 9 | + bottle do |
| 10 | + sha256 cellar: :any, arm64_sequoia: "3490caa14c81cdffce28d50ce34880ab9b95a193a26906bf035492e3c37a3b2d" |
| 11 | + sha256 cellar: :any, arm64_sonoma: "870c73a45691c13d672235e9a3ed53d0a9d76a7f1b9aafda775b541c1735c3d1" |
| 12 | + sha256 cellar: :any, arm64_ventura: "4a33d3d2692d953e3bd1c0a8561011152ab9dcb5d029f0bbc33315233337fe52" |
| 13 | + sha256 cellar: :any, sonoma: "fafd0d67b5ccd44ee5c33fd4ba38f063029a89582a21e5a88104f00638bc620f" |
| 14 | + sha256 cellar: :any, ventura: "70223395b5fb5525f701e78c40b9b5b4c9f897fec98bee2dff4af63612440da4" |
| 15 | + sha256 cellar: :any_skip_relocation, x86_64_linux: "dd96d83e2a85b4c479893f9493d0ffb9d7f66d357216d08adb6a4a158f72a582" |
| 16 | + end |
| 17 | + |
| 18 | + depends_on "autoconf" => :build |
| 19 | + depends_on "automake" => :build |
| 20 | + depends_on "libtool" => :build |
| 21 | + depends_on "pkg-config" => :build |
| 22 | + depends_on "libplist" |
| 23 | + |
| 24 | + uses_from_macos "curl" |
| 25 | + |
| 26 | + def install |
| 27 | + if build.head? |
| 28 | + system "./autogen.sh", *std_configure_args, "--disable-silent-rules" |
| 29 | + else |
| 30 | + system "./configure", *std_configure_args, "--disable-silent-rules" |
| 31 | + end |
| 32 | + system "make", "install" |
| 33 | + end |
| 34 | + |
| 35 | + test do |
| 36 | + (testpath/"test.c").write <<~C |
| 37 | + #include "libtatsu/tss.h" |
| 38 | +
|
| 39 | + int main(int argc, char* argv[]) { |
| 40 | + tss_set_debug_level(0); |
| 41 | + return 0; |
| 42 | + } |
| 43 | + C |
| 44 | + system ENV.cc, "test.c", "-L#{lib}", "-ltatsu", "-o", "test" |
| 45 | + system "./test" |
| 46 | + end |
| 47 | +end |
0 commit comments