123456789101112131415161718192021222324252627282930313233343536 |
- #!/usr/bin/env bash
- # _____ _
- # |_ _| |_ _ _ ___ ___ _ __ __ _
- # | | | ' \| '_/ -_) -_) ' \/ _` |_
- # |_| |_||_|_| \___\___|_|_|_\__,_(_)
- #
- # Threema iOS Client
- # Copyright (c) 2020 Threema GmbH
- #
- # This program is free software: you can redistribute it and/or modify
- # it under the terms of the GNU Affero General Public License, version 3,
- # as published by the Free Software Foundation.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU Affero General Public License for more details.
- #
- # You should have received a copy of the GNU Affero General Public License
- # along with this program. If not, see <https://www.gnu.org/licenses/>.
- #
- # Based on https://github.com/Carthage/Carthage/blob/master/Documentation/Xcode12Workaround.md
- set -euo pipefail
- xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
- trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
- # For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
- # the build will fail on lipo due to duplicate architectures.
- echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
- echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
- export XCODE_XCCONFIG_FILE="$xcconfig"
- carthage "$@"
|