pkg-config 1.3.4 → 1.3.5
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 +11 -0
- data/lib/pkg-config.rb +33 -32
- data/lib/pkg-config/version.rb +1 -1
- 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: cb7bbc85c094847a31538ce2c4ed0adfb26046c5e869e20135cdf97d560d76ee
|
4
|
+
data.tar.gz: 61e0d10717cf5a95b2e86274954143730a69512093a73d1202e7d2a9b5957a05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0c1de601a893060b82f7ffd3b96541780152fe82e63ca0e9f04653d471134a0b752db24969949485be825226bd278872bdf90384368c7007c503f961cb8e688
|
7
|
+
data.tar.gz: 74a24c0a5d04ecf648d6c9193508bf43c4fa64144c87a69da601a745e2009e5748573467ddf8aa386e985771036e40993adb0883659e6f71baae111edd29908f
|
data/NEWS
CHANGED
@@ -1,5 +1,16 @@
|
|
1
1
|
= NEWS
|
2
2
|
|
3
|
+
== 1.3.5 - 2019-03-08
|
4
|
+
|
5
|
+
=== Fixes
|
6
|
+
|
7
|
+
* Fixed MSYS2 detection installed at non standard folder.
|
8
|
+
[GitHub:ruby-gnome2/ruby-gnome2#1271][Reported by Simon Arnaud]
|
9
|
+
|
10
|
+
=== Thanks
|
11
|
+
|
12
|
+
* Simon Arnaud
|
13
|
+
|
3
14
|
== 1.3.4 - 2019-02-19
|
4
15
|
|
5
16
|
=== Fixes
|
data/lib/pkg-config.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2008-
|
1
|
+
# Copyright 2008-2019 Kouhei Sutou <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
|
@@ -34,6 +34,11 @@ class PackageConfig
|
|
34
34
|
@native_pkg_config ||= guess_native_pkg_config
|
35
35
|
end
|
36
36
|
|
37
|
+
@native_pkg_config_prefix = nil
|
38
|
+
def native_pkg_config_prefix
|
39
|
+
@native_pkg_config_prefix ||= compute_native_pkg_config_prefix
|
40
|
+
end
|
41
|
+
|
37
42
|
@custom_override_variables = nil
|
38
43
|
def custom_override_variables
|
39
44
|
@custom_override_variables ||= with_config("override-variables", "")
|
@@ -41,6 +46,7 @@ class PackageConfig
|
|
41
46
|
|
42
47
|
def clear_configure_args_cache
|
43
48
|
@native_pkg_config = nil
|
49
|
+
@native_pkg_config_prefix = nil
|
44
50
|
@custom_override_variables = nil
|
45
51
|
end
|
46
52
|
|
@@ -112,6 +118,20 @@ class PackageConfig
|
|
112
118
|
Pathname(path.to_s)
|
113
119
|
end
|
114
120
|
end
|
121
|
+
|
122
|
+
def compute_native_pkg_config_prefix
|
123
|
+
pkg_config = native_pkg_config
|
124
|
+
return nil unless pkg_config.absolute?
|
125
|
+
|
126
|
+
pkg_config_prefix = pkg_config.parent.parent
|
127
|
+
if File::ALT_SEPARATOR
|
128
|
+
normalized_pkg_config_prefix =
|
129
|
+
pkg_config_prefix.to_s.split(File::ALT_SEPARATOR).join(File::SEPARATOR)
|
130
|
+
Pathname(normalized_pkg_config_prefix)
|
131
|
+
else
|
132
|
+
pkg_config_prefix
|
133
|
+
end
|
134
|
+
end
|
115
135
|
end
|
116
136
|
|
117
137
|
attr_reader :paths
|
@@ -232,26 +252,18 @@ class PackageConfig
|
|
232
252
|
end
|
233
253
|
|
234
254
|
def normalize_path_flags(path_flags, flag_option)
|
255
|
+
return path_flags unless /-mingw32\z/ === RUBY_PLATFORM
|
256
|
+
|
257
|
+
pkg_config_prefix = self.class.native_pkg_config_prefix
|
258
|
+
return path_flags unless pkg_config_prefix
|
259
|
+
|
260
|
+
mingw_dir = pkg_config_prefix.basename.to_s
|
235
261
|
path_flags.collect do |path_flag|
|
236
|
-
path = path_flag.sub(flag_option
|
237
|
-
|
238
|
-
|
239
|
-
when "i386-mingw32"
|
240
|
-
ruby_prefix = RbConfig::CONFIG["prefix"]
|
241
|
-
candidates = Dir.glob("#{ruby_prefix}/msys{32,64,*}")
|
242
|
-
candidates.concat(Dir.glob("c:/msys{32,64,*}"))
|
243
|
-
prefix = candidates.first
|
244
|
-
when "x64-mingw32"
|
245
|
-
ruby_prefix = RbConfig::CONFIG["prefix"]
|
246
|
-
candidates = Dir.glob("#{ruby_prefix}/msys{64,*}")
|
247
|
-
candidates.concat(Dir.glob("c:/msys{64,*}"))
|
248
|
-
prefix = candidates.first
|
249
|
-
end
|
250
|
-
if /\A[a-z]:/i === path
|
251
|
-
"#{flag_option}#{path}"
|
252
|
-
else
|
253
|
-
"#{flag_option}#{prefix}#{path}"
|
262
|
+
path = path_flag.sub(/\A#{Regexp.escape(flag_option)}/, "")
|
263
|
+
path = path.sub(/\A\/#{Regexp.escape(mingw_dir)}/i) do
|
264
|
+
pkg_config_prefix.to_s
|
254
265
|
end
|
266
|
+
"#{flag_option}#{path}"
|
255
267
|
end
|
256
268
|
end
|
257
269
|
|
@@ -363,23 +375,12 @@ class PackageConfig
|
|
363
375
|
"/opt/X11/lib/pkgconfig",
|
364
376
|
"/usr/share/pkgconfig",
|
365
377
|
]
|
366
|
-
case RUBY_PLATFORM
|
367
|
-
when "x86-mingw32"
|
368
|
-
prefix = RbConfig::CONFIG["prefix"]
|
369
|
-
default_paths.concat(Dir.glob("#{prefix}/msys*/mingw32/lib/pkgconfig"))
|
370
|
-
default_paths.concat(Dir.glob("c:/msys*/mingw32/lib/pkgconfig"))
|
371
|
-
when "x64-mingw32"
|
372
|
-
prefix = RbConfig::CONFIG["prefix"]
|
373
|
-
default_paths.concat(Dir.glob("#{prefix}/msys*/mingw64/lib/pkgconfig"))
|
374
|
-
default_paths.concat(Dir.glob("c:/msys*/mingw64/lib/pkgconfig"))
|
375
|
-
end
|
376
378
|
libdir = ENV["PKG_CONFIG_LIBDIR"]
|
377
379
|
default_paths.unshift(libdir) if libdir
|
378
380
|
|
379
|
-
|
380
|
-
return default_paths.join(SEPARATOR) unless
|
381
|
+
pkg_config_prefix = self.class.native_pkg_config_prefix
|
382
|
+
return default_paths.join(SEPARATOR) unless pkg_config_prefix
|
381
383
|
|
382
|
-
pkg_config_prefix = pkg_config.parent.parent
|
383
384
|
pkg_config_arch_depended_paths =
|
384
385
|
Dir.glob((pkg_config_prefix + "lib/*/pkgconfig").to_s)
|
385
386
|
paths = []
|
data/lib/pkg-config/version.rb
CHANGED
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.3.
|
4
|
+
version: 1.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|