pkg-config 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS +4 -0
- data/lib/pkg-config.rb +17 -14
- data/test/run-test.rb +2 -0
- data/test/test_pkg_config.rb +2 -2
- metadata +8 -24
data/NEWS
CHANGED
data/lib/pkg-config.rb
CHANGED
@@ -27,18 +27,7 @@ class PackageConfig
|
|
27
27
|
class << self
|
28
28
|
@native_pkg_config = nil
|
29
29
|
def native_pkg_config
|
30
|
-
|
31
|
-
pkg_config = with_config("pkg-config", ENV["PKG_CONFIG"] || "pkg-config")
|
32
|
-
pkg_config = Pathname.new(pkg_config)
|
33
|
-
unless pkg_config.absolute?
|
34
|
-
found_pkg_config = search_pkg_config_from_path(pkg_config)
|
35
|
-
pkg_config = found_pkg_config if found_pkg_config
|
36
|
-
end
|
37
|
-
unless pkg_config.absolute?
|
38
|
-
found_pkg_config = search_pkg_config_by_dln_find_exe(pkg_config)
|
39
|
-
pkg_config = found_pkg_config if found_pkg_config
|
40
|
-
end
|
41
|
-
@native_pkg_config = pkg_config
|
30
|
+
@native_pkg_config ||= guess_native_pkg_config
|
42
31
|
end
|
43
32
|
|
44
33
|
@custom_override_variables = nil
|
@@ -52,6 +41,20 @@ class PackageConfig
|
|
52
41
|
end
|
53
42
|
|
54
43
|
private
|
44
|
+
def guess_native_pkg_config
|
45
|
+
pkg_config = with_config("pkg-config", ENV["PKG_CONFIG"] || "pkg-config")
|
46
|
+
pkg_config = Pathname.new(pkg_config)
|
47
|
+
unless pkg_config.absolute?
|
48
|
+
found_pkg_config = search_pkg_config_from_path(pkg_config)
|
49
|
+
pkg_config = found_pkg_config if found_pkg_config
|
50
|
+
end
|
51
|
+
unless pkg_config.absolute?
|
52
|
+
found_pkg_config = search_pkg_config_by_dln_find_exe(pkg_config)
|
53
|
+
pkg_config = found_pkg_config if found_pkg_config
|
54
|
+
end
|
55
|
+
pkg_config
|
56
|
+
end
|
57
|
+
|
55
58
|
def search_pkg_config_from_path(pkg_config)
|
56
59
|
(ENV["PATH"] || "").split(SEPARATOR).each do |path|
|
57
60
|
try_pkg_config = Pathname(path) + pkg_config
|
@@ -225,7 +228,7 @@ class PackageConfig
|
|
225
228
|
[path_flags, other_flags]
|
226
229
|
end
|
227
230
|
|
228
|
-
IDENTIFIER_RE = /[\
|
231
|
+
IDENTIFIER_RE = /[a-zA-Z\d_\.]+/
|
229
232
|
def parse_pc
|
230
233
|
raise ".pc for #{@name} doesn't exist." unless exist?
|
231
234
|
@variables = {}
|
@@ -287,7 +290,7 @@ class PackageConfig
|
|
287
290
|
end
|
288
291
|
|
289
292
|
module PKGConfig
|
290
|
-
VERSION = "1.0.
|
293
|
+
VERSION = "1.0.7"
|
291
294
|
|
292
295
|
@@paths = []
|
293
296
|
@@override_variables = {}
|
data/test/run-test.rb
CHANGED
data/test/test_pkg_config.rb
CHANGED
@@ -65,9 +65,9 @@ class PkgConfigTest < Test::Unit::TestCase
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def test_requires_private
|
68
|
-
assert_equal(["freetype2", "fontconfig", "libpng12",
|
68
|
+
assert_equal(["pixman-1", "freetype2", "fontconfig", "libpng12",
|
69
69
|
"xcb", "xcb-render", "xcb-renderutil",
|
70
|
-
"xrender", "x11"
|
70
|
+
"xrender", "x11"],
|
71
71
|
@cairo.requires_private)
|
72
72
|
end
|
73
73
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pkg-config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 7
|
10
|
+
version: 1.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kouhei Sutou
|
@@ -15,41 +15,25 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-30 00:00:00 +09:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
22
|
+
name: hoe
|
23
23
|
prerelease: false
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 31
|
30
30
|
segments:
|
31
31
|
- 2
|
32
|
-
- 0
|
33
32
|
- 4
|
34
|
-
|
33
|
+
- 0
|
34
|
+
version: 2.4.0
|
35
35
|
type: :development
|
36
36
|
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: hoe
|
39
|
-
prerelease: false
|
40
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ">="
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
hash: 21
|
46
|
-
segments:
|
47
|
-
- 2
|
48
|
-
- 6
|
49
|
-
- 1
|
50
|
-
version: 2.6.1
|
51
|
-
type: :development
|
52
|
-
version_requirements: *id002
|
53
37
|
description: A pkg-cofnig implementation by Ruby
|
54
38
|
email:
|
55
39
|
- kou@cozmixng.org
|