autobuild 1.5.21 → 1.5.22
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes.txt +5 -0
- data/lib/autobuild/environment.rb +19 -12
- data/lib/autobuild/package.rb +8 -4
- data/lib/autobuild/packages/orogen.rb +11 -2
- data/lib/autobuild/version.rb +1 -1
- metadata +3 -12
data/Changes.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== Version 1.5.22
|
2
|
+
* minor change to #env_add_path. The provided directory is not filtered out
|
3
|
+
anymore if it does not exist, to avoid the API user to *have* to call it
|
4
|
+
*after* the packages have been installed
|
5
|
+
|
1
6
|
== Version 1.5.21
|
2
7
|
* add an argument to status() to avoid using the network (for importers that can
|
3
8
|
do that, i.e. git)
|
@@ -44,15 +44,14 @@ module Autobuild
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def self.env_add_path(name, path, *paths)
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
$LOAD_PATH.unshift path
|
53
|
-
end
|
47
|
+
oldpath = environment[name]
|
48
|
+
if !oldpath || !oldpath.include?(path)
|
49
|
+
env_add(name, path)
|
50
|
+
if name == 'RUBYLIB'
|
51
|
+
$LOAD_PATH.unshift path
|
54
52
|
end
|
55
53
|
end
|
54
|
+
|
56
55
|
if !paths.empty?
|
57
56
|
env_add_path(name, *paths)
|
58
57
|
end
|
@@ -70,15 +69,19 @@ module Autobuild
|
|
70
69
|
|
71
70
|
# Updates the environment when a new prefix has been added
|
72
71
|
def self.update_environment(newprefix)
|
73
|
-
|
74
|
-
|
75
|
-
|
72
|
+
if File.directory?("#{newprefix}/bin")
|
73
|
+
env_add_path('PATH', "#{newprefix}/bin")
|
74
|
+
end
|
75
|
+
if File.directory?("#{newprefix}/lib/pkgconfig")
|
76
|
+
env_add_path('PKG_CONFIG_PATH', "#{newprefix}/lib/pkgconfig")
|
77
|
+
end
|
78
|
+
if File.directory?("#{newprefix}/lib") && !Dir.glob("#{newprefix}/lib/lib*.so").empty?
|
76
79
|
env_add_path('LD_LIBRARY_PATH', "#{newprefix}/lib")
|
77
80
|
end
|
78
81
|
|
79
82
|
# Validate the new rubylib path
|
80
83
|
new_rubylib = "#{newprefix}/lib"
|
81
|
-
if !File.directory?(File.join(new_rubylib, "ruby")) && !Dir["#{new_rubylib}/**/*.rb"].empty?
|
84
|
+
if File.directory?(new_rubylib) && !File.directory?(File.join(new_rubylib, "ruby")) && !Dir["#{new_rubylib}/**/*.rb"].empty?
|
82
85
|
env_add_path('RUBYLIB', new_rubylib)
|
83
86
|
end
|
84
87
|
|
@@ -87,7 +90,11 @@ module Autobuild
|
|
87
90
|
candidates = %w{rubylibdir archdir sitelibdir sitearchdir vendorlibdir vendorarchdir}.
|
88
91
|
map { |key| Config::CONFIG[key] }.
|
89
92
|
map { |path| path.gsub(/.*lib(?:32|64)?\/(\w*ruby\/)/, '\\1') }.
|
90
|
-
each
|
93
|
+
each do |subdir|
|
94
|
+
if File.directory?("#{newprefix}/lib/#{subdir}")
|
95
|
+
env_add_path("RUBYLIB", "#{newprefix}/lib/#{subdir}")
|
96
|
+
end
|
97
|
+
end
|
91
98
|
end
|
92
99
|
end
|
93
100
|
|
data/lib/autobuild/package.rb
CHANGED
@@ -209,10 +209,14 @@ module Autobuild
|
|
209
209
|
|
210
210
|
# Add the dependencies declared in spec
|
211
211
|
depends_on *@spec_dependencies if @spec_dependencies
|
212
|
+
update_environment
|
213
|
+
end
|
212
214
|
|
213
|
-
|
214
|
-
|
215
|
-
|
215
|
+
# Called to set/update all environment variables at import and after
|
216
|
+
# install time
|
217
|
+
def update_environment
|
218
|
+
super if defined? super
|
219
|
+
Autobuild.update_environment prefix
|
216
220
|
end
|
217
221
|
|
218
222
|
# Create all the dependencies required to reconfigure and/or rebuild the
|
@@ -265,7 +269,7 @@ module Autobuild
|
|
265
269
|
Autobuild.apply_post_install(name, @post_install)
|
266
270
|
end
|
267
271
|
Autobuild.touch_stamp(installstamp)
|
268
|
-
|
272
|
+
update_environment
|
269
273
|
end
|
270
274
|
|
271
275
|
def run(*args, &block)
|
@@ -231,9 +231,18 @@ module Autobuild
|
|
231
231
|
orogen_spec.provides.each do |name|
|
232
232
|
provides name
|
233
233
|
end
|
234
|
+
end
|
234
235
|
|
235
|
-
|
236
|
-
|
236
|
+
def update_environment
|
237
|
+
super
|
238
|
+
typelib_plugin = File.join(prefix, 'share', 'typelib', 'ruby')
|
239
|
+
if File.directory?(typelib_plugin)
|
240
|
+
Autobuild.env_add_path 'TYPELIB_RUBY_PLUGIN_PATH', typelib_plugin
|
241
|
+
end
|
242
|
+
roby_plugin = File.join(prefix, 'share', 'orocos', 'roby')
|
243
|
+
if File.directory?(roby_plugin)
|
244
|
+
Autobuild.env_add_path 'OROCOS_ROBY_PLUGIN_PATH', roby_plugin
|
245
|
+
end
|
237
246
|
end
|
238
247
|
|
239
248
|
def prepare
|
data/lib/autobuild/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autobuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 41
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 1
|
8
7
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
8
|
+
- 22
|
9
|
+
version: 1.5.22
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Sylvain Joyeux
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-
|
17
|
+
date: 2010-11-02 00:00:00 +01:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
@@ -26,7 +25,6 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
28
|
segments:
|
31
29
|
- 0
|
32
30
|
- 7
|
@@ -42,7 +40,6 @@ dependencies:
|
|
42
40
|
requirements:
|
43
41
|
- - ">="
|
44
42
|
- !ruby/object:Gem::Version
|
45
|
-
hash: 15
|
46
43
|
segments:
|
47
44
|
- 1
|
48
45
|
- 0
|
@@ -57,7 +54,6 @@ dependencies:
|
|
57
54
|
requirements:
|
58
55
|
- - ">="
|
59
56
|
- !ruby/object:Gem::Version
|
60
|
-
hash: 11
|
61
57
|
segments:
|
62
58
|
- 0
|
63
59
|
- 0
|
@@ -72,7 +68,6 @@ dependencies:
|
|
72
68
|
requirements:
|
73
69
|
- - ">="
|
74
70
|
- !ruby/object:Gem::Version
|
75
|
-
hash: 29
|
76
71
|
segments:
|
77
72
|
- 1
|
78
73
|
- 3
|
@@ -88,7 +83,6 @@ dependencies:
|
|
88
83
|
requirements:
|
89
84
|
- - ">="
|
90
85
|
- !ruby/object:Gem::Version
|
91
|
-
hash: 7
|
92
86
|
segments:
|
93
87
|
- 2
|
94
88
|
- 0
|
@@ -104,7 +98,6 @@ dependencies:
|
|
104
98
|
requirements:
|
105
99
|
- - ">="
|
106
100
|
- !ruby/object:Gem::Version
|
107
|
-
hash: 19
|
108
101
|
segments:
|
109
102
|
- 2
|
110
103
|
- 6
|
@@ -196,7 +189,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
196
189
|
requirements:
|
197
190
|
- - ">="
|
198
191
|
- !ruby/object:Gem::Version
|
199
|
-
hash: 3
|
200
192
|
segments:
|
201
193
|
- 0
|
202
194
|
version: "0"
|
@@ -205,7 +197,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
197
|
requirements:
|
206
198
|
- - ">="
|
207
199
|
- !ruby/object:Gem::Version
|
208
|
-
hash: 3
|
209
200
|
segments:
|
210
201
|
- 0
|
211
202
|
version: "0"
|