cocoapods-packager-ext 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96a2d4d6711437b8b0ce934ce12057bf16d096ad08a05063cdf54ed61db65987
4
- data.tar.gz: 0b4c98d7d03aaaa66b25763e48870a4aa09a269c5144a1744dfe0ad67b566dfb
3
+ metadata.gz: 7fffb447b1c1d4aa6c71a7b6a210b97e1a1d64ed0051c661bf8f086f2316840a
4
+ data.tar.gz: a12209cba5e0c81168e3358b66f584ce69750243c7adbaa1798ab5ce69968b26
5
5
  SHA512:
6
- metadata.gz: be0be828c37a362a515d010e946d786aa9d673a21f6f44e6d6fe8a63aa3d2cd26e9d988944f2ce3c63e3db17e55d43682ab17af7d3e07d8ee5a277cf2ea41ca3
7
- data.tar.gz: 26d6bed6a8f98a000d27ea15128fdd9f4bec290e8841589f8391e270d72059a09c5bbdbdf7ffda8fe4f27ede556213ee2cd72c4fcf3ba53d52e28b4b28dbf904
6
+ metadata.gz: a4489708d8ac98d424351afb552716cc01d99d05e77c06d42b066b360c4dc0fee658473fd2161597e599c7a09107bf57aec93ad1535bb7519be6045865a8bd42
7
+ data.tar.gz: b134bec491f618c710b0551510f379f8160ea741c91ad8396d58a44f35e142ac1b0a8b754ea4878888e4d5d8ff5c4d238e6824cd6270ad48ce12e959e1c32488
@@ -23,6 +23,9 @@ module Pod
23
23
  def options
24
24
  o = options_t
25
25
  o.push(['--all-deps','add all-depends'])
26
+ o.push(['--archs','select archs'])
27
+ o.push(['--black-deps','select exclude deps'])
28
+
26
29
  end
27
30
 
28
31
  end
@@ -30,6 +33,8 @@ module Pod
30
33
  alias initialize_t initialize
31
34
  def initialize(argv)
32
35
  @all_deps = argv.flag?('all-deps',false)
36
+ @select_archs = argv.option('archs','').split(',')
37
+ @black_deps = argv.option('black-deps','').split(',')
33
38
  initialize_t argv
34
39
  end
35
40
 
@@ -56,7 +61,9 @@ module Pod
56
61
  @config,
57
62
  @bundle_identifier,
58
63
  @exclude_deps,
59
- @all_deps
64
+ @all_deps,
65
+ @black_deps,
66
+ @select_archs
60
67
  )
61
68
 
62
69
  builder.build(platform, @library)
@@ -6,6 +6,15 @@ module Pod
6
6
  def deal_target(path)
7
7
  for item in @target_type_ext
8
8
  if File.extname(path) == item
9
+ isBlack = false
10
+ for black in @black_deps
11
+ if File.basename(path).include? black
12
+ isBlack = true
13
+ end
14
+ end
15
+ if isBlack
16
+ return
17
+ end
9
18
  if File.directory? path
10
19
  FileUtils.copy_entry(path,"#{@target_dir_ext_ext}/#{File.basename(path)}", false,false, true)
11
20
  else
@@ -42,6 +51,24 @@ module Pod
42
51
  build_library_t platform,defines,output
43
52
  end
44
53
 
54
+ alias ios_build_options_t ios_build_options
55
+ def ios_build_options
56
+ if @select_archs.size
57
+ return "ARCHS=\'#{@select_archs.join(' ')}\' OTHER_CFLAGS=\'-fembed-bitcode -Qunused-arguments\'"
58
+ else
59
+ return ios_build_options_t
60
+ end
61
+ end
62
+
63
+ alias build_sim_libraries_t build_sim_libraries
64
+ def build_sim_libraries(platform, defines)
65
+ if !@select_archs.include?('i386') && !@select_archs.include?('x86_64')
66
+ return
67
+ else
68
+ build_sim_libraries_t platform,defines
69
+ end
70
+ end
71
+
45
72
  alias build_static_lib_for_ios_t build_static_lib_for_ios
46
73
  def build_static_lib_for_ios(static_libs, _defines, output)
47
74
  if @all_deps
@@ -55,8 +82,10 @@ module Pod
55
82
  end
56
83
 
57
84
  alias initialize_t initialize
58
- def initialize(source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps, all_deps)
85
+ def initialize(source_dir, static_sandbox_root, dynamic_sandbox_root, public_headers_root, spec, embedded, mangle, dynamic, config, bundle_identifier, exclude_deps, all_deps,black_deps,select_archs)
59
86
  @all_deps = all_deps
87
+ @black_deps = black_deps
88
+ @select_archs = select_archs
60
89
  @target_type_ext = ['.a','.bundle']
61
90
  @target_dir_ext_ext = "#{static_sandbox_root}/build"
62
91
  @black_list_ext = ["#{static_sandbox_root}/build","#{static_sandbox_root}/build-sim"]
@@ -1,3 +1,3 @@
1
1
  module CocoapodsPackagerExt
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-packager-ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyle.zhou