2018-02-14 11:19:12 +01:00
|
|
|
#!/bin/sh
|
2021-12-08 17:43:21 +01:00
|
|
|
cd $(dirname $0)
|
2018-02-14 22:41:26 +01:00
|
|
|
|
2021-09-03 08:25:14 +02:00
|
|
|
git clone https://github.com/beeware/Python-Apple-support
|
2018-02-14 11:19:12 +01:00
|
|
|
cd Python-Apple-support
|
2018-12-02 20:26:27 +01:00
|
|
|
git checkout 60b990128d5f1f04c336ff66594574515ab56604
|
2021-03-26 14:56:30 +01:00
|
|
|
git apply ../Python-Apple-support.patch
|
2018-02-14 11:19:12 +01:00
|
|
|
cd ..
|
2018-02-14 22:41:26 +01:00
|
|
|
|
2018-02-14 11:19:12 +01:00
|
|
|
#TODO: change openssl version
|
|
|
|
platforms="macOS iOS watchOS tvOS"
|
2021-09-03 08:25:14 +02:00
|
|
|
|
2018-02-14 11:19:12 +01:00
|
|
|
for platform in $platforms;
|
|
|
|
do
|
2021-09-03 08:25:14 +02:00
|
|
|
if [[ $platform = "macOS" ]]; then
|
|
|
|
simulators="0"
|
|
|
|
else
|
|
|
|
simulators="0 1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
for simulator in $simulators;
|
|
|
|
do
|
|
|
|
if [[ $simulator = "1" ]]; then
|
|
|
|
platform="${platform}-simulator"
|
|
|
|
fi
|
|
|
|
echo $platform
|
|
|
|
cd Python-Apple-support
|
|
|
|
#NB: -j will fail
|
|
|
|
make OpenSSL-$platform
|
|
|
|
cd ..
|
|
|
|
rm -rf third_party/openssl/$platform
|
|
|
|
mkdir -p third_party/openssl/$platform/lib
|
|
|
|
cp ./Python-Apple-support/build/$platform/libcrypto.a third_party/openssl/$platform/lib/
|
|
|
|
cp ./Python-Apple-support/build/$platform/libssl.a third_party/openssl/$platform/lib/
|
|
|
|
cp -r ./Python-Apple-support/build/$platform/Support/OpenSSL/Headers/ third_party/openssl/$platform/include
|
|
|
|
done
|
2018-02-14 11:19:12 +01:00
|
|
|
done
|