pkg-config 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS +14 -0
- data/lib/pkg-config.rb +10 -1
- data/lib/pkg-config/version.rb +1 -1
- data/test/test_pkg_config.rb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11b312f0ff5b0ea6b556ddf155f0298fb7ef5467
|
4
|
+
data.tar.gz: e7a171afa76835a1c16ba38977a4d85ae5c45e46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfbdd95f6930ea73e9d58568898ae35baba7b12dd466ab978d2c5543c23a635a0dd3d55e2d082eb8b2eb7075ce4016168f8fe074d8ee4a9a328fc8bf49e7ea89
|
7
|
+
data.tar.gz: dddb03560e40be24ce601389205fd9f6c701c267adecc39c66e5f79391462a6938f573043cb8b9683a9f524b125af3d51d81b57decacecc47a57fcf69fbdbdeb
|
data/NEWS
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
= NEWS
|
2
2
|
|
3
|
+
== 1.2.4 - 2017-08-07
|
4
|
+
|
5
|
+
=== Improvements
|
6
|
+
|
7
|
+
* Added `pkg-config` 0.29 or later compatible result support.
|
8
|
+
[GitHub#13][Reported by HIGUCHI Daisuke]
|
9
|
+
|
10
|
+
* test: Updated expected value for the latest cairo.
|
11
|
+
[GitHub#14][Patch by HIGUCHI Daisuke]
|
12
|
+
|
13
|
+
=== Thanks
|
14
|
+
|
15
|
+
* HIGUCHI Daisuke
|
16
|
+
|
3
17
|
== 1.2.3 - 2017-05-29
|
4
18
|
|
5
19
|
=== Fixes
|
data/lib/pkg-config.rb
CHANGED
@@ -208,7 +208,10 @@ class PackageConfig
|
|
208
208
|
private
|
209
209
|
def collect_cflags
|
210
210
|
cflags_set = [declaration("Cflags")]
|
211
|
-
cflags_set +=
|
211
|
+
cflags_set += required_packages.collect do |package|
|
212
|
+
self.class.new(package, @options).cflags
|
213
|
+
end
|
214
|
+
cflags_set += private_required_packages.collect do |package|
|
212
215
|
self.class.new(package, @options).cflags
|
213
216
|
end
|
214
217
|
all_cflags = normalize_cflags(Shellwords.split(cflags_set.join(" ")))
|
@@ -378,6 +381,12 @@ class PackageConfig
|
|
378
381
|
end.uniq
|
379
382
|
end
|
380
383
|
|
384
|
+
def private_required_packages
|
385
|
+
requires_private.reject do |package|
|
386
|
+
@name == package
|
387
|
+
end.uniq
|
388
|
+
end
|
389
|
+
|
381
390
|
def all_required_packages
|
382
391
|
(requires_private + requires.reverse).reject do |package|
|
383
392
|
@name == package
|
data/lib/pkg-config/version.rb
CHANGED
data/test/test_pkg_config.rb
CHANGED
@@ -9,6 +9,13 @@ class PkgConfigTest < Test::Unit::TestCase
|
|
9
9
|
@cairo_png = PackageConfig.new("cairo-png", options)
|
10
10
|
end
|
11
11
|
|
12
|
+
def only_pkg_config_version(major, minor)
|
13
|
+
pkg_config_version = `pkg-config --version`.chomp
|
14
|
+
current_major, current_minor = pkg_config_version.split(".").collect(&:to_i)
|
15
|
+
return if ([major, minor] <=> [current_major, current_minor]) < 0
|
16
|
+
omit("Require pkg-config #{pkg_config_version} or later")
|
17
|
+
end
|
18
|
+
|
12
19
|
def test_exist?
|
13
20
|
assert(system('pkg-config --exists cairo'))
|
14
21
|
assert(@cairo.exist?)
|
@@ -19,11 +26,13 @@ class PkgConfigTest < Test::Unit::TestCase
|
|
19
26
|
|
20
27
|
def test_cflags
|
21
28
|
assert_pkg_config("cairo", ["--cflags"], @cairo.cflags)
|
29
|
+
only_pkg_config_version(0, 29)
|
22
30
|
assert_pkg_config("cairo-png", ["--cflags"], @cairo_png.cflags)
|
23
31
|
end
|
24
32
|
|
25
33
|
def test_cflags_only_I
|
26
34
|
assert_pkg_config("cairo", ["--cflags-only-I"], @cairo.cflags_only_I)
|
35
|
+
only_pkg_config_version(0, 29)
|
27
36
|
assert_pkg_config("cairo-png", ["--cflags-only-I"], @cairo_png.cflags_only_I)
|
28
37
|
end
|
29
38
|
|
@@ -45,7 +54,7 @@ class PkgConfigTest < Test::Unit::TestCase
|
|
45
54
|
|
46
55
|
@cairo_png.msvc_syntax = true
|
47
56
|
result = pkg_config("cairo-png", "--libs-only-l")
|
48
|
-
msvc_result = result.gsub(/-l(cairo|png[0-9]
|
57
|
+
msvc_result = result.gsub(/-l(cairo|png[0-9]+|z)\b/, '\1.lib')
|
49
58
|
assert_not_equal(msvc_result, result)
|
50
59
|
assert_equal(msvc_result, @cairo_png.libs_only_l)
|
51
60
|
end
|
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.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|