pkg-config 1.6.7 → 1.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/NEWS.md +7 -0
  3. data/lib/pkg-config.rb +14 -6
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9247c36102e80ca429636e25d28b24b14573486f0825d1d6764f85a09fc55681
4
- data.tar.gz: 8dc70f0d2fb458c96b78b4db348e119be01c9c170e16b969795e6e435a3dca5b
3
+ metadata.gz: dc21ae4fc1aa084eacdce9e6bc9ee1e9a7a7495fc2776e100ce521658eb6aca2
4
+ data.tar.gz: ab15be3f0de74ef76765f40400ba690da221b8ff5728058b9128a5d1bb70de9a
5
5
  SHA512:
6
- metadata.gz: 4c4d698e50f0f74dd4411fe8443e2c190fb1b1ae04e36c8341be38d997430977ffcb6ae3b7871fa4f53de367e3b08c9ec2305df504e9a60fe8a078843ee4d3e6
7
- data.tar.gz: 1b01d95584b9feb2417852a11c8bce55ae12b6c703c8aea9f3fe71185f640fd379a09176172eee9eb1f981dc4851f6fb11e6e8145351be3c5a54d429b18dce1d
6
+ metadata.gz: 8d1c155c87ddf7e10b9c8e9dad3a5d78f4d365ad34eb59fd1e27cc855f9e2912aa1517e9bc17f280e3860a5130eff51d13ca31af2a14c6bfc254e19c1e55a2c3
7
+ data.tar.gz: 1e292c97e8b7116247c95d90c12cfe8d6a3b3ef60e45d1e29f9b688ad7f5cc7aee7bc21a13a119dba5e8ce895e129a0ea4a4cb865d72ec209c1f1df593769f18
data/NEWS.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # NEWS
2
2
 
3
+ ## 1.6.8 - 2026-11-16
4
+
5
+ ### Improvements
6
+
7
+ * Stopped to depend on system `pkgconf`/`pkg-config` for MinGW's
8
+ Windows path detection.
9
+
3
10
  ## 1.6.7 - 2026-11-04
4
11
 
5
12
  ### Improvements
data/lib/pkg-config.rb CHANGED
@@ -19,7 +19,7 @@ require "rbconfig"
19
19
  require "shellwords"
20
20
 
21
21
  module PKGConfig
22
- VERSION = "1.6.7"
22
+ VERSION = "1.6.8"
23
23
 
24
24
  @@paths = []
25
25
  @@override_variables = {}
@@ -557,13 +557,21 @@ class PackageConfig
557
557
  def normalize_path_flag(path_flag, flag_option)
558
558
  return path_flag unless /-mingw(?:32|-ucrt)\z/ === RUBY_PLATFORM
559
559
 
560
- pkg_config_prefix = self.class.native_pkg_config_prefix
561
- return path_flag unless pkg_config_prefix
562
-
563
- mingw_dir = pkg_config_prefix.basename.to_s
560
+ # Convert MSYS2 path such as /mingw64/include to Windows path such
561
+ # as C:/msys64/mingw64/include. Ruby knows the Windows path of the
562
+ # MinGW prefix: RubyInstaller provides it and MSYS2's Ruby is
563
+ # installed into it.
564
+ if Object.const_defined?(:RubyInstaller)
565
+ mingw_bin_path = RubyInstaller::Runtime.msys2_installation.mingw_bin_path
566
+ mingw_windows_prefix =
567
+ File.dirname(mingw_bin_path.tr(File::ALT_SEPARATOR, File::SEPARATOR))
568
+ else
569
+ mingw_windows_prefix = RbConfig::CONFIG["prefix"]
570
+ end
571
+ mingw_dir = File.basename(mingw_windows_prefix)
564
572
  path = path_flag.sub(/\A#{Regexp.escape(flag_option)}/, "")
565
573
  path = path.sub(/\A\/#{Regexp.escape(mingw_dir)}/i) do
566
- pkg_config_prefix.to_s
574
+ mingw_windows_prefix
567
575
  end
568
576
  "#{flag_option}#{path}"
569
577
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkg-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.7
4
+ version: 1.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sutou Kouhei