| 1 |
# This file has been automatically generated from a template file. |
| 2 |
# Please make modifications to |
| 3 |
# `templates/src/objective-c/libuv-gRPC.podspec.template` instead. This |
| 4 |
# file can be regenerated from the template by running |
| 5 |
# `tools/buildgen/generate_projects.sh`. |
| 6 |
|
| 7 |
# Libuv CocoaPods podspec |
| 8 |
|
| 9 |
# Copyright 2021, Google Inc. |
| 10 |
# All rights reserved. |
| 11 |
# |
| 12 |
# Redistribution and use in source and binary forms, with or without |
| 13 |
# modification, are permitted provided that the following conditions are |
| 14 |
# met: |
| 15 |
# |
| 16 |
# * Redistributions of source code must retain the above copyright |
| 17 |
# notice, this list of conditions and the following disclaimer. |
| 18 |
# * Redistributions in binary form must reproduce the above |
| 19 |
# copyright notice, this list of conditions and the following disclaimer |
| 20 |
# in the documentation and/or other materials provided with the |
| 21 |
# distribution. |
| 22 |
# * Neither the name of Google Inc. nor the names of its |
| 23 |
# contributors may be used to endorse or promote products derived from |
| 24 |
# this software without specific prior written permission. |
| 25 |
# |
| 26 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 27 |
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 28 |
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 29 |
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 30 |
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 31 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 32 |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 33 |
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 34 |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 35 |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 36 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 37 |
|
| 38 |
Pod::Spec.new do |spec| |
| 39 |
|
| 40 |
pod_version = "0.0.10" |
| 41 |
libuv_version = "1.37.0" |
| 42 |
|
| 43 |
spec.name = "Libuv-gRPC" |
| 44 |
spec.version = pod_version |
| 45 |
spec.summary = "gRPC-Only Libuv Pod" |
| 46 |
|
| 47 |
spec.description = <<-DESC |
| 48 |
Libuv pod intended to be used only by gRPC iOS. libuv is a multi-platform |
| 49 |
support library with a focus on asynchronous I/O. It was primarily developed |
| 50 |
for use by Node.js, but it's also used by Luvit, Julia, pyuv, and others. |
| 51 |
DESC |
| 52 |
|
| 53 |
spec.homepage = "https://libuv.org/" |
| 54 |
|
| 55 |
spec.license = { :type => 'Mixed', :file => 'LICENSE' } |
| 56 |
spec.author = "libuv" |
| 57 |
|
| 58 |
# When using multiple platforms |
| 59 |
spec.ios.deployment_target = '9.0' |
| 60 |
spec.osx.deployment_target = '10.10' |
| 61 |
spec.tvos.deployment_target = '10.0' |
| 62 |
spec.watchos.deployment_target = '4.0' |
| 63 |
|
| 64 |
spec.source = { :git => "https://github.com/libuv/libuv.git", :tag => "v#{libuv_version}" } |
| 65 |
|
| 66 |
name = 'uv' |
| 67 |
spec.module_name = name |
| 68 |
spec.header_mappings_dir = 'include' |
| 69 |
spec.header_dir = name |
| 70 |
|
| 71 |
spec.subspec 'Interface' do |ss| |
| 72 |
ss.header_mappings_dir = 'include' |
| 73 |
ss.source_files = "include/uv.h", |
| 74 |
"include/uv/errno.h", |
| 75 |
"include/uv/threadpool.h", |
| 76 |
"include/uv/version.h", |
| 77 |
"include/uv/tree.h", |
| 78 |
"include/uv/unix.h", |
| 79 |
"include/uv/darwin.h" |
| 80 |
end |
| 81 |
|
| 82 |
spec.subspec 'Implementation' do |ss| |
| 83 |
ss.header_mappings_dir = 'src' |
| 84 |
ss.source_files = |
| 85 |
"src/fs-poll.c", |
| 86 |
"src/idna.c", |
| 87 |
"src/inet.c", |
| 88 |
"src/strscpy.c", |
| 89 |
"src/threadpool.c", |
| 90 |
"src/timer.c", |
| 91 |
"src/uv-data-getter-setters.c", |
| 92 |
"src/uv-common.c", |
| 93 |
"src/version.c", |
| 94 |
"src/unix/async.c", |
| 95 |
"src/unix/core.c", |
| 96 |
"src/unix/dl.c", |
| 97 |
"src/unix/fs.c", |
| 98 |
"src/unix/getaddrinfo.c", |
| 99 |
"src/unix/getnameinfo.c", |
| 100 |
"src/unix/loop.c", |
| 101 |
"src/unix/loop-watcher.c", |
| 102 |
"src/unix/pipe.c", |
| 103 |
"src/unix/poll.c", |
| 104 |
"src/unix/process.c", |
| 105 |
"src/unix/signal.c", |
| 106 |
"src/unix/stream.c", |
| 107 |
"src/unix/tcp.c", |
| 108 |
"src/unix/thread.c", |
| 109 |
"src/unix/tty.c", |
| 110 |
"src/unix/udp.c", |
| 111 |
"src/unix/bsd-ifaddrs.c", |
| 112 |
"src/unix/darwin.c", |
| 113 |
"src/unix/fsevents.c", |
| 114 |
"src/unix/kqueue.c", |
| 115 |
"src/unix/darwin-proctitle.c", |
| 116 |
"src/unix/proctitle.c", |
| 117 |
"src/heap-inl.h", |
| 118 |
"src/idna.h", |
| 119 |
"src/queue.h", |
| 120 |
"src/strscpy.h", |
| 121 |
"src/uv-common.h", |
| 122 |
"src/unix/atomic-ops.h", |
| 123 |
"src/unix/internal.h", |
| 124 |
"src/unix/spinlock.h" |
| 125 |
|
| 126 |
ss.dependency "#{spec.name}/Interface", pod_version |
| 127 |
end |
| 128 |
|
| 129 |
spec.requires_arc = false |
| 130 |
|
| 131 |
spec.pod_target_xcconfig = { |
| 132 |
'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(PODS_TARGET_SRCROOT)/include"', |
| 133 |
'USER_HEADER_SEARCH_PATHS' => '"$(PODS_TARGET_SRCROOT)" "$(PODS_TARGET_SRCROOT)/src" "$(PODS_TARGET_SRCROOT)/include"', |
| 134 |
'CLANG_WARN_STRICT_PROTOTYPES' => 'NO', |
| 135 |
'CLANG_WARN_DOCUMENTATION_COMMENTS' => 'NO', |
| 136 |
'USE_HEADERMAP' => 'NO', |
| 137 |
'ALWAYS_SEARCH_USER_PATHS' => 'NO', |
| 138 |
'GCC_TREAT_WARNINGS_AS_ERRORS' => 'NO', |
| 139 |
'GCC_WARN_INHIBIT_ALL_WARNINGS' => 'YES' |
| 140 |
} |
| 141 |
|
| 142 |
spec.libraries = 'c++' |
| 143 |
|
| 144 |
spec.compiler_flags = |
| 145 |
"-D_LARGEFILE_SOURCE", |
| 146 |
"-D_FILE_OFFSET_BITS=64", |
| 147 |
"-D_GNU_SOURCE", |
| 148 |
"-D_DARWIN_USE_64_BIT_INODE=1", |
| 149 |
"-D_DARWIN_UNLIMITED_SELECT=1" |
| 150 |
|
| 151 |
end |