pkg-config 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS +6 -0
- data/lib/pkg-config.rb +19 -0
- data/lib/pkg-config/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b047ecbdb15bee5ee7c7449fe449e1ba07bd32fc
|
4
|
+
data.tar.gz: 9c4721757a5e4f42f35630a094a7e411c05bc72b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e0769d5c077a77512f8380714168858fc65e24a79c617719163c3f216e4b32f884821fe8969d1d1dfd20e46893ed1cd086f6330fbb9cfa760e11360bc74b61b
|
7
|
+
data.tar.gz: c25e658f05214807fdbf13ebe2c15e803416bbe0bad8b6ec8ac3bee588ab869e178c4cfb10376c49858f3beceb7fac83a84eeb21abdfbad27d1751173cd80131
|
data/NEWS
CHANGED
data/lib/pkg-config.rb
CHANGED
@@ -213,6 +213,7 @@ class PackageConfig
|
|
213
213
|
end
|
214
214
|
all_cflags = normalize_cflags(Shellwords.split(cflags_set.join(" ")))
|
215
215
|
path_flags, other_flags = all_cflags.partition {|flag| /\A-I/ =~ flag}
|
216
|
+
path_flags = normalize_path_flags(path_flags, "-I")
|
216
217
|
path_flags = remove_duplicated_include_paths(path_flags)
|
217
218
|
path_flags = path_flags.reject do |flag|
|
218
219
|
flag == "-I/usr/include"
|
@@ -225,6 +226,23 @@ class PackageConfig
|
|
225
226
|
[path_flags, other_flags]
|
226
227
|
end
|
227
228
|
|
229
|
+
def normalize_path_flags(path_flags, prefix)
|
230
|
+
path_flags.collect do |path_flag|
|
231
|
+
path = path_flag.sub(prefix, "")
|
232
|
+
case RUBY_PLATFORM
|
233
|
+
when "x86-mingw32"
|
234
|
+
unless /\A[a-z]:/i === path
|
235
|
+
path = Dir.glob("c:/msys{32,64,*}").first + path
|
236
|
+
end
|
237
|
+
when "x64-mingw32"
|
238
|
+
unless /\A[a-z]:/i === path
|
239
|
+
path = Dir.glob("c:/msys{64,*}").first + path
|
240
|
+
end
|
241
|
+
end
|
242
|
+
"#{prefix}#{path}"
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
228
246
|
def normalize_cflags(cflags)
|
229
247
|
normalized_cflags = []
|
230
248
|
enumerator = cflags.to_enum
|
@@ -253,6 +271,7 @@ class PackageConfig
|
|
253
271
|
all_libs = [declaration("Libs")] + all_libs
|
254
272
|
all_libs = all_libs.join(" ").gsub(/-([Ll]) /, '\1').split.uniq
|
255
273
|
path_flags, other_flags = all_libs.partition {|flag| /\A-L/ =~ flag}
|
274
|
+
path_flags = normalize_path_flags(path_flags, "-L")
|
256
275
|
path_flags = path_flags.reject do |flag|
|
257
276
|
/\A-L\/usr\/lib(?:64|x32)?\z/ =~ flag
|
258
277
|
end
|
data/lib/pkg-config/version.rb
CHANGED