Skip to content

Instantly share code, notes, and snippets.

@merlimat
Last active May 16, 2018 20:51
Show Gist options
  • Save merlimat/1b4925e01bc7fcfb04b9a6193026a020 to your computer and use it in GitHub Desktop.
Save merlimat/1b4925e01bc7fcfb04b9a6193026a020 to your computer and use it in GitHub Desktop.

To install libpulsar, save the formula into libpulsar.rb and do:

brew install ./libpulsar.rb
class Libpulsar < Formula
desc "Apache Pulsar C++ library"
homepage "https://pulsar.apache.org"
version "2.1.0-incubating-SNAPSHOT"
url "https://s3-us-west-2.amazonaws.com/pulsar-preview/apache-pulsar-#{version}-src.tar.gz"
sha256 "b128e657395e6cec048e627c2729a92eb8bcafd08e5d9ee609f32bd1e41756bc"
head "https://github.com/apache/incubator-pulsar.git"
option "with-python3", "Use Boost with Python-3.x"
depends_on "pkg-config" => :build
depends_on "cmake" => :build
depends_on "openssl"
depends_on "boost"
depends_on "jsoncpp"
depends_on "log4cxx"
depends_on "protobuf@2.6"
if build.with? "python3"
depends_on "boost-python3"
else
depends_on "boost-python"
end
def install
Dir.chdir('pulsar-client-cpp')
system "cmake", ".", "-DBUILD_TESTS=OFF"
system "make", "pulsarShared", "pulsarStatic"
include.install "include/pulsar"
lib.install "lib/libpulsar.#{version}.dylib"
lib.install "lib/libpulsar.dylib"
lib.install "lib/libpulsar.a"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment