autobuild 1.2.10 → 1.2.11
Sign up to get free protection for your applications and to get access to all the features.
- data/Changes.txt +8 -0
- data/lib/autobuild.rb +1 -1
- data/lib/autobuild/packages/cmake.rb +36 -2
- metadata +3 -3
data/Changes.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
== Version 1.2.11
|
2
|
+
* fix small issues with CMake
|
3
|
+
- CMake 2.6 can convert option values between what the user provides (for
|
4
|
+
instance YES) and what is written in the cache (ON). Take that into account
|
5
|
+
- if the first configuration fails, no Makefile is generated but
|
6
|
+
a CMakeCache.txt is there. Autobuild was failing in that situation and will
|
7
|
+
now handle it gracefully.
|
8
|
+
|
1
9
|
== Version 1.2.10
|
2
10
|
* small fix
|
3
11
|
logs are sorted into subdirectories, following the structure of the
|
data/lib/autobuild.rb
CHANGED
@@ -45,23 +45,57 @@ module Autobuild
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
CMAKE_EQVS = {
|
49
|
+
'ON' => 'ON',
|
50
|
+
'YES' => 'ON',
|
51
|
+
'OFF' => 'OFF',
|
52
|
+
'NO' => 'OFF'
|
53
|
+
}
|
54
|
+
def equivalent_option_value?(old, new)
|
55
|
+
if old == new
|
56
|
+
true
|
57
|
+
else
|
58
|
+
old = CMAKE_EQVS[old]
|
59
|
+
new = CMAKE_EQVS[new]
|
60
|
+
if old && new
|
61
|
+
old == new
|
62
|
+
else
|
63
|
+
false
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
48
68
|
def prepare
|
49
69
|
super
|
50
70
|
|
51
71
|
all_defines = defines.dup
|
52
72
|
all_defines['CMAKE_INSTALL_PREFIX'] = prefix
|
53
73
|
|
74
|
+
if !File.exists?( File.join(builddir, 'Makefile') )
|
75
|
+
FileUtils.rm configurestamp
|
76
|
+
end
|
77
|
+
|
54
78
|
if File.exists?(configurestamp)
|
55
79
|
cache = File.read(configurestamp)
|
56
80
|
did_change = all_defines.any? do |name, value|
|
57
81
|
cache_line = cache.find do |line|
|
58
82
|
line =~ /^#{name}:/
|
59
83
|
end
|
60
|
-
|
84
|
+
|
85
|
+
value = value.to_s
|
86
|
+
old_value = cache_line.split("=")[1].chomp if cache_line
|
87
|
+
if !old_value || !equivalent_option_value?(old_value, value)
|
88
|
+
if Autobuild.debug
|
89
|
+
puts "option '#{name}' changed value: '#{old_value}' => '#{value}'"
|
90
|
+
end
|
91
|
+
|
61
92
|
true
|
62
93
|
end
|
63
94
|
end
|
64
95
|
if did_change
|
96
|
+
if Autobuild.debug
|
97
|
+
puts "CMake configuration changed, forcing a reconfigure"
|
98
|
+
end
|
65
99
|
FileUtils.rm configurestamp
|
66
100
|
end
|
67
101
|
end
|
@@ -89,7 +123,7 @@ module Autobuild
|
|
89
123
|
# Do the build in builddir
|
90
124
|
def build
|
91
125
|
Dir.chdir(builddir) do
|
92
|
-
if always_reconfigure
|
126
|
+
if always_reconfigure || !File.file?('Makefile')
|
93
127
|
Subprocess.run(name, 'build', Autobuild.tool(:cmake), '.')
|
94
128
|
end
|
95
129
|
Subprocess.run(name, 'build', Autobuild.tool(:make))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autobuild
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-03 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
53
|
+
version: 1.12.1
|
54
54
|
version:
|
55
55
|
description: This work is licensed under the GPLv2 license. See License.txt for details == What's autobuild ? Autobuild imports, configures, builds and installs various kinds of software packages. It can be used in software development to make sure that nothing is broken in the build process of a set of packages, or can be used as an automated installation tool. Autobuild config files are Ruby scripts which configure rake to * imports the package from a SCM or (optionnaly) updates it * configures it. This phase can handle code generation, configuration (for instance for autotools-based packages), ... * build * install It takes the dependencies between packages into account in its build process, updates the needed environment variables (+PKG_CONFIG_PATH+, +PATH+, +LD_LIBRARY_PATH+, ...)
|
56
56
|
email: sylvain.joyeux@m4x.org
|