motion.h 0.0.6 → 0.0.7

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/lib/motion.h.rb +23 -9
  4. data/motion.h.gemspec +1 -1
  5. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ce7667a186a28ed1a3117b631bbe7527d077d51
4
- data.tar.gz: a480f3d51bb53ff0998d9a50880845db6215bd95
3
+ metadata.gz: 511528c649ad4a3843b64b4a92f5a8f4894d6210
4
+ data.tar.gz: 3ea00c01f5388e197681382011cf57f5413a358d
5
5
  SHA512:
6
- metadata.gz: 22c558eec476622b3fa2c996a9e9f764e41cfa6fb315fc4e3663ad805236b523c8b71abdb6c3166f2b6f61525c53aff29934b7d5d4e738e638a017dd98b7abef
7
- data.tar.gz: d79ba2638bc0241361967aaca59ee2126e05418e919f9df6954abe03bad7a4130c42ee4602b538c57c958cfa4888a8c346ad710001de6560745828741bb31108
6
+ metadata.gz: 1d4bc836006f18b002eb46f4879b8f9361ac3f8f202cc3797f7492242cbb6d0f716d8937259450c9225b3c15748359128b3005d6841042af9ca3a3542cacb3ac
7
+ data.tar.gz: d28c3f961aa804f253b4dd143b3c3f2e1bff62e0bb0cfa8f3fa8ec8be49a2dda7a233c48e1f1cdbe7336c3d62d997721edc20b76d5d9714eea685a41b7980c6c
data/Rakefile CHANGED
@@ -3,5 +3,5 @@ require "bundler/gem_tasks"
3
3
  task :default do
4
4
  system 'gem uninstall -ax motion.h'
5
5
  system 'gem build motion.h.gemspec'
6
- system 'gem install ./motion.h-0.0.6.gem'
6
+ system 'gem install ./motion.h-0.0.7.gem'
7
7
  end
@@ -60,19 +60,26 @@ class MotionHeader
60
60
  def generate_bridgesupport_file
61
61
  return if File.exist?(bridgesupport_file)
62
62
  Dir.mkdir(@bridgesupport_dir) unless Dir.exist?(@bridgesupport_dir)
63
- flag = begin
64
- case platform
65
- when :ios
66
- "--no-64-bit"
67
- when :osx
68
- "--64-bit"
69
- end
63
+ cflags = [
64
+ "-I#{include_path}",
65
+ "-F#{frameworks_path}"
66
+ ]
67
+ if product_version >= catalina_version
68
+ cflags << "--isysroot #{isysroot_dir}"
70
69
  end
71
- Bundler.with_clean_env do
72
- `/Library/RubyMotion/bin/gen_bridge_metadata --format complete #{flag} --cflags '-I#{include_path} -F#{frameworks_path}' #{@header_file} > #{bridgesupport_file}`
70
+ Bundler.with_unbundled_env do
71
+ `/Library/RubyMotion/bin/gen_bridge_metadata --format complete --64-bit --cflags '#{cflags.join(' ')}' #{@header_file} > #{bridgesupport_file}`
73
72
  end
74
73
  end
75
74
 
75
+ def catalina_version
76
+ Gem::Version.new('10.15')
77
+ end
78
+
79
+ def product_version
80
+ Gem::Version.new(`sw_vers -productVersion`)
81
+ end
82
+
76
83
  def include_path
77
84
  sdk_dir = sdk_dir(@config.sdk_version)
78
85
  path_components = [@config.xcode_dir, *sdk_dir, 'usr', 'include', @prefix].compact
@@ -85,6 +92,13 @@ class MotionHeader
85
92
  File.join(*path_components)
86
93
  end
87
94
 
95
+ def isysroot_dir
96
+ case platform
97
+ when :ios then 'iPhoneOS'
98
+ when :osx then 'MacOSX'
99
+ end
100
+ end
101
+
88
102
  def sdk_dir(sdk_version)
89
103
  case platform
90
104
  when :ios
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "motion.h"
4
- spec.version = '0.0.6'
4
+ spec.version = '0.0.7'
5
5
  spec.authors = ["Dave Lee"]
6
6
  spec.email = ['dave@kastiglione.com']
7
7
  spec.description = 'Expose iOS system C libraries in RubyMotion.'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion.h
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Lee
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-24 00:00:00.000000000 Z
11
+ date: 2021-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,7 +56,7 @@ homepage: https://github.com/kastiglione/motion.h
56
56
  licenses:
57
57
  - MIT
58
58
  metadata: {}
59
- post_install_message:
59
+ post_install_message:
60
60
  rdoc_options: []
61
61
  require_paths:
62
62
  - lib
@@ -71,9 +71,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
73
  requirements: []
74
- rubyforge_project:
75
- rubygems_version: 2.5.1
76
- signing_key:
74
+ rubyforge_project:
75
+ rubygems_version: 2.5.2.3
76
+ signing_key:
77
77
  specification_version: 4
78
78
  summary: Expose iOS system C libraries in RubyMotion.
79
79
  test_files: []