|
|
@ -43,7 +43,6 @@ def fix_header_name(name): |
|
|
|
split_name = split_name[1:] |
|
|
|
split_name = split_name[1:] |
|
|
|
return '/'.join(split_name) |
|
|
|
return '/'.join(split_name) |
|
|
|
%> |
|
|
|
%> |
|
|
|
|
|
|
|
|
|
|
|
Pod::Spec.new do |s| |
|
|
|
Pod::Spec.new do |s| |
|
|
|
s.name = 'gRPC' |
|
|
|
s.name = 'gRPC' |
|
|
|
s.version = '0.6.0' |
|
|
|
s.version = '0.6.0' |
|
|
@ -59,17 +58,19 @@ Pod::Spec.new do |s| |
|
|
|
s.osx.deployment_target = '10.8' |
|
|
|
s.osx.deployment_target = '10.8' |
|
|
|
s.requires_arc = true |
|
|
|
s.requires_arc = true |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
objc_dir = 'src/objective-c' |
|
|
|
|
|
|
|
|
|
|
|
# Reactive Extensions library for iOS. |
|
|
|
# Reactive Extensions library for iOS. |
|
|
|
s.subspec 'RxLibrary' do |rs| |
|
|
|
s.subspec 'RxLibrary' do |ss| |
|
|
|
rs.source_files = 'src/objective-c/RxLibrary/*.{h,m}', |
|
|
|
src_dir = "#{objc_dir}/RxLibrary" |
|
|
|
'src/objective-c/RxLibrary/transformations/*.{h,m}', |
|
|
|
ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" |
|
|
|
'src/objective-c/RxLibrary/private/*.{h,m}' |
|
|
|
ss.private_header_files = "#{src_dir}/private/*.h" |
|
|
|
rs.private_header_files = 'src/objective-c/RxLibrary/private/*.h' |
|
|
|
ss.header_mappings_dir = "#{objc_dir}" |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
# Core cross-platform gRPC library, written in C. |
|
|
|
# Core cross-platform gRPC library, written in C. |
|
|
|
s.subspec 'C-Core' do |cs| |
|
|
|
s.subspec 'C-Core' do |ss| |
|
|
|
cs.source_files = \ |
|
|
|
ss.source_files = \ |
|
|
|
% for lib in libs: |
|
|
|
% for lib in libs: |
|
|
|
% if lib.name in ("grpc", "gpr"): |
|
|
|
% if lib.name in ("grpc", "gpr"): |
|
|
|
% for hdr in lib.get("headers", []): |
|
|
|
% for hdr in lib.get("headers", []): |
|
|
@ -84,7 +85,7 @@ Pod::Spec.new do |s| |
|
|
|
% endif |
|
|
|
% endif |
|
|
|
% endfor |
|
|
|
% endfor |
|
|
|
|
|
|
|
|
|
|
|
cs.private_header_files = \ |
|
|
|
ss.private_header_files = \ |
|
|
|
% for lib in libs: |
|
|
|
% for lib in libs: |
|
|
|
% if lib.name in ("grpc", "gpr"): |
|
|
|
% if lib.name in ("grpc", "gpr"): |
|
|
|
% for hdr in lib.get("headers", []): |
|
|
|
% for hdr in lib.get("headers", []): |
|
|
@ -93,11 +94,11 @@ Pod::Spec.new do |s| |
|
|
|
% endif |
|
|
|
% endif |
|
|
|
% endfor |
|
|
|
% endfor |
|
|
|
|
|
|
|
|
|
|
|
cs.header_mappings_dir = '.' |
|
|
|
ss.header_mappings_dir = '.' |
|
|
|
|
|
|
|
|
|
|
|
cs.requires_arc = false |
|
|
|
ss.requires_arc = false |
|
|
|
cs.libraries = 'z' |
|
|
|
ss.libraries = 'z' |
|
|
|
cs.dependency 'OpenSSL', '~> 1.0.200' |
|
|
|
ss.dependency 'OpenSSL', '~> 1.0.200' |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
# This is a workaround for Cocoapods Issue #1437. |
|
|
|
# This is a workaround for Cocoapods Issue #1437. |
|
|
@ -105,7 +106,7 @@ Pod::Spec.new do |s| |
|
|
|
# It needs to be here (top-level) instead of in the C-Core subspec because Cocoapods doesn't run |
|
|
|
# It needs to be here (top-level) instead of in the C-Core subspec because Cocoapods doesn't run |
|
|
|
# prepare_command's of subspecs. |
|
|
|
# prepare_command's of subspecs. |
|
|
|
# |
|
|
|
# |
|
|
|
# TODO(jcanizales): Try out Todd Reed's solution at Issue #1437. |
|
|
|
# TODO(jcanizales): Try out others' solutions at Issue #1437. |
|
|
|
s.prepare_command = <<-CMD |
|
|
|
s.prepare_command = <<-CMD |
|
|
|
# Move contents of include up a level to avoid manually specifying include paths |
|
|
|
# Move contents of include up a level to avoid manually specifying include paths |
|
|
|
cp -r "include/grpc" "." |
|
|
|
cp -r "include/grpc" "." |
|
|
@ -130,25 +131,27 @@ Pod::Spec.new do |s| |
|
|
|
CMD |
|
|
|
CMD |
|
|
|
|
|
|
|
|
|
|
|
# Objective-C wrapper around the core gRPC library. |
|
|
|
# Objective-C wrapper around the core gRPC library. |
|
|
|
s.subspec 'GRPCClient' do |gs| |
|
|
|
s.subspec 'GRPCClient' do |ss| |
|
|
|
gs.source_files = 'src/objective-c/GRPCClient/*.{h,m}', |
|
|
|
src_dir = "#{objc_dir}/GRPCClient" |
|
|
|
'src/objective-c/GRPCClient/private/*.{h,m}' |
|
|
|
ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" |
|
|
|
gs.private_header_files = 'src/objective-c/GRPCClient/private/*.h' |
|
|
|
ss.private_header_files = "#{src_dir}/private/*.h" |
|
|
|
gs.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' |
|
|
|
ss.header_mappings_dir = "#{objc_dir}" |
|
|
|
|
|
|
|
|
|
|
|
gs.dependency 'gRPC/C-Core' |
|
|
|
ss.dependency 'gRPC/C-Core' |
|
|
|
gs.dependency 'gRPC/RxLibrary' |
|
|
|
ss.dependency 'gRPC/RxLibrary' |
|
|
|
|
|
|
|
|
|
|
|
# Certificates, to be able to establish TLS connections: |
|
|
|
# Certificates, to be able to establish TLS connections: |
|
|
|
gs.resource_bundles = { 'gRPC' => ['etc/roots.pem'] } |
|
|
|
ss.resource_bundles = { 'gRPC' => ['etc/roots.pem'] } |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
# RPC library for ProtocolBuffers, based on gRPC |
|
|
|
# RPC library for ProtocolBuffers, based on gRPC |
|
|
|
s.subspec 'ProtoRPC' do |ps| |
|
|
|
s.subspec 'ProtoRPC' do |ss| |
|
|
|
ps.source_files = 'src/objective-c/ProtoRPC/*.{h,m}' |
|
|
|
src_dir = "#{objc_dir}/ProtoRPC" |
|
|
|
|
|
|
|
ss.source_files = "#{src_dir}/*.{h,m}" |
|
|
|
ps.dependency 'gRPC/GRPCClient' |
|
|
|
ss.header_mappings_dir = "#{objc_dir}" |
|
|
|
ps.dependency 'gRPC/RxLibrary' |
|
|
|
|
|
|
|
ps.dependency 'Protobuf', '~> 3.0.0-alpha-3' |
|
|
|
ss.dependency 'gRPC/GRPCClient' |
|
|
|
|
|
|
|
ss.dependency 'gRPC/RxLibrary' |
|
|
|
|
|
|
|
ss.dependency 'Protobuf', '~> 3.0.0-alpha-3' |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|