contribs: protobuf: Don't build protoc when specifying --with-protoc
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Thu, 20 Apr 2017 16:07:52 +0000 (18:07 +0200)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Fri, 21 Apr 2017 13:14:49 +0000 (15:14 +0200)
contrib/src/protobuf/dont-build-protoc.patch [new file with mode: 0644]
contrib/src/protobuf/rules.mak

diff --git a/contrib/src/protobuf/dont-build-protoc.patch b/contrib/src/protobuf/dont-build-protoc.patch
new file mode 100644 (file)
index 0000000..061cf4c
--- /dev/null
@@ -0,0 +1,13 @@
+--- protobuf/src/Makefile.am.old       2017-04-20 17:58:28.941775687 +0200
++++ protobuf/src/Makefile.am   2017-04-20 17:57:40.629763450 +0200
+@@ -481,7 +481,10 @@
+   google/protobuf/compiler/csharp/csharp_wrapper_field.cc      \
+   google/protobuf/compiler/csharp/csharp_wrapper_field.h
++EXTRA_PROGRAMS = protoc
++if !USE_EXTERNAL_PROTOC
+ bin_PROGRAMS = protoc
++endif
+ protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
+ protoc_SOURCES = google/protobuf/compiler/main.cc
index da4057a..d8d9580 100644 (file)
@@ -17,6 +17,7 @@ DEPS_protobuf = zlib $(DEPS_zlib)
 protobuf: protobuf-$(PROTOBUF_VERSION)-cpp.tar.gz .sum-protobuf
        $(UNPACK)
        mv protobuf-3.1.0 protobuf-3.1.0-cpp
+       $(APPLY) $(SRC)/protobuf/dont-build-protoc.patch
        $(MOVE)
 
 .protobuf: protobuf