diff options
author | Jorge Canizales <jcanizales@google.com> | 2016-06-28 09:55:24 -0700 |
---|---|---|
committer | Jorge Canizales <jcanizales@google.com> | 2016-06-28 16:20:21 -0700 |
commit | 37a7f4517c7a852d7d12ce5a2c6d461b071076c0 (patch) | |
tree | 2c5fefc0e78e4668c9e21d70f09d3bba6640c752 /src | |
parent | a1fe4120d9768193d9ae86e136af62919b0ebf68 (diff) |
BoringSSL: Intf and Impl subspecs. WIP
Diffstat (limited to 'src')
-rw-r--r-- | src/objective-c/BoringSSL.podspec | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/src/objective-c/BoringSSL.podspec b/src/objective-c/BoringSSL.podspec index fa668d4aee..8e08904924 100644 --- a/src/objective-c/BoringSSL.podspec +++ b/src/objective-c/BoringSSL.podspec @@ -31,7 +31,8 @@ Pod::Spec.new do |s| s.name = 'BoringSSL' - s.version = '3.0' + version = '3.0' + s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.' # Adapted from the homepage: s.description = <<-DESC @@ -73,23 +74,40 @@ Pod::Spec.new do |s| s.module_name = name s.header_dir = name - s.source_files = 'ssl/*.{h,c}', - 'ssl/**/*.{h,c}', - '*.{h,c}', - 'crypto/*.{h,c}', - 'crypto/**/*.{h,c}', - 'include/openssl/*.h' - s.public_header_files = 'include/openssl/*.h' - s.header_mappings_dir = 'include/openssl' s.module_map = 'include/openssl/module.modulemap' - s.exclude_files = "**/*_test.*" - # We don't need to inhibit all warnings; only -Wno-shorten-64-to-32. But Cocoapods' linter doesn't # want that for some reason. s.compiler_flags = '-DOPENSSL_NO_ASM', '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' s.requires_arc = false + s.header_mappings_dir = 'include/openssl' + + s.subspec 'Interface' do |ss| + ss.header_mappings_dir = 'include/openssl' + ss.source_files = 'include/openssl/*.h', 'include/openssl/empty.c' + ss.exclude_files = 'include/openssl/arm_arch.h' + end + + s.subspec 'Implementation' do |ss| + ss.header_mappings_dir = '.' + ss.source_files = 'ssl/*.{h,c}', + 'ssl/**/*.{h,c}', + '*.{h,c}', + 'crypto/*.{h,c}', + 'crypto/**/*.{h,c}' + ss.private_header_files = 'ssl/*.h', + 'ssl/**/*.h', + '*.h', + 'crypto/*.h', + 'crypto/**/*.h' + ss.exclude_files = '**/*_test.*', + '**/test_*.*', + '**/test/*.*' + + ss.dependency "#{s.name}/Interface", version + end + s.prepare_command = <<-END_OF_COMMAND # Replace "const BIGNUM *I" in rsa.h with a lowercase i, as the former fails when including # OpenSSL in a Swift bridging header (complex.h defines "I", and it's as if the compiler @@ -101,6 +119,8 @@ Pod::Spec.new do |s| # dynamic frameworks. The latters always works, being relative to the current file. sed -E -i '.back' 's/crypto\\///g' crypto/cipher/e_tls.c + touch include/openssl/empty.c + # Add a module map and an umbrella header cat > include/openssl/umbrella.h <<EOF #include "ssl.h" |