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

Protobuf 21.2 #105712

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0aadbf4
protobuf 21.2
ezzieyguywuf Jul 12, 2022
385c4d7
protobuf@3 3.20.1 (new formula)
carlocab Jul 14, 2022
9182b5a
apache-arrow: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
b4d2eab
bear: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
6624487
bloaty: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
5302aef
caffe: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
a4ef62a
etcd-cpp-apiv3: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
b0f4c9d
fastnetmon: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
78899f0
grpc: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
78f73b8
libphonenumber: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
63075df
libpulsar: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
b60435e
libtorch: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
2662cb0
mavsdk: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
4dcf649
monero: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
10dd7c4
mosh: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
8d8a4a5
mysql: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
812be72
ncnn: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
c5f12e3
netdata: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
952b722
ola: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
fb15256
opencv: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
773cc7d
or-tools: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
db950dd
osm-pbf: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
39068cd
percona-server: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
724784a
percona-xtrabackup: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
2e0d06a
protobuf-c: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
d2b52c2
protoc-gen-grpc-web: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
9fba7aa
rethinkdb: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
02849f3
sysdig: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
bfe2594
torchvision: revision bump (protobuf 21.2)
carlocab Jul 13, 2022
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
File renamed without changes.
1 change: 1 addition & 0 deletions Aliases/[email protected]
10 changes: 4 additions & 6 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-8.0.0/apache-arrow-8.0.0.tar.gz"
sha256 "ad9a05705117c989c116bae9ac70492fe015050e1b80fb0e38fde4b5d863aaa3"
license "Apache-2.0"
revision 3
revision 4
head "https://github.com/apache/arrow.git", branch: "master"

bottle do
Expand Down Expand Up @@ -77,11 +77,9 @@ def install

args << "-DARROW_MIMALLOC=ON" unless Hardware::CPU.arm?

mkdir "build" do
system "cmake", "../cpp", *std_cmake_args, *args
system "make"
system "make", "install"
end
system "cmake", "-S", "cpp", "-B", "build", *std_cmake_args, *args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

test do
Expand Down
10 changes: 4 additions & 6 deletions Formula/bear.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Bear < Formula
url "https://github.com/rizsotto/Bear/archive/3.0.19.tar.gz"
sha256 "2fcfe2c6e029182cfc54ed26b3505c0ef12b0f43df03fb587f335afdc2ca9431"
license "GPL-3.0-or-later"
revision 3
revision 4
head "https://github.com/rizsotto/Bear.git", branch: "master"

bottle do
Expand Down Expand Up @@ -51,11 +51,9 @@ def install
-DENABLE_FUNC_TESTS=OFF
]

mkdir "build" do
system "cmake", "..", *args, *std_cmake_args
system "make", "all"
system "make", "install"
end
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

test do
Expand Down
9 changes: 6 additions & 3 deletions Formula/bloaty.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Bloaty < Formula
url "https://github.com/google/bloaty/releases/download/v1.1/bloaty-1.1.tar.bz2"
sha256 "a308d8369d5812aba45982e55e7c3db2ea4780b7496a5455792fb3dcba9abd6f"
license "Apache-2.0"
revision 8
revision 9

bottle do
sha256 cellar: :any, arm64_monterey: "ba9f5939fc1a0b26f069c79e03e82c46172f3e7414cdd9a8575180535dd7ac74"
Expand All @@ -22,8 +22,11 @@ class Bloaty < Formula
depends_on "re2"

def install
system "cmake", ".", *std_cmake_args
system "make", "install"
# https://github.com/protocolbuffers/protobuf/issues/9947
ENV.append_to_cflags "-DNDEBUG"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little weird that we need this, since I always thought that CMAKE_BUILD_TYPE=Release already added -DNDEBUG to C[XX]FLAGS.

It turns out that this is only true for CMAKE_C_FLAGS:

