Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuke themis/themis-{openssl,boringssl} subspecs #884

Merged
merged 1 commit into from
Dec 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 0 additions & 147 deletions themis.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -85,151 +85,4 @@ Pod::Spec.new do |s|
ss.public_header_files = "src/wrappers/themis/Obj-C/objcthemis/*.h"
end
end

# ---------- WARNING! --------------------------------------------
# themis-boringssl is DEPRECATED and will be removed in version 0.14
# Switch to the default subspec in your Podfile: `pod 'themis'`
# ----------------------------------------------------------------

# use `themis/themis-openssl` as separate target to use Themis with OpenSSL
s.subspec 'themis-openssl' do |so|
# Enable bitcode for OpenSSL in a very specific way, but it works, thanks to @deszip
so.ios.pod_target_xcconfig = {
'OTHER_CFLAGS[config=Debug]' => '$(inherited) -fembed-bitcode-marker',
'OTHER_CFLAGS[config=Release]' => '$(inherited) -fembed-bitcode',
'BITCODE_GENERATION_MODE[config=Release]' => 'bitcode',
'BITCODE_GENERATION_MODE[config=Debug]' => 'bitcode-marker'
}

# As of version 1.0.2.20.1, GRKOpenSSLFramework binaries do not contain
# arm64 slices for iOS Simulator and macOS, and thus do not support
# Apple Silicon. Disable building Themis for Apple Silicon until
# GRKOpenSSLFramework gets proper arm64 support.
# Update: 1.0.2.20.2 still with no arm64 simulator support
so.ios.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
so.ios.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
so.osx.pod_target_xcconfig = { 'EXCLUDED_ARCHS' => 'arm64' }
so.osx.user_target_xcconfig = { 'EXCLUDED_ARCHS' => 'arm64' }

# TODO: due to error in symbols in GRKOpenSSLFramework 219 release, we've manually switched to 218
# which doesn't sound like a good decision, so when GRKOpenSSLFramework will be updated –
# please bring back correct dependency version
# https://github.com/cossacklabs/themis/issues/538
# 26 sept 2019
#so.dependency 'GRKOpenSSLFramework', '~> 1.0.1' # <-- this is good
# 11 oct 2020 update: trying 1.0.2.20, but it also gives linking errors, so postponed
# https://github.com/levigroker/GRKOpenSSLFramework/issues/10
#so.dependency 'GRKOpenSSLFramework', '1.0.2.20' # 1.0.2u, latest in 1.0.2 branch

so.dependency 'GRKOpenSSLFramework', '1.0.2.18' # <-- this is temp

# We're building some C code here which uses includes as it pleases.
# Allow this behavior, but we will have to control header mappings.
# Also, configure some preprocessor definitions to select OpenSSL backend.
so.ios.xcconfig = {
'OTHER_CFLAGS' => '-DLIBRESSL',
'USE_HEADERMAP' => 'NO',
'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/themis/include" "${PODS_ROOT}/themis/src" "${PODS_ROOT}/themis/src/wrappers/themis/Obj-C"',
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
}
so.osx.xcconfig = {
'OTHER_CFLAGS' => '-DLIBRESSL',
'USE_HEADERMAP' => 'NO',
'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/themis/include" "${PODS_ROOT}/themis/src" "${PODS_ROOT}/themis/src/wrappers/themis/Obj-C"',
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
}

# don't use as independent target
so.subspec 'core' do |ss|
ss.source_files = [
"include/themis/*.h",
"include/soter/*.h",
"src/themis/*.{c,h}",
"src/soter/*.{c,h}",
"src/soter/ed25519/*.{c,h}",
"src/soter/openssl/*.{c,h}",
]
# Prevent CocoaPods from flattening the headers, we need structure.
ss.header_mappings_dir = "."
# Don't export Themis Core headers, make only ObjcThemis public.
ss.private_header_files = [
"include/themis/*.h",
"include/soter/*.h",
"src/themis/*.h",
"src/soter/*.h",
"src/soter/ed25519/*.h",
"src/soter/openssl/*.h",
]
end

# don't use as independent target
so.subspec 'objcwrapper' do |ss|
ss.header_mappings_dir = 'src/wrappers/themis/Obj-C/objcthemis'
ss.source_files = "src/wrappers/themis/Obj-C/objcthemis/*.{m,h}"
ss.public_header_files = 'src/wrappers/themis/Obj-C/objcthemis/*.h'
ss.header_dir = 'objcthemis'
ss.dependency 'themis/themis-openssl/core'
end
end


# ---------- WARNING! ----------------------------------------------
# themis-boringssl is DEPRECATED and will be removed in version 0.14
# Switch to the default subspec in your Podfile: `pod 'themis'`
# ------------------------------------------------------------------

# use `themis/themis-boringssl` as separate target to use Themis with BoringSSL
s.subspec 'themis-boringssl' do |so|

so.dependency 'BoringSSL', '~> 10.0'


# We're building some C code here which uses includes as it pleases.
# Allow this behavior, but we will have to control header mappings.
# Also, configure some preprocessor definitions to select BoringSSL backend.
so.ios.xcconfig = {
'OTHER_CFLAGS' => '-DBORINGSSL -DCRYPTO_ENGINE_PATH=boringssl -DSOTER_BORINGSSL_DISABLE_XTS',
'USE_HEADERMAP' => 'NO',
'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/themis/include" "${PODS_ROOT}/themis/src" "${PODS_ROOT}/themis/src/wrappers/themis/Obj-C"',
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
}
so.osx.xcconfig = {
'OTHER_CFLAGS' => '-DBORINGSSL -DCRYPTO_ENGINE_PATH=boringssl -DSOTER_BORINGSSL_DISABLE_XTS',
'USE_HEADERMAP' => 'NO',
'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/themis/include" "${PODS_ROOT}/themis/src" "${PODS_ROOT}/themis/src/wrappers/themis/Obj-C"',
'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
}

# don't use as independent target
so.subspec 'core' do |ss|
ss.source_files = [
"include/themis/*.h",
"include/soter/*.h",
"src/themis/*.{c,h}",
"src/soter/*.{c,h}",
"src/soter/ed25519/*.{c,h}",
"src/soter/boringssl/*.{c,h}",
]
# Prevent CocoaPods from flattening the headers, we need structure.
ss.header_mappings_dir = "."
# Don't export Themis Core headers, make only ObjcThemis public.
ss.private_header_files = [
"include/themis/*.h",
"include/soter/*.h",
"src/themis/*.h",
"src/soter/*.h",
"src/soter/ed25519/*.h",
"src/soter/boringssl/*.h",
]
end

# don't use as independent target
so.subspec 'objcwrapper' do |ss|
ss.header_mappings_dir = 'src/wrappers/themis/Obj-C/objcthemis'
ss.source_files = "src/wrappers/themis/Obj-C/objcthemis/*.{m,h}"
ss.public_header_files = 'src/wrappers/themis/Obj-C/objcthemis/*.h'
ss.header_dir = 'objcthemis'
ss.dependency 'themis/themis-boringssl/core'
end
end
end