Normalize native protoc path handling
This commit is contained in:
@@ -33,7 +33,20 @@ reset_qt_configure_state() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ensure_native_protoc() {
|
ensure_native_protoc() {
|
||||||
local found
|
local archive found
|
||||||
|
|
||||||
|
if [[ -x "$PROTOC" ]]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
archive="$(find "$ROOT/depends/built/$HOST/native_protobuf" \
|
||||||
|
-name 'native_protobuf-*.tar.gz' -type f 2>/dev/null | sort | tail -n 1 || true)"
|
||||||
|
|
||||||
|
if [[ -n "$archive" ]]; then
|
||||||
|
echo "Extracting native protoc from $archive"
|
||||||
|
mkdir -p "$ROOT/depends/build/$BUILD_HOST"
|
||||||
|
tar -xzf "$archive" -C "$ROOT/depends/build/$BUILD_HOST" ./bin/protoc
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -x "$PROTOC" ]]; then
|
if [[ -x "$PROTOC" ]]; then
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -114,6 +114,11 @@ ifneq ($(native_packages),)
|
|||||||
echo " - $$p: $$f"; \
|
echo " - $$p: $$f"; \
|
||||||
tar -xzf $$f -C "$(build_prefix)"; \
|
tar -xzf $$f -C "$(build_prefix)"; \
|
||||||
done
|
done
|
||||||
|
@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"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
endif
|
endif
|
||||||
@echo "== Writing config.site: $(host_prefix)/share/config.site"
|
@echo "== Writing config.site: $(host_prefix)/share/config.site"
|
||||||
@mkdir -p "$(host_prefix)/share"
|
@mkdir -p "$(host_prefix)/share"
|
||||||
|
|||||||
Reference in New Issue
Block a user