pkg-config 1.4.3 → 1.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS +52 -0
- data/README.rdoc +2 -10
- data/lib/pkg-config/version.rb +2 -2
- data/lib/pkg-config.rb +9 -4
- data/test/{test_pkg_config.rb → test-pkg-config.rb} +25 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56f761ee856442aa5a1cab954113684151dffb48a87069862a7600ae549ae583
|
4
|
+
data.tar.gz: c005ee17fbd0499d8a4f28c6cae27d670e0ef891e69f63fcf5aef42dc07e5a0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe85cafd6e90bcc5722631dc59e40e86944d8e0fe3603e55560a5ece0eea63bdbe9a631a44a80c7b116a562b7ec6445fa5a17a64f15b8c54ac1e41b282edfeca
|
7
|
+
data.tar.gz: 91e6dbeaa6205cabe300c12cfa6f93088145d79c3dffc7d30f3ed9868fe943fa22e0dcde683d7ed2e4d7df1f1d29939abe0763ae1f82bc273d17efb766021be4
|
data/NEWS
CHANGED
@@ -1,5 +1,57 @@
|
|
1
1
|
= NEWS
|
2
2
|
|
3
|
+
== 1.4.7 - 2022-01-16
|
4
|
+
|
5
|
+
=== Improvements
|
6
|
+
|
7
|
+
* Added support for RubyInstaller2 3.1 or later.
|
8
|
+
[Reported by golirev][GitHub:ruby-gnome/ruby-gnome#1457]
|
9
|
+
|
10
|
+
=== Thanks
|
11
|
+
|
12
|
+
* golirev
|
13
|
+
|
14
|
+
== 1.4.6 - 2021-04-12
|
15
|
+
|
16
|
+
=== Improvements
|
17
|
+
|
18
|
+
* Improved support for .pc detection installed by Homebrew.
|
19
|
+
[Reported by Evan Shea][GitHub:rcairo/rcairo#66]
|
20
|
+
|
21
|
+
=== Thanks
|
22
|
+
|
23
|
+
* Evan Shea
|
24
|
+
|
25
|
+
== 1.4.5 - 2021-02-04
|
26
|
+
|
27
|
+
=== Improvements
|
28
|
+
|
29
|
+
* Added support for macOS 11.2.
|
30
|
+
[Reported by Ludovic Moutury][GitHub:rcairo/rcairo#69]
|
31
|
+
|
32
|
+
=== Thanks
|
33
|
+
|
34
|
+
* Ludovic Moutury
|
35
|
+
|
36
|
+
== 1.4.4 - 2020-09-23
|
37
|
+
|
38
|
+
=== Fixes
|
39
|
+
|
40
|
+
* Fixed a bug that NoMethodError instead of
|
41
|
+
PackageConfig::NotFoundError is raised.
|
42
|
+
[GitHub#21][Fixed by kojix2]
|
43
|
+
|
44
|
+
=== Thanks
|
45
|
+
|
46
|
+
* kojix2
|
47
|
+
|
48
|
+
== 1.4.3 - 2020-09-15
|
49
|
+
|
50
|
+
=== Improvements
|
51
|
+
|
52
|
+
* Changed to use PackageConfig::NotFoundError instead of RuntimeError
|
53
|
+
for exception on no .pc is found.
|
54
|
+
|
3
55
|
== 1.4.2 - 2020-08-10
|
4
56
|
|
5
57
|
=== 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
|
-
*
|
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-
|
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/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2012-
|
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.
|
18
|
+
VERSION = "1.4.7"
|
19
19
|
end
|
data/lib/pkg-config.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2008-
|
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
|
@@ -301,7 +301,7 @@ class PackageConfig
|
|
301
301
|
end
|
302
302
|
|
303
303
|
def normalize_path_flags(path_flags, flag_option)
|
304
|
-
return path_flags unless /-
|
304
|
+
return path_flags unless /-mingw(?:32|-ucrt)\z/ === RUBY_PLATFORM
|
305
305
|
|
306
306
|
pkg_config_prefix = self.class.native_pkg_config_prefix
|
307
307
|
return path_flags unless pkg_config_prefix
|
@@ -386,7 +386,7 @@ class PackageConfig
|
|
386
386
|
|
387
387
|
IDENTIFIER_RE = /[a-zA-Z\d_\.]+/
|
388
388
|
def parse_pc
|
389
|
-
raise NotFoundError ".pc
|
389
|
+
raise NotFoundError, ".pc doesn't exist: <#{@name}>" unless exist?
|
390
390
|
@variables = {}
|
391
391
|
@declarations = {}
|
392
392
|
File.open(pc_path) do |input|
|
@@ -463,6 +463,7 @@ class PackageConfig
|
|
463
463
|
paths << (pkg_config_prefix + "libx32/pkgconfig").to_s
|
464
464
|
paths << (pkg_config_prefix + "lib/pkgconfig").to_s
|
465
465
|
paths << (pkg_config_prefix + "libdata/pkgconfig").to_s
|
466
|
+
paths << (pkg_config_prefix + "share/pkgconfig").to_s
|
466
467
|
end
|
467
468
|
if /-darwin\d[\d\.]*\z/ =~ RUBY_PLATFORM and
|
468
469
|
/\A(\d+\.\d+)/ =~ `sw_vers -productVersion`
|
@@ -485,7 +486,11 @@ class PackageConfig
|
|
485
486
|
homebrew_repository_candidates << Pathname(homebrew_repository)
|
486
487
|
end
|
487
488
|
homebrew_repository_candidates.uniq.each do |candidate|
|
488
|
-
|
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
|
489
494
|
paths << path.to_s if path.exist?
|
490
495
|
end
|
491
496
|
end
|
@@ -25,12 +25,14 @@ class PkgConfigTest < Test::Unit::TestCase
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def test_cflags
|
28
|
+
omit("Fragile on macOS") if RUBY_PLATFORM.include?("darwin")
|
28
29
|
assert_pkg_config("cairo", ["--cflags"], @cairo.cflags)
|
29
30
|
only_pkg_config_version(0, 29)
|
30
31
|
assert_pkg_config("cairo-png", ["--cflags"], @cairo_png.cflags)
|
31
32
|
end
|
32
33
|
|
33
34
|
def test_cflags_only_I
|
35
|
+
omit("Fragile on macOS") if RUBY_PLATFORM.include?("darwin")
|
34
36
|
assert_pkg_config("cairo", ["--cflags-only-I"], @cairo.cflags_only_I)
|
35
37
|
only_pkg_config_version(0, 29)
|
36
38
|
assert_pkg_config("cairo-png", ["--cflags-only-I"], @cairo_png.cflags_only_I)
|
@@ -164,11 +166,33 @@ class PkgConfigTest < Test::Unit::TestCase
|
|
164
166
|
end
|
165
167
|
end
|
166
168
|
|
169
|
+
def test_not_found
|
170
|
+
message = ".pc doesn't exist: <nonexistent>"
|
171
|
+
assert_raise(PackageConfig::NotFoundError.new(message)) do
|
172
|
+
PKGConfig.modversion("nonexistent")
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
167
176
|
private
|
168
177
|
def pkg_config(package, *args)
|
169
178
|
args.unshift("--define-variable=libdir=#{@custom_libdir}")
|
170
179
|
args = args.collect {|arg| arg.dump}.join(" ")
|
171
|
-
`pkg-config #{args} #{package}`.strip
|
180
|
+
normalize_pkg_config_result(`pkg-config #{args} #{package}`.strip)
|
181
|
+
end
|
182
|
+
|
183
|
+
def normalize_pkg_config_result(result)
|
184
|
+
case RUBY_PLATFORM
|
185
|
+
when /mingw/
|
186
|
+
result = result.gsub(/\/bin\/..\//, "/")
|
187
|
+
if result.include?(" -mms-bitfields ")
|
188
|
+
# Reorder -mms-bitfields (non path flag)
|
189
|
+
result = result.gsub(" -mms-bitfields ", " ")
|
190
|
+
result = "-mms-bitfields #{result}"
|
191
|
+
end
|
192
|
+
result
|
193
|
+
else
|
194
|
+
result
|
195
|
+
end
|
172
196
|
end
|
173
197
|
|
174
198
|
def assert_pkg_config(package, pkg_config_args, actual)
|
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.
|
4
|
+
version: 1.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-16 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/
|
71
|
+
- test/test-pkg-config.rb
|
72
72
|
homepage: https://github.com/ruby-gnome/pkg-config
|
73
73
|
licenses:
|
74
74
|
- LGPLv2+
|
@@ -89,10 +89,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
|
-
rubygems_version: 3.
|
92
|
+
rubygems_version: 3.4.0.dev
|
93
93
|
signing_key:
|
94
94
|
specification_version: 4
|
95
95
|
summary: A pkg-config implementation for Ruby
|
96
96
|
test_files:
|
97
97
|
- test/run-test.rb
|
98
|
-
- test/
|
98
|
+
- test/test-pkg-config.rb
|