❯ cat CMakeLists.txt
cmake_minimum_required(VERSION 3.20)
project(flags C)
message(STATUS "CMAKE_C_FLAGS_RELEASE = ${CMAKE_C_FLAGS_RELEASE}")
message(STATUS "CMAKE_CXX_FLAGS_RELEASE = ${CMAKE_CXX_FLAGS_RELEASE}")
❯ cmake .
-- The C compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- CMAKE_C_FLAGS_RELEASE = -O3 -DNDEBUG
-- CMAKE_CXX_FLAGS_RELEASE =
-- Configuring done
-- Generating done
-- Build files have been written to: /var/folders/kb/pf4wbfc512z47l56g5072l900000gn/T/tmp.KkoU3ADrCO

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no, it's definitely there:

❯ cat CMakeLists.txt
cmake_minimum_required(VERSION 3.20)
project(flags C CXX)
message(STATUS "CMAKE_C_FLAGS_RELEASE = ${CMAKE_C_FLAGS_RELEASE}")
message(STATUS "CMAKE_CXX_FLAGS_RELEASE = ${CMAKE_CXX_FLAGS_RELEASE}")
❯ cmake .
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_C_FLAGS_RELEASE = -O3 -DNDEBUG
-- CMAKE_CXX_FLAGS_RELEASE = -O3 -DNDEBUG
-- Configuring done
-- Generating done
-- Build files have been written to: /var/folders/kb/pf4wbfc512z47l56g5072l900000gn/T/tmp.KkoU3ADrCO

system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

test do
Expand Down
9 changes: 5 additions & 4 deletions Formula/caffe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Caffe < Formula
url "https://github.com/BVLC/caffe/archive/1.0.tar.gz"
sha256 "71d3c9eb8a183150f965a465824d01fe82826c22505f7aa314f700ace03fa77f"
license "BSD-2-Clause"
revision 39
revision 40

livecheck do
url :stable
Expand Down Expand Up @@ -61,7 +61,7 @@ class Caffe < Formula
def install
ENV.cxx11

