pkg-config 1.3.5 → 1.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb7bbc85c094847a31538ce2c4ed0adfb26046c5e869e20135cdf97d560d76ee
4
- data.tar.gz: 61e0d10717cf5a95b2e86274954143730a69512093a73d1202e7d2a9b5957a05
3
+ metadata.gz: 59d59ab5544c845936e20b50acae103136de26d613208299721a656b9fc5fc3e
4
+ data.tar.gz: 12033b104ff312b2efc709f21923ee52ab9547563d39967719ee881730c0f4f7
5
5
  SHA512:
6
- metadata.gz: c0c1de601a893060b82f7ffd3b96541780152fe82e63ca0e9f04653d471134a0b752db24969949485be825226bd278872bdf90384368c7007c503f961cb8e688
7
- data.tar.gz: 74a24c0a5d04ecf648d6c9193508bf43c4fa64144c87a69da601a745e2009e5748573467ddf8aa386e985771036e40993adb0883659e6f71baae111edd29908f
6
+ metadata.gz: 27e9d30f51297788fcbfeabc56bda85f7737874f439fdca4298a3bf58687c027b29a87e7103a04158f84833d40b60062578a1348aaf95a8df7d9be8dc31abb40
7
+ data.tar.gz: 2ab9249853fc16c5d5d768a991ec929625743fd13f50d812dd886a6ba7b4ff6871896538a4707ea77764310617f9a6b0e0048dbb3be318d3e6aaa31db3adcbab
data/NEWS CHANGED
@@ -1,5 +1,11 @@
1
1
  = NEWS
2
2
 
3
+ == 1.3.6 - 2019-03-09
4
+
5
+ === Improvements
6
+
7
+ * Added support for Homebrew environment without pkg-config formula.
8
+
3
9
  == 1.3.5 - 2019-03-08
4
10
 
5
11
  === Fixes
@@ -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 = search_pkg_config_from_path(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 search_pkg_config_from_path(pkg_config)
78
+ def search_executable_from_path(name)
79
79
  (ENV["PATH"] || "").split(SEPARATOR).each do |path|
80
- try_pkg_config = Pathname(path) + pkg_config
81
- return try_pkg_config if try_pkg_config.exist?
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
- paths.concat(pkg_config_arch_depended_paths)
388
- paths << (pkg_config_prefix + "lib64/pkgconfig").to_s
389
- paths << (pkg_config_prefix + "libx32/pkgconfig").to_s
390
- paths << (pkg_config_prefix + "lib/pkgconfig").to_s
391
- paths << (pkg_config_prefix + "libdata/pkgconfig").to_s
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
- brew_path = pkg_config_prefix + "bin" + "brew"
397
- if brew_path.exist?
398
- escaped_brew_path = Shellwords.escape(brew_path.to_s)
399
- homebrew_repository = `#{escaped_brew_path} --repository`.chomp
400
- homebrew_repository_candidates << Pathname.new(homebrew_repository)
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
- homebrew_repository_candidates << pkg_config_prefix + "Homebrew"
403
- homebrew_repository_candidates << pkg_config_prefix
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}"
@@ -15,5 +15,5 @@
15
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  module PKGConfig
18
- VERSION = "1.3.5"
18
+ VERSION = "1.3.6"
19
19
  end
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.5
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-08 00:00:00.000000000 Z
11
+ date: 2019-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit