pkg-config 1.6.5 → 1.6.7
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.
- checksums.yaml +4 -4
- data/NEWS.md +25 -0
- data/lib/pkg-config.rb +14 -9
- data/test/test-pkg-config.rb +52 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9247c36102e80ca429636e25d28b24b14573486f0825d1d6764f85a09fc55681
|
|
4
|
+
data.tar.gz: 8dc70f0d2fb458c96b78b4db348e119be01c9c170e16b969795e6e435a3dca5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4c4d698e50f0f74dd4411fe8443e2c190fb1b1ae04e36c8341be38d997430977ffcb6ae3b7871fa4f53de367e3b08c9ec2305df504e9a60fe8a078843ee4d3e6
|
|
7
|
+
data.tar.gz: 1b01d95584b9feb2417852a11c8bce55ae12b6c703c8aea9f3fe71185f640fd379a09176172eee9eb1f981dc4851f6fb11e6e8145351be3c5a54d429b18dce1d
|
data/NEWS.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# NEWS
|
|
2
2
|
|
|
3
|
+
## 1.6.7 - 2026-11-04
|
|
4
|
+
|
|
5
|
+
### Improvements
|
|
6
|
+
|
|
7
|
+
* Improved `pkgconf`/`pkg-config` search algorithm: Search `pkgconf`
|
|
8
|
+
and `pkg-config` in each `PATH` entry.
|
|
9
|
+
* [apache/arrow#55366](https://github.com/apache/arrow/issues/55366)
|
|
10
|
+
* Reported by tadeja
|
|
11
|
+
|
|
12
|
+
### Thanks
|
|
13
|
+
|
|
14
|
+
* tadeja
|
|
15
|
+
|
|
16
|
+
## 1.6.6 - 2026-10-19
|
|
17
|
+
|
|
18
|
+
### Improvements
|
|
19
|
+
|
|
20
|
+
* Added support for clang-cl.
|
|
21
|
+
* [ruby-gnome/pkg-config#56](https://github.com/ruby-gnome/pkg-config/issues/56)
|
|
22
|
+
* Patch by Hiroshi SHIBATA
|
|
23
|
+
|
|
24
|
+
### Thanks
|
|
25
|
+
|
|
26
|
+
* Hiroshi SHIBATA
|
|
27
|
+
|
|
3
28
|
## 1.6.5 - 2025-12-01
|
|
4
29
|
|
|
5
30
|
### Improvements
|
data/lib/pkg-config.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (C) 2008-
|
|
1
|
+
# Copyright (C) 2008-2026 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
|
|
@@ -19,7 +19,7 @@ require "rbconfig"
|
|
|
19
19
|
require "shellwords"
|
|
20
20
|
|
|
21
21
|
module PKGConfig
|
|
22
|
-
VERSION = "1.6.
|
|
22
|
+
VERSION = "1.6.7"
|
|
23
23
|
|
|
24
24
|
@@paths = []
|
|
25
25
|
@@override_variables = {}
|
|
@@ -34,7 +34,8 @@ module PKGConfig
|
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def msvc?
|
|
37
|
-
/mswin/.match(RUBY_PLATFORM) and
|
|
37
|
+
/mswin/.match(RUBY_PLATFORM) and
|
|
38
|
+
/\A(?:clang-)?cl\b/.match(RbConfig::CONFIG["CC"])
|
|
38
39
|
end
|
|
39
40
|
|
|
40
41
|
def package_config(package)
|
|
@@ -186,8 +187,6 @@ class PackageConfig
|
|
|
186
187
|
candidates = [
|
|
187
188
|
with_config("pkg-config"),
|
|
188
189
|
ENV["PKG_CONFIG"],
|
|
189
|
-
"pkgconf#{exeext}",
|
|
190
|
-
"pkg-config#{exeext}",
|
|
191
190
|
].compact
|
|
192
191
|
candidates.each do |pkg_config|
|
|
193
192
|
pkg_config = Pathname.new(pkg_config)
|
|
@@ -201,13 +200,19 @@ class PackageConfig
|
|
|
201
200
|
return found_pkg_config if found_pkg_config
|
|
202
201
|
end
|
|
203
202
|
end
|
|
204
|
-
|
|
203
|
+
# Search both names in each PATH entry to respect PATH order.
|
|
204
|
+
default_candidates = ["pkgconf#{exeext}", "pkg-config#{exeext}"]
|
|
205
|
+
found_pkg_config = search_executable_from_path(*default_candidates)
|
|
206
|
+
return found_pkg_config if found_pkg_config
|
|
207
|
+
Pathname.new(candidates[0] || default_candidates[0])
|
|
205
208
|
end
|
|
206
209
|
|
|
207
|
-
def search_executable_from_path(
|
|
210
|
+
def search_executable_from_path(*names)
|
|
208
211
|
(ENV["PATH"] || "").split(SEPARATOR).each do |path|
|
|
209
|
-
|
|
210
|
-
|
|
212
|
+
names.each do |name|
|
|
213
|
+
try_name = Pathname(path) + name
|
|
214
|
+
return try_name if try_name.executable?
|
|
215
|
+
end
|
|
211
216
|
end
|
|
212
217
|
nil
|
|
213
218
|
end
|
data/test/test-pkg-config.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
require "mkmf"
|
|
2
|
+
require "fileutils"
|
|
2
3
|
require "tempfile"
|
|
4
|
+
require "tmpdir"
|
|
3
5
|
|
|
4
6
|
require "pkg-config"
|
|
5
7
|
|
|
@@ -344,4 +346,54 @@ Cflags: -I${includedir}/my-package
|
|
|
344
346
|
"-DFOO", "-Wall", "-Wl,--as-needed"]))
|
|
345
347
|
end
|
|
346
348
|
end
|
|
349
|
+
|
|
350
|
+
sub_test_case(".native_pkg_config") do
|
|
351
|
+
def setup
|
|
352
|
+
super
|
|
353
|
+
original_path = ENV["PATH"]
|
|
354
|
+
original_pkg_config = ENV["PKG_CONFIG"]
|
|
355
|
+
begin
|
|
356
|
+
ENV.delete("PKG_CONFIG")
|
|
357
|
+
PackageConfig.clear_configure_args_cache
|
|
358
|
+
Dir.mktmpdir do |tmp_dir|
|
|
359
|
+
@tmp_dir = tmp_dir
|
|
360
|
+
yield
|
|
361
|
+
end
|
|
362
|
+
ensure
|
|
363
|
+
ENV["PATH"] = original_path
|
|
364
|
+
ENV["PKG_CONFIG"] = original_pkg_config
|
|
365
|
+
PackageConfig.clear_configure_args_cache
|
|
366
|
+
end
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
def create_executable(dir, name)
|
|
370
|
+
dir = File.join(@tmp_dir, dir)
|
|
371
|
+
FileUtils.mkdir_p(dir)
|
|
372
|
+
path = File.join(dir, "#{name}#{RbConfig::CONFIG["EXEEXT"]}")
|
|
373
|
+
File.write(path, "")
|
|
374
|
+
FileUtils.chmod(0755, path)
|
|
375
|
+
Pathname(path)
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
def native_pkg_config
|
|
379
|
+
PackageConfig.native_pkg_config
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
def test_prefer_earlier_path_entry
|
|
383
|
+
pkg_config = create_executable("conda", "pkg-config")
|
|
384
|
+
pkgconf = create_executable("homebrew", "pkgconf")
|
|
385
|
+
ENV["PATH"] = [
|
|
386
|
+
File.dirname(pkg_config),
|
|
387
|
+
File.dirname(pkgconf),
|
|
388
|
+
].join(File::PATH_SEPARATOR)
|
|
389
|
+
assert_equal(pkg_config, native_pkg_config)
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
def test_prefer_pkgconf_in_same_path_entry
|
|
393
|
+
create_executable("bin", "pkg-config")
|
|
394
|
+
pkgconf = create_executable("bin", "pkgconf")
|
|
395
|
+
ENV["PATH"] = File.dirname(pkgconf)
|
|
396
|
+
assert_equal(pkgconf, native_pkg_config)
|
|
397
|
+
end
|
|
398
|
+
end
|
|
347
399
|
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.
|
|
4
|
+
version: 1.6.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sutou Kouhei
|
|
@@ -44,7 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: '0'
|
|
46
46
|
requirements: []
|
|
47
|
-
rubygems_version:
|
|
47
|
+
rubygems_version: 4.0.20
|
|
48
48
|
specification_version: 4
|
|
49
49
|
summary: A pkg-config implementation for Ruby
|
|
50
50
|
test_files:
|