Skip to content

Commit 901aea5

Browse files
authored
Merge pull request #249811 from Homebrew/bump-avro-c-1.12.1
avro-c avro-cpp avro-tools 1.12.1
2 parents 1101b21 + 5e397e4 commit 901aea5

File tree

3 files changed

+42
-97
lines changed

3 files changed

+42
-97
lines changed

Formula/a/avro-c.rb

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
class AvroC < Formula
22
desc "Data serialization system"
33
homepage "https://avro.apache.org/"
4-
url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.0/c/avro-c-1.12.0.tar.gz"
5-
mirror "https://archive.apache.org/dist/avro/avro-1.12.0/c/avro-c-1.12.0.tar.gz"
6-
sha256 "74333d431079c35d770cef6996cb4de04058d19e81bd0b9a363bcfd38575037f"
4+
url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.1/c/avro-c-1.12.1.tar.gz"
5+
mirror "https://archive.apache.org/dist/avro/avro-1.12.1/c/avro-c-1.12.1.tar.gz"
6+
sha256 "b64e31b94719499549622aa92f1d96d1742967ced261a0931b63be3bbe907f2c"
77
license "Apache-2.0"
88

99
bottle do
10-
sha256 cellar: :any, arm64_tahoe: "592ba6d381848c72396130bb795a9f4c5b6d8014bba6ef420f1ee35209a72cd1"
11-
sha256 cellar: :any, arm64_sequoia: "55a7ac0c245aa1a110e06f25ed5aab22922fc762de9a61576ae9a8cf22e150bd"
12-
sha256 cellar: :any, arm64_sonoma: "acc150596eca0d7da0c04d277ee91b6cf126b22f7e71751638ab09ee76da7448"
13-
sha256 cellar: :any, arm64_ventura: "2193d76cd4bf35b5d69c89befe5a10d0f0673c4fdedc62d7dcbc4b8e43315217"
14-
sha256 cellar: :any, sonoma: "3394bb8ba4ea17797d835e77ec0cea484a563d4d58aca0d53bbadf754afe0bb9"
15-
sha256 cellar: :any, ventura: "3f5f2cdd8bdcc59291607247041f5b83a59481eb7c37e9ec9df26c1f9c5b41ad"
16-
sha256 cellar: :any_skip_relocation, arm64_linux: "fa594ba05dbc282f35d49a75872f849187fb7172125fd70780ecee7498f37d70"
17-
sha256 cellar: :any_skip_relocation, x86_64_linux: "3bbc7d593ae823c31de41337ae70b81254fe04ff700a4d514e18f5f4992e2586"
10+
sha256 cellar: :any, arm64_tahoe: "bbdf1ec9340996a46133cdb5c069d0fa413f0998a05c7ff4589d1e6ae5a43a51"
11+
sha256 cellar: :any, arm64_sequoia: "cc17f9907b085d176a5726058a266f0c251c3fbe64bddccbfa2c1cec17d9c06a"
12+
sha256 cellar: :any, arm64_sonoma: "0b67b5f253ad41f9c2e13d79179987140a5072ceec7aa37460c2c9e3fa06f229"
13+
sha256 cellar: :any, sonoma: "3c17d0b642d61939628c80f9a3fc6ef200b06d735bb7bf3a80007e6adf0aab1e"
14+
sha256 cellar: :any_skip_relocation, arm64_linux: "0ac05bd00f42b859e03b56503b0942c6cb423a0205ab4c444fd962994293347e"
15+
sha256 cellar: :any_skip_relocation, x86_64_linux: "55f8e43ea2d0386f33e078a3238886d1de56e4fe843a3e4e0c525179b7189698"
1816
end
1917

2018
depends_on "cmake" => :build

Formula/a/avro-cpp.rb

Lines changed: 29 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,46 @@
11
class AvroCpp < Formula
22
desc "Data serialization system"
33
homepage "https://avro.apache.org/"
4-
url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.0/cpp/avro-cpp-1.12.0.tar.gz"
5-
mirror "https://archive.apache.org/dist/avro/avro-1.12.0/cpp/avro-cpp-1.12.0.tar.gz"
6-
sha256 "f2edf77126a75b0ec1ad166772be058351cea3d74448be7e2cef20050c0f98ab"
4+
url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.1/cpp/avro-cpp-1.12.1.tar.gz"
5+
mirror "https://archive.apache.org/dist/avro/avro-1.12.1/cpp/avro-cpp-1.12.1.tar.gz"
6+
sha256 "18a0d155905a4dab0c2bfd66c742358a7d969bcff58cf6f655bcf602879f4fe7"
77
license "Apache-2.0"
8-
revision 1
98

109
bottle do
11-
sha256 cellar: :any, arm64_tahoe: "6704d6e89acb0c747ea276845a9931aba6be8ccb0555ea7333f6fd871d33ef74"
12-
sha256 cellar: :any, arm64_sequoia: "c957d98325e78e380f0350d9c9e96edd4dedf5bc6e066cd3e1cc8149b50c8598"
13-
sha256 cellar: :any, arm64_sonoma: "b099c4cb40748b37a98350b66ecfaeeca27028731698f061a943aa677cea409b"
14-
sha256 cellar: :any, arm64_ventura: "2bd5f3b4db84283a53fd5ad1378e64fe2be612ba26d542eef7678de2c3a9bc39"
15-
sha256 cellar: :any, sonoma: "1f97c3b6d551ac12a5709fc8677c5f9383d82f592a55884009fefd14f1c86829"
16-
sha256 cellar: :any, ventura: "ec11016e755c1c5ccae51e3e6f443a5051ace8c0649129102d047150fada63dc"
17-
sha256 cellar: :any_skip_relocation, arm64_linux: "06cd6e6715712951deb88a37597234c495bf65fe08eb54a8b74310007780ac32"
18-
sha256 cellar: :any_skip_relocation, x86_64_linux: "3ae8f2eb793dc55a6deb6907c02445d54feb481060a4c0fdc8bbbbdd3cfb3737"
10+
sha256 cellar: :any, arm64_tahoe: "b89b52514a01938e58227cea3df043f72c11d92517e50e612b7b21dc21a2896e"
11+
sha256 cellar: :any, arm64_sequoia: "87b4bc2edf4027fb23b6377efc812502ee28d5824fcaa985b505cdb74b7affaa"
12+
sha256 cellar: :any, arm64_sonoma: "3b5fd6eab8771d335bdcd737c3a36829517744a98d628ba4478ae3832f719d8c"
13+
sha256 cellar: :any, sonoma: "fc835f42954873b7b49d89070ca917f1b441e46fa3ce2ba74a66951aac80f2ad"
14+
sha256 cellar: :any_skip_relocation, arm64_linux: "07d6dfb9075c7ebfe7b280a386f7ae12e05ad6359426f170de52e2333f1280ce"
15+
sha256 cellar: :any_skip_relocation, x86_64_linux: "abb4bdc11f71daeb6474d1f46bbac5dd9d8d80bd916e1386aeb457042c37964d"
1916
end
2017

2118
depends_on "cmake" => :build
2219
depends_on "fmt" => [:build, :test] # needed for headers
2320
depends_on "pkgconf" => :build
2421
depends_on "boost"
22+
depends_on "zstd"
2523

26-
# Fix compatibility with `fmt` 11, https://github.com/apache/avro/pull/3444
27-
# Fix to use system installed `fmt`, https://github.com/apache/avro/pull/3447
28-
# Both patches are not applicable to the source splitted tarball
29-
# Also add workaround for Boost 1.89.0 until next release that drops Boost dep
30-
patch :DATA
24+
uses_from_macos "zlib"
25+
26+
# Add missing cmake file from git
27+
resource "avro-cpp-config.cmake.in" do
28+
url "https://github.com/apache/avro/raw/refs/tags/release-1.12.1/lang/c++/cmake/avro-cpp-config.cmake.in"
29+
sha256 "2f100bed5a5ec300bc16e618ef17c64056c165a3dba8dde590a3ef65352440fa"
30+
end
3131

3232
def install
33+
(buildpath/"cmake").install resource("avro-cpp-config.cmake.in")
34+
35+
# Boost 1.89+ no longer requires the 'system' component
36+
boost_replacements = /Boost\s1.70\sREQUIRED\s(CONFIG\s)?COMPONENTS\s?system/
37+
inreplace "CMakeLists.txt" do |s|
38+
s.gsub! boost_replacements, "Boost REQUIRED"
39+
s.gsub! "$<INSTALL_INTERFACE:$<TARGET_NAME_IF_EXISTS:Boost::system>>", ""
40+
s.gsub! "Boost::system ZLIB::ZLIB", "$<TARGET_NAME_IF_EXISTS:Boost::system> ZLIB::ZLIB"
41+
end
42+
inreplace "cmake/avro-cpp-config.cmake.in", boost_replacements, "Boost REQUIRED"
43+
3344
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
3445
system "cmake", "--build", "build"
3546
system "cmake", "--install", "build"
@@ -57,71 +68,7 @@ def install
5768
CPP
5869