args = std_cmake_args + %w[
args = %w[
-DALLOW_LMDB_NOLOCK=OFF
-DBUILD_SHARED_LIBS=ON
-DBUILD_docs=OFF
Expand All @@ -77,8 +77,9 @@ def install
]
args << "-DBLAS=Open" if OS.linux?

system "cmake", ".", *args
system "make", "install"
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
pkgshare.install "models"
end

Expand Down
2 changes: 1 addition & 1 deletion Formula/etcd-cpp-apiv3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class EtcdCppApiv3 < Formula
url "https://github.com/etcd-cpp-apiv3/etcd-cpp-apiv3/archive/refs/tags/v0.2.6.tar.gz"
sha256 "ef2bee616031316bc4cbc416cf9932fd1b2273f5f8fe9c24d2b3602c14277e8a"
license "BSD-3-Clause"
revision 3
revision 4

bottle do
sha256 cellar: :any, arm64_monterey: "0b3ff796f8f384c630d74fed859dc5b6e093f8a11611e18ba94f7cd94fb412a4"
Expand Down
2 changes: 1 addition & 1 deletion Formula/fastnetmon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Fastnetmon < Formula
url "https://github.com/pavel-odintsov/fastnetmon/archive/refs/tags/v1.2.2.tar.gz"
sha256 "4de0fe9390673f7e2fc8f3f1e3696a1455ea659049430c4870fcf82600c2ea2d"
license "GPL-2.0-only"
revision 2
revision 3

bottle do
sha256 cellar: :any, arm64_monterey: "b6c75424de702e5fc844e7d9784153cdbd94d5a6fabde0be51443600aa4e54fa"
Expand Down
1 change: 1 addition & 0 deletions Formula/grpc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Grpc < Formula
tag: "v1.47.0",
revision: "2717aa8c9b768de99c811628af4e8c30d6c2da4f"
license "Apache-2.0"
revision 1
head "https://github.com/grpc/grpc.git", branch: "master"

# The "latest" release on GitHub is sometimes for an older major/minor and
Expand Down
2 changes: 1 addition & 1 deletion Formula/libphonenumber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Libphonenumber < Formula
url "https://github.com/google/libphonenumber/archive/v8.12.44.tar.gz"
sha256 "02337c60e3a055e0a4bc4e0a60e8ae31aa567adce59f266cfd37961fceea74c2"
license "Apache-2.0"
revision 2
revision 3

livecheck do
url :stable
Expand Down
1 change: 1 addition & 0 deletions Formula/libpulsar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Libpulsar < Formula
mirror "https://archive.apache.org/dist/pulsar/pulsar-2.10.1/apache-pulsar-2.10.1-src.tar.gz"
sha256 "a8c8fbea39f1447ebc0c4e899198d0acb48dce05c69ceec78cf8e56856af6946"
license "Apache-2.0"
revision 1

bottle do
sha256 cellar: :any, arm64_monterey: "900dd29116523ff79477f4230d8c89089c1e1f531e788a3b07565ba751fabaa8"
Expand Down
1 change: 1 addition & 0 deletions Formula/libtorch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Libtorch < Formula
tag: "v1.12.0",
revision: "67ece03c8cd632cce9523cd96efde6f2d1cc8121"
license "BSD-3-Clause"
revision 1

livecheck do
url :stable
Expand Down
2 changes: 1 addition & 1 deletion Formula/mavsdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Mavsdk < Formula
tag: "v1.4.3",
revision: "2d2d85c60123c7d071b1bf50354fc6c06c12115b"
license "BSD-3-Clause"
revision 1
revision 2

livecheck do
url :stable
Expand Down
2 changes: 1 addition & 1 deletion Formula/monero.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Monero < Formula
tag: "v0.17.3.2",
revision: "424e4de16b98506170db7b0d7d87a79ccf541744"
license "BSD-3-Clause"
revision 1
revision 2

livecheck do
url :stable
Expand Down
5 changes: 4 additions & 1 deletion Formula/mosh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Mosh < Formula
desc "Remote terminal application"
homepage "https://mosh.org"
license "GPL-3.0-or-later"
revision 18
revision 19

stable do
url "https://mosh.org/mosh-1.3.2.tar.gz"
Expand Down Expand Up @@ -73,6 +73,9 @@ class Mosh < Formula
def install
ENV.cxx11

# https://github.com/protocolbuffers/protobuf/issues/9947
ENV.append_to_cflags "-DNDEBUG"

# teach mosh to locate mosh-client without referring
# PATH to support launching outside shell e.g. via launcher
inreplace "scripts/mosh.pl", "'mosh-client", "\'#{bin}/mosh-client"
Expand Down
1 change: 1 addition & 0 deletions Formula/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Mysql < Formula
url "https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-8.0.29.tar.gz"
sha256 "fd34a84c65fc7b15609d55b1f5d128c4d5543a6b95fa638569c3277c5c7bb048"
license "GPL-2.0-only" => { with: "Universal-FOSS-exception-1.0" }
revision 1

livecheck do
url "https://dev.mysql.com/downloads/mysql/?tpl=files&os=src"
Expand Down
1 change: 1 addition & 0 deletions Formula/ncnn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Ncnn < Formula
url "https://github.com/Tencent/ncnn/archive/refs/tags/20220701.tar.gz"
sha256 "e222f2ac54cc52ed7b1f6edc83ce4bf8ea1dc729c81f6a1560e4196032ec88ca"
license "BSD-3-Clause"
revision 1
head "https://github.com/Tencent/ncnn.git", branch: "master"

bottle do
Expand Down
4 changes: 4 additions & 0 deletions Formula/netdata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Netdata < Formula
url "https://github.com/netdata/netdata/releases/download/v1.35.1/netdata-v1.35.1.tar.gz"
sha256 "587f6cce421015f8e0a527e3964a4de8cc17085c354498150bc3ade21606bbf9"
license "GPL-3.0-or-later"
revision 1

livecheck do
url :stable
Expand Down Expand Up @@ -40,6 +41,9 @@ class Netdata < Formula
end

def install
# https://github.com/protocolbuffers/protobuf/issues/9947
ENV.append_to_cflags "-DNDEBUG"

# We build judy as static library, so we don't need to install it
# into the real prefix
judyprefix = "#{buildpath}/resources/judy"
Expand Down
5 changes: 4 additions & 1 deletion Formula/ola.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Ola < Formula
url "https://github.com/OpenLightingProject/ola/releases/download/0.10.8/ola-0.10.8.tar.gz"
sha256 "102aa3114562a2a71dbf7f77d2a0fb9fc47acc35d6248a70b6e831365ca71b13"
license all_of: ["GPL-2.0-or-later", "LGPL-2.1-or-later"]
revision 5
revision 6
head "https://github.com/OpenLightingProject/ola.git", branch: "master"

bottle do
Expand Down Expand Up @@ -37,6 +37,9 @@ class Ola < Formula
end

def install
# https://github.com/protocolbuffers/protobuf/issues/9947
ENV.append_to_cflags "-DNDEBUG"

args = %W[
--disable-fatal-warnings
--disable-dependency-tracking
Expand Down
2 changes: 1 addition & 1 deletion Formula/opencv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Opencv < Formula
url "https://github.com/opencv/opencv/archive/4.5.5.tar.gz"
sha256 "a1cfdcf6619387ca9e232687504da996aaa9f7b5689986b8331ec02cb61d28ad"
license "Apache-2.0"
revision 2
revision 3

livecheck do
url :stable
Expand Down
2 changes: 1 addition & 1 deletion Formula/or-tools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class OrTools < Formula
desc "Google's Operations Research tools"
homepage "https://developers.google.com/optimization/"
license "Apache-2.0"
revision 2
revision 3
head "https://github.com/google/or-tools.git", branch: "stable"

stable do
Expand Down
2 changes: 1 addition & 1 deletion Formula/osm-pbf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class OsmPbf < Formula
url "https://github.com/openstreetmap/OSM-binary/archive/v1.5.0.tar.gz"
sha256 "2abf3126729793732c3380763999cc365e51bffda369a008213879a3cd90476c"
license "LGPL-3.0-or-later"
revision 3
revision 4

bottle do
sha256 cellar: :any, arm64_monterey: "7c54ae6cece29667791513344f8ca1f07412dbf7c0030eb000c835864dda96b7"
Expand Down
5 changes: 3 additions & 2 deletions Formula/percona-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class PerconaServer < Formula
url "https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-8.0.28-20/source/tarball/percona-server-8.0.28-20.tar.gz"
sha256 "88890e081d70901f938e39b688663d4514910773488fca42cd6de0f4371fb157"
license "BSD-3-Clause"
revision 1

livecheck do
url "https://www.percona.com/downloads/Percona-Server-LATEST/"
Expand Down Expand Up @@ -44,8 +45,8 @@ class PerconaServer < Formula
patch :DATA
end

conflicts_with "mariadb", "mysql",
because: "percona, mariadb, and mysql install the same binaries"
conflicts_with "mariadb", "mysql", because: "percona, mariadb, and mysql install the same binaries"
conflicts_with "percona-xtrabackup", because: "both install a `kmip.h`"

# https://bugs.mysql.com/bug.php?id=86711
# https://github.com/Homebrew/homebrew-core/pull/20538
Expand Down
3 changes: 3 additions & 0 deletions Formula/percona-xtrabackup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class PerconaXtrabackup < Formula
homepage "https://www.percona.com/software/mysql-database/percona-xtrabackup"
url "https://downloads.percona.com/downloads/Percona-XtraBackup-LATEST/Percona-XtraBackup-8.0.28-21/source/tarball/percona-xtrabackup-8.0.28-21.tar.gz"
sha256 "66d7f15f8e61d0231cbc814dff73fc6181ed9aa91d55b14a34a5b32b63e8ca02"
revision 1

livecheck do
url "https://www.percona.com/downloads/Percona-XtraBackup-LATEST/"
Expand Down Expand Up @@ -45,6 +46,8 @@ class PerconaXtrabackup < Formula
depends_on "libaio"
end

conflicts_with "percona-server", because: "both install a `kmip.h`"

fails_with :gcc do
version "6"
cause "The build requires GCC 7.1 or later."
Expand Down
4 changes: 4 additions & 0 deletions Formula/protobuf-c.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class ProtobufC < Formula
url "https://github.com/protobuf-c/protobuf-c/releases/download/v1.4.1/protobuf-c-1.4.1.tar.gz"
sha256 "4cc4facd508172f3e0a4d3a8736225d472418aee35b4ad053384b137b220339f"
license "BSD-2-Clause"
revision 1

bottle do
sha256 cellar: :any, arm64_monterey: "537aa180b45b68c137ab083b1ff95d02e2080a83e3233c699d405811ee1f1fdf"
Expand All @@ -20,6 +21,9 @@ class ProtobufC < Formula
def install
ENV.cxx11

# https://github.com/protocolbuffers/protobuf/issues/9947
ENV.append_to_cflags "-DNDEBUG"

system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make", "install"
end
Expand Down
4 changes: 2 additions & 2 deletions Formula/protobuf.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Protobuf < Formula
desc "Protocol buffers (Google's data interchange format)"
homepage "https://github.com/protocolbuffers/protobuf/"
url "https://github.com/protocolbuffers/protobuf/releases/download/v3.19.4/protobuf-all-3.19.4.tar.gz"
sha256 "ba0650be1b169d24908eeddbe6107f011d8df0da5b1a5a4449a913b10e578faf"
url "https://github.com/protocolbuffers/protobuf/releases/download/v21.2/protobuf-all-21.2.tar.gz"
sha256 "9ae699200f3a80c735f9dc3b20e46d447584266f4601403e8fe5b97005f204dd"
license "BSD-3-Clause"

livecheck do
Expand Down
62 changes: 62 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
class ProtobufAT3 < Formula
desc "Protocol buffers (Google's data interchange format)"
homepage "https://github.com/protocolbuffers/protobuf/"
url "https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protobuf-all-3.20.1.tar.gz"
sha256 "3a400163728db996e8e8d21c7dfb3c239df54d0813270f086c4030addeae2fad"
license "BSD-3-Clause"

keg_only :versioned_formula

depends_on "[email protected]" => [:build, :test]
# The Python3.9 bindings can be removed when Python3.9 is made keg-only.
depends_on "[email protected]" => [:build, :test]

uses_from_macos "zlib"

def install
# Don't build in debug mode. See:
# https://github.com/Homebrew/homebrew/issues/9279
# https://github.com/protocolbuffers/protobuf/blob/5c24564811c08772d090305be36fae82d8f12bbe/configure.ac#L61
ENV.prepend "CXXFLAGS", "-DNDEBUG"
ENV.cxx11

system "./autogen.sh" if build.head?
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}", "--with-zlib"
system "make"
system "make", "install"

# Install editor support and examples
pkgshare.install "editors/proto.vim", "examples"
elisp.install "editors/protobuf-mode.el"

ENV.append_to_cflags "-I#{include}"
ENV.append_to_cflags "-L#{lib}"

cd "python" do
["3.9", "3.10"].each do |xy|
site_packages = prefix/Language::Python.site_packages("python#{xy}")
system "python#{xy}", *Language::Python.setup_install_args(prefix),
"--install-lib=#{site_packages}",
"--cpp_implementation"
end
end
end

test do
testdata = <<~EOS
syntax = "proto3";
package test;
message TestCase {
string name = 4;
}
message Test {
repeated TestCase case = 1;
}
EOS
(testpath/"test.proto").write testdata
system bin/"protoc", "test.proto", "--cpp_out=."
system Formula["[email protected]"].opt_bin/"python3", "-c", "import google.protobuf"
system Formula["[email protected]"].opt_bin/"python3", "-c", "import google.protobuf"
end
end
Loading