1#!/bin/sh 2 3git clone https://github.com/beeware/Python-Apple-support 4cd Python-Apple-support 5git checkout 60b990128d5f1f04c336ff66594574515ab56604 6git apply ../Python-Apple-support.patch 7cd .. 8 9#TODO: change openssl version 10platforms="macOS iOS watchOS tvOS" 11 12for platform in $platforms; 13do 14 if [[ $platform = "macOS" ]]; then 15 simulators="0" 16 else 17 simulators="0 1" 18 fi 19 20 for simulator in $simulators; 21 do 22 if [[ $simulator = "1" ]]; then 23 platform="${platform}-simulator" 24 fi 25 echo $platform 26 cd Python-Apple-support 27 #NB: -j will fail 28 make OpenSSL-$platform 29 cd .. 30 rm -rf third_party/openssl/$platform 31 mkdir -p third_party/openssl/$platform/lib 32 cp ./Python-Apple-support/build/$platform/libcrypto.a third_party/openssl/$platform/lib/ 33 cp ./Python-Apple-support/build/$platform/libssl.a third_party/openssl/$platform/lib/ 34 cp -r ./Python-Apple-support/build/$platform/Support/OpenSSL/Headers/ third_party/openssl/$platform/include 35 done 36done 37