5970
system bin/"avrogencpp", "-i", "cpx.json", "-o", "cpx.hh", "-n", "cpx"
60-
system ENV.cxx, "test.cpp", "-std=c++14", "-o", "test"
71+
system ENV.cxx, "test.cpp", "-std=c++17", "-o", "test"
6172
system "./test"
6273
end
6374
end
64-
65-
__END__
66-
diff --git a/CMakeLists.txt b/CMakeLists.txt
67-
index 19059a4..afdfdf5 100644
68-
--- a/CMakeLists.txt
69-
+++ b/CMakeLists.txt
70-
@@ -80,17 +80,20 @@ endif ()
71-
72-
73-
find_package (Boost 1.38 REQUIRED
74-
- COMPONENTS filesystem iostreams program_options regex system)
75-
-
76-
-include(FetchContent)
77-
-FetchContent_Declare(
78-
- fmt
79-
- GIT_REPOSITORY https://github.com/fmtlib/fmt.git
80-
- GIT_TAG 10.2.1
81-
- GIT_PROGRESS TRUE
82-
- USES_TERMINAL_DOWNLOAD TRUE
83-
-)
84-
-FetchContent_MakeAvailable(fmt)
85-
+ COMPONENTS filesystem iostreams program_options regex)
86-
+
87-
+find_package(fmt)
88-
+if (NOT fmt_FOUND)
89-
+ include(FetchContent)
90-
+ FetchContent_Declare(
91-
+ fmt
92-
+ GIT_REPOSITORY https://github.com/fmtlib/fmt.git
93-
+ GIT_TAG 10.2.1
94-
+ GIT_PROGRESS TRUE
95-
+ USES_TERMINAL_DOWNLOAD TRUE
96-
+ )
97-
+ FetchContent_MakeAvailable(fmt)
98-
+endif (NOT fmt_FOUND)
99-
100-
find_package(Snappy)
101-
if (SNAPPY_FOUND)
102-
diff --git a/include/avro/Node.hh b/include/avro/Node.hh
103-
index f76078b..7226d05 100644
104-
--- a/include/avro/Node.hh
105-
+++ b/include/avro/Node.hh
106-
@@ -219,7 +219,7 @@ inline std::ostream &operator<<(std::ostream &os, const avro::Node &n) {
107-
template<>
108-
struct fmt::formatter<avro::Name> : fmt::formatter<std::string> {
109-
template<typename FormatContext>
110-
- auto format(const avro::Name &n, FormatContext &ctx) {
111-
+ auto format(const avro::Name &n, FormatContext &ctx) const {
112-
return fmt::formatter<std::string>::format(n.fullname(), ctx);
113-
}
114-
};
115-
diff --git a/include/avro/Types.hh b/include/avro/Types.hh
116-
index 84a3397..c0533f3 100644
117-
--- a/include/avro/Types.hh
118-
+++ b/include/avro/Types.hh
119-
@@ -113,7 +113,7 @@ std::ostream &operator<<(std::ostream &os, const Null &null);
120-
template<>
121-
struct fmt::formatter<avro::Type> : fmt::formatter<std::string> {
122-
template<typename FormatContext>
123-
- auto format(avro::Type t, FormatContext &ctx) {
124-
+ auto format(avro::Type t, FormatContext &ctx) const {
125-
return fmt::formatter<std::string>::format(avro::toString(t), ctx);
126-
}
127-
};

Formula/a/avro-tools.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
class AvroTools < Formula
22
desc "Avro command-line tools and utilities"
33
homepage "https://avro.apache.org/"
4-
url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.0/java/avro-tools-1.12.0.jar"
5-
mirror "https://archive.apache.org/dist/avro/avro-1.12.0/java/avro-tools-1.12.0.jar"
6-
sha256 "63b6c890a3aceba69c2ea7d2033c9d1e62d0837d13121b4ce01aea856f72a018"
4+
url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.1/java/avro-tools-1.12.1.jar"
5+
mirror "https://archive.apache.org/dist/avro/avro-1.12.1/java/avro-tools-1.12.1.jar"
6+
sha256 "eb269df172ec96f6721bf9e56182e28afd9cd72d596d035c46561f6f70a69c36"
77
license "Apache-2.0"
88

99
bottle do
10-
sha256 cellar: :any_skip_relocation, all: "8ea65f6f0bafec8627a2103ea2ac64c5adc0f8fc28799caadc079a3b2fe511c5"
10+
sha256 cellar: :any_skip_relocation, all: "38d023c2825177abcf6afefb16f1806b2655da255ea6ecb664d45047e1973fac"
1111
end
1212

1313
depends_on "openjdk"

0 commit comments

Comments
 (0)