autobuild 1.9.0.b3 → 1.9.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
  SHA1:
3
- metadata.gz: 97d91fdc5b06cf57bc85a29436b8ae83de8bf188
4
- data.tar.gz: 366b4196e75cb245ba30e241d3b3b2d57b18919e
3
+ metadata.gz: 7d3bb942267370ce2e0ae0788d95dbae126bb822
4
+ data.tar.gz: 1b4d9cd82f441501de25ca9c257bf87e2a2b1a93
5
5
  SHA512:
6
- metadata.gz: 87f2e924550b4c3568e195e065b8e152091d452c177f5409f27ae637019e6e0643a15fde769f124954f23547981c7ef864fb9944659bd849cc20e35ab3f56d79
7
- data.tar.gz: cb5e7f5c663ab02bad5c3d1ade8e1090ab2db8e87056af6d33fdd10fc75fa7f37b6e738c05abe81f0582cd4cc5480a47d204398855335ef1c6733dbb92ab7056
6
+ metadata.gz: b4c2c503656df061fd82e4defddac037294bff228c62b2d7dba636cea89e22dbfc5e0da42fe497971205a2f20b8184a9b8198da80fc64ef54667b0fb046ac449
7
+ data.tar.gz: 7fe3027e64442123763bef17d20d433889dd2886c4896914ae3f67b2a11c6ac703d310ed8ff9eacf6bd68e8aa2021995ca924e4feed594bf3e40ac6fef760ee2
@@ -21,25 +21,6 @@ module Autobuild
21
21
  #
22
22
  # Finally, the build stage actually calls the package's build targets (of
23
23
  # the form "package_name-build", which will trigger the build if needed.
24
- #
25
- # <b>Autodetecting dependencies</b>
26
- # There are two sides in dependency autodetection. The first side is that
27
- # packages must declare what they provide. One example is the handling of
28
- # pkgconfig dependencies: packages must declare that they provide a
29
- # pkgconfig definition. This side of the autodetection must be done just
30
- # after the package's import, by overloading the #import method:
31
- #
32
- # def import
33
- # super
34
- #
35
- # # Do autodetection and call Package#provides
36
- # end
37
- #
38
- # Note that, in most cases, the overloaded import method *must* begin with
39
- # "super".
40
- #
41
- # The other side is the detection itself. That must be done by overloading
42
- # the #prepare method.
43
24
  class Package
44
25
  @@packages = {}
45
26
  @@provides = {}
@@ -133,7 +133,7 @@ module Autobuild
133
133
  FileUtils.rm_f configurestamp
134
134
  end
135
135
 
136
- def import(only_local=false)
136
+ def import(options = Hash.new)
137
137
  # We force a regen after the first checkout. The issue is that
138
138
  # autotools is less robust than it should, and very often it is
139
139
  # better to generate the build system for the system on which we
@@ -75,6 +75,24 @@ module Autobuild
75
75
  super
76
76
  end
77
77
 
78
+ @@defines = Hash.new
79
+
80
+ def self.defines
81
+ @@defines
82
+ end
83
+
84
+ def self.define(name, value)
85
+ @@defines[name] =
86
+ if value.respond_to?(:to_str)
87
+ value.to_str
88
+ elsif value
89
+ 'ON'
90
+ else
91
+ 'OFF'
92
+ end
93
+ end
94
+
95
+
78
96
  def define(name, value)
79
97
  @defines[name] =
80
98
  if value.respond_to?(:to_str)
@@ -252,7 +270,7 @@ module Autobuild
252
270
  end
253
271
  end
254
272
 
255
- def import(only_local=false)
273
+ def import(options = Hash.new)
256
274
  super
257
275
 
258
276
  Dir.glob(File.join(srcdir, "*.pc.in")) do |file|
@@ -273,7 +291,7 @@ module Autobuild
273
291
  doc_utility.source_ref_dir = builddir
274
292
 
275
293
  if File.exist?(cmake_cache)
276
- all_defines = defines.dup
294
+ all_defines = self.class.defines.merge(defines)
277
295
  all_defines['CMAKE_INSTALL_PREFIX'] = prefix
278
296
  all_defines['CMAKE_MODULE_PATH'] = "#{CMake.module_path.join(";")}"
279
297
  cache = File.read(cmake_cache)
@@ -318,12 +336,12 @@ module Autobuild
318
336
 
319
337
  command = [ "cmake", "-DCMAKE_INSTALL_PREFIX=#{prefix}", "-DCMAKE_MODULE_PATH=#{CMake.module_path.join(";")}" ]
320
338
 
321
- if(RbConfig::CONFIG["host_os"] =~%r!(msdos|mswin|djgpp|mingw|[Ww]indows)!)
322
- command << '-G'
323
- command << "MSYS Makefiles"
324
- end
339
+ if Autobuild.windows?
340
+ command << '-G'
341
+ command << "MSYS Makefiles"
342
+ end
325
343
 
326
- defines.each do |name, value|
344
+ self.class.defines.merge(defines).each do |name, value|
327
345
  command << "-D#{name}=#{value}"
328
346
  end
329
347
  if generator
@@ -12,7 +12,7 @@ module Autobuild
12
12
  super
13
13
  end
14
14
 
15
- def import(only_local=false)
15
+ def import(options = Hash.new)
16
16
  end
17
17
 
18
18
  def prepare
@@ -17,7 +17,7 @@ module Autobuild
17
17
  use :autogen => 'autogen'
18
18
  end
19
19
 
20
- def import(only_local=false)
20
+ def import(options = Hash.new)
21
21
  super
22
22
  get_provides
23
23
  end
@@ -177,10 +177,6 @@ module Autobuild
177
177
  FileUtils.rm_f genstamp
178
178
  end
179
179
 
180
- def import(only_local=false)
181
- super
182
- end
183
-
184
180
  def update_environment
185
181
  super
186
182
  typelib_plugin = File.join(prefix, 'share', 'typelib', 'ruby')
@@ -1,5 +1,5 @@
1
1
  module Autobuild
2
- VERSION = "1.9.0.b3" unless defined? Autobuild::VERSION
2
+ VERSION = "1.9.0" unless defined? Autobuild::VERSION
3
3
  end
4
4
 
5
5
 
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.9.0.b3
4
+ version: 1.9.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: 2015-03-16 00:00:00.000000000 Z
11
+ date: 2015-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -169,14 +169,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
169
  version: 1.9.2
170
170
  required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  requirements:
172
- - - ">"
172
+ - - ">="
173
173
  - !ruby/object:Gem::Version
174
- version: 1.3.1
174
+ version: '0'
175
175
  requirements: []
176
176
  rubyforge_project:
177
177
  rubygems_version: 2.2.2
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: Library to handle build systems and import mechanisms
181
- test_files:
182
- - test/suite.rb
181
+ test_files: []