Skip to content

Instantly share code, notes, and snippets.

@rsfinn
Last active February 6, 2019 20:21
Show Gist options
  • Save rsfinn/f7d59088dcd9db7259d9c58fe44ac112 to your computer and use it in GitHub Desktop.
Save rsfinn/f7d59088dcd9db7259d9c58fe44ac112 to your computer and use it in GitHub Desktop.
[email protected], updated for current Homebrew (removed references to cxx11)
class Capnp < Formula
desc "Data interchange format and capability-based RPC system"
homepage "https://capnproto.org/"
url "https://capnproto.org/capnproto-c++-0.6.1.tar.gz"
sha256 "8082040cd8c3b93c0e4fc72f2799990c72fdcf21c2b5ecdae6611482a14f1a04"
bottle do
cellar :any_skip_relocation
sha256 "fe035ee20666f60bea72a033625e30981da7cf49bca28e3ded78daeb9a0cc9f3" => :sierra
sha256 "5ef99277556769e117350e4c4c625c4498aab44aec043c24a3e8596ee98a311a" => :el_capitan
sha256 "7068ca3b3c0db13d8669d1c6e70c5a4a5f31872b70741c8cd54485b5f66052db" => :yosemite
end
depends_on "cmake" => :build
def install
mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make", "install"
end
end
test do
file = testpath/"test.capnp"
text = "\"Is a happy little duck\""
file.write Utils.popen_read("#{bin}/capnp id").chomp + ";\n"
file.append_lines "const dave :Text = #{text};"
assert_match text, shell_output("#{bin}/capnp eval #{file} dave")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment