Skip to content

Commit

Permalink
ssldump: fix Xcode 12 build
Browse files Browse the repository at this point in the history
This was hairy because it's built around such an ancient autoconf
version that just a simple "autoreconf" isn't enough.  However
once you get the right automake bits in place it does actually
compile completely happily.

Closes #66514.

Signed-off-by: FX Coudert <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
  • Loading branch information
mitchblank authored and BrewTestBot committed Dec 8, 2020
1 parent 9816320 commit 52bea8a
Showing 1 changed file with 16 additions and 4 deletions.
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 "[email protected]"

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

0 comments on commit 52bea8a

Please sign in to comment.