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

avro-c 1.12.0 #198178

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
13 changes: 5 additions & 8 deletions Formula/a/avro-c.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
class AvroC < Formula

Check notice on line 1 in Formula/a/avro-c.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for avro-c built at 88a122dfecf (Merge 9801e0839e21554b3e0a00f490237151d95b0807 into de43c68fbf09b7550ddb74755db7147810fe1d50, 2024-11-19)

Check notice on line 1 in Formula/a/avro-c.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for avro-c built at 88a122dfecf (Merge 9801e0839e21554b3e0a00f490237151d95b0807 into de43c68fbf09b7550ddb74755db7147810fe1d50, 2024-11-19)

Check notice on line 1 in Formula/a/avro-c.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for avro-c built at 88a122dfecf (Merge 9801e0839e21554b3e0a00f490237151d95b0807 into de43c68fbf09b7550ddb74755db7147810fe1d50, 2024-11-19)
desc "Data serialization system"
homepage "https://avro.apache.org/"
# Upstreams tar.gz can't be opened by bsdtar on macOS
# https://github.com/Homebrew/homebrew-core/pull/146296#issuecomment-1737945877
# https://apple.stackexchange.com/questions/197839/why-is-extracting-this-tgz-throwing-an-error-on-my-mac-but-not-on-linux
url "https://github.com/apache/avro.git",
tag: "release-1.11.3",
revision: "35ff8b997738e4d983871902d47bfb67b3250734"
url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.0/c/avro-c-1.12.0.tar.gz"
mirror "https://archive.apache.org/dist/avro/avro-1.12.0/c/avro-c-1.12.0.tar.gz"
sha256 "74333d431079c35d770cef6996cb4de04058d19e81bd0b9a363bcfd38575037f"
license "Apache-2.0"

bottle do
Expand All @@ -29,7 +26,7 @@
uses_from_macos "zlib"

def install
system "cmake", "-S", "lang/c", "-B", "build", *std_cmake_args
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
Expand All @@ -42,6 +39,6 @@

testpath.install resource("homebrew-example")
system ENV.cc, "quickstop.c", "-o", "test", "-I#{include}", "-L#{lib}", "-lavro"
system "./test", ">> /dev/null"
assert_match "Silent | (555) 123-6422 | 29 |", shell_output("./test")
end
end
37 changes: 28 additions & 9 deletions Formula/a/avro-cpp.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
class AvroCpp < Formula
desc "Data serialization system"
homepage "https://avro.apache.org/"
# Upstreams tar.gz can't be opened by bsdtar on macOS
# https://github.com/Homebrew/homebrew-core/pull/146296#issuecomment-1737945877
# https://apple.stackexchange.com/questions/197839/why-is-extracting-this-tgz-throwing-an-error-on-my-mac-but-not-on-linux
url "https://github.com/apache/avro.git",
tag: "release-1.11.3",
revision: "35ff8b997738e4d983871902d47bfb67b3250734"
url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.0/cpp/avro-cpp-1.12.0.tar.gz"
mirror "https://archive.apache.org/dist/avro/avro-1.12.0/cpp/avro-cpp-1.12.0.tar.gz"
sha256 "f2edf77126a75b0ec1ad166772be058351cea3d74448be7e2cef20050c0f98ab"
license "Apache-2.0"
revision 4

bottle do
sha256 cellar: :any, arm64_sequoia: "68cc14a37de162f0006e51cd24bf8732037333c8b4f83d93281f5fd027322854"
Expand All @@ -22,16 +18,39 @@
end

depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "pkgconf" => :build
depends_on "boost"

resource "fmt" do
url "https://github.com/fmtlib/fmt/releases/download/10.2.1/fmt-10.2.1.zip"
sha256 "312151a2d13c8327f5c9c586ac6cf7cddc1658e8f53edae0ec56509c8fa516c9"
end

