pkg-config 1.4.5 → 1.4.8

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: c534d5c0df96e67e72a0571920884897446ee0f744a16396826c97556bad064d
4
- data.tar.gz: 3f98e05ee7a23b4e849caf6fe122b9efd25da4dd905cbe12bd2885333c679156
3
+ metadata.gz: c2c16e146d0ccf624f6d0bb159f794819283d0a03473faa688464c85529c76a8
4
+ data.tar.gz: 7bf14f8e591acf8eaae6ac8859499e1bb193e098d3f1ae6fd73027992433a87e
5
5
  SHA512:
6
- metadata.gz: a1974ba13aa57590a7608a0baded10dd18f22dde4a0c242c81d1adba0dd1809bd2ec03fa3fdb03e57bb63acc94957a14da856b048baf4aa41eca38a98e37d61e
7
- data.tar.gz: 40383987f314bacb2e8e9d39fca02bd0f9f4b60c1670fc7270e9757f6836bbd2c84001f07329882ef0713381e91054bf10bd06edea51b0fdb8e0eb3f97481ab4
6
+ metadata.gz: 78855df890fe391b08d049034817b8df3e238bbf584fe206dbea89c035ef3bc09651bc233c0623b09750f425afeeef0339fec0eca22555775e7f76a0bd3afdcc
7
+ data.tar.gz: d1baeaa40e6e8334c8b90dce84b8d53e5709164e983e267728897124f07f700051539b3cf5c347d1107c799535aa7a1aa860a9cd3fba1937147acfae05ffe585
data/NEWS CHANGED
@@ -1,5 +1,33 @@
1
1
  = NEWS
2
2
 
3
+ == 1.4.8 - 2022-07-30
4
+
5
+ === Improvements
6
+
7
+ * Added support for showing found package version.
8
+
9
+ == 1.4.7 - 2022-01-16
10
+
11
+ === Improvements
12
+
13
+ * Added support for RubyInstaller2 3.1 or later.
14
+ [Reported by golirev][GitHub:ruby-gnome/ruby-gnome#1457]
15
+
16
+ === Thanks
17
+
18
+ * golirev
19
+
20
+ == 1.4.6 - 2021-04-12
21
+
22
+ === Improvements
23
+
24
+ * Improved support for .pc detection installed by Homebrew.
25
+ [Reported by Evan Shea][GitHub:rcairo/rcairo#66]
26
+
27
+ === Thanks
28
+
29
+ * Evan Shea
30
+
3
31
  == 1.4.5 - 2021-02-04
4
32
 
5
33
  === Improvements
@@ -1,4 +1,4 @@
1
- # Copyright 2012-2020 Sutou Kouhei <kou@cozmixng.org>
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.5"
18
+ VERSION = "1.4.8"
19
19
  end
data/lib/pkg-config.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2008-2021 Sutou Kouhei <kou@cozmixng.org>
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 /-mingw32\z/ === RUBY_PLATFORM
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
@@ -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`
@@ -597,8 +598,12 @@ module PKGConfig
597
598
  message << " version (>= #{major}.#{minor}.#{micro})"
598
599
  end
599
600
  major ||= 0
600
- enough_version = checking_for(checking_message(message)) do
601
- check_version?(pkg, major, minor, micro)
601
+ enough_version = 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
602
607
  end
603
608
  if enough_version
604
609
  libraries = libs_only_l(pkg)
@@ -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.5
4
+ version: 1.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-04 00:00:00.000000000 Z
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.3.0.dev
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