2014-07-14 13:57:06 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2011 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libprotobuf-c
|
2023-03-11 00:16:47 +00:00
|
|
|
PKG_VERSION:=1.4.1
|
|
|
|
PKG_RELEASE:=1
|
2014-07-14 13:57:06 +00:00
|
|
|
|
2018-08-17 19:11:11 +00:00
|
|
|
PKG_SOURCE:=protobuf-c-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=https://github.com/protobuf-c/protobuf-c/releases/download/v$(PKG_VERSION)
|
2023-03-11 00:16:47 +00:00
|
|
|
PKG_HASH:=4cc4facd508172f3e0a4d3a8736225d472418aee35b4ad053384b137b220339f
|
2018-08-17 19:11:11 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/protobuf-c-$(PKG_VERSION)
|
|
|
|
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/protobuf-c-$(PKG_VERSION)
|
|
|
|
|
2020-03-16 02:49:09 +00:00
|
|
|
PKG_MAINTAINER:=
|
2019-07-01 00:59:28 +00:00
|
|
|
PKG_LICENSE:=BSD-2-Clause
|
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
2014-07-14 13:57:06 +00:00
|
|
|
|
2018-06-13 13:44:58 +00:00
|
|
|
HOST_BUILD_DEPENDS:=protobuf/host
|
2019-09-21 20:25:21 +00:00
|
|
|
PKG_BUILD_DEPENDS:=protobuf
|
2018-04-30 21:14:47 +00:00
|
|
|
|
2019-09-24 19:46:36 +00:00
|
|
|
CMAKE_INSTALL:=1
|
2019-09-21 20:25:21 +00:00
|
|
|
CMAKE_SOURCE_SUBDIR:=build-cmake
|
2014-07-15 07:44:42 +00:00
|
|
|
|
2014-07-14 13:57:06 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2018-04-30 21:14:47 +00:00
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
2021-06-10 23:27:06 +00:00
|
|
|
include $(INCLUDE_DIR)/cmake.mk
|
2014-07-14 13:57:06 +00:00
|
|
|
|
|
|
|
define Package/libprotobuf-c
|
|
|
|
TITLE:=Protocol Buffers library
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
2018-08-17 19:11:11 +00:00
|
|
|
URL:=https://github.com/protobuf-c/protobuf-c
|
2014-07-14 13:57:06 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libprotobuf-c/description
|
|
|
|
Runtime library to use Google Protocol Buffers from C applications.
|
|
|
|
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
|
|
|
|
|
2019-09-26 04:35:30 +00:00
|
|
|
CMAKE_HOST_OPTIONS += \
|
2021-10-19 07:47:16 +00:00
|
|
|
-DBUILD_SHARED_LIBS=OFF \
|
2020-05-24 04:16:25 +00:00
|
|
|
-DCMAKE_CXX_STANDARD=11 \
|
2019-09-26 04:35:30 +00:00
|
|
|
-DCMAKE_SKIP_RPATH=OFF \
|
|
|
|
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
|
|
|
|
|
2019-09-21 20:25:21 +00:00
|
|
|
CMAKE_OPTIONS += \
|
2021-06-13 03:48:05 +00:00
|
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
|
|
-DBUILD_PROTOC=OFF
|
2014-07-14 13:57:06 +00:00
|
|
|
|
|
|
|
define Package/libprotobuf-c/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2019-09-21 20:25:21 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so* $(1)/usr/lib/
|
2014-07-14 13:57:06 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,libprotobuf-c))
|
2018-04-30 21:14:47 +00:00
|
|
|
$(eval $(call HostBuild))
|
|
|
|
|