Skip to content

Commit 0800bce

Browse files
authored
Merge pull request #2 from signalapp/jrose/acknowledgements
Preserve license files, for inclusion in acknowledgements
2 parents effa191 + c5c5a8b commit 0800bce

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

lib/cocoapods-binary/Integration.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,6 @@ def empty_source_files(spec)
216216
spec.attributes_hash["resources"] += bundle_names.map{|n| n+".bundle"}
217217
end
218218

219-
# to avoid the warning of missing license
220-
spec.attributes_hash["license"] = {}
221-
222219
end
223220

224221
end

lib/cocoapods-binary/Prebuild.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def prebuild_frameworks!
163163
Pod::Prebuild.remove_build_dir(sandbox_path)
164164

165165

166-
# copy vendored libraries and frameworks
166+
# copy vendored libraries and frameworks as well as any license
167167
targets.each do |target|
168168
root_path = self.sandbox.pod_dir(target.name)
169169
target_folder = sandbox.framework_folder_path_for_target_name(target.name)
@@ -178,14 +178,15 @@ def prebuild_frameworks!
178178

179179
target.spec_consumers.each do |consumer|
180180
file_accessor = Sandbox::FileAccessor.new(root_path, consumer)
181-
lib_paths = file_accessor.vendored_frameworks || []
182-
lib_paths += file_accessor.vendored_libraries
181+
preserve_paths = file_accessor.vendored_frameworks || []
182+
preserve_paths += file_accessor.vendored_libraries
183+
preserve_paths << file_accessor.license if file_accessor.license
183184
# @TODO dSYM files
184-
lib_paths.each do |lib_path|
185-
relative = lib_path.relative_path_from(root_path)
185+
preserve_paths.each do |path|
186+
relative = path.relative_path_from(root_path)
186187
destination = target_folder + relative
187188
destination.dirname.mkpath unless destination.dirname.exist?
188-
FileUtils.cp_r(lib_path, destination, :remove_destination => true)
189+
FileUtils.cp_r(path, destination, :remove_destination => true)
189190
end
190191
end
191192
end

lib/cocoapods-binary/rome/build_framework.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ def build_for_iosish_platform(sandbox,
4141
module_name = target.product_module_name
4242
device_framework_path = "#{build_dir}/#{CONFIGURATION}-#{device}/#{target_name}/#{module_name}.framework"
4343
simulator_framework_path = "#{build_dir}/#{CONFIGURATION}-#{simulator}/#{target_name}/#{module_name}.framework"
44+
if !File.directory?(device_framework_path)
45+
# Newer Xcodes seem to build all in one directory.
46+
device_framework_path = "#{build_dir}/#{CONFIGURATION}-#{device}/#{module_name}.framework"
47+
simulator_framework_path = "#{build_dir}/#{CONFIGURATION}-#{simulator}/#{module_name}.framework"
48+
end
4449

4550
device_binary = device_framework_path + "/#{module_name}"
4651
simulator_binary = simulator_framework_path + "/#{module_name}"

0 commit comments

Comments
 (0)