pkg-config 1.3.5 → 1.3.6
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/NEWS +6 -0
- data/lib/pkg-config.rb +29 -21
- data/lib/pkg-config/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: 59d59ab5544c845936e20b50acae103136de26d613208299721a656b9fc5fc3e
|
4
|
+
data.tar.gz: 12033b104ff312b2efc709f21923ee52ab9547563d39967719ee881730c0f4f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27e9d30f51297788fcbfeabc56bda85f7737874f439fdca4298a3bf58687c027b29a87e7103a04158f84833d40b60062578a1348aaf95a8df7d9be8dc31abb40
|
7
|
+
data.tar.gz: 2ab9249853fc16c5d5d768a991ec929625743fd13f50d812dd886a6ba7b4ff6871896538a4707ea77764310617f9a6b0e0048dbb3be318d3e6aaa31db3adcbab
|
data/NEWS
CHANGED
data/lib/pkg-config.rb
CHANGED
@@ -65,7 +65,7 @@ class PackageConfig
|
|
65
65
|
pkg_config = with_config("pkg-config", default_pkg_config)
|
66
66
|
pkg_config = Pathname.new(pkg_config)
|
67
67
|
unless pkg_config.absolute?
|
68
|
-
found_pkg_config =
|
68
|
+
found_pkg_config = search_executable_from_path(pkg_config)
|
69
69
|
pkg_config = found_pkg_config if found_pkg_config
|
70
70
|
end
|
71
71
|
unless pkg_config.absolute?
|
@@ -75,10 +75,10 @@ class PackageConfig
|
|
75
75
|
pkg_config
|
76
76
|
end
|
77
77
|
|
78
|
-
def
|
78
|
+
def search_executable_from_path(name)
|
79
79
|
(ENV["PATH"] || "").split(SEPARATOR).each do |path|
|
80
|
-
|
81
|
-
return
|
80
|
+
try_name = Pathname(path) + name
|
81
|
+
return try_name if try_name.executable?
|
82
82
|
end
|
83
83
|
nil
|
84
84
|
end
|
@@ -378,29 +378,37 @@ class PackageConfig
|
|
378
378
|
libdir = ENV["PKG_CONFIG_LIBDIR"]
|
379
379
|
default_paths.unshift(libdir) if libdir
|
380
380
|
|
381
|
-
pkg_config_prefix = self.class.native_pkg_config_prefix
|
382
|
-
return default_paths.join(SEPARATOR) unless pkg_config_prefix
|
383
|
-
|
384
|
-
pkg_config_arch_depended_paths =
|
385
|
-
Dir.glob((pkg_config_prefix + "lib/*/pkgconfig").to_s)
|
386
381
|
paths = []
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
382
|
+
pkg_config_prefix = self.class.native_pkg_config_prefix
|
383
|
+
if pkg_config_prefix
|
384
|
+
pkg_config_arch_depended_paths =
|
385
|
+
Dir.glob((pkg_config_prefix + "lib/*/pkgconfig").to_s)
|
386
|
+
paths.concat(pkg_config_arch_depended_paths)
|
387
|
+
paths << (pkg_config_prefix + "lib64/pkgconfig").to_s
|
388
|
+
paths << (pkg_config_prefix + "libx32/pkgconfig").to_s
|
389
|
+
paths << (pkg_config_prefix + "lib/pkgconfig").to_s
|
390
|
+
paths << (pkg_config_prefix + "libdata/pkgconfig").to_s
|
391
|
+
end
|
392
392
|
if /-darwin\d[\d\.]*\z/ =~ RUBY_PLATFORM and
|
393
393
|
/\A(\d+\.\d+)/ =~ `sw_vers -productVersion`
|
394
394
|
mac_os_version = $1
|
395
395
|
homebrew_repository_candidates = []
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
396
|
+
if pkg_config_prefix
|
397
|
+
brew_path = pkg_config_prefix + "bin" + "brew"
|
398
|
+
if brew_path.exist?
|
399
|
+
escaped_brew_path = Shellwords.escape(brew_path.to_s)
|
400
|
+
homebrew_repository = `#{escaped_brew_path} --repository`.chomp
|
401
|
+
homebrew_repository_candidates << Pathname.new(homebrew_repository)
|
402
|
+
else
|
403
|
+
homebrew_repository_candidates << pkg_config_prefix + "Homebrew"
|
404
|
+
homebrew_repository_candidates << pkg_config_prefix
|
405
|
+
end
|
401
406
|
else
|
402
|
-
|
403
|
-
|
407
|
+
brew = self.class.__send__(:search_executable_from_path, "brew")
|
408
|
+
if brew
|
409
|
+
homebrew_repository = `brew --repository`.chomp
|
410
|
+
homebrew_repository_candidates << Pathname(homebrew_repository)
|
411
|
+
end
|
404
412
|
end
|
405
413
|
homebrew_repository_candidates.each do |candidate|
|
406
414
|
path = candidate + "Library/Homebrew/os/mac/pkgconfig/#{mac_os_version}"
|
data/lib/pkg-config/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pkg-config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|