pkg-config 1.5.7 → 1.5.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.
- checksums.yaml +4 -4
- data/NEWS.md +6 -0
- data/lib/pkg-config/version.rb +2 -2
- data/lib/pkg-config.rb +18 -11
- data/test/test-pkg-config.rb +16 -5
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 718c0829414803eaf6e4b4119eedbd5635f06490e432e02b8fecd1100e471409
|
|
4
|
+
data.tar.gz: 00d55bbd4c8f935454a5a65a1f84a6183e04f87ed6621fb6b21145075e38b481
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5333ac54f4a4ff9d9013d4f61097032bd822d8b562144b5dd79a646106fe82d0c4ae32933ba6e570a14b10198d729c442d885b782e32ab490da4998bb7930c9c
|
|
7
|
+
data.tar.gz: a31424703041ab85dabff217234d68dcf0d1e28418f7b6a3ec2173dfdba6cc3c565d68744adf4e8eae7140cf3775a01c180ab6667886ae7ed50c3fc465fedd5b
|
data/NEWS.md
CHANGED
data/lib/pkg-config/version.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2012-
|
|
1
|
+
# Copyright (C) 2012-2024 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.5.
|
|
18
|
+
VERSION = "1.5.8"
|
|
19
19
|
end
|
data/lib/pkg-config.rb
CHANGED
|
@@ -72,18 +72,25 @@ class PackageConfig
|
|
|
72
72
|
|
|
73
73
|
def guess_native_pkg_config
|
|
74
74
|
exeext = RbConfig::CONFIG["EXEEXT"]
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
pkg_config
|
|
75
|
+
candidates = [
|
|
76
|
+
with_config("pkg-config"),
|
|
77
|
+
ENV["PKG_CONFIG"],
|
|
78
|
+
"pkgconf#{exeext}",
|
|
79
|
+
"pkg-config#{exeext}",
|
|
80
|
+
].compact
|
|
81
|
+
candidates.each do |pkg_config|
|
|
82
|
+
pkg_config = Pathname.new(pkg_config)
|
|
83
|
+
return pkg_config if pkg_config.absolute? and pkg_config.exist?
|
|
84
|
+
unless pkg_config.absolute?
|
|
85
|
+
found_pkg_config = search_executable_from_path(pkg_config)
|
|
86
|
+
return found_pkg_config if found_pkg_config
|
|
87
|
+
end
|
|
88
|
+
unless pkg_config.absolute?
|
|
89
|
+
found_pkg_config = search_pkg_config_by_dln_find_exe(pkg_config)
|
|
90
|
+
return found_pkg_config if found_pkg_config
|
|
91
|
+
end
|
|
85
92
|
end
|
|
86
|
-
|
|
93
|
+
Pathname.new(candidates[0])
|
|
87
94
|
end
|
|
88
95
|
|
|
89
96
|
def search_executable_from_path(name)
|
data/test/test-pkg-config.rb
CHANGED
|
@@ -2,7 +2,18 @@ require "mkmf"
|
|
|
2
2
|
require "pkg-config"
|
|
3
3
|
|
|
4
4
|
class PkgConfigTest < Test::Unit::TestCase
|
|
5
|
+
def find_program(name)
|
|
6
|
+
exeext = RbConfig::CONFIG["EXEEXT"]
|
|
7
|
+
ENV["PATH"].split(File::PATH_SEPARATOR).each do |path|
|
|
8
|
+
program = File.join(path, name)
|
|
9
|
+
return name if File.exist?(program)
|
|
10
|
+
return name if File.exist?("#{program}.#{exeext}")
|
|
11
|
+
end
|
|
12
|
+
nil
|
|
13
|
+
end
|
|
14
|
+
|
|
5
15
|
def setup
|
|
16
|
+
@pkgconf = find_program("pkgconf") || "pkg-config"
|
|
6
17
|
@custom_libdir = "/tmp/local/lib"
|
|
7
18
|
options = {:override_variables => {"libdir" => @custom_libdir}}
|
|
8
19
|
@cairo = PackageConfig.new("cairo", options)
|
|
@@ -10,17 +21,17 @@ class PkgConfigTest < Test::Unit::TestCase
|
|
|
10
21
|
end
|
|
11
22
|
|
|
12
23
|
def only_pkg_config_version(major, minor)
|
|
13
|
-
pkg_config_version =
|
|
24
|
+
pkg_config_version = `#{@pkgconf} --version`.chomp
|
|
14
25
|
current_major, current_minor = pkg_config_version.split(".").collect(&:to_i)
|
|
15
26
|
return if ([major, minor] <=> [current_major, current_minor]) <= 0
|
|
16
|
-
omit("Require
|
|
27
|
+
omit("Require #{@pkgconf} #{pkg_config_version} or later")
|
|
17
28
|
end
|
|
18
29
|
|
|
19
30
|
def test_exist?
|
|
20
|
-
assert(system("
|
|
31
|
+
assert(system("#{@pkgconf} --exists cairo"))
|
|
21
32
|
assert(@cairo.exist?)
|
|
22
33
|
|
|
23
|
-
assert(system("
|
|
34
|
+
assert(system("#{@pkgconf} --exists cairo-png"))
|
|
24
35
|
assert(@cairo_png.exist?)
|
|
25
36
|
end
|
|
26
37
|
|
|
@@ -177,7 +188,7 @@ class PkgConfigTest < Test::Unit::TestCase
|
|
|
177
188
|
def pkg_config(package, *args)
|
|
178
189
|
args.unshift("--define-variable=libdir=#{@custom_libdir}")
|
|
179
190
|
args = args.collect {|arg| arg.dump}.join(" ")
|
|
180
|
-
normalize_pkg_config_result(
|
|
191
|
+
normalize_pkg_config_result(`#{@pkgconf} #{args} #{package}`.strip)
|
|
181
192
|
end
|
|
182
193
|
|
|
183
194
|
def normalize_pkg_config_result(result)
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pkg-config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kouhei Sutou
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: bin
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date: 2024-
|
|
11
|
+
date: 2024-11-21 00:00:00.000000000 Z
|
|
11
12
|
dependencies:
|
|
12
13
|
- !ruby/object:Gem::Dependency
|
|
13
14
|
name: test-unit
|
|
@@ -73,6 +74,7 @@ licenses:
|
|
|
73
74
|
- LGPLv2+
|
|
74
75
|
metadata:
|
|
75
76
|
msys2_mingw_dependencies: pkg-config
|
|
77
|
+
post_install_message:
|
|
76
78
|
rdoc_options: []
|
|
77
79
|
require_paths:
|
|
78
80
|
- lib
|
|
@@ -87,7 +89,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
87
89
|
- !ruby/object:Gem::Version
|
|
88
90
|
version: '0'
|
|
89
91
|
requirements: []
|
|
90
|
-
rubygems_version: 3.
|
|
92
|
+
rubygems_version: 3.5.22
|
|
93
|
+
signing_key:
|
|
91
94
|
specification_version: 4
|
|
92
95
|
summary: A pkg-config implementation for Ruby
|
|
93
96
|
test_files:
|