build-tool 0.3 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ == 0.3.1
2
+ - Main Features
3
+ - BuildSystem: QMake support
4
+ - Bugfixes
5
+ - Fix the gc command
6
+ - Fix the installation comment on gem update/install
7
+
8
+
1
9
  == 0.3
2
10
  - Main Features
3
11
  * Split the recipes from the gem
data/Manifest.txt CHANGED
@@ -15,6 +15,7 @@ lib/build-tool/build-system/cmake.rb
15
15
  lib/build-tool/build-system/custom.rb
16
16
  lib/build-tool/build-system/kdel10n.rb
17
17
  lib/build-tool/build-system/none.rb
18
+ lib/build-tool/build-system/qmake.rb
18
19
  lib/build-tool/build-system/qt.rb
19
20
  lib/build-tool/cfg/lexer.rb
20
21
  lib/build-tool/cfg/lexer.rex
data/Rakefile CHANGED
@@ -14,8 +14,9 @@ Hoe.spec( 'build-tool' ) do |build_tool|
14
14
  build_tool.developer 'Michael Jansen', 'info@michael-jansen.biz'
15
15
  build_tool.post_install_message = <<-EOS
16
16
  To start with build-tool try the following commands:
17
+ > build-tool recipe add git://gitorious.org/build-tool/kde-trunk-recipe.git kde
17
18
  > build-tool recipe list
18
- > build-tool recipe install <recipe>
19
+ > build-tool recipe install kde
19
20
 
20
21
  For documentation see http://michael-jansen.biz/build-tool
21
22
 
data/lib/build-tool.rb CHANGED
@@ -2,6 +2,6 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module BuildTool
5
- VERSION = '0.3'
5
+ VERSION = '0.3.1'
6
6
  end
7
7
 
@@ -0,0 +1,110 @@
1
+ require 'mj/tools/subprocess'
2
+ require 'build-tool/build-system/base'
3
+
4
+ module BuildTool; module BuildSystem
5
+
6
+ #
7
+ # QMake build system.
8
+ #
9
+ class QMake < Base
10
+
11
+ include MJ::Tools::SubProcess
12
+
13
+ class MakeError < BuildTool::Error; end
14
+ class QMakeError < BuildTool::Error; end
15
+
16
+ def initialize( *args )
17
+ super( *args )
18
+ end
19
+
20
+ #
21
+ ### ATTRIBUTES
22
+ #
23
+
24
+ # Check if the module is configured
25
+ def configured?
26
+ Pathname.new( build_directory ).join( 'Makefile' ).exist?
27
+ end
28
+
29
+ def name
30
+ "qmake"
31
+ end
32
+
33
+ #
34
+ ### METHODS
35
+ #
36
+
37
+ def[]( var )
38
+ if @options.has_key? var
39
+ return @options[var]
40
+ end
41
+
42
+ # case var
43
+
44
+
45
+ # else
46
+ # *TODO* raise correct exception
47
+ raise NotImplementedError
48
+
49
+ # end
50
+ end
51
+
52
+ def[]=( var, val )
53
+ @options[var] = val
54
+ end
55
+
56
+ # Configure the module
57
+ def reconfigure()
58
+ configure
59
+ end
60
+
61
+ # Execute a qmake command in the context of the build directory
62
+ def qmake( command, wd = build_directory )
63
+ rc = self.class.execute "qmake #{command}", wd, env
64
+ if rc != 0
65
+ raise QMakeError, "qmake failed with error #{rc}!"
66
+ end
67
+ rc
68
+ end
69
+
70
+ def configure
71
+ check_build_directory( true )
72
+ opt = option_string
73
+ opt += " PREFIX=#{install_prefix.to_s}" if install_prefix
74
+ rc = qmake "#{source_directory}/*.pro #{opt}"
75
+ rc
76
+ end
77
+
78
+ def do_make( target = nil )
79
+ rc = self.class.execute( "make #{target ? target : "" }", build_directory, self.module.environment.values )
80
+ if rc != 0
81
+ raise MakeError, "make #{target || "" } failed with error code #{rc}";
82
+ end
83
+ rc
84
+ end
85
+
86
+ def install( fast )
87
+ make( "install" )
88
+ end
89
+
90
+ def install_fast_supported?
91
+ false
92
+ end
93
+
94
+ def make( target = nil )
95
+ do_make( target )
96
+ end
97
+
98
+ def option_string
99
+ arr = []
100
+ @options.each do |var, val|
101
+ arr << "#{var}='#{val}'"
102
+ end
103
+ arr.join(" ")
104
+ end
105
+
106
+ end # class QMake
107
+
108
+
109
+ end; end # module BuildTool::BuildSystem
110
+
@@ -37,8 +37,8 @@ module BuildTool; module Commands;
37
37
  if $noop
