Skip to content

Commit

Permalink
Merge pull request #149322 from Porkepix/bump-libnet-1.3
Browse files Browse the repository at this point in the history
libnet 1.3
  • Loading branch information
BrewTestBot authored Oct 9, 2023
2 parents a80a62e + 68c27a8 commit 2efdede
Showing 1 changed file with 29 additions and 22 deletions.
51 changes: 29 additions & 22 deletions Formula/lib/libnet.rb
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
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
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

# 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 <stdio.h>
#include <stdint.h>
#include <libnet.h>
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

0 comments on commit 2efdede

Please sign in to comment.