From e2a4fac0af51247ca9275accf222ba7ed5c512c4 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 1 May 2026 04:12:06 +0000 Subject: [PATCH] Recover native protoc during depends install --- depends/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/depends/Makefile b/depends/Makefile index f6f5f959..4682b133 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -118,6 +118,15 @@ ifneq ($(native_packages),) echo " - $$p: $$f"; \ tar --no-same-owner -xzf "$$f" -C "$(build_prefix)"; \ done + @if [[ " $(native_packages) " == *" native_protobuf "* ]] && [[ ! -x "$(build_prefix)/bin/protoc" ]]; then \ + found="$$(find "$(build_prefix)" -path '*/bin/protoc' -type f 2>/dev/null | sort | head -n 1)"; \ + if [[ -n "$$found" ]]; then \ + echo "== Staging native protoc from: $$found"; \ + mkdir -p "$(build_prefix)/bin"; \ + cp "$$found" "$(build_prefix)/bin/protoc"; \ + chmod +x "$(build_prefix)/bin/protoc"; \ + fi; \ + fi @if [[ " $(native_packages) " == *" native_protobuf "* ]] && [[ ! -x "$(build_prefix)/bin/protoc" ]]; then \ echo "ERROR: missing native protoc under $(build_prefix)/bin/protoc"; \ echo "Fix: make -C $(BASEDIR) HOST=$(HOST) NO_QT=$(NO_QT) native_protobuf"; \