autobuild 1.15.0 → 1.16.0

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
  SHA256:
3
- metadata.gz: c5db12f4baef9f5192a60e44c30b9db25301eeada8b07706dc29b07f8a3d72f9
4
- data.tar.gz: '078bd5a842db6b28dcc83934074291860998f7688bb8186d7ca1c1b40510054f'
3
+ metadata.gz: 3b7ade4cfb6600c6240d0e6cbb23ed19340e7c3a43b7811aab49236e1d81b1f0
4
+ data.tar.gz: 72fade1f3c6de16fd4988c9d132452aed5a7684f4e1978872ea3e18933c8c0ac
5
5
  SHA512:
6
- metadata.gz: 86b505fbc092682443ae1cf05403ad72ef2cba0cd5f0c42d9b1e70f352f37221a5304baf2a0b1391ccb9b2d8247580abbbe4ab7c503c1a480c7ded04d01e1314
7
- data.tar.gz: a6110dd2e3f714a9213973f4eebbcee346357295e56970b798f413c692c59cfb49ac2b90399890827ffff101d1e564cce3ca715d36d260acbe290096633e18d8
6
+ metadata.gz: 3b63871e342d7a5b7bdf7bb0ab28c1aa6bb4e808f95a08ada2c9d56ba74c2ce95207883348b8e5727bfac65932d6c8f5cd2473f62bf2445ed6b4110d95331a17
7
+ data.tar.gz: 1a53537790164887e430742c5314e1f22685f2b50102874b33556f2153fa03e4d69f68cf95d89602c799bda420c878985c2f5600122077b84917221f8408ac89
@@ -395,7 +395,7 @@ def relocate(url, options = Hash.new)
395
395
  def update(package, options = Hash.new) # :nodoc:
396
396
  if options[:only_local]
397
397
  package.warn "%s: the archive importer does not support local updates, skipping"
398
- return
398
+ return false
399
399
  end
400
400
  needs_update = update_cache(package)
401
401
 
@@ -404,9 +404,9 @@ def update(package, options = Hash.new) # :nodoc:
404
404
  end
405
405
 
406
406
  if needs_update || archive_changed?(package)
407
- checkout(package, allow_interactive: options[:allow_interactive])
408
- true
407
+ return checkout(package, allow_interactive: options[:allow_interactive])
409
408
  end
409
+ false
410
410
  end
411
411
 
412
412
  def checkout_digest_stamp(package)
@@ -449,7 +449,7 @@ def checkout(package, options = Hash.new) # :nodoc:
449
449
  if !response
450
450
  package.message "not updating #{package.srcdir}"
451
451
  package.progress_done
452
- return
452
+ return false
453
453
  else
454
454
  package.message "deleting #{package.srcdir} to update to new archive"
455
455
  FileUtils.rm_rf package.srcdir
@@ -498,6 +498,7 @@ def checkout(package, options = Hash.new) # :nodoc:
498
498
  end
499
499
  end
500
500
  write_checkout_digest_stamp(package)
501
+ return true
501
502
 
502
503
  rescue SubcommandFailed
503
504
  if cachefile != url.path
@@ -19,8 +19,8 @@ def self.autotools(opts, &proc)
19
19
  # ==== Handles autotools-based packages
20
20
  #
21
21
  # == Used programs (see <tt>Autobuild.programs</tt>)
22
- # Autotools will use the 'aclocal', 'autoheader', 'autoconf' and 'automake'
23
- # programs defined on Autobuild.programs. autoheader is disabled by default,
22
+ # Autotools will use the 'aclocal', 'autoheader', 'autoconf', 'automake' and 'bear'
23
+ # programs defined on Autobuild.programs. autoheader and bear are disabled by default,
24
24
  # aclocal, autoconf and automake use are autodetected.
25
25
  #
26
26
  # To override this default behaviour on a per-package basis, use Autotools#use
@@ -32,8 +32,23 @@ class Autotools < Configurable
32
32
  attr_accessor :autoheader_flags
33
33
  attr_accessor :autoconf_flags
34
34
  attr_accessor :automake_flags
35
+ attr_accessor :bear_flags
35
36
 
36
37
  @builddir = 'build'
38
+ @@enable_bear_globally = false
39
+
40
+ def self.enable_bear_globally?
41
+ @@enable_bear_globally
42
+ end
43
+
44
+ def self.enable_bear_globally=(flag)
45
+ @@enable_bear_globally = flag
46
+ end
47
+
48
+ def using_bear?
49
+ return Autotools.enable_bear_globally? if using[:bear].nil?
50
+ using[:bear]
51
+ end
37
52
 
