$NetBSD: patch-Makefile,v 1.3 2023/02/20 09:58:02 tnn Exp $ Add netbsd support --- Makefile.orig 2023-02-08 19:03:18.000000000 +0000 +++ Makefile @@ -162,10 +162,10 @@ err_if_empty = $(if $(strip $($(1))),$(s # Windows and Mac (both podman-remote client only) require CGO_ENABLED=0. CGO_ENABLED ?= 1 # Default to the native OS type and architecture unless otherwise specified -NATIVE_GOOS := $(shell env -u GOOS $(GO) env GOOS) +NATIVE_GOOS := $(shell env GOOS= $(GO) env GOOS) GOOS ?= $(call err_if_empty,NATIVE_GOOS) # Default to the native architecture type -NATIVE_GOARCH := $(shell env -u GOARCH $(GO) env GOARCH) +NATIVE_GOARCH := $(shell env GOARCH= $(GO) env GOARCH) GOARCH ?= $(NATIVE_GOARCH) ifeq ($(call err_if_empty,GOOS),windows) BINSFX := .exe @@ -175,6 +175,10 @@ else ifeq ($(GOOS),darwin) BINSFX := SRCBINDIR := bin/darwin CGO_ENABLED := 0 +else ifeq ($(GOOS),netbsd) +BINSFX := +SRCBINDIR := bin/netbsd +CGO_ENABLED := 0 else BINSFX := -remote SRCBINDIR := bin