diff --git a/xcode.sh b/xcode.sh index 3cd124cdc3..f699c50232 100644 --- a/xcode.sh +++ b/xcode.sh @@ -1,8 +1,25 @@ package: Xcode version: "1.0" -system_requirement_missing: | - Please make sure you install Xcode and the command line tools using xcode-select --install -system_requirement: "(osx.*)" -system_requirement_check: | +prefer_system: ".*" +prefer_system_check: | + # In case we are not on Darwin, this should not be included + case `uname -o` in + Darwin) ;; + *) echo "alibuild_system_replace: unsupported" ;; + esac xcode-select -p && echo '#include ' | clang++ -x c++ - -c -o /dev/null + XCODE_VERSION="$(xcode-select -v | sed -e 's/[^0-9]//g')" + echo "alibuild_system_replace: ${XCODE_VERSION}" +prefer_system_replacement_specs: + unsupported: + version: "unsupported" + recipe: | + echo "XCode not supported on $(uname -o). Please check your dependencies." + exit 1 + "[0-9]+": + version: "%(key)s" + recipe: | + exit 0 --- +echo "Please make sure you install Xcode and the command line tools using xcode-select --install." +exit 1