protobuf-c: fix host usage

Dependant packages mostly depend on a proto-c binary instead of
proto-gen-c. Add a symlink for it.

Remove no longer needed HOST options.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2025-08-22 16:04:57 -07:00
committed by Hannu Nyman
parent 31b3f9bd1f
commit 0ec080beff

View File

@@ -27,6 +27,7 @@ PKG_BUILD_DEPENDS:=protobuf
CMAKE_INSTALL:=1 CMAKE_INSTALL:=1
CMAKE_SOURCE_SUBDIR:=build-cmake CMAKE_SOURCE_SUBDIR:=build-cmake
CMAKE_BINARY_SUBDIR:=openwrt-build
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
@@ -46,16 +47,15 @@ define Package/libprotobuf-c/description
internal RPC protocols and file formats. internal RPC protocols and file formats.
endef endef
CMAKE_HOST_OPTIONS += \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_STANDARD=11 \
-DCMAKE_SKIP_RPATH=OFF \
-DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib"
CMAKE_OPTIONS += \ CMAKE_OPTIONS += \
-DBUILD_SHARED_LIBS=ON \ -DBUILD_SHARED_LIBS=ON \
-DBUILD_PROTOC=OFF -DBUILD_PROTOC=OFF
define Host/Install
$(call Host/Install/Default)
$(LN) $(STAGING_DIR_HOSTPKG)/bin/protoc-gen-c $(STAGING_DIR_HOSTPKG)/bin/protoc-c
endef
define Package/libprotobuf-c/install define Package/libprotobuf-c/install
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so* $(1)/usr/lib/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libprotobuf-c.so* $(1)/usr/lib/