Build and install only OpenSSL libraries in iOS example. Fixes #2152. Update OpenSSL to 1.0.2u.

This commit is contained in:
levlam 2022-10-05 14:31:02 +03:00
parent 7aa6f2bf91
commit ff91aa0192
2 changed files with 25 additions and 8 deletions

View File

@ -1,10 +1,8 @@
diff --git a/Makefile b/Makefile
index 695be54..4efe5e5 100644
index 695be54..9d4f4a4 100644
--- a/Makefile
+++ b/Makefile
@@ -5,10 +5,13 @@
# - iOS - build everything for iOS
# - tvOS - build everything for tvOS
@@ -7,8 +7,11 @@
# - watchOS - build everything for watchOS
# - OpenSSL-macOS - build OpenSSL for macOS
# - OpenSSL-iOS - build OpenSSL for iOS
@ -16,7 +14,14 @@ index 695be54..4efe5e5 100644
# - BZip2-macOS - build BZip2 for macOS
# - BZip2-iOS - build BZip2 for iOS
# - BZip2-tvOS - build BZip2 for tvOS
@@ -36,31 +39,45 @@ OPENSSL_VERSION=$(OPENSSL_VERSION_NUMBER)$(OPENSSL_REVISION)
@@ -30,37 +33,51 @@ PYTHON_VERSION=2.7.14
PYTHON_VER=$(basename $(PYTHON_VERSION))
OPENSSL_VERSION_NUMBER=1.0.2
-OPENSSL_REVISION=n
+OPENSSL_REVISION=u
OPENSSL_VERSION=$(OPENSSL_VERSION_NUMBER)$(OPENSSL_REVISION)
BZIP2_VERSION=1.0.6
# Supported OS
@ -39,11 +44,11 @@ index 695be54..4efe5e5 100644
+CFLAGS-iphoneos.armv7=
+CFLAGS-iphoneos.armv7s=
+CFLAGS-iphoneos.arm64=
+
+# iOS-simulator targets
+TARGETS-iOS-simulator=iphonesimulator.x86_64 iphonesimulator.i386 iphonesimulator.arm64
+CFLAGS-iOS-simulator=-mios-simulator-version-min=7.0
+
# tvOS targets
-TARGETS-tvOS=appletvsimulator.x86_64 appletvos.arm64
+TARGETS-tvOS=appletvos.arm64
@ -85,3 +90,15 @@ index 695be54..4efe5e5 100644
else
cd $$(OPENSSL_DIR-$1) && \
CC="$$(CC-$1)" \
@@ -216,7 +235,10 @@ $$(OPENSSL_DIR-$1)/libssl.a $$(OPENSSL_DIR-$1)/libcrypto.a: $$(OPENSSL_DIR-$1)/M
CC="$$(CC-$1)" \
CROSS_TOP="$$(dir $$(SDK_ROOT-$1)).." \
CROSS_SDK="$$(notdir $$(SDK_ROOT-$1))" \
- make all && make install
+ make build_libs && \
+ mkdir -p "$(PROJECT_DIR)/build/$2" && \
+ cp libcrypto.a libssl.a "$(PROJECT_DIR)/build/$2" && \
+ make install_sw
# Unpack BZip2
$$(BZIP2_DIR-$1)/Makefile: downloads/bzip2-$(BZIP2_VERSION).tgz

View File

@ -32,6 +32,6 @@ do
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
cp -r ./Python-Apple-support/build/$platform/openssl/include/ third_party/openssl/$platform/include
done
done