rb_sys 0.9.76 → 0.9.78

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: c79e94963bafba1b586eedc8c4bf6c7c946b3940a0c7bc097cae7d04040403e5
4
- data.tar.gz: f6f9c2b94b7311b976ef215080955bf77f8684ba0d17548c83bd03d6bdde7683
3
+ metadata.gz: 8fb42bed92543f08d6a3225a194387d67671a18152815470b835b12bc2406411
4
+ data.tar.gz: e9fe146231fe531643428f3bc2c4b7376fcf883fb1b8adc400bff361379be9e3
5
5
  SHA512:
6
- metadata.gz: 7887dbf95e017f3cc0be4d430574dad5d53ef3deb5f1809027a4d9b92a02be5f19e0b2f9dba449b9fcbd17089b044bc202ef39c9be20345522988e73ab65d9c4
7
- data.tar.gz: 98e18fa3cb80075f935b874f8e7b5ca6bd13b6d9bf0134e4fc9df18d180ae363a2461a82891f860d557eb5e943267fd7ecc397e2a25a04dac4b9426dc36f9e86
6
+ metadata.gz: b31316a3201a77e5960bf33ce5b9e59bb1fdf24bd31a6f5eebf9103938d0adee6cca5f9cd3a84813e3f24b9519676467fb649b45788487ab607af9b54c3a018e
7
+ data.tar.gz: cae3aaeead61b81af09bfcb5d77f79e9db5ce1f5863273c7ba230cb5dc7a0db34dce910692d453fab187d57ef7c233da43441e2537733ec2937158540a95cb0c
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rb_sys/mkmf.rb CHANGED
@@ -80,12 +80,8 @@ module RbSys
80
80
  #{conditional_assign("RB_SYS_CARGO_PROFILE_DIR", "$(RB_SYS_CARGO_PROFILE)", indent: 1)}
81
81
  #{endif_stmt}
82
82
 
83
- # Set the build profile (dev, release, etc.) Compat with Rust 1.54.
84
- #{if_eq_stmt("$(RB_SYS_CARGO_PROFILE)", "release")}
85
- #{assign_stmt("RB_SYS_CARGO_PROFILE_FLAG", "--release", indent: 1)}
86
- #{else_stmt}
83
+ # Set the build profile (dev, release, etc.).
87
84
  #{assign_stmt("RB_SYS_CARGO_PROFILE_FLAG", "--profile $(RB_SYS_CARGO_PROFILE)", indent: 1)}
88
- #{endif_stmt}
89
85
 
90
86
  # Account for sub-directories when using `--target` argument with Cargo
91
87
  #{conditional_assign("RB_SYS_CARGO_TARGET_DIR", "target")}
@@ -177,24 +173,35 @@ module RbSys
177
173
  end
178
174
 
179
175
  def env_vars(builder)
180
- lines = builder.build_env.map { |k, v| env_line(k, v) }
181
- lines << env_line("CC", strip_cmd(env_or_makefile_config("CC")))
182
- lines << env_line("CXX", strip_cmd(env_or_makefile_config("CXX")))
183
- lines << env_line("AR", strip_cmd(env_or_makefile_config("AR"))) unless env_or_makefile_config("AR") == "libtool -static"
176
+ lines = []
177
+
178
+ if (cc = env_or_makefile_config("CC", builder)) && find_executable(cc)
179
+ lines << assign_stmt("CC", cc)
180
+ end
181
+
182
+ if (cxx = env_or_makefile_config("CXX", builder)) && find_executable(cxx)
183
+ lines << assign_stmt("CXX", cxx)
184
+ end
185
+
186
+ if (ar = env_or_makefile_config("AR", builder)) && find_executable(ar)
187
+ lines << assign_stmt("AR", ar)
188
+ end
189
+
190
+ lines += builder.build_env.map { |k, v| env_line(k, v) }
184
191
  lines.compact.join("\n")
185
192
  end
186
193
 
187
194
  def env_line(k, v)
188
195
  return unless v
189
- export_env(k, v.gsub("\n", '\n'))
196
+ export_env(k, strip_cmd(v.gsub("\n", '\n')))
190
197
  end
191
198
 
192
199
  def strip_cmd(cmd)
193
200
  cmd.gsub("-nologo", "").strip
194
201
  end
195
202
 
196
- def env_or_makefile_config(key)
197
- ENV[key] || RbConfig::MAKEFILE_CONFIG[key]
203
+ def env_or_makefile_config(key, builder)
204
+ builder.env[key] || ENV[key] || RbConfig::MAKEFILE_CONFIG[key]
198
205
  end
199
206
 
200
207
  def gsub_cargo_command!(cargo_command, builder:)
@@ -332,8 +339,8 @@ module RbSys
332
339
  raise "libclang version 5.0.0 or greater is required (current #{libclang_version})"
333
340
  end
334
341
 
335
- if libclang_version >= Gem::Version.new("15.0.0")
336
- raise "libclang version > 14.0.0 or greater is required (current #{libclang_version})"
342
+ if libclang_version >= Gem::Version.new("17.0.0")
343
+ raise "libclang version < 17.0.0 or greater is required (current #{libclang_version})"
337
344
  end
338
345
  end
339
346
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RbSys
4
- VERSION = "0.9.76"
4
+ VERSION = "0.9.78"
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb_sys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.76
4
+ version: 0.9.78
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer
@@ -30,7 +30,7 @@ cert_chain:
30
30
  DIZ6NVmpBvohJVCCCDxQQxFKLXZp1ivoxjN+m7eJSW7yzIz062pH4u8pPNQsiVSb
31
31
  I5rgRPbDr2rAFGXKoQ0+u6CLkRxqrVsITl/OPfZhBQI=
32
32
  -----END CERTIFICATE-----
33
- date: 2023-05-09 00:00:00.000000000 Z
33
+ date: 2023-05-23 00:00:00.000000000 Z
34
34
  dependencies: []
35
35
  description:
36
36
  email:
metadata.gz.sig CHANGED
Binary file