From 6eb0ecfc7a4e14376c559d2428f025753b18e3ed Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 13 Jun 2023 16:03:54 +0200 Subject: [PATCH] Allow non-cgo builds for Dawrin --- ...{detect_darwin.go => detect_cgo_darwin.go} | 2 ++ i18n/detect_nocgo_darwin.go | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+) rename i18n/{detect_darwin.go => detect_cgo_darwin.go} (97%) create mode 100644 i18n/detect_nocgo_darwin.go diff --git a/i18n/detect_darwin.go b/i18n/detect_cgo_darwin.go similarity index 97% rename from i18n/detect_darwin.go rename to i18n/detect_cgo_darwin.go index 00503ba0ae8..c9fd4ecefb9 100644 --- a/i18n/detect_darwin.go +++ b/i18n/detect_cgo_darwin.go @@ -13,6 +13,8 @@ // Arduino software without disclosing the source code of your own applications. // To purchase a commercial license, send an email to license@arduino.cc. +//go:build darwin && cgo + package i18n /* diff --git a/i18n/detect_nocgo_darwin.go b/i18n/detect_nocgo_darwin.go new file mode 100644 index 00000000000..f7ae977b19f --- /dev/null +++ b/i18n/detect_nocgo_darwin.go @@ -0,0 +1,22 @@ +// This file is part of arduino-cli. +// +// Copyright 2020 ARDUINO SA (http://www.arduino.cc/) +// +// This software is released under the GNU General Public License version 3, +// which covers the main part of arduino-cli. +// The terms of this license can be found at: +// https://www.gnu.org/licenses/gpl-3.0.en.html +// +// You can be released from the requirements of the above licenses by purchasing +// a commercial license. Buying such a license is mandatory if you want to +// modify or otherwise use the software for commercial activities involving the +// Arduino software without disclosing the source code of your own applications. +// To purchase a commercial license, send an email to license@arduino.cc. + +//go:build darwin && !cgo + +package i18n + +func getLocaleIdentifier() string { + return getLocaleIdentifierFromEnv() +}