def install
system "cmake", "-S", "lang/c++", "-B", "build", *std_cmake_args
# Some installed `avro-cpp` headers include `fmt` headers, but code is not compatible with fmt >= 11
resource("fmt").stage do
system "cmake", "-S", ".", "-B", "build", *std_cmake_args(install_prefix: libexec)
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

args = %W[
-DCMAKE_PREFIX_PATH=#{libexec}
-DHOMEBREW_ALLOW_FETCHCONTENT=ON
-DFETCHCONTENT_FULLY_DISCONNECTED=ON
-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS
]

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

def caveats
"`avro-cpp` headers may need to use the bundled `fmt` at #{opt_libexec}"
end

test do

Check failure on line 53 in Formula/a/avro-cpp.rb

View workflow job for this annotation

GitHub Actions / Linux

`brew test --verbose avro-cpp` failed on Linux!

==> /usr/bin/g++-11 test.cpp -std=c++11 -o test In file included from /home/linuxbrew/.linuxbrew/opt/avro-cpp/include/avro/AvroTraits.hh:23, from /home/linuxbrew/.linuxbrew/opt/avro-cpp/include/avro/Specific.hh:30, from cpx.hh:27, from test.cpp:1: /home/linuxbrew/.linuxbrew/opt/avro-cpp/include/avro/Types.hh:22:10: fatal error: fmt/format.h: No such file or directory 22 | #include <fmt/format.h> | ^~~~~~~~~~~~~~ compilation terminated. ::error::avro-cpp: failed An exception occurred within a child process: BuildError: Failed executing: /usr/bin/g++-11 test.cpp -std=c++11 -o test /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:3134:in `block in system' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:3070:in `open' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:3070:in `system' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:175:in `bind_call' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:175:in `validate_call_skip_block_type' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:117:in `block in create_validator_slow_skip_block_type' /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/a/avro-cpp.rb:68:in `block in <class:AvroCpp>' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2867:in `block (3 levels) in run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:539:in `with_env' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2866:in `block (2 levels) in run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1205:in `with_logging' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2865:in `block in run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:90:in `block in run' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:90:in `chdir' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/mktemp.rb:90:in `run' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `bind_call' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `validate_call' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:3193:in `mktemp' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `bind_call' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `validate_call' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:2859:in `run_test' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:48:in `block in <main>' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:41:in `handle_timeout' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:195:in `timeout' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/test.rb:54:in `<main>'

Check failure on line 53 in Formula/a/avro-cpp.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

`brew test --verbose avro-cpp` failed on macOS Sequoia (15) on Apple Silicon!

==> /usr/bin/clang++ test.cpp -std=c++11 -o test In file included from test.cpp:1: In file included from ./cpx.hh:27: In file included from /opt/homebrew/include/avro/Specific.hh:30: In file included from /opt/homebrew/include/avro/AvroTraits.hh:23: /opt/homebrew/include/avro/Types.hh:22:10: fatal error: 'fmt/format.h' file not found 22 | #include <fmt/format.h> | ^~~~~~~~~~~~~~ 1 error generated. ::error::avro-cpp: failed An exception occurred within a child process: BuildError: Failed executing: /usr/bin/clang++ test.cpp -std=c++11 -o test /opt/homebrew/Library/Homebrew/formula.rb:3134:in `block in system' /opt/homebrew/Library/Homebrew/formula.rb:3070:in `open' /opt/homebrew/Library/Homebrew/formula.rb:3070:in `system' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:175:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:175:in `validate_call_skip_block_type' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:117:in `block in create_validator_slow_skip_block_type' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/a/avro-cpp.rb:68:in `block in <class:AvroCpp>' /opt/homebrew/Library/Homebrew/formula.rb:2867:in `block (3 levels) in run_test' /opt/homebrew/Library/Homebrew/extend/kernel.rb:539:in `with_env' /opt/homebrew/Library/Homebrew/formula.rb:2866:in `block (2 levels) in run_test' /opt/homebrew/Library/Homebrew/formula.rb:1205:in `with_logging' /opt/homebrew/Library/Homebrew/formula.rb:2865:in `block in run_test' /opt/homebrew/Library/Homebrew/mktemp.rb:90:in `block in run' /opt/homebrew/Library/Homebrew/mktemp.rb:90:in `chdir' /opt/homebrew/Library/Homebrew/mktemp.rb:90:in `run' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `validate_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /opt/homebrew/Library/Homebrew/formula.rb:3193:in `mktemp' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `validate_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /opt/homebrew/Library/Homebrew/formula.rb:2859:in `run_test' /opt/homebrew/Library/Homebrew/test.rb:48:in `block in <main>' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:41:in `handle_timeout' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:195:in `timeout' /opt/homebrew/Library/Homebrew/test.rb:54:in `<main>'

Check failure on line 53 in Formula/a/avro-cpp.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

`brew test --verbose avro-cpp` failed on macOS Sonoma (14) on Apple Silicon!

==> /usr/bin/clang++ test.cpp -std=c++11 -o test In file included from test.cpp:1: In file included from ./cpx.hh:27: In file included from /opt/homebrew/include/avro/Specific.hh:30: In file included from /opt/homebrew/include/avro/AvroTraits.hh:23: /opt/homebrew/include/avro/Types.hh:22:10: fatal error: 'fmt/format.h' file not found 22 | #include <fmt/format.h> | ^~~~~~~~~~~~~~ 1 error generated. ::error::avro-cpp: failed An exception occurred within a child process: BuildError: Failed executing: /usr/bin/clang++ test.cpp -std=c++11 -o test /opt/homebrew/Library/Homebrew/formula.rb:3134:in `block in system' /opt/homebrew/Library/Homebrew/formula.rb:3070:in `open' /opt/homebrew/Library/Homebrew/formula.rb:3070:in `system' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:175:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:175:in `validate_call_skip_block_type' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:117:in `block in create_validator_slow_skip_block_type' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/a/avro-cpp.rb:68:in `block in <class:AvroCpp>' /opt/homebrew/Library/Homebrew/formula.rb:2867:in `block (3 levels) in run_test' /opt/homebrew/Library/Homebrew/extend/kernel.rb:539:in `with_env' /opt/homebrew/Library/Homebrew/formula.rb:2866:in `block (2 levels) in run_test' /opt/homebrew/Library/Homebrew/formula.rb:1205:in `with_logging' /opt/homebrew/Library/Homebrew/formula.rb:2865:in `block in run_test' /opt/homebrew/Library/Homebrew/mktemp.rb:90:in `block in run' /opt/homebrew/Library/Homebrew/mktemp.rb:90:in `chdir' /opt/homebrew/Library/Homebrew/mktemp.rb:90:in `run' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `validate_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /opt/homebrew/Library/Homebrew/formula.rb:3193:in `mktemp' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `validate_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /opt/homebrew/Library/Homebrew/formula.rb:2859:in `run_test' /opt/homebrew/Library/Homebrew/test.rb:48:in `block in <main>' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:41:in `handle_timeout' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:195:in `timeout' /opt/homebrew/Library/Homebrew/test.rb:54:in `<main>'

Check failure on line 53 in Formula/a/avro-cpp.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

`brew test --verbose avro-cpp` failed on macOS Ventura (13) on Apple Silicon!

