From d078dbed7b1843b8510a4bec64959cfe6c294250 Mon Sep 17 00:00:00 2001 From: Ken Keys Date: Wed, 23 May 2018 16:37:35 -0700 Subject: [PATCH 1/2] protobuf: add smaller protobuf-lite package variant Signed-off-by: Ken Keys --- libs/protobuf/Makefile | 48 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/libs/protobuf/Makefile b/libs/protobuf/Makefile index 2f25156bf..5b65dabd7 100644 --- a/libs/protobuf/Makefile +++ b/libs/protobuf/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=protobuf PKG_VERSION:=3.3.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION) @@ -26,19 +26,43 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk -define Package/protobuf +define Package/protobuf/Default SECTION:=libs CATEGORY:=Libraries TITLE:=A structured data encoding library URL:=https://github.com/google/protobuf DEPENDS:=+zlib +libpthread +libstdcpp - MAINTAINER:=Per Sandström + MAINTAINER:=Ken Keys +endef + +define Package/protobuf + $(call Package/protobuf/Default) + DEPENDS+=+protobuf-lite +endef + +define Package/protobuf-lite + $(call Package/protobuf/Default) +endef + +define Package/protobuf/description/Default +Protocol Buffers are a way of encoding structured data in an efficient +yet extensible format. Google uses Protocol Buffers for almost all +of its internal RPC protocols and file formats. endef define Package/protobuf/description - Protocol Buffers are a way of encoding structured data in an efficient - yet extensible format. Google uses Protocol Buffers for almost all - of its internal RPC protocols and file formats. +$(call Package/protobuf/description/Default) + +This package provides the libprotoc, libprotobuf, and libprotobuf-lite +libraries. For a much smaller protobuf package, see "protobuf-lite". + +endef + +define Package/protobuf-lite/description +$(call Package/protobuf/description/Default) + +This package provides the libprotobuf-lite library. + endef CONFIGURE_ARGS += --with-protoc=$(STAGING_DIR_HOSTPKG)/bin/protoc @@ -57,16 +81,21 @@ define Build/InstallDev $(1)/usr/lib/ endef -define Package/protobuf/install +define Package/protobuf-lite/install $(INSTALL_DIR) \ $(1)/usr/lib $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \ + $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \ $(1)/usr/lib/ +endef + +define Package/protobuf/install + $(INSTALL_DIR) \ + $(1)/usr/lib $(CP) \ - $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \ + $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \ $(1)/usr/lib/ $(CP) \ @@ -75,4 +104,5 @@ define Package/protobuf/install endef $(eval $(call BuildPackage,protobuf)) +$(eval $(call BuildPackage,protobuf-lite)) $(eval $(call HostBuild)) From 07daa086e6b23e67d0a30a6bd9c8a8d3203b9fbc Mon Sep 17 00:00:00 2001 From: Ken Keys Date: Wed, 23 May 2018 16:39:29 -0700 Subject: [PATCH 2/2] protobuf: upgrade to version 3.5.1 Signed-off-by: Ken Keys --- libs/protobuf/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/protobuf/Makefile b/libs/protobuf/Makefile index 5b65dabd7..c93527f05 100644 --- a/libs/protobuf/Makefile +++ b/libs/protobuf/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=protobuf -PKG_VERSION:=3.3.0 -PKG_RELEASE:=2 +PKG_VERSION:=3.5.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION) -PKG_HASH:=578a2589bf9258adb03245dec5d624b61536867ebb732dbb8aeb30d96b0ada1f +PKG_HASH:=c28dba8782da2cfea1e11c61d335958c31a9c1bc553063546af9cbe98f204092 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE