pkg-config 1.4.1 → 1.4.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: 94b6c4b1e8df7f419e2faa25afd76dc8a29aa665aa0774b6ea9ff6bd8e2d5768
4
- data.tar.gz: e885bc6fe1a7f17f01cfdff2db3822a76ae9bdafc0c299192a90f2e582634b90
3
+ metadata.gz: b1c1b5cb0cedf685a806efd09bdfbf787852c2b2eef92b43754a69156f5acb65
4
+ data.tar.gz: 4528eb9c10553f8547159793f39a21cae9f6ff33a98d7790c57b9f9f69c6718b
5
5
  SHA512:
6
- metadata.gz: d5c54b359d84ce673cd8556f5124671514ce68b9f6b952652429165e43b7e9a8b35ed6834f72aab18e2d0a25c0844b74816191ac66b024c31f43a071b1bc9ef2
7
- data.tar.gz: fd44996b5a304e03caabfd7ce55b156e6eb2b19eada66c64bab3777326263db51a3f444d651d1ba64d175172f895f9674b5e7fcb6e52e3a948fb55bee6540148
6
+ metadata.gz: 0cae292cac6ced18946b212af545098462422f69b8be86b40a8e069640934060d6449ba2dcdc7cf81f99f9e28c962b5ac61c4236831cdbc50e45be02e2f8e89a
7
+ data.tar.gz: 0d1fc6aa1408c6b72a83e8381e36db9944a6bc704ad8814cde4807cf06195b840de7e666342ae440a76bdc155400e3e5036ba2d3a3e9a6a5b91250172aeb5243
data/NEWS CHANGED
@@ -1,5 +1,53 @@
1
1
  = NEWS
2
2
 
3
+ == 1.4.6 - 2021-04-12
4
+
5
+ === Improvements
6
+
7
+ * Improved support for .pc detection installed by Homebrew.
8
+ [Reported by Evan Shea][GitHub:rcairo/rcairo#66]
9
+
10
+ === Thanks
11
+
12
+ * Evan Shea
13
+
14
+ == 1.4.5 - 2021-02-04
15
+
16
+ === Improvements
17
+
18
+ * Added support for macOS 11.2.
19
+ [Reported by Ludovic Moutury][GitHub:rcairo/rcairo#69]
20
+
21
+ === Thanks
22
+
23
+ * Ludovic Moutury
24
+
25
+ == 1.4.4 - 2020-09-23
26
+
27
+ === Fixes
28
+
29
+ * Fixed a bug that NoMethodError instead of
30
+ PackageConfig::NotFoundError is raised.
31
+ [GitHub#21][Fixed by kojix2]
32
+
33
+ === Thanks
34
+
35
+ * kojix2
36
+
37
+ == 1.4.3 - 2020-09-15
38
+
39
+ === Improvements
40
+
41
+ * Changed to use PackageConfig::NotFoundError instead of RuntimeError
42
+ for exception on no .pc is found.
43
+
44
+ == 1.4.2 - 2020-08-10
45
+
46
+ === Improvements
47
+
48
+ * Added support for detecting pkgconfig path on RubyInstaller
49
+ without "ridk exec".
50
+
3
51
  == 1.4.1 - 2020-02-10
4
52
 
5
53
  === Improvements
data/README.rdoc CHANGED
@@ -8,17 +8,13 @@ pkg-config
8
8
 
9
9
  A pkg-config implementation by Ruby.
10
10
 
11
- == Dependencies
12
-
13
- * ruby >= 1.8 (1.9.2 is also supported!)
14
-
15
11
  == Install
16
12
 
17
13
  # gem install pkg-config
18
14
 
19
15
  == Documents
20
16
 
21
- * TODO
17
+ * https://rubydoc.info/gems/pkg-config
22
18
 
23
19
  == Source
24
20
 
@@ -27,7 +23,7 @@ http://github.com/ruby-gnome/pkg-config
27
23
 
28
24
  == Copyright
29
25
 
30
- Copyright 2008-2019 Kouhei Sutou <kou@clear-code.com>
26
+ Copyright 2008-2020 Kouhei Sutou <kou@clear-code.com>
31
27
 
32
28
  This library is free software; you can redistribute it and/or
33
29
  modify it under the terms of the GNU Lesser General Public
@@ -45,10 +41,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
45
41
 
46
42
  See LGPL-2.1 file for details.
47
43
 
48
- == Mailing list
49
-
50
- TODO
51
-
52
44
  == Thanks
53
45
 
54
46
  * Funky Bibimbap
data/lib/pkg-config.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2008-2020 Sutou Kouhei <kou@cozmixng.org>
1
+ # Copyright 2008-2021 Sutou Kouhei <kou@cozmixng.org>
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -25,6 +25,12 @@ require "rbconfig"
25
25
  require "shellwords"
26
26
 
27
27
  class PackageConfig
28
+ class Error < StandardError
29
+ end
30
+
31
+ class NotFoundError < Error
32
+ end
33
+
28
34
  SEPARATOR = File::PATH_SEPARATOR
29
35
 
30
36
  class << self
@@ -380,7 +386,7 @@ class PackageConfig
380
386
 
381
387
  IDENTIFIER_RE = /[a-zA-Z\d_\.]+/
382
388
  def parse_pc
383
- raise ".pc for #{@name} doesn't exist." unless exist?
389
+ raise NotFoundError, ".pc doesn't exist: <#{@name}>" unless exist?
384
390
  @variables = {}
385
391
  @declarations = {}
386
392
  File.open(pc_path) do |input|
@@ -439,6 +445,11 @@ class PackageConfig
439
445
  "/opt/X11/lib/pkgconfig",
440
446
  "/usr/share/pkgconfig",
441
447
  ]
448
+ if Object.const_defined?(:RubyInstaller)
449
+ mingw_bin_path = RubyInstaller::Runtime.msys2_installation.mingw_bin_path
450
+ mingw_pkgconfig_path = Pathname.new(mingw_bin_path) + "../lib/pkgconfig"
451
+ default_paths.unshift(mingw_pkgconfig_path.cleanpath.to_s)
452
+ end
442
453
  libdir = ENV["PKG_CONFIG_LIBDIR"]
443
454
  default_paths.unshift(libdir) if libdir
444
455
 
@@ -452,6 +463,7 @@ class PackageConfig
452
463
  paths << (pkg_config_prefix + "libx32/pkgconfig").to_s
453
464
  paths << (pkg_config_prefix + "lib/pkgconfig").to_s
454
465
  paths << (pkg_config_prefix + "libdata/pkgconfig").to_s
466
+ paths << (pkg_config_prefix + "share/pkgconfig").to_s
455
467
  end
456
468
  if /-darwin\d[\d\.]*\z/ =~ RUBY_PLATFORM and
457
469
  /\A(\d+\.\d+)/ =~ `sw_vers -productVersion`
@@ -474,7 +486,11 @@ class PackageConfig
474
486
  homebrew_repository_candidates << Pathname(homebrew_repository)
475
487
  end
476
488
  homebrew_repository_candidates.uniq.each do |candidate|
477
- path = candidate + "Library/Homebrew/os/mac/pkgconfig/#{mac_os_version}"
489
+ pkgconfig_base_path = candidate + "Library/Homebrew/os/mac/pkgconfig"
490
+ path = pkgconfig_base_path + mac_os_version
491
+ unless path.exist?
492
+ path = pkgconfig_base_path + mac_os_version.gsub(/\.\d+\z/, "")
493
+ end
478
494
  paths << path.to_s if path.exist?
479
495
  end
480
496
  end
@@ -1,4 +1,4 @@
1
- # Copyright 2012-2019 Kouhei Sutou <kou@cozmixng.org>
1
+ # Copyright 2012-2021 Sutou Kouhei <kou@cozmixng.org>
2
2
  #
3
3
  # This library is free software; you can redistribute it and/or
4
4
  # modify it under the terms of the GNU Lesser General Public
@@ -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.4.1"
18
+ VERSION = "1.4.6"
19
19
  end
data/test/run-test.rb CHANGED
@@ -6,9 +6,6 @@ base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
6
6
  lib_dir = File.join(base_dir, "lib")
7
7
  test_dir = File.join(base_dir, "test")
8
8
 
9
- ENV["BUNDLE_GEMFILE"] ||= File.join(base_dir, "Gemfile")
10
- require "bundler/setup"
11
-
12
9
  require 'test-unit'
13
10
 
14
11
  $LOAD_PATH.unshift(lib_dir)
@@ -164,6 +164,13 @@ class PkgConfigTest < Test::Unit::TestCase
164
164
  end
165
165
  end
166
166
 
167
+ def test_not_found
168
+ message = ".pc doesn't exist: <nonexistent>"
169
+ assert_raise(PackageConfig::NotFoundError.new(message)) do
170
+ PKGConfig.modversion("nonexistent")
171
+ end
172
+ end
173
+
167
174
  private
168
175
  def pkg_config(package, *args)
169
176
  args.unshift("--define-variable=libdir=#{@custom_libdir}")
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.4.1
4
+ version: 1.4.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: 2020-02-10 00:00:00.000000000 Z
11
+ date: 2021-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
@@ -68,7 +68,7 @@ files:
68
68
  - lib/pkg-config.rb
69
69
  - lib/pkg-config/version.rb
70
70
  - test/run-test.rb
71
- - test/test_pkg_config.rb
71
+ - test/test-pkg-config.rb
72
72
  homepage: https://github.com/ruby-gnome/pkg-config
73
73
  licenses:
74
74
  - LGPLv2+
@@ -89,11 +89,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  requirements: []
92
- rubyforge_project:
93
- rubygems_version: 2.7.6.2
92
+ rubygems_version: 3.3.0.dev
94
93
  signing_key:
95
94
  specification_version: 4
96
95
  summary: A pkg-config implementation for Ruby
97
96
  test_files:
98
97
  - test/run-test.rb
99
- - test/test_pkg_config.rb
98
+ - test/test-pkg-config.rb