==> /usr/bin/clang++ test.cpp -std=c++11 -o test In file included from test.cpp:1: In file included from ./cpx.hh:27: In file included from /opt/homebrew/include/avro/Specific.hh:30: In file included from /opt/homebrew/include/avro/AvroTraits.hh:23: /opt/homebrew/include/avro/Types.hh:22:10: fatal error: 'fmt/format.h' file not found #include <fmt/format.h> ^~~~~~~~~~~~~~ 1 error generated. ::error::avro-cpp: failed An exception occurred within a child process: BuildError: Failed executing: /usr/bin/clang++ test.cpp -std=c++11 -o test /opt/homebrew/Library/Homebrew/formula.rb:3134:in `block in system' /opt/homebrew/Library/Homebrew/formula.rb:3070:in `open' /opt/homebrew/Library/Homebrew/formula.rb:3070:in `system' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:175:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:175:in `validate_call_skip_block_type' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:117:in `block in create_validator_slow_skip_block_type' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/a/avro-cpp.rb:68:in `block in <class:AvroCpp>' /opt/homebrew/Library/Homebrew/formula.rb:2867:in `block (3 levels) in run_test' /opt/homebrew/Library/Homebrew/extend/kernel.rb:539:in `with_env' /opt/homebrew/Library/Homebrew/formula.rb:2866:in `block (2 levels) in run_test' /opt/homebrew/Library/Homebrew/formula.rb:1205:in `with_logging' /opt/homebrew/Library/Homebrew/formula.rb:2865:in `block in run_test' /opt/homebrew/Library/Homebrew/mktemp.rb:90:in `block in run' /opt/homebrew/Library/Homebrew/mktemp.rb:90:in `chdir' /opt/homebrew/Library/Homebrew/mktemp.rb:90:in `run' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `validate_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /opt/homebrew/Library/Homebrew/formula.rb:3193:in `mktemp' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/call_validation.rb:278:in `validate_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11647/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /opt/homebrew/Library/Homebrew/formula.rb:2859:in `run_test' /opt/homebrew/Library/Homebrew/test.rb:48:in `block in <main>' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:41:in `handle_timeout' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/lib/ruby/3.3.0/timeout.rb:195:in `timeout' /opt/homebrew/Library/Homebrew/test.rb:54:in `<main>'
(testpath/"cpx.json").write <<~JSON
{
"type": "record",
Expand Down
17 changes: 5 additions & 12 deletions Formula/a/avro-tools.rb
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
class AvroTools < Formula

Check notice on line 1 in Formula/a/avro-tools.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for avro-tools built at 88a122dfecf (Merge 9801e0839e21554b3e0a00f490237151d95b0807 into de43c68fbf09b7550ddb74755db7147810fe1d50, 2024-11-19)

Check notice on line 1 in Formula/a/avro-tools.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for avro-tools built at 88a122dfecf (Merge 9801e0839e21554b3e0a00f490237151d95b0807 into de43c68fbf09b7550ddb74755db7147810fe1d50, 2024-11-19)
desc "Avro command-line tools and utilities"
homepage "https://avro.apache.org/"
# Upstreams tar.gz can't be opened by bsdtar on macOS
# https://github.com/Homebrew/homebrew-core/pull/146296#issuecomment-1737945877
# https://apple.stackexchange.com/questions/197839/why-is-extracting-this-tgz-throwing-an-error-on-my-mac-but-not-on-linux
url "https://github.com/apache/avro.git",
tag: "release-1.11.3",
revision: "35ff8b997738e4d983871902d47bfb67b3250734"
url "https://www.apache.org/dyn/closer.lua?path=avro/avro-1.12.0/java/avro-tools-1.12.0.jar"
mirror "https://archive.apache.org/dist/avro/avro-1.12.0/java/avro-tools-1.12.0.jar"
sha256 "63b6c890a3aceba69c2ea7d2033c9d1e62d0837d13121b4ce01aea856f72a018"
license "Apache-2.0"

bottle do
rebuild 1
sha256 cellar: :any_skip_relocation, all: "0c9a211ec08bf395ec8ee998b5ba200da009d31918e1046b8fc4560d8c6fb57a"
end

depends_on "maven" => :build
depends_on "openjdk"

def install
cd "lang/java" do
system "mvn", "clean", "--projects", "tools", "package", "-DskipTests"
libexec.install "#{buildpath}/lang/java/tools/target/avro-tools-#{version}.jar"
bin.write_jar_script libexec/"avro-tools-#{version}.jar", "avro-tools"
end
Comment on lines -21 to -25
Copy link
Member

Choose a reason for hiding this comment

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

what is hassle of building from source?

libexec.install "avro-tools-#{version}.jar"
bin.write_jar_script libexec/"avro-tools-#{version}.jar", "avro-tools"
end

test do
Expand Down
Loading