From 4ef9b86cc22c4051d98534c28f413720df610fe6 Mon Sep 17 00:00:00 2001
From: "Nicolas \"Pixel\" Noble" <pixel@nobis-crew.org>
Date: Fri, 14 Aug 2015 19:35:24 +0200
Subject: [PATCH] Fixing zookeeper's installation.

---
 Makefile                    |  5 ++---
 templates/Makefile.template | 23 +++++++++++------------
 2 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/Makefile b/Makefile
index 5895e49b27..d254fd6ecb 100644
--- a/Makefile
+++ b/Makefile
@@ -3407,9 +3407,11 @@ ifeq ($(CONFIG),opt)
 	$(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc.a
 	$(E) "[STRIP]   Stripping libgrpc_unsecure.a"
 	$(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a
+ifeq ($(HAS_ZOOKEEPER),true)
 	$(E) "[STRIP]   Stripping libgrpc_zookeeper.a"
 	$(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_zookeeper.a
 endif
+endif
 
 strip-static_cxx: static_cxx
 ifeq ($(CONFIG),opt)
@@ -3417,9 +3419,6 @@ ifeq ($(CONFIG),opt)
 	$(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++.a
 	$(E) "[STRIP]   Stripping libgrpc++_unsecure.a"
 	$(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a
-
-ifeq ($(HAS_ZOOKEEPER),true)
-endif
 endif
 
 strip-shared_c: shared_c
diff --git a/templates/Makefile.template b/templates/Makefile.template
index 75fd672596..1b898efbdd 100644
--- a/templates/Makefile.template
+++ b/templates/Makefile.template
@@ -1143,39 +1143,38 @@ ifeq ($(CONFIG),opt)
 % for lib in libs:
 % if lib.language == "c":
 % if lib.build == "all":
+% if not lib.get('external_deps', None):
 	$(E) "[STRIP]   Stripping lib${lib.name}.a"
 	$(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a
 % endif
 % endif
+% endif
 % endfor
-endif
-
-strip-static_cxx: static_cxx
-ifeq ($(CONFIG),opt)
+ifeq ($(HAS_ZOOKEEPER),true)
 % for lib in libs:
-% if lib.language == "c++":
+% if lib.language == "c":
 % if lib.build == "all":
-% if not lib.get('external_deps', None):
+% if 'zookeeper' in lib.get('external_deps', []):
 	$(E) "[STRIP]   Stripping lib${lib.name}.a"
 	$(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a
 % endif
 % endif
 % endif
 % endfor
+endif
+endif
 
-ifeq ($(HAS_ZOOKEEPER),true)
+strip-static_cxx: static_cxx
+ifeq ($(CONFIG),opt)
 % for lib in libs:
 % if lib.language == "c++":
 % if lib.build == "all":
-% if 'zookeeper' in lib.get('external_deps', []):
-  $(E) "[STRIP]   Stripping lib${lib.name}.a"
-  $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a
-% endif
+	$(E) "[STRIP]   Stripping lib${lib.name}.a"
+	$(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a
 % endif
 % endif
 % endfor
 endif
-endif
 
 strip-shared_c: shared_c
 ifeq ($(CONFIG),opt)
-- 
GitLab