Skip to content

Commit eb0aeb2

Browse files
authored
Merge pull request #196599 from Homebrew/rapidjson-backport
rapidjson: backport fix for usage with recent GCC and Clang
2 parents 61a22e4 + 323c2b1 commit eb0aeb2

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

Formula/r/rapidjson.rb

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
11
class Rapidjson < Formula
22
desc "JSON parser/generator for C++ with SAX and DOM style APIs"
33
homepage "https://rapidjson.org/"
4-
url "https://github.com/Tencent/rapidjson/archive/refs/tags/v1.1.0.tar.gz"
5-
sha256 "bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e"
64
license "MIT"
75
head "https://github.com/Tencent/rapidjson.git", branch: "master"
86

7+
stable do
8+
url "https://github.com/Tencent/rapidjson/archive/refs/tags/v1.1.0.tar.gz"
9+
sha256 "bf7ced29704a1e696fbccf2a2b4ea068e7774fa37f6d7dd4039d0787f8bed98e"
10+
11+
# Backport fix for usage with recent GCC and Clang
12+
patch do
13+
url "https://github.com/Tencent/rapidjson/commit/9bd618f545ab647e2c3bcbf2f1d87423d6edf800.patch?full_index=1"
14+
sha256 "ce341a69d6c17852fddd5469b6aabe995fd5e3830379c12746a18c3ae858e0e1"
15+
end
16+
end
17+
918
bottle do
10-
rebuild 2
11-
sha256 cellar: :any_skip_relocation, all: "b16b08efb12ae55a25ac840b757e8cb8cb6cdcdfca37004e1f864f753960e40a"
19+
rebuild 3
20+
sha256 cellar: :any_skip_relocation, all: "ba505c9a587b3c26539eae5dd732ae36bca53b67daf94579fee177d88094fa52"
1221
end
1322

1423
depends_on "cmake" => :build
1524

1625
def install
17-
system "cmake", "-DRAPIDJSON_BUILD_DOC=OFF",
26+
system "cmake", "-S", ".", "-B", "build",
27+
"-DRAPIDJSON_BUILD_DOC=OFF",
1828
"-DRAPIDJSON_BUILD_EXAMPLES=OFF",
1929
"-DRAPIDJSON_BUILD_TESTS=OFF",
20-
".", *std_cmake_args
21-
system "make", "install"
30+
*std_cmake_args
31+
system "cmake", "--install", "build"
2232
end
2333

2434
test do

0 commit comments

Comments
 (0)