autobuild 1.12.3 → 1.13.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,25 +2,25 @@
2
2
 
3
3
  module Autobuild
4
4
  class InstalledPkgConfig < Package
5
- attr_reader :pkgconfig
6
- attr_reader :prefix
5
+ attr_reader :pkgconfig
6
+ attr_reader :prefix
7
7
 
8
- def initialize(name)
9
- @pkgconfig = PkgConfig.new(name)
10
- @prefix = @pkgconfig.prefix
11
- super
12
- end
8
+ def initialize(name)
9
+ @pkgconfig = PkgConfig.new(name)
10
+ @prefix = @pkgconfig.prefix
11
+ super
12
+ end
13
13
 
14
- def installstamp
15
- std_stamp = super
16
- return std_stamp if File.file?(std_stamp)
14
+ def installstamp
15
+ std_stamp = super
16
+ return std_stamp if File.file?(std_stamp)
17
17
 
18
- pcfile = File.join(pkgconfig.prefix, "lib", "pkgconfig", "#{name}.pc")
19
- if !File.file?(pcfile)
20
- raise "cannot find the .pc file for #{name}, tried #{pcfile}"
21
- end
22
- pcfile
23
- end
18
+ pcfile = File.join(pkgconfig.prefix, "lib", "pkgconfig", "#{name}.pc")
19
+ if !File.file?(pcfile)
20
+ raise "cannot find the .pc file for #{name}, tried #{pcfile}"
21
+ end
22
+ pcfile
23
+ end
24
24
  end
25
25
  def self.installed_pkgconfig(name, &block)
26
26
  InstalledPkgConfig.new(name, &block)
@@ -1,9 +1,9 @@
1
1
  # Access to information from pkg-config(1)
2
2
  class PkgConfig
3
3
  class NotFound < RuntimeError
4
- attr_reader :name
5
- def initialize(name); @name = name end
6
- def to_s; "#{name} is not available to pkg-config" end
4
+ attr_reader :name
5
+ def initialize(name); @name = name end
6
+ def to_s; "#{name} is not available to pkg-config" end
7
7
  end
8
8
 
9
9
  # The module name
@@ -14,30 +14,30 @@ def to_s; "#{name} is not available to pkg-config" end
14
14
  # Create a PkgConfig object for the package +name+
15
15
  # Raises PkgConfig::NotFound if the module does not exist
16
16
  def initialize(name)
17
- if !system("pkg-config --exists #{name}")
18
- raise NotFound.new(name)
19
- end
20
-
21
- @name = name
22
- @version = `pkg-config --modversion #{name}`.chomp.strip
23
- @actions = Hash.new
24
- @variables = Hash.new
17
+ if !system("pkg-config --exists #{name}")
18
+ raise NotFound.new(name)
19
+ end
20
+
21
+ @name = name
22
+ @version = `pkg-config --modversion #{name}`.chomp.strip
23
+ @actions = Hash.new
24
+ @variables = Hash.new
25
25
  end
26
26
 
27
27
  ACTIONS = %w{cflags cflags-only-I cflags-only-other
28
- libs libs-only-L libs-only-l libs-only-other static}
28
+ libs libs-only-L libs-only-l libs-only-other static}
29
29
  ACTIONS.each do |action|
30
- define_method(action.gsub(/-/, '_')) do
31
- @actions[action] ||= `pkg-config --#{action} #{name}`.chomp.strip
32
- end
30
+ define_method(action.gsub(/-/, '_')) do
31
+ @actions[action] ||= `pkg-config --#{action} #{name}`.chomp.strip
32
+ end
33
33
  end
34
34
 
35
35
  def method_missing(varname, *args, &proc)
36
- if args.empty?
37
- @variables[varname] ||= `pkg-config --variable=#{varname} #{name}`.chomp.strip
38
- else
39
- super(varname, *args, &proc)
40
- end
36
+ if args.empty?
37
+ @variables[varname] ||= `pkg-config --variable=#{varname} #{name}`.chomp.strip
38
+ else
39
+ super(varname, *args, &proc)
40
+ end
41
41
  end
42
42
  end
43
43
 
@@ -250,28 +250,6 @@ def self.display_progress
250
250
  end
251
251
  end
252
252
 
253
- # The exception type that is used to report multiple errors that occured
254
- # when ignore_errors is set
255
- class CompositeException < Autobuild::Exception
256
- # The array of exception objects representing all the errors that
257
- # occured during the build
258
- attr_reader :original_errors
259
-
260
- def initialize(original_errors)
261
- @original_errors = original_errors
262
- end
263
-
264
- def mail?; true end
265
-
266
- def to_s
267
- result = ["#{original_errors.size} errors occured"]
268
- original_errors.each_with_index do |e, i|
269
- result << "(#{i}) #{e.to_s}"
270
- end
271
- result.join("\n")
272
- end
273
- end
274
-
275
253
  ## The reporting module provides the framework # to run commands in
276
254
  # autobuild and report errors # to the user
277
255
  #
@@ -81,7 +81,7 @@ def self.autodetect_processor_count
81
81
  if @processor_count
82
82
  return @processor_count
83
83
  end
84
-
84
+
85
85
  if File.file?('/proc/cpuinfo')
86
86
  cpuinfo = File.readlines('/proc/cpuinfo')
87
87
  physical_ids, core_count, processor_ids = [], [], []
@@ -252,9 +252,9 @@ def self.run(target, phase, *command)
252
252
  FileUtils.mkdir_p File.dirname(logname)
253
253
  end
254
254
 
255
- if Autobuild.verbose
256
- Autobuild.message "#{target_name}: running #{command.join(" ")}\n (output goes to #{logname})"
257
- end
255
+ if Autobuild.verbose
256
+ Autobuild.message "#{target_name}: running #{command.join(" ")}\n (output goes to #{logname})"
257
+ end
258
258
 
259
259
  open_flag = if Autobuild.keep_oldlogs then 'a'
260
260
  elsif Autobuild.registered_logfile?(logname) then 'a'
@@ -281,7 +281,7 @@ def self.run(target, phase, *command)
281
281
  logfile.puts
282
282
  logfile.puts "#{Time.now}: running"
283
283
  logfile.puts " #{command.join(" ")}"
284
- logfile.puts "with environment:"
284
+ logfile.puts "with environment:"
285
285
  env.keys.sort.each do |key|
286
286
  if value = env[key]
287
287
  logfile.puts " '#{key}'='#{value}'"
@@ -290,7 +290,7 @@ def self.run(target, phase, *command)
290
290
  logfile.puts
291
291
  logfile.puts "#{Time.now}: running"
292
292
  logfile.puts " #{command.join(" ")}"
293
- logfile.flush
293
+ logfile.flush
294
294
  logfile.sync = true
295
295
 
296
296
  if !input_streams.empty?
@@ -58,11 +58,11 @@ class SourceTreeTask < Rake::Task
58
58
  attr_reader :newest_file
59
59
  attr_reader :newest_time
60
60
 
61
- def initialize(*args, &block)
62
- @exclude = Autobuild.ignored_files.dup
63
- super
64
- end
65
-
61
+ def initialize(*args, &block)
62
+ @exclude = Autobuild.ignored_files.dup
63
+ super
64
+ end
65
+
66
66
  def timestamp
67
67
  if @newest_time
68
68
  return @newest_time
@@ -1,8 +1,8 @@
1
1
  module Autobuild
2
2
  class << self
3
- # Configure the programs used by different packages
3
+ # Configure the programs used by different packages
4
4
  attr_reader :programs
5
- # A cache of entries in programs to their resolved full path
5
+ # A cache of entries in programs to their resolved full path
6
6
  #
7
7
  # @return [{String=>[String,String,String]}] the triplet (full path,
8
8
  # tool name, value of ENV['PATH']). The last two values are used to
@@ -12,11 +12,11 @@ class << self
12
12
  attr_reader :programs_in_path
13
13
 
14
14
  # Get a given program, using its name as default value. For
15
- # instance
16
- # tool('automake')
17
- # will return 'automake' unless the autobuild script defined
18
- # another automake program in Autobuild.programs by doing
19
- # Autobuild.programs['automake'] = 'automake1.9'
15
+ # instance
16
+ # tool('automake')
17
+ # will return 'automake' unless the autobuild script defined
18
+ # another automake program in Autobuild.programs by doing
19
+ # Autobuild.programs['automake'] = 'automake1.9'
20
20
  def tool(name)
21
21
  programs[name.to_sym] || programs[name.to_s] || name.to_s
22
22
  end
@@ -1,3 +1,3 @@
1
1
  module Autobuild
2
- VERSION = "1.12.3" unless defined? Autobuild::VERSION
2
+ VERSION = "1.13.0.pre1" unless defined? Autobuild::VERSION
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.3
4
+ version: 1.13.0.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-05 00:00:00.000000000 Z
11
+ date: 2018-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -19,10 +19,7 @@ dependencies:
19
19
  version: '12.0'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 12.0.0
23
- - - "<"
24
- - !ruby/object:Gem::Version
25
- version: 12.1.0
22
+ version: 12.3.0
26
23
  type: :runtime
27
24
  prerelease: false
28
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -32,10 +29,7 @@ dependencies:
32
29
  version: '12.0'
33
30
  - - ">="
34
31
  - !ruby/object:Gem::Version
35
- version: 12.0.0
36
- - - "<"
37
- - !ruby/object:Gem::Version
38
- version: 12.1.0
32
+ version: 12.3.0
39
33
  - !ruby/object:Gem::Dependency
40
34
  name: utilrb
41
35
  requirement: !ruby/object:Gem::Requirement
@@ -62,20 +56,14 @@ dependencies:
62
56
  requirements:
63
57
  - - "~>"
64
58
  - !ruby/object:Gem::Version
65
- version: 0.12.0
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: 0.12.0
59
+ version: 0.15.0
69
60
  type: :runtime
70
61
  prerelease: false
71
62
  version_requirements: !ruby/object:Gem::Requirement
72
63
  requirements:
73
64
  - - "~>"
74
65
  - !ruby/object:Gem::Version
75
- version: 0.12.0
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- version: 0.12.0
66
+ version: 0.15.0
79
67
  - !ruby/object:Gem::Dependency
80
68
  name: pastel
81
69
  requirement: !ruby/object:Gem::Requirement
@@ -237,9 +225,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
237
225
  version: 1.9.3
238
226
  required_rubygems_version: !ruby/object:Gem::Requirement
239
227
  requirements:
240
- - - ">="
228
+ - - ">"
241
229
  - !ruby/object:Gem::Version
242
- version: '0'
230
+ version: 1.3.1
243
231
  requirements: []
244
232
  rubyforge_project:
245
233
  rubygems_version: 2.5.1