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

nicknezis pushed a commit to branch nicknezis/bazel-2
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git

commit 76421e47a90dd80cb4366b97829b1f736add0790
Author: Nicholas Nezis <[email protected]>
AuthorDate: Sat Apr 4 21:15:45 2020 -0400

    Added patch file to make Zookeeper compile on Ubuntu 18.04
---
 WORKSPACE                                        |  4 +++-
 third_party/zookeeper/{zookeeper.BUILD => BUILD} |  1 +
 third_party/zookeeper/pkgconfig.patch            | 12 ++++++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/WORKSPACE b/WORKSPACE
index f3bacde..31cab18 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -248,8 +248,10 @@ http_archive(
     name = "org_apache_zookeeper",
     urls = 
["https://archive.apache.org/dist/zookeeper/zookeeper-3.4.14/zookeeper-3.4.14.tar.gz";],
     strip_prefix = "zookeeper-3.4.14",
-    build_file = "@//:third_party/zookeeper/zookeeper.BUILD",
+    build_file = "@//:third_party/zookeeper/BUILD",
     sha256 = 
"b14f7a0fece8bd34c7fffa46039e563ac5367607c612517aa7bd37306afbd1cd",
+    patches = ["//third_party/zookeeper:pkgconfig.patch"],
+    patch_args = ["-p2"],
 )
 
 http_archive(
diff --git a/third_party/zookeeper/zookeeper.BUILD b/third_party/zookeeper/BUILD
similarity index 98%
rename from third_party/zookeeper/zookeeper.BUILD
rename to third_party/zookeeper/BUILD
index 008cb5b..d9f06ee 100644
--- a/third_party/zookeeper/zookeeper.BUILD
+++ b/third_party/zookeeper/BUILD
@@ -29,6 +29,7 @@ genrule(
         "mkdir -p $$TMP_DIR",
         "cp -R $$(pwd)/external/org_apache_zookeeper/* $$TMP_DIR",
         "cd $$TMP_DIR/zookeeper-client/zookeeper-client-c",
+        "autoreconf -if",
         "./configure --prefix=$$INSTALL_DIR --enable-shared=no",
         "make install",
         "rm -rf $$TMP_DIR",
diff --git a/third_party/zookeeper/pkgconfig.patch 
b/third_party/zookeeper/pkgconfig.patch
new file mode 100644
index 0000000..472fe6c
--- /dev/null
+++ b/third_party/zookeeper/pkgconfig.patch
@@ -0,0 +1,12 @@
+diff -Naur /tmp/zookeeper-client/zookeeper-client-c/configure.ac 
/tmp/zookeeper-client/zookeeper-client-c/configure.ac
+--- /tmp/zookeeper-client/zookeeper-client-c/configure.ac      2019-03-06 
16:50:47.000000000 +0000
++++ /tmp/zookeeper-client/zookeeper-client-c/configure.ac      2020-04-04 
23:44:40.442252000 +0000
+@@ -34,7 +34,7 @@
+    CPPUNIT_INCLUDE=
+    CPPUNIT_LIBS=
+ else
+-   AM_PATH_CPPUNIT(1.10.2)
++   PKG_CHECK_MODULES([CPPUNIT], [cppunit >= 1.10.2])
+ fi
+ 
+ if test "$CALLER" = "ANT" ; then

Reply via email to