38
53
  def configurestamp; "#{builddir}/config.status" end
39
54
 
@@ -44,6 +59,7 @@ def initialize(options)
44
59
  @autoheader_flags = Array.new
45
60
  @autoconf_flags = Array.new
46
61
  @automake_flags = Array.new
62
+ @bear_flags = ['-a']
47
63
 
48
64
  super
49
65
  end
@@ -209,6 +225,15 @@ def prepare
209
225
  file configurestamp => regen_target
210
226
  end
211
227
 
228
+ def tool_program(tool)
229
+ tool_flag = using[tool.to_sym]
230
+ if tool_flag.respond_to?(:to_str)
231
+ tool_flag.to_str
232
+ else
233
+ Autobuild.tool(tool)
234
+ end
235
+ end
236
+
212
237
  # If set to true, configure will be called with --no-create and
213
238
  # ./config.status will be started each time before "make"
214
239
  #
@@ -272,15 +297,9 @@ def regen
272
297
  working_directory: srcdir
273
298
  else
274
299
  [ :aclocal, :autoconf, :autoheader, :automake ].each do |tool|
275
- if tool_flag = using[tool]
276
- tool_program = if tool_flag.respond_to?(:to_str)
277
- tool_flag.to_str
278
- else; Autobuild.tool(tool)
279
- end
280
-
281
- run 'configure', tool_program, *send("#{tool}_flags"),
282
- working_directory: srcdir
283
- end
300
+ next unless using[tool]
301
+ run 'configure', tool_program(tool), *send("#{tool}_flags"),
302
+ working_directory: srcdir
284
303
  end
285
304
  end
286
305
  end
@@ -308,7 +327,18 @@ def build
308
327
  if force_config_status
309
328
  run('build', './config.status')
310
329
  end
311
- run('build', Autobuild.tool(:make), "-j#{parallel_build_level}")
330
+
331
+ build_options = []
332
+ if using_bear?
333
+ build_tool = tool_program(:bear)
334
+ build_options = bear_flags
335
+ build_options << Autobuild.tool(:make)
336
+ else
337
+ build_tool = Autobuild.tool(:make)
338
+ end
339
+ build_options << "-j#{parallel_build_level}"
340
+
341
+ run('build', build_tool, *build_options)
312
342
  end
313
343
  end
314
344
  Autobuild.touch_stamp(buildstamp)
@@ -1,12 +1,16 @@
1
+ require 'rubygems/version'
2
+
1
3
  module Autobuild
2
4
  def self.make_is_gnumake?(pkg, path = Autobuild.tool(:make))
3
5
  @make_is_gnumake ||= Hash.new
6
+ @gnumake_version ||= Hash.new
4
7
  if @make_is_gnumake.has_key?(path)
5
8
  @make_is_gnumake[path]
6
9
  else
7
10
  begin
8
11
  result = pkg.run('prepare', path, '--version')
9
12
  @make_is_gnumake[path] = (result.first =~ /GNU Make/)
13
+ @gnumake_version[path] = result.first.scan(/[\d.]+/)[0]
10
14
  rescue Autobuild::SubcommandFailed
11
15
  @make_is_gnumake[path] = false
12
16
  end
@@ -31,7 +35,11 @@ def self.invoke_make_parallel(pkg, cmd_path = Autobuild.tool(:make))
31
35
  job_server.get(reserved - 1) # We already have one token taken by autobuild itself
32
36
  yield("-j#{pkg.parallel_build_level}")
33
37
  end
34
- yield("--jobserver-fds=#{job_server.rio.fileno},#{job_server.wio.fileno}", "-j")
38
+ if Gem::Version.new(@gnumake_version[cmd_path]) >= Gem::Version.new("4.2.0")
39
+ yield("--jobserver-auth=#{job_server.rio.fileno},#{job_server.wio.fileno}", "-j")
40
+ else
41
+ yield("--jobserver-fds=#{job_server.rio.fileno},#{job_server.wio.fileno}", "-j")
42
+ end
35
43
  end
36
44
  yield("-j#{pkg.parallel_build_level}")
37
45
  else yield
@@ -1,3 +1,3 @@
1
1
  module Autobuild
2
- VERSION = "1.15.0" unless defined? Autobuild::VERSION
2
+ VERSION = "1.16.0" 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.15.0
4
+ version: 1.16.0
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-08-31 00:00:00.000000000 Z
11
+ date: 2018-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake