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

json-c: use modern cmake syntax #178614

Merged
merged 1 commit into from
Jul 31, 2024
Merged
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
8 changes: 4 additions & 4 deletions Formula/j/json-c.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class JsonC < Formula

Check notice on line 1 in Formula/j/json-c.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Installed previously built bottle for json-c from

:66760a4228a (Merge d2e5de4c2f7272abcd442a738c9efab2ff38e671 into 9f46f6df79fd2cd04c4589e4c1aef7a055beb054, 2024-07-26)

Check notice on line 1 in Formula/j/json-c.rb

View workflow job for this annotation

GitHub Actions / macOS 14-x86_64

Installed previously built bottle for json-c from

:66760a4228a (Merge d2e5de4c2f7272abcd442a738c9efab2ff38e671 into 9f46f6df79fd2cd04c4589e4c1aef7a055beb054, 2024-07-26)

Check notice on line 1 in Formula/j/json-c.rb

View workflow job for this annotation

GitHub Actions / Linux

Installed previously built bottle for json-c from

:66760a4228a (Merge d2e5de4c2f7272abcd442a738c9efab2ff38e671 into 9f46f6df79fd2cd04c4589e4c1aef7a055beb054, 2024-07-26)

Check notice on line 1 in Formula/j/json-c.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Installed previously built bottle for json-c from

:66760a4228a (Merge d2e5de4c2f7272abcd442a738c9efab2ff38e671 into 9f46f6df79fd2cd04c4589e4c1aef7a055beb054, 2024-07-26)

Check notice on line 1 in Formula/j/json-c.rb

View workflow job for this annotation

GitHub Actions / macOS 13-x86_64

Installed previously built bottle for json-c from

:66760a4228a (Merge d2e5de4c2f7272abcd442a738c9efab2ff38e671 into 9f46f6df79fd2cd04c4589e4c1aef7a055beb054, 2024-07-26)

Check notice on line 1 in Formula/j/json-c.rb

View workflow job for this annotation

GitHub Actions / macOS 12-arm64

Installed previously built bottle for json-c from

:66760a4228a (Merge d2e5de4c2f7272abcd442a738c9efab2ff38e671 into 9f46f6df79fd2cd04c4589e4c1aef7a055beb054, 2024-07-26)

Check notice on line 1 in Formula/j/json-c.rb

View workflow job for this annotation

GitHub Actions / macOS 12-x86_64

Installed previously built bottle for json-c from

:66760a4228a (Merge d2e5de4c2f7272abcd442a738c9efab2ff38e671 into 9f46f6df79fd2cd04c4589e4c1aef7a055beb054, 2024-07-26)
desc "JSON parser for C"
homepage "https://github.com/json-c/json-c/wiki"
url "https://github.com/json-c/json-c/archive/refs/tags/json-c-0.17-20230812.tar.gz"
Expand Down Expand Up @@ -27,10 +27,9 @@
depends_on "cmake" => :build

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

test do
Expand All @@ -46,6 +45,7 @@
return 0;
}
EOS

system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-ljson-c", "-o", "test"
assert_equal '{ "key": "value" }', shell_output("./test").chomp
end
Expand Down
Loading