pkg-config 1.4.6 → 1.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS +27 -0
- data/lib/pkg-config/version.rb +2 -2
- data/lib/pkg-config.rb +9 -4
- data/test/test-pkg-config.rb +18 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8744b07afc1df6d424780519cc0bc63c958c3933b1b4ee58ed8c97b73c240f9
|
4
|
+
data.tar.gz: 4cdef6c98e5f88ac45a0bc5c26f580a1d9fb31fb637bfd37eb014e7aa6798bff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daad81936552a5db084c32c3c91825917cdb5f35c3940aa7cd0249f433ab02b5b5ee779538e7cad51721f9daed7890e9a45571244078f927db895b243045a2bd
|
7
|
+
data.tar.gz: 970f917f76ed381f3d427c3add37495107c5bb556aa9470b72459b06bb768b4ad21215f9efd6fb712535a9f99f9ffb2019313e562d5f57c1228de5824634c36b
|
data/NEWS
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
= NEWS
|
2
2
|
|
3
|
+
== 1.4.9 - 2022-07-31
|
4
|
+
|
5
|
+
This is a bug fix release of 1.4.8. All 1.4.8 users should be upgraded
|
6
|
+
to 1.4.9.
|
7
|
+
|
8
|
+
=== Fixes
|
9
|
+
|
10
|
+
* Fixed a regression bug in 1.4.8 that PkgConfig.have_package can't
|
11
|
+
detect nonexistent package.
|
12
|
+
|
13
|
+
== 1.4.8 - 2022-07-30
|
14
|
+
|
15
|
+
=== Improvements
|
16
|
+
|
17
|
+
* Added support for showing found package version.
|
18
|
+
|
19
|
+
== 1.4.7 - 2022-01-16
|
20
|
+
|
21
|
+
=== Improvements
|
22
|
+
|
23
|
+
* Added support for RubyInstaller2 3.1 or later.
|
24
|
+
[Reported by golirev][GitHub:ruby-gnome/ruby-gnome#1457]
|
25
|
+
|
26
|
+
=== Thanks
|
27
|
+
|
28
|
+
* golirev
|
29
|
+
|
3
30
|
== 1.4.6 - 2021-04-12
|
4
31
|
|
5
32
|
=== Improvements
|
data/lib/pkg-config/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2012-
|
1
|
+
# Copyright 2012-2022 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.9"
|
19
19
|
end
|
data/lib/pkg-config.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2008-
|
1
|
+
# Copyright 2008-2022 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
|
@@ -598,9 +598,14 @@ module PKGConfig
|
|
598
598
|
message << " version (>= #{major}.#{minor}.#{micro})"
|
599
599
|
end
|
600
600
|
major ||= 0
|
601
|
-
|
602
|
-
check_version?(pkg, major, minor, micro)
|
601
|
+
result = checking_for(checking_message(message), "%s") do
|
602
|
+
if check_version?(pkg, major, minor, micro)
|
603
|
+
"yes (#{modversion(pkg)})"
|
604
|
+
else
|
605
|
+
"no"
|
606
|
+
end
|
603
607
|
end
|
608
|
+
enough_version = (result != "no")
|
604
609
|
if enough_version
|
605
610
|
libraries = libs_only_l(pkg)
|
606
611
|
dldflags = libs(pkg)
|
data/test/test-pkg-config.rb
CHANGED
@@ -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)
|
@@ -175,7 +177,22 @@ class PkgConfigTest < Test::Unit::TestCase
|
|
175
177
|
def pkg_config(package, *args)
|
176
178
|
args.unshift("--define-variable=libdir=#{@custom_libdir}")
|
177
179
|
args = args.collect {|arg| arg.dump}.join(" ")
|
178
|
-
`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
|
179
196
|
end
|
180
197
|
|
181
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.9
|
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-07-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -89,7 +89,7 @@ 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
|