You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2018/05/23 18:10:33 UTC
[incubator-pulsar] branch master updated: Added Homebrew recipe for
C++ client library (#1834)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 3e09628 Added Homebrew recipe for C++ client library (#1834)
3e09628 is described below
commit 3e0962811637f4c002ad1e460bdd6da2c769f61a
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Wed May 23 11:10:31 2018 -0700
Added Homebrew recipe for C++ client library (#1834)
### Motivation
Added recipe to build C++ client library on Mac for Homebrew.
First step is to include the recipe here. The final goal, once 2.1 is released is to have this recipe on main Homebrew repository.
---
pulsar-client-cpp/homebrew/libpulsar.rb | 66 +++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/pulsar-client-cpp/homebrew/libpulsar.rb b/pulsar-client-cpp/homebrew/libpulsar.rb
new file mode 100644
index 0000000..bda900b
--- /dev/null
+++ b/pulsar-client-cpp/homebrew/libpulsar.rb
@@ -0,0 +1,66 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+class Libpulsar < Formula
+ desc "Apache Pulsar C++ library"
+ homepage "https://pulsar.apache.org"
+
+ head "https://github.com/apache/incubator-pulsar.git"
+
+ # TODO: Switch to official 2.1 version when available
+ version "2.1.0-incubating-SNAPSHOT"
+ url "https://s3-us-west-2.amazonaws.com/pulsar-preview/apache-pulsar-#{version}-src.tar.gz"
+ sha256 "d416fa89c971cf1b223530e0ce9dbd7e7ca81be3cf0c3e5fcfde1f781ff43762"
+
+ option "with-python3", "Use Boost with Python-3.x"
+ option "with-log4cxx", "Enable Log4cxx logger"
+
+ depends_on "pkg-config" => :build
+ depends_on "cmake" => :build
+ depends_on "openssl" => :build
+ depends_on "boost" => :build
+ depends_on "jsoncpp" => :build
+ depends_on "protobuf@2.6" => :build
+
+ if build.with? "python3"
+ depends_on "boost-python3" => :build
+ else
+ depends_on "boost-python" => :build
+ end
+
+ if build.with? "log4cxx"
+ depends_on "log4cxx" => :build
+ end
+
+ def install
+ Dir.chdir('pulsar-client-cpp')
+
+ if build.with? "log4cxx"
+ system "cmake", ".", "-DBUILD_TESTS=OFF", "-DLINK_STATIC=ON", "-DUSE_LOG4CXX"
+ else
+ system "cmake", ".", "-DBUILD_TESTS=OFF", "-DLINK_STATIC=ON"
+ end
+ 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
--
To stop receiving notification emails like this one, please contact
sijie@apache.org.