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

grpc 1.40.0 #84990

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions Formula/apache-arrow-glib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class ApacheArrowGlib < Formula
mirror "https://archive.apache.org/dist/arrow/arrow-5.0.0/apache-arrow-5.0.0.tar.gz"
sha256 "c3b4313eca594c20f761a836719721aaf0760001af896baec3ab64420ff9910a"
license "Apache-2.0"
revision 1
head "https://github.com/apache/arrow.git", branch: "master"

livecheck do
Expand Down
6 changes: 3 additions & 3 deletions Formula/apache-arrow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ApacheArrow < Formula
mirror "https://archive.apache.org/dist/arrow/arrow-5.0.0/apache-arrow-5.0.0.tar.gz"
sha256 "c3b4313eca594c20f761a836719721aaf0760001af896baec3ab64420ff9910a"
license "Apache-2.0"
revision 2
revision 3
head "https://github.com/apache/arrow.git", branch: "master"

bottle do
Expand All @@ -18,7 +18,7 @@ class ApacheArrow < Formula

depends_on "boost" => :build
depends_on "cmake" => :build
depends_on "llvm" => :build
depends_on "llvm@12" => :build
depends_on "brotli"
depends_on "glog"
depends_on "grpc"
Expand All @@ -39,7 +39,7 @@ def install
ENV.runtime_cpu_detection if Hardware::CPU.intel?

# link against system libc++ instead of llvm provided libc++
ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib
ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm@12"].opt_lib
args = %W[
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=TRUE
-DARROW_FLIGHT=ON
Expand Down
1 change: 1 addition & 0 deletions Formula/bear.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Bear < Formula
url "https://github.com/rizsotto/Bear/archive/3.0.16.tar.gz"
sha256 "877ee5e89e8445f74df95f2f3896597f04b86a4e5d0dbbca07ac71027dcb362d"
license "GPL-3.0-or-later"
revision 1
head "https://github.com/rizsotto/Bear.git", branch: "master"

bottle do
Expand Down
11 changes: 8 additions & 3 deletions Formula/grpc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ class Grpc < Formula
desc "Next generation open source RPC library and framework"
homepage "https://grpc.io/"
url "https://github.com/grpc/grpc.git",
tag: "v1.39.1",
revision: "2d6b8f61cfdd1c4d2d7c1aae65a4fbf00e3e0981"
tag: "v1.40.0",
revision: "ab6beb3f686857d687bf72e80b1fbaf7d3c3e4a4"
license "Apache-2.0"
head "https://github.com/grpc/grpc.git"

Expand Down Expand Up @@ -34,7 +34,9 @@ class Grpc < Formula
uses_from_macos "zlib"

on_macos do
depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1100
# This shouldn't be needed for `:test`, but there's a bug in `brew`:
# CompilerSelectionError: pdnsrec cannot be built with any available compilers.
depends_on "llvm" => [:build, :test] if DevelopmentTools.clang_build_version <= 1100
end

fails_with :clang do
Expand Down Expand Up @@ -85,6 +87,9 @@ def install
end

test do
# Force use of system clang on Mojave
ENV.clang if OS.mac? && (DevelopmentTools.clang_build_version <= 1100)

(testpath/"test.cpp").write <<~EOS
#include <grpc/grpc.h>
int main() {
Expand Down
1 change: 1 addition & 0 deletions Formula/mavsdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Mavsdk < Formula
tag: "v0.44.0",
revision: "ee84bd93b7e0ef802963503a34783772e31eb10e"
license "BSD-3-Clause"
revision 1

livecheck do
url :stable
Expand Down
38 changes: 32 additions & 6 deletions Formula/sysdig.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Sysdig < Formula
url "https://github.com/draios/sysdig/archive/0.27.1.tar.gz"
sha256 "b9d05854493d245a7a7e75f77fc654508f720aab5e5e8a3a932bd8eb54e49bda"
license "Apache-2.0"
revision 2
revision 3

livecheck do
url :stable
Expand All @@ -22,18 +22,24 @@ class Sysdig < Formula
depends_on "c-ares"
depends_on "jsoncpp"
depends_on "luajit"
depends_on "[email protected]"
depends_on "tbb"

uses_from_macos "curl"
uses_from_macos "ncurses"
uses_from_macos "zlib"

on_linux do
depends_on "elfutils"
depends_on "gcc"
depends_on "grpc"
depends_on "jq"
depends_on "libb64"
depends_on "protobuf"
end

fails_with gcc: "5" # C++17

# More info on https://gist.github.com/juniorz/9986999
resource "sample_file" do
url "https://gist.githubusercontent.com/juniorz/9986999/raw/a3556d7e93fa890a157a33f4233efaf8f5e01a6f/sample.scap"
Expand All @@ -45,15 +51,35 @@ def install
-DSYSDIG_VERSION=#{version}
-DUSE_BUNDLED_DEPS=OFF
-DCREATE_TEST_TARGETS=OFF
-DDIR_ETC=#{etc}
]
args << "-DBUILD_DRIVER=OFF" if OS.linux?

mkdir "build" do
system "cmake", "..", *args
system "make"
system "make", "install"
# `USE_BUNDLED_*=OFF` flags are implied by `USE_BUNDLED_DEPS=OFF`, but let's be explicit.
%w[LUAJIT JSONCPP ZLIB TBB JQ NCURSES B64 OPENSSL CURL CARES PROTOBUF GRPC].each do |dep|
args << "-DUSE_BUNDLED_#{dep}=OFF"
end

if OS.linux?
# Workaround for:
# error adding symbols: DSO missing from command line
abseil_libdir = Formula["abseil"].opt_lib
ENV.append "LDFLAGS", "-L#{abseil_libdir} -Wl,-rpath,#{abseil_libdir}"

# We need to compile with C++17 to use abseil.
args += %w[
-DBUILD_DRIVER=OFF
-DCMAKE_CXX_STANDARD=17
]
end

# From upstream build instructions:
# "Note: Sysdig's build can get confused with GNU make's parallel job option (-j)."
# https://github.com/draios/sysdig/wiki/How-to-Install-Sysdig-from-the-Source-Code#linux-and-osx
ENV.deparallelize if OS.linux?
system "cmake", "-S", ".", "-B", "build", *args
system "cmake", "--build", "build"
system "cmake", "--install", "build"

(pkgshare/"demos").install resource("sample_file").files("sample.scap")
end

Expand Down