|
|
|
@ -38,9 +38,10 @@ bad_header_names = ('time.h', 'string.h') |
|
|
|
|
def fix_header_name(name): |
|
|
|
|
split_name = name.split('/') |
|
|
|
|
if split_name[-1] in bad_header_names: |
|
|
|
|
return '/'.join(split_name[:-1] + ['grpc_' + split_name[-1]]) |
|
|
|
|
else: |
|
|
|
|
return name |
|
|
|
|
split_name[-1] = 'grpc_' + split_name[-1] |
|
|
|
|
if split_name[0] == 'include': |
|
|
|
|
split_name = split_name[1:] |
|
|
|
|
return '/'.join(split_name) |
|
|
|
|
%> |
|
|
|
|
|
|
|
|
|
Pod::Spec.new do |s| |
|
|
|
@ -106,10 +107,13 @@ Pod::Spec.new do |s| |
|
|
|
|
# |
|
|
|
|
# TODO(jcanizales): Try out Todd Reed's solution at Issue #1437. |
|
|
|
|
s.prepare_command = <<-CMD |
|
|
|
|
# Move contents of include up a level to avoid manually specifying include paths |
|
|
|
|
cp -r "include/grpc" "." |
|
|
|
|
|
|
|
|
|
DIR_TIME="grpc/support" |
|
|
|
|
BAD_TIME="$DIR_TIME/time.h" |
|
|
|
|
GOOD_TIME="$DIR_TIME/grpc_time.h" |
|
|
|
|
grep -rl "$BAD_TIME" include/grpc src/core | xargs sed -i '' -e s@$BAD_TIME@$GOOD_TIME@g |
|
|
|
|
grep -rl "$BAD_TIME" grpc src/core | xargs sed -i '' -e s@$BAD_TIME@$GOOD_TIME@g |
|
|
|
|
if [ -f "include/$BAD_TIME" ]; |
|
|
|
|
then |
|
|
|
|
mv -f "include/$BAD_TIME" "include/$GOOD_TIME" |
|
|
|
@ -118,7 +122,7 @@ Pod::Spec.new do |s| |
|
|
|
|
DIR_STRING="src/core/support" |
|
|
|
|
BAD_STRING="$DIR_STRING/string.h" |
|
|
|
|
GOOD_STRING="$DIR_STRING/grpc_string.h" |
|
|
|
|
grep -rl "$BAD_STRING" include/grpc src/core | xargs sed -i '' -e s@$BAD_STRING@$GOOD_STRING@g |
|
|
|
|
grep -rl "$BAD_STRING" grpc src/core | xargs sed -i '' -e s@$BAD_STRING@$GOOD_STRING@g |
|
|
|
|
if [ -f "$BAD_STRING" ]; |
|
|
|
|
then |
|
|
|
|
mv -f "$BAD_STRING" "$GOOD_STRING" |
|
|
|
@ -133,9 +137,6 @@ Pod::Spec.new do |s| |
|
|
|
|
gs.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' |
|
|
|
|
|
|
|
|
|
gs.dependency 'gRPC/C-Core' |
|
|
|
|
# TODO(jcanizales): Remove this when the prepare_command moves everything under "include/grpc" |
|
|
|
|
# one directory up. |
|
|
|
|
gs.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Public/gRPC/include"' } |
|
|
|
|
gs.dependency 'gRPC/RxLibrary' |
|
|
|
|
|
|
|
|
|
# Certificates, to be able to establish TLS connections: |
|
|
|
|