Merge pull request #207020 from Homebrew/bump-qpdf-11.10.0
[Homebrew/homebrew-core.git] / Formula / e / enet.rb
blob80d3e0a371ad48118af3953955e2210940beaa06
1 class Enet < Formula
2   desc "Provides a network communication layer on top of UDP"
3   homepage "http://enet.bespin.org"
4   url "http://enet.bespin.org/download/enet-1.3.18.tar.gz"
5   sha256 "2a8a0c5360d68bb4fcd11f2e4c47c69976e8d2c85b109dd7d60b1181a4f85d36"
6   license "MIT"
7   head "https://github.com/lsalzman/enet.git", branch: "master"
9   livecheck do
10     url "http://enet.bespin.org/Downloads.html"
11     regex(/href=.*?enet[._-]v?(\d+(?:\.\d+)+)\.t/i)
12   end
14   bottle do
15     sha256 cellar: :any,                 arm64_sequoia:  "c1785264ccb278a9595c68354604b48a02d1e05f5c1d9ce1e8f2d3d6baa704d9"
16     sha256 cellar: :any,                 arm64_sonoma:   "e078c1459c03714c7bfacf48e92c9245ac4d4842479826b4f76d9e49cca66e45"
17     sha256 cellar: :any,                 arm64_ventura:  "8bcb6508f5e8ff25fe137e0f3373a3f005c3d26797881cbce22cef4056e76c1f"
18     sha256 cellar: :any,                 arm64_monterey: "e2c4a31201788842f820b7f90745e90286b7675940d3edb65f545e3e021b057c"
19     sha256 cellar: :any,                 sonoma:         "826941d0ca8527b5be6121478c8f713b3f72ca69413cf43ef655a616ca0e0551"
20     sha256 cellar: :any,                 ventura:        "ef5837ce67084857ced1dcc5d467f644420a4eb0eac7cb846134274e1c58d0b5"
21     sha256 cellar: :any,                 monterey:       "f6eb8f65dc979ec67b61ece60ffad7543b6c246b37400f48809c97a0d56ee987"
22     sha256 cellar: :any_skip_relocation, x86_64_linux:   "e4f47239030ad6e2af53bb52c6a040f0bb46424ffd3909819c190e939a63a8a3"
23   end
25   def install
26     system "./configure", *std_configure_args.reject { |s| s["--disable-debug"] }
27     system "make", "install"
28   end
30   test do
31     (testpath/"test.c").write <<~C
32       #include <enet/enet.h>
33       #include <stdio.h>
35       int main (int argc, char ** argv)
36       {
37         if (enet_initialize () != 0)
38         {
39           fprintf (stderr, "An error occurred while initializing ENet.\\n");
40           return EXIT_FAILURE;
41         }
42         atexit (enet_deinitialize);
43       }
44     C
45     system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lenet", "-o", "test"
46     system testpath/"test"
47   end
48 end