rubygems-requirements-system 0.1.1 → 0.1.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: 90a61d5a90ce6c2152e1bad4a5f7824ab91e0bc89edacff1bb5fac9999b13803
4
- data.tar.gz: d32a941aeb55702028cf1ec11f95b4d0182e0c8b56935bb28552854217b19ded
3
+ metadata.gz: a5df5e519aeace78d1dd3458027a2ac8f035b01b603a1e802c24d95397b59a09
4
+ data.tar.gz: 4abb564599ef2b88a7a4de12650abfd440f7151b314f8613de9159fc64d8d297
5
5
  SHA512:
6
- metadata.gz: 213e567eeef057abf6bd2beac626e066a5722ddcff48e95e4aae1ed59e56d75870382518fc724e77e1efa10ef23ad983e29f814b566b625b8fe7f8412919c585
7
- data.tar.gz: 4e4b37b4ef3f9bc62dbae0d206c3cfd25be43e64dd6a5ccfb5429409e53b84a9ec0d45d20e583e0e57ed72d4e2ab16f32c884982a3904b1fa3af99adbc897f3e
6
+ metadata.gz: fa69897a8464203ea3171e68d34ab2bda417262941e53d7fdf4110f04196041fb92f6bcb313f944e9b6adc0af72807255da8576cf59e4c53d74d49654fc4b600
7
+ data.tar.gz: 9e589167215ee1d51f773fa4130e11b59624d76a643b4e87a3f380524004cd1092f9b4d0c2dabe390e76bb57d1f97146f16efb3ce84b4e90e7faa77eea31d9a5
data/doc/text/news.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # News
2
2
 
3
+ ## 0.1.3 - 2025-09-03
4
+
5
+ ### Improvements
6
+
7
+ * Updated bundled `pkg-config` gem to 1.6.4.
8
+
9
+ ## 0.1.2 - 2025-08-27
10
+
11
+ ### Improvements
12
+
13
+ * Updated bundled `pkg-config` gem to 1.6.3.
14
+
3
15
  ## 0.1.1 - 2025-06-11
4
16
 
5
17
  ### Fixes
@@ -19,7 +19,7 @@ require "rbconfig"
19
19
  require "shellwords"
20
20
 
21
21
  module PKGConfig
22
- VERSION = "1.6.0"
22
+ VERSION = "1.6.4"
23
23
 
24
24
  @@paths = []
25
25
  @@override_variables = {}
@@ -340,21 +340,34 @@ class PackageConfig
340
340
  if brew
341
341
  homebrew_repository = run_command("brew", "--repository")
342
342
  if homebrew_repository
343
- homebrew_repository_candidates <<
344
- Pathname(homebrew_repository.to_s)
343
+ homebrew_repository_candidates <<
344
+ Pathname(homebrew_repository.strip)
345
+ end
346
+ homebrew_prefix = run_command("brew", "--prefix")
347
+ if homebrew_prefix
348
+ homebrew_repository_candidates <<
349
+ Pathname(homebrew_prefix.strip)
345
350
  end
346
351
  end
347
352
  homebrew_repository_candidates.uniq.each do |candidate|
348
- pkgconfig_base_path = candidate + "Library/Homebrew/os/mac/pkgconfig"
349
- path = pkgconfig_base_path + mac_os_version
350
- unless path.exist?
351
- path = pkgconfig_base_path + mac_os_version.gsub(/\.\d+\z/, "")
353
+ mac_pkgconfig_base_path =
354
+ candidate + "Library/Homebrew/os/mac/pkgconfig"
355
+ mac_pkgconfig_path = mac_pkgconfig_base_path + mac_os_version
356
+ unless mac_pkgconfig_path.exist?
357
+ mac_pkgconfig_path =
358
+ mac_pkgconfig_base_path + mac_os_version.gsub(/\.\d+\z/, "")
352
359
  end
353
- paths << path.to_s if path.exist?
360
+ paths << mac_pkgconfig_path.to_s if mac_pkgconfig_path.exist?
361
+
362
+ pkgconfig_path = candidate + "lib/pkgconfig"
363
+ paths << pkgconfig_path.to_s if pkgconfig_path.exist?
354
364
  end
355
365
  end
356
366
  paths.concat(default_paths)
357
- paths.join(SEPARATOR)
367
+ [
368
+ with_config("pkg-config-path") || ENV["PKG_CONFIG_PATH"],
369
+ *paths,
370
+ ].compact.join(SEPARATOR)
358
371
  end
359
372
 
360
373
  def run_command(*command_line)
@@ -388,8 +401,10 @@ class PackageConfig
388
401
  @name = name
389
402
  end
390
403
  @options = options
391
- path = @options[:path] || ENV["PKG_CONFIG_PATH"]
392
- @paths = [path, self.class.default_path].compact.join(SEPARATOR).split(SEPARATOR)
404
+ @paths = [
405
+ @options[:path],
406
+ self.class.default_path,
407
+ ].compact.join(SEPARATOR).split(SEPARATOR)
393
408
  @paths.unshift(*(@options[:paths] || []))
394
409
  @paths = normalize_paths(@paths)
395
410
  @msvc_syntax = @options[:msvc_syntax]
@@ -622,13 +637,18 @@ class PackageConfig
622
637
  @variables = {}
623
638
  @declarations = {}
624
639
  File.open(pc_path) do |input|
640
+ current_line = +""
625
641
  input.each_line do |line|
626
642
  if line.dup.force_encoding("UTF-8").valid_encoding?
627
643
  line.force_encoding("UTF-8")
628
644
  end
629
645
  line = line.gsub(/#.*/, "").strip
630
- next if line.empty?
631
- case line
646
+ if line.end_with?("\\")
647
+ current_line += line[0..-2]
648
+ next
649
+ end
650
+ current_line += line
651
+ case current_line
632
652
  when /^(#{IDENTIFIER_RE})\s*=\s*/
633
653
  match = Regexp.last_match
634
654
  @variables[match[1]] = match.post_match.strip
@@ -636,6 +656,7 @@ class PackageConfig
636
656
  match = Regexp.last_match
637
657
  @declarations[match[1]] = match.post_match.strip
638
658
  end
659
+ current_line = +""
639
660
  end
640
661
  end
641
662
  end
@@ -14,5 +14,5 @@
14
14
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
16
  module RubyGemsRequirementsSystem
17
- VERSION = "0.1.1"
17
+ VERSION = "0.1.3"
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygems-requirements-system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sutou Kouhei
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
- rubygems_version: 3.6.7
81
+ rubygems_version: 3.6.9
82
82
  specification_version: 4
83
83
  summary: Users can install system packages automatically on "gem install"
84
84
  test_files: []