From d46c4eb3f1eced1feefb47e530043f547c2b09e5 Mon Sep 17 00:00:00 2001 From: Porkepix Date: Tue, 3 Oct 2023 10:51:40 +0200 Subject: [PATCH 1/2] libnet 1.3 libnet: add test libnet: add includes for test libnet: fix include libnet: use pkg-config in test libnet: remove whitespace Co-authored-by: Sean Molenaar --- Formula/lib/libnet.rb | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/Formula/lib/libnet.rb b/Formula/lib/libnet.rb index efa9c0668234..ea7ca0a181b8 100644 --- a/Formula/lib/libnet.rb +++ b/Formula/lib/libnet.rb @@ -1,8 +1,8 @@ class Libnet < Formula desc "C library for creating IP packets" homepage "https://github.com/libnet/libnet" - url "https://github.com/libnet/libnet/releases/download/v1.2/libnet-1.2.tar.gz" - sha256 "caa4868157d9e5f32e9c7eac9461efeff30cb28357f7f6bf07e73933fb4edaa7" + url "https://github.com/libnet/libnet/releases/download/v1.3/libnet-1.3.tar.gz" + sha256 "ad1e2dd9b500c58ee462acd839d0a0ea9a2b9248a1287840bc601e774fb6b28f" license "BSD-2-Clause" bottle do @@ -21,16 +21,28 @@ class Libnet < Formula end depends_on "doxygen" => :build - - # Fix -flat_namespace being used on Big Sur and later. - patch do - url "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" - sha256 "35acd6aebc19843f1a2b3a63e880baceb0f5278ab1ace661e57a502d9d78c93c" - end + depends_on "pkg-config" => :test def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" + system "./configure", *std_configure_args system "make", "install" end + + test do + flags = shell_output("pkg-config --libs --cflags libnet").chomp.split + (testpath/"test.c").write <<~EOS + #include + #include + #include + + int main(int argc, const char *argv[]) + { + printf("%s", libnet_version()); + return 0; + } + EOS + + system ENV.cc, "test.c", *flags, "-o", "test" + assert_match version.to_s, shell_output("./test") + end end From 68c27a815aad10ea0aa9936f5362324f91fc3141 Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Mon, 9 Oct 2023 01:55:50 +0000 Subject: [PATCH 2/2] libnet: update 1.3 bottle. --- Formula/lib/libnet.rb | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Formula/lib/libnet.rb b/Formula/lib/libnet.rb index ea7ca0a181b8..1445cdb835d9 100644 --- a/Formula/lib/libnet.rb +++ b/Formula/lib/libnet.rb @@ -6,18 +6,13 @@ class Libnet < Formula license "BSD-2-Clause" bottle do - sha256 cellar: :any, arm64_sonoma: "954b5ea3a7842019c76564dffa1cdd576bf11531df7f24fe0203d3308155463f" - sha256 cellar: :any, arm64_ventura: "a723fce072aa1d71f2d9f3af1fe647e40348ae679705a902e6fe884c6650d3d0" - sha256 cellar: :any, arm64_monterey: "e35635f157e1fa140f454b451ef60d5dadc60f0f7513fbcd82399193d4ab9155" - sha256 cellar: :any, arm64_big_sur: "bc8839eea92ce445c790f503ec9342bbc254fba52751a3ac0ed90b5d13bed2f6" - sha256 cellar: :any, sonoma: "d8a2f0d902038480d4314bd04ec6dfcb8880c9307b811c07797eed3167a66b5e" - sha256 cellar: :any, ventura: "938743e30a5f50726f54c9b2cbcd1e72e6897c4964259ee692dab300d9628738" - sha256 cellar: :any, monterey: "8fbd2bdf18193db957bf4312cf8b3d90ded8a141831430350a9e60f13d421e40" - sha256 cellar: :any, big_sur: "9ecd86c12061ee31384cc784031ee4b0fb05e3ae79ff6c4c6b3f2e61690e8ad4" - sha256 cellar: :any, catalina: "0ecfbf2539a6e051ca8aa5962c0ee7cb57ffd173cf654b0eec8152c1a3fbf133" - sha256 cellar: :any, mojave: "cadba638a54f4d5646a3510439ab89317ed23df3c45b12704b78065bb127fbc4" - sha256 cellar: :any, high_sierra: "44e7b11e8f900f9d6f8e0d1a5deed99c46078dd2dbc997937f713ce5a1ac0f38" - sha256 cellar: :any_skip_relocation, x86_64_linux: "755c46e11346388df5a8a3e2f50bf7bb449abfc889abfc561a1784e5d17c8b97" + sha256 cellar: :any, arm64_sonoma: "9a0e1d5eb30194a4309588c383cc4e179804e88314b280e2d04c96069ebef867" + sha256 cellar: :any, arm64_ventura: "9f808a8325a153535d7b22da23d652929bfce526493dc0ee5a4505a971ae7b43" + sha256 cellar: :any, arm64_monterey: "6d6326c365e861f65a1f13438ccb409600f2dc7783e8bfc42835f247e545d4c2" + sha256 cellar: :any, sonoma: "8e92431961fce081d8094362611f3550938938f3e8d7de7c369c691be9ef77c2" + sha256 cellar: :any, ventura: "c1f1f76069f4f73b50c02c7434e77f0eb22f16a92c2e7756101c41bd40ae989c" + sha256 cellar: :any, monterey: "4f2d247267535a9a8cd3eebf91891d3c0f555035533db9a40e32b03ca47c9e30" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c80410be8c65b37b135596873de64f7587068d32d0b8ba8ba91f4299f609e8ed" end depends_on "doxygen" => :build