Default static Qt build to host architecture
ober
c8ce4351d1068ad06d416a1b4f3e0a48a5680767
--- a/Makefile +++ b/Makefile @@ -42,11 +42,13 @@ CARGO ?= cargo CARGO_AUDIT ?= $(shell command -v cargo-audit 2>/dev/null || printf '%s/.cargo/bin/cargo-audit' "$$HOME") CARGO_AUDIT_VERSION ?= 0.22.2 PODMAN ?= podman -PODMAN_PLATFORM ?= linux/arm64 +STATIC_QT_HOST_ARCH := $(shell uname -m) +STATIC_QT_ARCH := $(if $(filter x86_64 amd64,$(STATIC_QT_HOST_ARCH)),amd64,$(if $(filter aarch64 arm64,$(STATIC_QT_HOST_ARCH)),arm64,$(STATIC_QT_HOST_ARCH))) +PODMAN_PLATFORM ?= linux/$(STATIC_QT_ARCH) PODMAN_BUILD_FLAGS ?= STATIC_QT_BASE_IMAGE ?= docker.io/library/ubuntu:24.04@sha256:4fbb8e6a8395de5a7550b33509421a2bafbc0aab6c06ba2cef9ebffbc7092d90 STATIC_QT_IMAGE ?= jerboa-browser-qt-builder -STATIC_QT_TARBALL ?= jerboa-browser-static-qt-linux-arm64.tar.gz +STATIC_QT_TARBALL ?= jerboa-browser-static-qt-linux-$(STATIC_QT_ARCH).tar.gz STATIC_QT_APT_SNAPSHOT ?= 20260701T000000Z # Modules that use (std crypto native-rust) need libjerboa_native dlopen-able at @@ -158,8 +160,17 @@ ensure-jerboa-tools: check-podman: @command -v $(PODMAN) >/dev/null 2>&1 || \ { echo "ERROR: Podman executable '$(PODMAN)' not found. Install Podman or set PODMAN=/path/to/podman."; exit 1; } - @$(PODMAN) info >/dev/null 2>&1 || \ - { echo "ERROR: Podman executable '$(PODMAN)' is installed but not reachable. On macOS/Windows, run 'podman machine start' and retry."; exit 1; } + @if ! $(PODMAN) info >/dev/null 2>&1; then \ + echo "ERROR: Podman executable '$(PODMAN)' is installed but not usable:" >&2; \ + $(PODMAN) info >&2 || true; \ + case "$$(uname -s)" in \ + Darwin|MINGW*|MSYS*|CYGWIN*) \ + echo "On macOS/Windows, initialize and start the VM with: podman machine init && podman machine start" >&2 ;; \ + *) \ + echo "On Linux, fix the rootless Podman setup above; do not use podman machine." >&2 ;; \ + esac; \ + exit 1; \ + fi # Build the self-contained native ./jerboa-browser via .jerbuild. native-static: check-jerbuild