38
38
  say "rm -rf #{cmd.logdir}"
39
39
  else
40
- debug("Removing #{cmd.logdir}");
41
- File.rm_rf( cmd.logdir ) if File.exist?( cmd.logdir )
40
+ logger.debug("Removing #{cmd.logdir}");
41
+ FileUtils.rm_rf( cmd.logdir ) if File.exist?( cmd.logdir )
42
42
  end
43
43
  end
44
44
  cmd.delete
@@ -7,7 +7,7 @@ module BuildTool; module Commands; module Recipes
7
7
  #
8
8
  # BuildCommand
9
9
  #
10
- class Fetch < Standard
10
+ class Incoming < Standard
11
11
 
12
12
  name "incoming"
13
13
  description "Show the incoming changes to the recipe from the repository."
@@ -41,7 +41,7 @@ module BuildTool; module Commands; module Recipes
41
41
 
42
42
  if @fetch
43
43
  say "Fetching"
44
- repo.fetch()
44
+ repo.fetch("origin")
45
45
  end
46
46
 
47
47
  repo.log("HEAD..origin/master").each do |line|
@@ -10,6 +10,7 @@ require 'build-tool/build-system/autoconf'
10
10
  require 'build-tool/build-system/custom'
11
11
  require 'build-tool/build-system/none'
12
12
  require 'build-tool/build-system/kdel10n'
13
+ require 'build-tool/build-system/qmake'
13
14
 
14
15
 
15
16
  module BuildTool
metadata CHANGED
@@ -1,12 +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: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- version: "0.3"
9
+ - 1
10
+ version: 0.3.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Michael Jansen
@@ -35,7 +36,7 @@ cert_chain:
35
36
  M3zOaQdtTmiQPBqNIsE=
36
37
  -----END CERTIFICATE-----
37
38
 
38
- date: 2010-06-24 00:00:00 +02:00
39
+ date: 2010-07-09 00:00:00 +02:00
39
40
  default_executable:
40
41
  dependencies:
41
42
  - !ruby/object:Gem::Dependency
@@ -173,12 +174,12 @@ dependencies:
173
174
  requirements:
174
175
  - - ">="
175
176
  - !ruby/object:Gem::Version
176
- hash: 23
177
+ hash: 21
177
178
  segments:
178
179
  - 2
179
180
  - 6
180
- - 0
181
- version: 2.6.0
181
+ - 1
182
+ version: 2.6.1
182
183
  type: :development
183
184
  version_requirements: *id009
184
185
  description: |-
@@ -214,6 +215,7 @@ files:
214
215
  - lib/build-tool/build-system/custom.rb
215
216
  - lib/build-tool/build-system/kdel10n.rb
216
217
  - lib/build-tool/build-system/none.rb
218
+ - lib/build-tool/build-system/qmake.rb
217
219
  - lib/build-tool/build-system/qt.rb
218
220
  - lib/build-tool/cfg/lexer.rb
219
221
  - lib/build-tool/cfg/lexer.rex
@@ -293,7 +295,7 @@ has_rdoc: true
293
295
  homepage: http://michael-jansen.biz/build-tool
294
296
  licenses: []
295
297
 
296
- post_install_message: " To start with build-tool try the following commands:\n > build-tool recipe list\n > build-tool recipe install <recipe>\n\n For documentation see http://michael-jansen.biz/build-tool\n\n"
298
+ post_install_message: " To start with build-tool try the following commands:\n > build-tool recipe add git://gitorious.org/build-tool/kde-trunk-recipe.git kde\n > build-tool recipe list\n > build-tool recipe install kde\n\n For documentation see http://michael-jansen.biz/build-tool\n\n"
297
299
  rdoc_options:
298
300
  - --main
299
301
  - README.txt
metadata.gz.sig CHANGED
Binary file