diff --git a/libs/protobuf/Makefile b/libs/protobuf/Makefile index 7e60e84986c0d7..0dcea63d2c6978 100644 --- a/libs/protobuf/Makefile +++ b/libs/protobuf/Makefile @@ -8,19 +8,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=protobuf -PKG_VERSION:=3.17.3 -PKG_RELEASE:=2 +PKG_VERSION:=29.1 +PKG_RELEASE:=1 -PKG_SOURCE:=$(PKG_NAME)-cpp-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/google/protobuf/releases/download/v$(PKG_VERSION) -PKG_HASH:=51cec99f108b83422b7af1170afd7aeb2dd77d2bcbb7b6bad1f92509e9ccf8cb +PKG_HASH:=3d32940e975c4ad9b8ba69640e78f5527075bae33ca2890275bf26b853c0962c -PKG_MAINTAINER:=Ken Keys +PKG_MAINTAINER:=Ken Keys , Austin Lane PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:google:protobuf -CMAKE_SOURCE_SUBDIR:=cmake +HOST_BUILD_DEPENDS:=abseil-cpp/host +PKG_BUILD_DEPENDS:=abseil-cpp include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/host-build.mk @@ -31,7 +32,7 @@ define Package/protobuf/Default CATEGORY:=Libraries TITLE:=A structured data encoding library URL:=https://github.com/google/protobuf - DEPENDS:=+zlib +libpthread +libatomic +libstdcpp + DEPENDS:=+zlib +libstdcpp +abseil-cpp endef define Package/protobuf @@ -65,39 +66,45 @@ This package provides the libprotobuf-lite library. endef CMAKE_HOST_OPTIONS += \ + -Dprotobuf_ABSL_PROVIDER="package" \ -Dprotobuf_BUILD_PROTOC_BINARIES=ON \ -Dprotobuf_BUILD_TESTS=OFF \ + -Dprotobuf_BUILD_EXAMPLES=OFF \ -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_INSTALL_LIBDIR=lib CMAKE_OPTIONS += \ + -Dprotobuf_ABSL_PROVIDER="package" \ -Dprotobuf_BUILD_PROTOC_BINARIES=ON \ -Dprotobuf_BUILD_TESTS=OFF \ + -Dprotobuf_BUILD_EXAMPLES=OFF \ -Dprotobuf_WITH_ZLIB=ON \ -DBUILD_SHARED_LIBS=ON -TARGET_LDFLAGS += -latomic - define Build/InstallDev $(call Build/InstallDev/cmake,$(1)) $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/protobuf.pc $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/protobuf.pc $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/protobuf-lite.pc $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/protobuf-lite.pc + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/upb.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/upb.pc + $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/utf8_range.pc + $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/utf8_range.pc endef define Package/protobuf-lite/install - $(INSTALL_DIR) \ - $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libutf8_range.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libutf8_validity.so* $(1)/usr/lib/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-lite.so* \ $(1)/usr/lib/ endef define Package/protobuf/install - $(INSTALL_DIR) \ - $(1)/usr/lib + $(INSTALL_DIR) $(1)/usr/lib $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/libprotoc.so* \ diff --git a/libs/protobuf/patches/010-rpath.patch b/libs/protobuf/patches/010-rpath.patch index ef3e98ab17e88b..36db52f5899601 100644 --- a/libs/protobuf/patches/010-rpath.patch +++ b/libs/protobuf/patches/010-rpath.patch @@ -1,24 +1,24 @@ --- a/cmake/install.cmake +++ b/cmake/install.cmake -@@ -16,8 +16,8 @@ foreach(_library ${_protobuf_libraries}) - $ - $) +@@ -39,8 +39,8 @@ endif () + + foreach(_library ${_protobuf_libraries}) if (UNIX AND NOT APPLE) - set_property(TARGET ${_library} - PROPERTY INSTALL_RPATH "$ORIGIN") -+# set_property(TARGET ${_library} ++# set_property(TARGET ${_library} +# PROPERTY INSTALL_RPATH "$ORIGIN") elseif (APPLE) set_property(TARGET ${_library} PROPERTY INSTALL_RPATH "@loader_path") -@@ -34,8 +34,8 @@ if (protobuf_BUILD_PROTOC_BINARIES) - BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} - COMPONENT protoc) - if (UNIX AND NOT APPLE) -- set_property(TARGET protoc -- PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") -+# set_property(TARGET protoc -+# PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") - elseif (APPLE) - set_property(TARGET protoc - PROPERTY INSTALL_RPATH "@loader_path/../lib") +@@ -66,8 +66,8 @@ if (protobuf_BUILD_PROTOC_BINARIES) + endif () + foreach (binary IN LISTS _protobuf_binaries) + if (UNIX AND NOT APPLE) +- set_property(TARGET ${binary} +- PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") ++# set_property(TARGET ${binary} ++# PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") + elseif (APPLE) + set_property(TARGET ${binary} + PROPERTY INSTALL_RPATH "@loader_path/../lib")