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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cbe82e6b78d94b2bcf0b1805e01061b48b9b0a3d
4
- data.tar.gz: 9f984bc5d47073fd92c5c02fa3b0c786a8626dfd
3
+ metadata.gz: 11b312f0ff5b0ea6b556ddf155f0298fb7ef5467
4
+ data.tar.gz: e7a171afa76835a1c16ba38977a4d85ae5c45e46
5
5
  SHA512:
6
- metadata.gz: 5f06130d4efc5532d2c0b909644dbe34e7c2ac0f122a7554403993657d0dcd086a32744b6f4113ec4dbb773c392b6b242b5491b858b6793a752bae83d12f02e8
7
- data.tar.gz: 535570aa221d8f46c812e0ad2c6baa19836874fb72ee55875e5ac78db4be274231cbd086cdba1fb0b90b8b2e927f6a4cda51c456c82162f6bd5ac6d9a7696602
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 += all_required_packages.collect do |package|
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
@@ -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.2.3"
18
+ VERSION = "1.2.4"
19
19
  end
@@ -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]+)\b/, '\1.lib')
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.3
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-05-29 00:00:00.000000000 Z
11
+ date: 2017-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit