pkg-config 1.1.5 → 1.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fe7a6584418f822bb6415828ff01b297c46ef30
4
- data.tar.gz: ff5970916bf87d0386fb451a24d29cda7ec7bef8
3
+ metadata.gz: 8abe472bb4c19c7d3f913d28fa8c3c78f15d3d44
4
+ data.tar.gz: a26ecd64e1e9601d3d4683fa5dd27b04d9748fc8
5
5
  SHA512:
6
- metadata.gz: 054b0b55943dc67f61a9d6c7a3777a974d4de7932d77a815205870cc32c1086fa9d65265702e8814cfc4ff02f098b105ac1fb6743197ae74637390b17f4e07ae
7
- data.tar.gz: 8e4af11ebddb0daa108eb7c346dc4490f12f5bf89233e586b83f0c7ea14a607499aef6bab04068b0cea1ea6cf057d5b56dbef061224be4b197445fd354fc595a
6
+ metadata.gz: 55e3b289f3e02ed605cae8d23a65686674f58082511b3789c45ab77a029b0866b554783fd7348ff70cb8926f8e4dbcd4ea9c048ac6a71b61452a109d4e17e477
7
+ data.tar.gz: e1c2f07b3250a79d13fed264b8f5b86b756bb4462ed48295c10220d5b932ebc446198000243a937077f6c561b321dff8efd8fd2be1b050d6746accd2936609d7
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # -*- mode: ruby; coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>
3
+ # Copyright (C) 2011-2013 Kouhei Sutou <kou@clear-code.com>
4
4
  #
5
5
  # This library is free software; you can redistribute it and/or
6
6
  # modify it under the terms of the GNU Lesser General Public
@@ -13,8 +13,8 @@
13
13
  #
14
14
  # You should have received a copy of the GNU Lesser General Public
15
15
  # License along with this library; if not, write to the Free Software
16
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
- source :rubygems
18
+ source "https://rubygems.org/"
19
19
 
20
20
  gemspec
data/NEWS CHANGED
@@ -1,5 +1,23 @@
1
1
  = NEWS
2
2
 
3
+ == 1.1.6 - 2014/11/12
4
+
5
+ * Supported Ruby 2.1.
6
+ [GitHub:ruby-gnome2/ruby-gnome2#262][Reported by Steve Wills]
7
+
8
+ === Thanks
9
+
10
+ * Steve Wills
11
+
12
+ == 1.1.5 - 2013/12/29
13
+
14
+ * Supported XQuartz.
15
+ [GitHub:#10][Patch by Masafumi Yokoyama]
16
+
17
+ === Thanks
18
+
19
+ * Masafumi Yokoyama
20
+
3
21
  == 1.1.4 - 2012/08/02
4
22
 
5
23
  * Supported mswin64 as MSVC environment.
@@ -47,7 +47,7 @@ Lesser General Public License for more details.
47
47
 
48
48
  You should have received a copy of the GNU Lesser General Public
49
49
  License along with this library; if not, write to the Free Software
50
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
50
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
51
51
 
52
52
  See LGPL-2.1 file for details.
53
53
 
data/Rakefile CHANGED
@@ -14,7 +14,7 @@
14
14
  #
15
15
  # You should have received a copy of the GNU Lesser General Public
16
16
  # License along with this library; if not, write to the Free Software
17
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 
19
19
  task :default => :test
20
20
 
@@ -1,4 +1,4 @@
1
- # Copyright 2008-2011 Kouhei Sutou <kou@cozmixng.org>
1
+ # Copyright 2008-2013 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
@@ -12,7 +12,7 @@
12
12
  #
13
13
  # You should have received a copy of the GNU Lesser General Public
14
14
  # License along with this library; if not, write to the Free Software
15
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  begin
18
18
  require "pkg-config/version"
@@ -90,7 +90,11 @@ class PackageConfig
90
90
  rescue DL::DLError
91
91
  return nil
92
92
  end
93
- extern "const char *dln_find_exe(const char *, const char *)"
93
+ begin
94
+ extern "const char *dln_find_exe(const char *, const char *)"
95
+ rescue DL::DLError
96
+ return nil
97
+ end
94
98
  end
95
99
  path = dln.dln_find_exe(pkg_config.to_s, nil)
96
100
  if path.nil? or path.size.zero?
@@ -192,12 +196,13 @@ class PackageConfig
192
196
 
193
197
  private
194
198
  def collect_cflags
195
- all_cflags = all_required_packages.collect do |package|
199
+ cflags_set = [declaration("Cflags")]
200
+ cflags_set += all_required_packages.collect do |package|
196
201
  self.class.new(package, @options).cflags
197
202
  end
198
- all_cflags = [declaration("Cflags")] + all_cflags
199
- all_cflags = all_cflags.join(" ").gsub(/-I /, '-I').split.uniq
203
+ all_cflags = normalize_cflags(Shellwords.split(cflags_set.join(" ")))
200
204
  path_flags, other_flags = all_cflags.partition {|flag| /\A-I/ =~ flag}
205
+ path_flags = remove_duplicated_include_paths(path_flags)
201
206
  path_flags = path_flags.reject do |flag|
202
207
  flag == "-I/usr/include"
203
208
  end
@@ -209,6 +214,27 @@ class PackageConfig
209
214
  [path_flags, other_flags]
210
215
  end
211
216
 
217
+ def normalize_cflags(cflags)
218
+ normalized_cflags = []
219
+ enumerator = cflags.to_enum
220
+ begin
221
+ loop do
222
+ cflag = enumerator.next
223
+ normalized_cflags << cflag
224
+ case cflag
225
+ when "-I"
226
+ normalized_cflags << enumerator.next
227
+ end
228
+ end
229
+ rescue StopIteration
230
+ end
231
+ normalized_cflags
232
+ end
233
+
234
+ def remove_duplicated_include_paths(path_flags)
235
+ path_flags.uniq
236
+ end
237
+
212
238
  def collect_libs
213
239
  all_libs = required_packages.collect do |package|
214
240
  self.class.new(package, @options).libs
@@ -1,4 +1,4 @@
1
- # Copyright 2012 Kouhei Sutou <kou@cozmixng.org>
1
+ # Copyright 2012-2013 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
@@ -12,8 +12,8 @@
12
12
  #
13
13
  # You should have received a copy of the GNU Lesser General Public
14
14
  # License along with this library; if not, write to the Free Software
15
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  module PKGConfig
18
- VERSION = "1.1.5"
18
+ VERSION = "1.1.6"
19
19
  end
@@ -12,10 +12,5 @@ require "bundler/setup"
12
12
  require 'test-unit'
13
13
 
14
14
  $LOAD_PATH.unshift(lib_dir)
15
- $LOAD_PATH.unshift(test_dir)
16
15
 
17
- Dir.glob("test/**/test_*.rb") do |file|
18
- require file.gsub(/(?:^test\/|\.rb$)/, '')
19
- end
20
-
21
- exit Test::Unit::AutoRunner.run(false)
16
+ exit Test::Unit::AutoRunner.run(true)
metadata CHANGED
@@ -1,69 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pkg-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-30 00:00:00.000000000 Z
11
+ date: 2014-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: test-unit-notify
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
24
+ - - ">="
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rake
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
- - - '>='
31
+ - - ">="
46
32
  - !ruby/object:Gem::Version
47
33
  version: '0'
48
34
  type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - '>='
38
+ - - ">="
53
39
  - !ruby/object:Gem::Version
54
40
  version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: bundler
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - '>='
45
+ - - ">="
60
46
  - !ruby/object:Gem::Version
61
47
  version: '0'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - '>='
52
+ - - ">="
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
55
  description: pkg-config can be used in your extconf.rb to properly detect need libraries
@@ -74,16 +60,16 @@ executables: []
74
60
  extensions: []
75
61
  extra_rdoc_files: []
76
62
  files:
77
- - README.rdoc
78
- - NEWS
79
63
  - Gemfile
80
- - Rakefile
81
64
  - LGPL-2.1
82
- - lib/pkg-config/version.rb
65
+ - NEWS
66
+ - README.rdoc
67
+ - Rakefile
83
68
  - lib/pkg-config.rb
84
- - test/test_pkg_config.rb
69
+ - lib/pkg-config/version.rb
85
70
  - test/run-test.rb
86
- homepage: https://github.com/rcairo/pkg-config
71
+ - test/test_pkg_config.rb
72
+ homepage: https://github.com/ruby-gnome2/pkg-config
87
73
  licenses:
88
74
  - LGPLv2+
89
75
  metadata: {}
@@ -93,21 +79,20 @@ require_paths:
93
79
  - lib
94
80
  required_ruby_version: !ruby/object:Gem::Requirement
95
81
  requirements:
96
- - - '>='
82
+ - - ">="
97
83
  - !ruby/object:Gem::Version
98
84
  version: '0'
99
85
  required_rubygems_version: !ruby/object:Gem::Requirement
100
86
  requirements:
101
- - - '>='
87
+ - - ">="
102
88
  - !ruby/object:Gem::Version
103
89
  version: '0'
104
90
  requirements: []
105
91
  rubyforge_project: cairo
106
- rubygems_version: 2.0.14
92
+ rubygems_version: 2.2.2
107
93
  signing_key:
108
94
  specification_version: 4
109
95
  summary: A pkg-config implementation for Ruby
110
96
  test_files:
111
97
  - test/test_pkg_config.rb
112
98
  - test/run-test.rb
113
- has_rdoc: