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 +4 -4
- data/doc/text/news.md +12 -0
- data/lib/rubygems-requirements-system/pkg-config.rb +34 -13
- data/lib/rubygems-requirements-system/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5df5e519aeace78d1dd3458027a2ac8f035b01b603a1e802c24d95397b59a09
|
4
|
+
data.tar.gz: 4abb564599ef2b88a7a4de12650abfd440f7151b314f8613de9159fc64d8d297
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa69897a8464203ea3171e68d34ab2bda417262941e53d7fdf4110f04196041fb92f6bcb313f944e9b6adc0af72807255da8576cf59e4c53d74d49654fc4b600
|
7
|
+
data.tar.gz: 9e589167215ee1d51f773fa4130e11b59624d76a643b4e87a3f380524004cd1092f9b4d0c2dabe390e76bb57d1f97146f16efb3ce84b4e90e7faa77eea31d9a5
|
data/doc/text/news.md
CHANGED
@@ -19,7 +19,7 @@ require "rbconfig"
|
|
19
19
|
require "shellwords"
|
20
20
|
|
21
21
|
module PKGConfig
|
22
|
-
VERSION = "1.6.
|
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
|
-
|
344
|
-
|
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
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
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 <<
|
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
|
-
|
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
|
-
|
392
|
-
|
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
|
-
|
631
|
-
|
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
|
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.
|
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.
|
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: []
|