Merge pull request #207020 from Homebrew/bump-qpdf-11.10.0
[Homebrew/homebrew-core.git] / Formula / t / torsocks.rb
blob15a7a8bceb5af8973928c02a89645dc3bb6f10b7
1 class Torsocks < Formula
2   desc "Use SOCKS-friendly applications with Tor"
3   homepage "https://gitlab.torproject.org/tpo/core/torsocks"
4   url "https://gitlab.torproject.org/tpo/core/torsocks/-/archive/v2.4.0/torsocks-v2.4.0.tar.bz2"
5   sha256 "54b2e3255b697fb69bb92388376419bcef1f94d511da3980f9ed5cd8a41df3a8"
6   license "GPL-2.0-only"
7   head "https://gitlab.torproject.org/tpo/core/torsocks.git", branch: "main"
9   bottle do
10     rebuild 1
11     sha256 arm64_sequoia: "b5d5931945d4eb5f2fd28481d2498492f2de77e987d3d3622008281f9b40ca01"
12     sha256 arm64_sonoma:  "a8da2ce1c5139f9ead58af8a1ba51e6938bcd6073440927b37c0386238b28a73"
13     sha256 arm64_ventura: "af12596e6a8e4f4c4ff3fe6e78bdd10208a2f0dc6d7febb4e07045849b197b6a"
14     sha256 sonoma:        "895ce81c30fff7067666ab08c5e57fbc5f1d15fea84d5afb5439842a487a0675"
15     sha256 ventura:       "b028a43bbf38e062a4fae15d77d681a3b5a09ee9bc80076d28113276d74fc9dc"
16     sha256 x86_64_linux:  "162199d0f4d1f3419971ccac67db06cb27a50358d39b304f6098e683f4b2b935"
17   end
19   depends_on "autoconf" => :build
20   depends_on "automake" => :build
21   depends_on "libtool" => :build
23   # https://gitlab.torproject.org/legacy/trac/-/issues/28538
24   patch do
25     url "https://gitlab.torproject.org/legacy/trac/uploads/9efc1c0c47b3950aa91e886b01f7e87d/0001-Fix-macros-for-accept4-2.patch"
26     sha256 "97881f0b59b3512acc4acb58a0d6dfc840d7633ead2f400fad70dda9b2ba30b0"
27   end
29   def install
30     # Fix compile with newer Clang
31     ENV.append_to_cflags "-Wno-implicit-function-declaration" if DevelopmentTools.clang_build_version >= 1403
33     system "./autogen.sh"
34     system "./configure", "--disable-silent-rules", *std_configure_args
35     system "make", "install"
36   end
38   test do
39     system bin/"torsocks", "--help"
40   end
41 end