build-tool 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- build-tool (0.6.4)
4
+ build-tool (0.6.6)
5
5
  activerecord (>= 3.2.1)
6
6
  ansi (>= 1.4.2)
7
7
  grit (>= 2.4.1)
@@ -12,41 +12,42 @@ PATH
12
12
  GEM
13
13
  remote: http://rubygems.org/
14
14
  specs:
15
- activemodel (3.2.3)
16
- activesupport (= 3.2.3)
15
+ activemodel (3.2.9)
16
+ activesupport (= 3.2.9)
17
17
  builder (~> 3.0.0)
18
- activerecord (3.2.3)
19
- activemodel (= 3.2.3)
20
- activesupport (= 3.2.3)
18
+ activerecord (3.2.9)
19
+ activemodel (= 3.2.9)
20
+ activesupport (= 3.2.9)
21
21
  arel (~> 3.0.2)
22
22
  tzinfo (~> 0.3.29)
23
- activesupport (3.2.3)
23
+ activesupport (3.2.9)
24
24
  i18n (~> 0.6)
25
25
  multi_json (~> 1.0)
26
- ansi (1.4.2)
26
+ ansi (1.4.3)
27
27
  arel (3.0.2)
28
- builder (3.0.0)
28
+ builder (3.0.4)
29
29
  diff-lcs (1.1.3)
30
30
  grit (2.5.0)
31
31
  diff-lcs (~> 1.1)
32
32
  mime-types (~> 1.15)
33
33
  posix-spawn (~> 0.3.6)
34
- i18n (0.6.0)
35
- inifile (1.1.0)
34
+ i18n (0.6.1)
35
+ inifile (2.0.2)
36
36
  little-plugger (1.1.3)
37
- logging (1.7.2)
37
+ logging (1.8.0)
38
38
  little-plugger (>= 1.1.3)
39
- mime-types (1.18)
40
- multi_json (1.3.6)
39
+ multi_json (>= 1.3.6)
40
+ mime-types (1.19)
41
+ multi_json (1.4.0)
41
42
  posix-spawn (0.3.6)
42
- racc (1.4.7)
43
- rake (0.9.2.2)
43
+ racc (1.4.9)
44
+ rake (10.0.2)
44
45
  rexical (1.0.5)
45
46
  sqlite3 (1.3.6)
46
- turn (0.9.3)
47
+ turn (0.9.6)
47
48
  ansi
48
- tzinfo (0.3.33)
49
- yard (0.7.5)
49
+ tzinfo (0.3.35)
50
+ yard (0.8.3)
50
51
 
51
52
  PLATFORMS
52
53
  ruby
@@ -1,3 +1,9 @@
1
+ == Version 0.6.6
2
+ === Enhancements
3
+ - cmake: Make it possible to set option not starting with -D
4
+ ATTENTION: Requires changes to the recipe
5
+ - build-systems: Make it possible to unset options.
6
+
1
7
  == Version 0.6.5
2
8
  === Enhancements
3
9
  - Archive Buildsystem now supports bzip2 compressed archives.
@@ -1,2 +1,12 @@
1
1
  cmd files <doesnotexist>
2
2
  > Unhandled exception
3
+
4
+ archive: tar.bz2 not supported
5
+
6
+ use environment not_existing gives no error, warning
7
+
8
+ custom build-system: reconfigure not supported
9
+
10
+
11
+ <sreich> mjansen: only thing i ran into that i'd like would be a way to force a cmake switch for one module temporarily
12
+ <sreich> e.g. kde-build build something -DCMAKE_CXX_COMPILER
@@ -69,26 +69,28 @@ def option_hash
69
69
  end
70
70
  # If this build-system declaration is not active we are done
71
71
  if active?
72
- return parent_option_hash.merge( @options )
72
+ rc = parent_option_hash.merge( @options )
73
73
  else
74
- return parent_option_hash
74
+ rc = parent_option_hash
75
75
  end
76
+ rc.delete_if { |k, v| v.nil? }
76
77
  end
77
78
 
78
79
  def option_names
79
80
  # Check the parents names (if any)
80
81
  par = parent
81
82
  if par
82
- parent_option_names = par.option_names
83
+ parent_option_hash = par.option_hash
83
84
  else
84
- parent_option_names = []
85
+ parent_option_hash = {}
85
86
  end
86
87
  # If this build-system declaration is not active we are done
87
88
  if active?
88
- return ( @options.keys + parent_option_names ).uniq
89
+ rc = parent_option_hash.merge( @options )
89
90
  else
90
- return parent_option_names
91
+ rc = parent_option_hash
91
92
  end
