aboutsummaryrefslogtreecommitdiff
path: root/contrib/depends/packages/native_protobuf.mk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contrib/depends/packages/native_protobuf.mk28
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/depends/packages/native_protobuf.mk b/contrib/depends/packages/native_protobuf.mk
new file mode 100644
index 000000000..83e602341
--- /dev/null
+++ b/contrib/depends/packages/native_protobuf.mk
@@ -0,0 +1,28 @@
+package=protobuf3
+$(package)_version=3.6.1
+$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v$($(package)_version)/
+$(package)_file_name=protobuf-cpp-$($(package)_version).tar.gz
+$(package)_sha256_hash=b3732e471a9bb7950f090fd0457ebd2536a9ba0891b7f3785919c654fe2a2529
+$(package)_cxxflags=-std=c++11
+
+define $(package)_set_vars
+ $(package)_config_opts=--disable-shared --prefix=$(build_prefix)
+ $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+ $(MAKE) -C src libprotobuf.la all
+endef
+
+define $(package)_stage_cmds
+ $(MAKE) DESTDIR=$($(package)_staging_dir) -C src install install-libLTLIBRARIES install-nobase_includeHEADERS &&\
+ $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA
+endef
+
+define $(package)_postprocess_cmds
+ rm lib/libprotoc.a
+endef