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
|
2023-06-30 09:10:39 +02:00
|
|
|
git checkout 6f43aba0ddd5a9f52f39775d0141bd4363614020 || exit 1
|
2023-03-03 12:11:46 +01:00
|
|
|
git reset --hard || exit 1
|
2024-03-11 18:47:04 +01:00
|
|
|
git apply ../Python-Apple-support.patch || exit 1
|
2018-02-14 11:19:12 +01:00
|
|
|
cd ..
|
2018-02-14 22:41:26 +01:00
|
|
|
|
2024-03-11 18:47:04 +01:00
|
|
|
platforms="macOS iOS watchOS tvOS visionOS"
|
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
|
2022-10-14 22:09:16 +02:00
|
|
|
make OpenSSL-$platform || exit 1
|
2021-09-03 08:25:14 +02:00
|
|
|
cd ..
|
2022-10-14 22:09:16 +02:00
|
|
|
rm -rf third_party/openssl/$platform || exit 1
|
|
|
|
mkdir -p third_party/openssl/$platform/lib || exit 1
|
2023-06-30 09:10:39 +02:00
|
|
|
cp ./Python-Apple-support/merge/$platform/openssl/lib/libcrypto.a third_party/openssl/$platform/lib/ || exit 1
|
|
|
|
cp ./Python-Apple-support/merge/$platform/openssl/lib/libssl.a third_party/openssl/$platform/lib/ || exit 1
|
|
|
|
cp -r ./Python-Apple-support/merge/$platform/openssl/include/ third_party/openssl/$platform/include || exit 1
|
2021-09-03 08:25:14 +02:00
|
|
|
done
|
2018-02-14 11:19:12 +01:00
|
|
|
done
|