2015-04-24 15:06:36 +00:00
|
|
|
class Rapidjson < Formula
|
|
|
|
homepage "https://miloyip.github.io/rapidjson/"
|
2015-05-14 12:20:09 +00:00
|
|
|
url "https://github.com/miloyip/rapidjson/archive/v1.0.2.tar.gz"
|
|
|
|
sha256 "c3711ed2b3c76a5565ee9f0128bb4ec6753dbcc23450b713842df8f236d08666"
|
2015-04-24 15:06:36 +00:00
|
|
|
head "https://github.com/miloyip/rapidjson.git"
|
|
|
|
|
2015-04-26 12:43:13 +00:00
|
|
|
bottle do
|
2015-05-14 18:13:34 +00:00
|
|
|
sha256 "32067dca55523d203d836e416fd80e2a70d5f0907725e5eb6a6c4c988fee3d3d" => :yosemite
|
|
|
|
sha256 "7686ef10f5702518ff4feff0c5b609c8c21e6796bf2c8cc37f48594a1486f188" => :mavericks
|
|
|
|
sha256 "e31ed3128e73c9450e54c6139b3e0211edc0857bee27829029058b690aa7d747" => :mountain_lion
|
2015-04-26 12:43:13 +00:00
|
|
|
end
|
|
|
|
|
2015-04-24 15:06:36 +00:00
|
|
|
option "without-docs", "Don't build documentation"
|
|
|
|
|
|
|
|
depends_on "cmake" => :build
|
|
|
|
depends_on "doxygen" => :build if build.with? "docs"
|
|
|
|
|
|
|
|
def install
|
|
|
|
args = std_cmake_args
|
|
|
|
args << "-DRAPIDJSON_BUILD_DOC=OFF" if build.without? "docs"
|
|
|
|
system "cmake", ".", *args
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system ENV.cxx, "#{share}/doc/RapidJSON/examples/capitalize/capitalize.cpp", "-o", "capitalize"
|
|
|
|
assert_equal '{"A":"B"}', pipe_output("./capitalize", '{"a":"b"}')
|
|
|
|
end
|
|
|
|
end
|