trafficserver: revision bump (yaml-cpp 0.7.0)

Closes #82097.

Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Michka Popoff <3406519+iMichka@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Rui Chen 2022-01-02 18:13:04 -05:00 committed by BrewTestBot
parent 2570d52e12
commit 86648ca2bb
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 42 additions and 13 deletions

View File

@ -1,26 +1,32 @@
class Trafficserver < Formula
desc "HTTP/1.1 compliant caching proxy server"
homepage "https://trafficserver.apache.org/"
url "https://downloads.apache.org/trafficserver/trafficserver-9.1.1.tar.bz2"
mirror "https://archive.apache.org/dist/trafficserver/trafficserver-9.1.1.tar.bz2"
sha256 "90cfa975858d50bc1995bee195f13ff45497773c2f90363332516fd3fdafd7e8"
license "Apache-2.0"
revision 1
stable do
url "https://downloads.apache.org/trafficserver/trafficserver-9.1.1.tar.bz2"
mirror "https://archive.apache.org/dist/trafficserver/trafficserver-9.1.1.tar.bz2"
sha256 "90cfa975858d50bc1995bee195f13ff45497773c2f90363332516fd3fdafd7e8"
# Fix macOS ARM build error due to undefined symbols
# TODO: remove in the next release
patch do
url "https://github.com/apache/trafficserver/commit/393e223ab0217645a18c112fe94afee029c90c63.patch?full_index=1"
sha256 "f412de78a8fa9cc8d79ebc9994d4530d15cf3993d7d363bdfae64c02114355c5"
end
end
bottle do
sha256 catalina: "c28ab8ba05de3d98d81bcdbfa89c771d458a3326023909a76d2893a6fd20e89c"
end
head do
url "https://github.com/apache/trafficserver.git"
url "https://github.com/apache/trafficserver.git", branch: "master"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
fails_with :clang do
build 800
cause "needs C++17"
end
end
depends_on "pkg-config" => :build
@ -30,6 +36,25 @@ class Trafficserver < Formula
depends_on "pcre"
depends_on "yaml-cpp"
on_macos do
# Need to regenerate configure to fix macOS 11+ build error due to undefined symbols
# See https://github.com/apache/trafficserver/pull/8556#issuecomment-995319215
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
on_linux do
depends_on "gcc"
end
fails_with gcc: "5" # needs C++17
fails_with :clang do
build 800
cause "needs C++17"
end
def install
# Per https://luajit.org/install.html: If MACOSX_DEPLOYMENT_TARGET
# is not set then it's forced to 10.4, which breaks compile on Mojave.
@ -48,7 +73,7 @@ class Trafficserver < Formula
--enable-experimental-plugins
]
system "autoreconf", "-fvi" if build.head?
system "autoreconf", "-fvi" if build.head? || OS.mac?
system "./configure", *args
# Fix wrong username in the generated startup script for bottles.
@ -58,7 +83,6 @@ class Trafficserver < Formula
"Makefile.PL INSTALLDIRS=$(INSTALLDIRS)",
"Makefile.PL INSTALLDIRS=$(INSTALLDIRS) INSTALLSITEMAN3DIR=#{man3}"
ENV.append "LDFLAGS", "-Wl,-undefined,dynamic_lookup" if OS.mac?
system "make" if build.head?
system "make", "install"
end
@ -75,7 +99,12 @@ class Trafficserver < Formula
end
test do
output = shell_output("#{bin}/trafficserver status")
assert_match "Apache Traffic Server is not running", output
if OS.mac?
output = shell_output("#{bin}/trafficserver status")
assert_match "Apache Traffic Server is not running", output
else
output = shell_output("#{bin}/trafficserver status 2>&1", 3)
assert_match "traffic_manager is not running", output
end
end
end