-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibs.autobuild
154 lines (128 loc) · 4.44 KB
/
libs.autobuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# old_navigation packages
# Add a bundle package and create in it a "scripts" directory
bundle_package 'bundles/old_navigation' do |pkg|
Autoproj.env_add_path 'RUBYLIB', File.join(pkg.srcdir, "scripts")
end
import_package 'learning/maps'
cmake_package 'learning/performance_map'
# Declaration of how the package "learning/libcmaes" should be configured,
# built and installed
import_package "learning/libcmaes" do |pkg|
# pkg.depends_on should only be used for dynamic dependencies i.e.
# dependencies that are dependent on build options. Static dependencies
# should be defined in the package’s manifest.xml The manifest has to be in
# the manifests folder under the same folder structure where the package is
# lodaded (in this case under learning)
def pkg.prepare
#Executed on update phase
super
# These are the commands to run to configure the library for building.
in_dir("#{srcdir}") do
# The output will be stored in a file with appendix the first
# string of the following command. In this case "autogen".
# The second and posterior parameters define the command to execute
# for the configuration
run("autogen", "./autogen.sh")
run("configure", "./configure", "--prefix=#{Autobuild.prefix}",
"--includedir=#{Autobuild.prefix}/include")
message "Configured %s"
end
end
def pkg.build
# These are the commands that to build the library.
in_dir("#{srcdir}") do
run("build", Autobuild.tool(:make))
end
message "Built %s"
end
def pkg.install
# These are the commands to install the library.
in_dir("#{srcdir}") do
run("install", Autobuild.tool(:make), "install")
end
message "Installed %s"
end
end
import_package "learning/nlopt" do |pkg|
def pkg.prepare
super
in_dir("#{srcdir}") do
run("configure", "./configure", "--prefix=#{Autobuild.prefix}",
"--includedir=#{Autobuild.prefix}/include/nlopt", "--with-cxx",
"--enable-shared", "--without-python", "--without-matlab",
"--without-octave")
message "Configured %s"
end
end
def pkg.build
in_dir("#{srcdir}") do
run("build", Autobuild.tool(:make))
message "Built %s"
end
end
def pkg.install
in_dir("#{srcdir}") do
run("install", Autobuild.tool(:make), "install")
message "Installed %s"
end
end
end
import_package "learning/sferes2" do |pkg|
def pkg.prepare
super
in_dir("#{srcdir}") do
run("configure", "./waf", "configure")
run("rock-configure", "./waf","configure",
"--prefix=#{Autobuild.prefix}", "--out=#{Autobuild.prefix}/lib")
message "Configured %s"
end
end
def pkg.build
in_dir("#{srcdir}") do
run("build", "./waf","build")
in_dir("#{srcdir}/sferes") do
run("cp-headers",
"find . -name '*.h*' | cpio -pdm #{Autobuild.prefix}/include/sferes")
message "headers copied %s"
end
message "Built %s"
end
end
def pkg.install
in_dir("#{srcdir}") do
run("install", "./waf", "install")
message "Installed %s"
end
end
end
import_package "learning/limbo" do |pkg|
def pkg.prepare
super
in_dir("#{srcdir}") do
run("configure", "./waf", "configure")
run("rock-configure", "./waf","configure",
"--prefix=#{Autobuild.prefix}",
"--out=#{Autobuild.prefix}/lib/limbo",
"--libcmaes=#{Autobuild.prefix}", "--nlopt=#{Autobuild.prefix}",
"--sferes=#{Autobuild.prefix}/include")
message "Configured %s"
end
end
def pkg.build
in_dir("#{srcdir}") do
run("build", "./waf","build")
in_dir("#{srcdir}/src") do
run("cp-headers",
"find . -name '*.h*' | cpio -pdm #{Autobuild.prefix}/include/limbo")
message "headers copied %s"
end
message "Built %s"
end
end
def pkg.install
in_dir("#{srcdir}") do
run("install", "./waf", "install")
message "Installed %s"
end
end
end