diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-06-23 18:32:26 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-06-23 18:32:26 -0700 |
commit | e2288fcd8d045f8383981cd07b9bc301f63ecd1e (patch) | |
tree | 9c23166e6a8d81cd030fa913ce51f16965b4a0b6 /templates | |
parent | eb327fba7ca55e97ab889a33c7c70e0401b767eb (diff) | |
parent | 870af21d65b6b21bb2dd6127797eee86c1aef727 (diff) |
Merge github.com:grpc/grpc into so-freaking-sick-of-irrelevant-merge-conflicts
Conflicts:
gRPC.podspec
templates/gRPC.podspec.template
Diffstat (limited to 'templates')
-rw-r--r-- | templates/gRPC.podspec.template | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index da5ca127fb..da5e8880df 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -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) def grpc_files(libs): out = [] @@ -89,14 +90,6 @@ Pod::Spec.new do |s| cs.private_header_files = ${(',\n' + 30*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} cs.header_mappings_dir = '.' - # The core library includes its headers as either "src/core/..." or "grpc/...", meaning we have - # to tell XCode to look for headers under the "include" subdirectory too. - # - # TODO(jcanizales): Instead of doing this, during installation move everything under - # "include/grpc" one directory up. The directory names under PODS_ROOT are implementation - # details of Cocoapods, and have changed in the past, breaking this podspec. - cs.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC" ' + - '"$(PODS_ROOT)/Headers/Private/gRPC/include"' } cs.requires_arc = false cs.libraries = 'z' @@ -110,10 +103,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" @@ -122,7 +118,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" @@ -137,9 +133,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: |