This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 3789967  Updating libpulsar Homebrew recipe to 2.2.0 (#2896)
3789967 is described below

commit 37899671c21589a9a84845424f4ca2c404c123dc
Author: Matteo Merli <[email protected]>
AuthorDate: Wed Oct 31 16:46:42 2018 -0700

    Updating libpulsar Homebrew recipe to 2.2.0 (#2896)
---
 pulsar-client-cpp/homebrew/libpulsar.rb | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/pulsar-client-cpp/homebrew/libpulsar.rb 
b/pulsar-client-cpp/homebrew/libpulsar.rb
index 9e4f2de..426e783 100644
--- a/pulsar-client-cpp/homebrew/libpulsar.rb
+++ b/pulsar-client-cpp/homebrew/libpulsar.rb
@@ -23,10 +23,9 @@ class Libpulsar < Formula
 
   head "https://github.com/apache/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 "b7ec66c64830f9a0890a145d40a2a28063c056c2d68e9a4e9bdb0cbe7de0bb39"
+  version "2.2.0"
+  url 
"https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=pulsar/pulsar-#{version}/apache-pulsar-#{version}-src.tar.gz";
+  sha256 "a3b1940a803043bb2c365ce9df657d15bf9aacb3c9ff5db86a79dc4374033f08"
 
   option "with-python3", "Use Boost with Python-3.x"
   option "with-log4cxx", "Enable Log4cxx logger"
@@ -41,6 +40,7 @@ class Libpulsar < Formula
   if build.with? "python3"
       depends_on "boost-python3" => :build
   else
+      depends_on "python@2" => :build
       depends_on "boost-python" => :build
   end
 
@@ -51,10 +51,16 @@ class Libpulsar < Formula
   def install
     Dir.chdir('pulsar-client-cpp')
 
+    if build.with? "python3"
+        python_include_dir = 
'/usr/local/Frameworks/Python.framework/Versions/3.7/include/python3.7m'
+    else
+        python_include_dir = 
'/usr/local/Frameworks/Python.framework/Versions/2.7/include/python2.7/'
+    end
+
     if build.with? "log4cxx"
-      system "cmake", ".", "-DBUILD_TESTS=OFF", "-DLINK_STATIC=ON", 
"-DUSE_LOG4CXX"
+      system "cmake", ".", "-DBUILD_TESTS=OFF", "-DLINK_STATIC=ON", 
"-DUSE_LOG4CXX", "-DPYTHON_INCLUDE_DIR=" + python_include_dir
     else
-      system "cmake", ".", "-DBUILD_TESTS=OFF", "-DLINK_STATIC=ON"
+      system "cmake", ".", "-DBUILD_TESTS=OFF", "-DLINK_STATIC=ON", 
"-DPYTHON_INCLUDE_DIR=" + python_include_dir
     end
     system "make", "pulsarShared", "pulsarStatic"
 

Reply via email to