93
+ return rc.keys
92
94
  end
93
95
 
94
96
  def to_s
@@ -104,6 +106,10 @@ def active?
104
106
  end
105
107
 
106
108
  def []( var )
109
+ # Check if the value is explicitly set to None
110
+ if @options.has_key?( var ) and @options[ var ].nil?
111
+ return "<unset>"
112
+ end
107
113
  # Get the parents value (if any)
108
114
  par = parent
109
115
  if par and par.option_set?( var )
@@ -102,7 +102,11 @@ def option_string
102
102
  arr = []
103
103
  option_names.each do |var|
104
104
  val = self[var]
105
- arr << "-D#{var}='#{val}'"
105
+ if var.start_with? 'D'
106
+ arr << "-#{var}='#{val}'"
107
+ else
108
+ arr << "-#{var}'#{val}'"
109
+ end
106
110
  end
107
111
  arr.join(" ")
108
112
  end
@@ -72,8 +72,7 @@ def make( target = nil )
72
72
 
73
73
  def option_string
74
74
  arr = []
75
- option_names.each do |var|
76
- val = self[var]
75
+ option_hash.each do |var, val|
77
76
  arr << "#{var}='#{val}'"
78
77
  end
79
78
  arr.join(" ")
@@ -116,6 +116,7 @@ rule
116
116
  :BUILD_SYSTEM prepend { [:PREPEND, text]; }
117
117
  :BUILD_SYSTEM append { [:APPEND, text]; }
118
118
  :BUILD_SYSTEM set { [:SET, text]; }
119
+ :BUILD_SYSTEM unset { [:UNSET, text]; }
119
120
  :BUILD_SYSTEM inplace { [:INPLACE, text]; }
120
121
  :BUILD_SYSTEM end\b { @state = @states.pop; [ :END, text ]; }
121
122
  # COMMON
@@ -48,6 +48,7 @@ class BuildTool::Cfg::Parser < BuildTool::Cfg::Lexer
48
48
  token TEXT
49
49
  token TOKEN
50
50
  token TRACK
51
+ token UNSET
51
52
  token URL
52
53
  token USE
53
54
  token USER
@@ -162,7 +163,8 @@ rule
162
163
  ;
163
164
 
164
165
  build_system_statement
165
- : OPTION identifier STRING { result = BuildSystemOptionNode.new( val[1..-1] ); }
166
+ : OPTION identifier UNSET { result = BuildSystemOptionNode.new( val[1..-1] ); }
167
+ | OPTION identifier STRING { result = BuildSystemOptionNode.new( val[1..-1] ); }
166
168
  | OPTION identifier SET STRING { result = BuildSystemOptionNode.new( val[1..-1] ); }
167
169
  | OPTION identifier PREPEND STRING { result = BuildSystemOptionNode.new( val[1..-1] ); }
168
170
  | OPTION identifier APPEND STRING { result = BuildSystemOptionNode.new( val[1..-1] ); }
@@ -65,7 +65,11 @@ def visit_BuildSystemOptionNode( node )
65
65
  else raise StandardError, "Unexpected token #{node.values[1]}!"
66
66
  end
67
67
  when 2
68
- @build_system.set( node.values[0], node.values[1] )
68
+ case node.values[1]
69
+ when 'unset'; @build_system.set( node.values[0], nil )
70
+ else
71
+ @build_system.set( node.values[0], node.values[1] )
72
+ end
69
73
  else
70
74
  raise StandardError, "Unexpected number of tokens #{node.values.length} #{node.values.join(', ')}"
71
75
  end
@@ -288,11 +288,15 @@ def state_char
288
288
  def last_success
289
289
  return @last_success if @last_success
290
290
  lastlog = BuildTool::History::CommandLog.last_success_by_module( name )
291
- if lastlog.nil?
292
- @last_success = DateTime.new
293
- else
291
+
292
+ if not lastlog.nil?
294
293
  @last_success = lastlog[:finished_at]
295
294
  end
295
+
296
+ if @last_success.nil?
297
+ @last_success = DateTime.new
298
+ end
299
+
296
300
  return @last_success
297
301
  end
298
302
 
@@ -26,5 +26,5 @@ def recipe_version()
26
26
 
27
27
  end
28
28
 
29
- VERSION = Version.new( 0, 6, 5 )
29
+ VERSION = Version.new( 0, 6, 6 )
30
30
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-tool
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 5
10
- version: 0.6.5
9
+ - 6
10
+ version: 0.6.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Jansen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-03 00:00:00 +02:00
18
+ date: 2012-12-04 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency