Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssldump: fix Xcode 12 build #66514

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions Formula/ssldump.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class Ssldump < Formula
sha256 "096ee72c50d64cddefb9d90f2b9c904322eaf36eab4c76bb914a60387b75baf9" => :high_sierra
end

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libpcap"
depends_on "openssl@1.1"

Expand All @@ -31,15 +33,25 @@ def install
ENV["LIBS"] = "-lssl -lcrypto"

# .dylib, not .a
inreplace "configure", "if test -f $dir/libpcap.a; then",
"if test -f $dir/#{shared_library("libpcap")}; then"
inreplace "configure.in", "if test -f $dir/libpcap.a; then",
"if test -f $dir/#{shared_library("libpcap")}; then"

# The configure file that ships in the 0.9b3 tarball is too old to work
# with Xcode 12
system "autoreconf", "--verbose", "--install", "--force"

# Normally we'd get these files installed as part of autoreconf. However,
# this project doesn't use Makefile.am so they're not brought in. The copies
# in the 0.9b3 tarball are too old to detect MacOS
%w[config.guess config.sub].each do |fn|
cp "#{Formula["automake"].opt_prefix}/share/automake-#{Formula["automake"].version.major_minor}/#{fn}", fn
end

system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--mandir=#{man}",
"--with-pcap=#{Formula["libpcap"].opt_prefix}",
"osx"
"--with-pcap=#{Formula["libpcap"].opt_prefix}"
system "make"
# force install as make got confused by install target and INSTALL file.
system "make", "install", "-B"
Expand Down