r2corba 1.6.1-x64-mingw-ucrt
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGES +173 -0
- data/LICENSE +59 -0
- data/README.rdoc +62 -0
- data/THANKS +54 -0
- data/bin/r2corba +8 -0
- data/bin/r2corba.bat +20 -0
- data/bin/ridlc +11 -0
- data/bin/ridlc.bat +23 -0
- data/bin/rins +7 -0
- data/bin/rins.bat +19 -0
- data/ext/.keep +0 -0
- data/lib/corba/cbase/IORMap.rb +32 -0
- data/lib/corba/cbase/ORB.rb +239 -0
- data/lib/corba/cbase/Request.rb +133 -0
- data/lib/corba/cbase/Streams.rb +128 -0
- data/lib/corba/cbase/Stub.rb +18 -0
- data/lib/corba/cbase/Typecode.rb +440 -0
- data/lib/corba/cbase/Values.rb +130 -0
- data/lib/corba/cbase/exception.rb +67 -0
- data/lib/corba/cbase/poa.rb +22 -0
- data/lib/corba/cbase/policies.rb +77 -0
- data/lib/corba/cbase/post_require.rb +13 -0
- data/lib/corba/cbase/require.rb +36 -0
- data/lib/corba/cmds/base.rb +84 -0
- data/lib/corba/cmds/test.rb +29 -0
- data/lib/corba/common/Any.rb +91 -0
- data/lib/corba/common/IDL.rb +100 -0
- data/lib/corba/common/ORB.rb +367 -0
- data/lib/corba/common/Object.rb +211 -0
- data/lib/corba/common/Request.rb +19 -0
- data/lib/corba/common/Servant.rb +107 -0
- data/lib/corba/common/Struct.rb +21 -0
- data/lib/corba/common/Stub.rb +78 -0
- data/lib/corba/common/Typecode.rb +1147 -0
- data/lib/corba/common/Union.rb +60 -0
- data/lib/corba/common/Values.rb +92 -0
- data/lib/corba/common/const.rb +21 -0
- data/lib/corba/common/exception.rb +68 -0
- data/lib/corba/common/require.rb +34 -0
- data/lib/corba/common/version.rb +21 -0
- data/lib/corba/idl/BiDirPolicyC.rb +62 -0
- data/lib/corba/idl/CosNamingC.rb +460 -0
- data/lib/corba/idl/CosNamingS.rb +308 -0
- data/lib/corba/idl/IDL.rb +20 -0
- data/lib/corba/idl/IORTable.pidl +61 -0
- data/lib/corba/idl/IORTableC.rb +116 -0
- data/lib/corba/idl/MessagingC.rb +903 -0
- data/lib/corba/idl/POAC.rb +929 -0
- data/lib/corba/idl/TAO_Ext.pidl +45 -0
- data/lib/corba/idl/TAO_ExtC.rb +178 -0
- data/lib/corba/idl/r2c_orb.rb +571 -0
- data/lib/corba/idl/require.rb +19 -0
- data/lib/corba/jbase/Any.rb +274 -0
- data/lib/corba/jbase/IORMap.rb +35 -0
- data/lib/corba/jbase/ORB.rb +111 -0
- data/lib/corba/jbase/Object.rb +98 -0
- data/lib/corba/jbase/Request.rb +225 -0
- data/lib/corba/jbase/Servant.rb +247 -0
- data/lib/corba/jbase/ServerRequest.rb +127 -0
- data/lib/corba/jbase/Streams.rb +734 -0
- data/lib/corba/jbase/Stub.rb +37 -0
- data/lib/corba/jbase/Typecode.rb +520 -0
- data/lib/corba/jbase/Values.rb +174 -0
- data/lib/corba/jbase/exception.rb +106 -0
- data/lib/corba/jbase/poa.rb +228 -0
- data/lib/corba/jbase/policies.rb +299 -0
- data/lib/corba/jbase/post_require.rb +13 -0
- data/lib/corba/jbase/require.rb +92 -0
- data/lib/corba/naming.rb +13 -0
- data/lib/corba/naming_service.rb +14 -0
- data/lib/corba/poa.rb +14 -0
- data/lib/corba/policies.rb +17 -0
- data/lib/corba/require.rb +16 -0
- data/lib/corba/svcs/ins/cos_naming.rb +432 -0
- data/lib/corba/svcs/ins/ins.rb +525 -0
- data/lib/corba/svcs/ins/naming_service.rb +118 -0
- data/lib/corba.rb +15 -0
- data/lib/ridlbe/ruby/config.rb +340 -0
- data/lib/ridlbe/ruby/orb.pidlc +0 -0
- data/lib/ridlbe/ruby/require.rb +15 -0
- data/lib/ridlbe/ruby/walker.rb +1605 -0
- data/mkrf_conf_bingem.rb +149 -0
- data/rakelib/bin.rake +79 -0
- data/rakelib/bin.rb +145 -0
- data/rakelib/build.rake +87 -0
- data/rakelib/config.rake +51 -0
- data/rakelib/config.rb +542 -0
- data/rakelib/ext.rake +183 -0
- data/rakelib/ext.rb +277 -0
- data/rakelib/ext_r2tao.rb +208 -0
- data/rakelib/gem.rake +251 -0
- data/rakelib/gem.rb +145 -0
- data/rakelib/package.rake +25 -0
- data/rakelib/test.rake +22 -0
- data/test/BiDirectional/Test.idl +33 -0
- data/test/BiDirectional/client.rb +131 -0
- data/test/BiDirectional/run_test.rb +67 -0
- data/test/BiDirectional/server.rb +167 -0
- data/test/CORBA_Services/Naming/BindingIterator/Test.idl +26 -0
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +120 -0
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +81 -0
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +108 -0
- data/test/CORBA_Services/Naming/Corbaname/Test.idl +26 -0
- data/test/CORBA_Services/Naming/Corbaname/client.rb +84 -0
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +87 -0
- data/test/CORBA_Services/Naming/Corbaname/server.rb +134 -0
- data/test/CORBA_Services/Naming/Simple/Test.idl +26 -0
- data/test/CORBA_Services/Naming/Simple/client.rb +83 -0
- data/test/CORBA_Services/Naming/Simple/run_test.rb +81 -0
- data/test/CORBA_Services/Naming/Simple/server.rb +108 -0
- data/test/Collocation/Diamond.idl +38 -0
- data/test/Collocation/run_test.rb +51 -0
- data/test/Collocation/test.rb +201 -0
- data/test/Connect_Timeout/Test.idl +26 -0
- data/test/Connect_Timeout/client.rb +109 -0
- data/test/Connect_Timeout/run_test.rb +51 -0
- data/test/DII/Test.idl +26 -0
- data/test/DII/client.rb +114 -0
- data/test/DII/run_test.rb +68 -0
- data/test/DII/server.rb +94 -0
- data/test/DSI/Test.idl +26 -0
- data/test/DSI/client.rb +65 -0
- data/test/DSI/run_test.rb +68 -0
- data/test/DSI/server.rb +105 -0
- data/test/Exceptions/Test.idl +47 -0
- data/test/Exceptions/client.rb +117 -0
- data/test/Exceptions/run_test.rb +68 -0
- data/test/Exceptions/server.rb +130 -0
- data/test/Hello/Test.idl +26 -0
- data/test/Hello/client.rb +77 -0
- data/test/Hello/run_test.rb +70 -0
- data/test/Hello/server.rb +94 -0
- data/test/IDL_Test/Test.idl +116 -0
- data/test/IDL_Test/Test_inc.idl +17 -0
- data/test/IDL_Test/client.rb +103 -0
- data/test/IDL_Test/run_test.rb +68 -0
- data/test/IDL_Test/server.rb +103 -0
- data/test/IORMap/Test.idl +26 -0
- data/test/IORMap/client.rb +72 -0
- data/test/IORMap/run_test.rb +68 -0
- data/test/IORMap/server.rb +113 -0
- data/test/IORTable/Test.idl +26 -0
- data/test/IORTable/client.rb +74 -0
- data/test/IORTable/run_test.rb +68 -0
- data/test/IORTable/server.rb +129 -0
- data/test/Implicit_Conversion/Test.idl +30 -0
- data/test/Implicit_Conversion/client.rb +112 -0
- data/test/Implicit_Conversion/run_test.rb +68 -0
- data/test/Implicit_Conversion/server.rb +98 -0
- data/test/Multi_Threading/Multiple_ORB/Test.idl +26 -0
- data/test/Multi_Threading/Multiple_ORB/client.rb +81 -0
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +70 -0
- data/test/Multi_Threading/Multiple_ORB/server.rb +107 -0
- data/test/Multi_Threading/Simple/Test.idl +26 -0
- data/test/Multi_Threading/Simple/client.rb +92 -0
- data/test/Multi_Threading/Simple/run_test.rb +68 -0
- data/test/Multi_Threading/Simple/server.rb +117 -0
- data/test/Multi_Threading/Threads/Test.idl +27 -0
- data/test/Multi_Threading/Threads/client.rb +77 -0
- data/test/Multi_Threading/Threads/run_test.rb +75 -0
- data/test/Multi_Threading/Threads/server.rb +116 -0
- data/test/Multi_Threading/Threads/watchdog.rb +87 -0
- data/test/Multiple_Servant_Interfaces/Test.idl +33 -0
- data/test/Multiple_Servant_Interfaces/client.rb +69 -0
- data/test/Multiple_Servant_Interfaces/run_test.rb +68 -0
- data/test/Multiple_Servant_Interfaces/server.rb +101 -0
- data/test/Nil/Test.idl +26 -0
- data/test/Nil/run_test.rb +51 -0
- data/test/Nil/test.rb +80 -0
- data/test/OBV/AbstractInterface/client.rb +178 -0
- data/test/OBV/AbstractInterface/run_test.rb +68 -0
- data/test/OBV/AbstractInterface/server.rb +149 -0
- data/test/OBV/AbstractInterface/test.idl +52 -0
- data/test/OBV/Custom/OBV.idl +18 -0
- data/test/OBV/Custom/OBV_impl.rb +41 -0
- data/test/OBV/Custom/client.rb +85 -0
- data/test/OBV/Custom/run_test.rb +68 -0
- data/test/OBV/Custom/server.rb +99 -0
- data/test/OBV/Simple/OBV.idl +15 -0
- data/test/OBV/Simple/OBV_impl.rb +26 -0
- data/test/OBV/Simple/client.rb +85 -0
- data/test/OBV/Simple/run_test.rb +68 -0
- data/test/OBV/Simple/server.rb +99 -0
- data/test/OBV/Simple_Event/Event.idl +15 -0
- data/test/OBV/Simple_Event/Event_impl.rb +26 -0
- data/test/OBV/Simple_Event/client.rb +85 -0
- data/test/OBV/Simple_Event/run_test.rb +68 -0
- data/test/OBV/Simple_Event/server.rb +99 -0
- data/test/OBV/Supports/client.rb +115 -0
- data/test/OBV/Supports/run_test.rb +68 -0
- data/test/OBV/Supports/server.rb +102 -0
- data/test/OBV/Supports/supports.idl +32 -0
- data/test/OBV/Supports/supports_impl.rb +59 -0
- data/test/OBV/Tree/client.rb +115 -0
- data/test/OBV/Tree/run_test.rb +68 -0
- data/test/OBV/Tree/server.rb +116 -0
- data/test/OBV/Tree/test.idl +31 -0
- data/test/OBV/Truncatable/Extra.idl +26 -0
- data/test/OBV/Truncatable/Truncatable.idl +105 -0
- data/test/OBV/Truncatable/Truncatable_impl.rb +85 -0
- data/test/OBV/Truncatable/client.rb +278 -0
- data/test/OBV/Truncatable/run_test.rb +68 -0
- data/test/OBV/Truncatable/server.rb +88 -0
- data/test/OBV/ValueBox/client.rb +497 -0
- data/test/OBV/ValueBox/run_test.rb +68 -0
- data/test/OBV/ValueBox/server.rb +271 -0
- data/test/OBV/ValueBox/valuebox.idl +101 -0
- data/test/OBV/ValueBox/vb_basic.idl +75 -0
- data/test/OBV/ValueBox/vb_struct.idl +68 -0
- data/test/OBV/ValueBox/vb_union.idl +21 -0
- data/test/Object/Test.idl +26 -0
- data/test/Object/client.rb +111 -0
- data/test/Object/run_test.rb +68 -0
- data/test/Object/server.rb +125 -0
- data/test/POA/Test.idl +27 -0
- data/test/POA/run_test.rb +51 -0
- data/test/POA/test.rb +111 -0
- data/test/Param_Test/Test.idl +182 -0
- data/test/Param_Test/client.rb +276 -0
- data/test/Param_Test/run_test.rb +68 -0
- data/test/Param_Test/server.rb +295 -0
- data/test/Performance/Simple/Test.idl +26 -0
- data/test/Performance/Simple/client.rb +89 -0
- data/test/Performance/Simple/run_test.rb +68 -0
- data/test/Performance/Simple/server.rb +94 -0
- data/test/Policies/Test.idl +26 -0
- data/test/Policies/run_test.rb +51 -0
- data/test/Policies/test.rb +142 -0
- data/test/Timeout/client.rb +206 -0
- data/test/Timeout/run_test.rb +68 -0
- data/test/Timeout/server.rb +108 -0
- data/test/Timeout/test.idl +18 -0
- data/test/lib/assert.rb +41 -0
- data/test/lib/test.rb +546 -0
- data/test/test_runner.rb +191 -0
- metadata +318 -0
data/rakelib/config.rb
ADDED
@@ -0,0 +1,542 @@
|
|
1
|
+
#--------------------------------------------------------------------
|
2
|
+
# config.rb - build file
|
3
|
+
#
|
4
|
+
# Author: Martin Corino
|
5
|
+
#
|
6
|
+
# This program is free software; you can redistribute it and/or
|
7
|
+
# modify it under the terms of the R2CORBA LICENSE which is
|
8
|
+
# included with this program.
|
9
|
+
#
|
10
|
+
# Copyright (c) Remedy IT Expertise BV
|
11
|
+
#--------------------------------------------------------------------
|
12
|
+
|
13
|
+
require 'rbconfig'
|
14
|
+
require 'yaml'
|
15
|
+
require 'optparse'
|
16
|
+
|
17
|
+
require 'rake/clean'
|
18
|
+
|
19
|
+
require File.join(File.dirname(__FILE__), '../lib/corba/common/version')
|
20
|
+
|
21
|
+
=begin
|
22
|
+
|
23
|
+
Generic keys defaulted to RB_CONFIG value
|
24
|
+
================================================
|
25
|
+
bindir
|
26
|
+
libdir
|
27
|
+
datadir
|
28
|
+
mandir
|
29
|
+
sysconfdir
|
30
|
+
localstatedir
|
31
|
+
|
32
|
+
custom keys
|
33
|
+
===========
|
34
|
+
Generic
|
35
|
+
|
36
|
+
key default
|
37
|
+
--- ------
|
38
|
+
prefix nil
|
39
|
+
libruby File.join(RB_CONFIG['libdir'], 'ruby'),
|
40
|
+
librubyver RB_CONFIG['rubylibdir'],
|
41
|
+
librubyverarch RB_CONFIG['archdir'],
|
42
|
+
siteruby RB_CONFIG['sitedir'],
|
43
|
+
siterubyver RB_CONFIG['sitelibdir'],
|
44
|
+
siterubyverarch RB_CONFIG['sitearchdir'],
|
45
|
+
rbdir RB_CONFIG['siterubyver']
|
46
|
+
sodir RB_CONFIG['siterubyverarch']
|
47
|
+
|
48
|
+
MRI
|
49
|
+
|
50
|
+
key default
|
51
|
+
--- ------
|
52
|
+
makeprog 'make'
|
53
|
+
without-tao 'no'
|
54
|
+
aceroot nil
|
55
|
+
taoroot nil
|
56
|
+
mpcroot nil
|
57
|
+
aceinstdir $ACE_ROOT/lib || get_config[:sodir]
|
58
|
+
with-ipv6 'no'
|
59
|
+
with-ssl 'no'
|
60
|
+
sslroot '/usr'
|
61
|
+
with-debug 'no'
|
62
|
+
|
63
|
+
Java
|
64
|
+
|
65
|
+
key default
|
66
|
+
--- ------
|
67
|
+
without-jacorb false
|
68
|
+
jacorb_home ENV['JACORB_HOME']
|
69
|
+
=end
|
70
|
+
|
71
|
+
if (Rake::Version::MAJOR.to_i == 10 &&
|
72
|
+
((Rake::Version::MINOR.to_i == 4 && Rake::Version::BUILD.to_i >= 2) ||
|
73
|
+
Rake::Version::MINOR.to_i > 4)) || Rake::Version::MAJOR.to_i > 10
|
74
|
+
|
75
|
+
# patch Rake::Application with method to cleanup ARGV consuming
|
76
|
+
# all Rake options
|
77
|
+
class Rake::Application
|
78
|
+
|
79
|
+
def cleanup_args(argv = ARGV) # :nodoc:
|
80
|
+
return argv if options.r2corba_cleanup_done
|
81
|
+
|
82
|
+
_opt_backup = options
|
83
|
+
@options = OpenStruct.new
|
84
|
+
options.rakelib = ['rakelib']
|
85
|
+
options.trace_output = $stderr
|
86
|
+
|
87
|
+
begin
|
88
|
+
return OptionParser.new do |opts|
|
89
|
+
opts.banner = ''
|
90
|
+
opts.separator ''
|
91
|
+
|
92
|
+
standard_rake_options.each { |args| opts.on(*args) }
|
93
|
+
opts.environment('RAKEOPT')
|
94
|
+
end.parse!(argv)
|
95
|
+
ensure
|
96
|
+
@options = _opt_backup
|
97
|
+
@options.r2corba_cleanup_done = true
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
else
|
103
|
+
|
104
|
+
class Rake::Application
|
105
|
+
|
106
|
+
## noop for other Rake versions
|
107
|
+
def cleanup_args(argv = ARGV) # :nodoc:
|
108
|
+
argv
|
109
|
+
end
|
110
|
+
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
module R2CORBA
|
115
|
+
|
116
|
+
if defined? ::RbConfig
|
117
|
+
RB_CONFIG = ::RbConfig::CONFIG
|
118
|
+
else
|
119
|
+
RB_CONFIG = ::Config::CONFIG
|
120
|
+
end unless defined? RB_CONFIG
|
121
|
+
|
122
|
+
CFGKEYS = %w{prefix
|
123
|
+
bindir
|
124
|
+
libdir
|
125
|
+
datadir
|
126
|
+
mandir
|
127
|
+
sysconfdir
|
128
|
+
localstatedir
|
129
|
+
libruby
|
130
|
+
librubyver
|
131
|
+
librubyverarch
|
132
|
+
siteruby
|
133
|
+
siterubyver
|
134
|
+
siterubyverarch
|
135
|
+
rbdir
|
136
|
+
sodir}
|
137
|
+
|
138
|
+
RBDEFAULTS = %w{bindir
|
139
|
+
libdir
|
140
|
+
datadir
|
141
|
+
mandir
|
142
|
+
sysconfdir
|
143
|
+
localstatedir}
|
144
|
+
|
145
|
+
CONFIG = {
|
146
|
+
:libruby => File.join(RB_CONFIG['libdir'], 'ruby'),
|
147
|
+
:librubyver => RB_CONFIG['rubylibdir'],
|
148
|
+
:librubyverarch => RB_CONFIG['archdir'],
|
149
|
+
:siteruby => RB_CONFIG['sitedir'],
|
150
|
+
:siterubyver => RB_CONFIG['sitelibdir'],
|
151
|
+
:siterubyverarch => RB_CONFIG['sitearchdir'],
|
152
|
+
:rbdir => :siterubyver,
|
153
|
+
:sodir => :siterubyverarch,
|
154
|
+
}
|
155
|
+
|
156
|
+
if defined?(JRUBY_VERSION)
|
157
|
+
CFGKEYS.concat(%w{without-jacorb jacorb_home})
|
158
|
+
CONFIG.merge!({
|
159
|
+
:'without-jacorb' => false,
|
160
|
+
:jacorb_home => ENV['JACORB_HOME'] || ''
|
161
|
+
})
|
162
|
+
BUILD_CFG = '.jrconfig'
|
163
|
+
else
|
164
|
+
CFGKEYS.concat(%w{makeprog without-tao aceroot taoroot mpcroot aceinstdir with-ipv6 with-ssl sslroot with-debug})
|
165
|
+
CONFIG.merge!({
|
166
|
+
:makeprog => 'make',
|
167
|
+
:'without-tao' => false,
|
168
|
+
:aceroot => ENV['ACE_ROOT'] || '',
|
169
|
+
:taoroot => ENV['TAO_ROOT'] || '',
|
170
|
+
:mpcroot => ENV['MPC_ROOT'] || '',
|
171
|
+
:aceinstdir => '',
|
172
|
+
:'with-ipv6' => false,
|
173
|
+
:'with-ssl' => false,
|
174
|
+
:sslroot => ENV['SSL_ROOT'] || (RUBY_PLATFORM =~ /mingw/ ? '' : '/usr'),
|
175
|
+
:'with-debug' => false,
|
176
|
+
})
|
177
|
+
BUILD_CFG = '.rconfig'
|
178
|
+
end
|
179
|
+
|
180
|
+
module AccessMethods
|
181
|
+
def get_config(key)
|
182
|
+
v = R2CORBA::CONFIG.has_key?(key.to_sym) ? R2CORBA::CONFIG[key.to_sym] : (RBDEFAULTS.include?(key.to_s) ? RB_CONFIG[key.to_s] : nil)
|
183
|
+
v = R2CORBA::CONFIG[v] while Symbol === v && R2CORBA::CONFIG.has_key?(v)
|
184
|
+
v
|
185
|
+
end
|
186
|
+
|
187
|
+
def set_config(key, val)
|
188
|
+
R2CORBA::CONFIG[key.to_sym] = val
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
module Config
|
193
|
+
|
194
|
+
@@ruby_ver = RUBY_VERSION.split('.').collect {|n| n.to_i}
|
195
|
+
|
196
|
+
def self.rb_ver_major
|
197
|
+
@@ruby_ver[0]
|
198
|
+
end
|
199
|
+
|
200
|
+
def self.rb_ver_minor
|
201
|
+
@@ruby_ver[1]
|
202
|
+
end
|
203
|
+
|
204
|
+
def self.rb_ver_release
|
205
|
+
@@ruby_ver[2]
|
206
|
+
end
|
207
|
+
|
208
|
+
@@is_win32 = RUBY_PLATFORM =~ /mingw/ ? true : false
|
209
|
+
@@is_win64 = (@@is_win32 && (RUBY_PLATFORM =~ /x64/)) ? true : false
|
210
|
+
@@is_linux = RB_CONFIG['target_os'] =~ /linux/ ? true : false
|
211
|
+
@@is_osx = RUBY_PLATFORM =~ /darwin/ ? true : false
|
212
|
+
|
213
|
+
if @@is_linux
|
214
|
+
# determin distro
|
215
|
+
name = 'linux'
|
216
|
+
if File.readable?('/etc/os-release')
|
217
|
+
# find 'NAME=...'
|
218
|
+
File.foreach('/etc/os-release', :encoding => 'utf-8') do |ln|
|
219
|
+
if /^NAME=(.*)$/ =~ ln.strip
|
220
|
+
name = $1.downcase
|
221
|
+
break
|
222
|
+
end
|
223
|
+
end
|
224
|
+
elsif File.readable?('/etc/lsb-release')
|
225
|
+
# find 'DISTRIB_ID='
|
226
|
+
File.foreach('/etc/lsb-release', :encoding => 'utf-8') do |ln|
|
227
|
+
if /^DISTRIB_ID=(.*)$/ =~ ln.strip
|
228
|
+
name = $1.downcase
|
229
|
+
break
|
230
|
+
end
|
231
|
+
end
|
232
|
+
elsif File.readable?('/etc/redhat-release')
|
233
|
+
name = File.read('/etc/redhat-release').strip.downcase
|
234
|
+
elsif File.exist?('/etc/SuSE-release')
|
235
|
+
name = 'suse'
|
236
|
+
elsif File.exist?('/etc/debian_version')
|
237
|
+
name = 'debian'
|
238
|
+
end
|
239
|
+
@@linux_distro = case name
|
240
|
+
when /suse/
|
241
|
+
:suse
|
242
|
+
when /fedora/
|
243
|
+
:fedora
|
244
|
+
when /ubuntu/
|
245
|
+
:ubuntu
|
246
|
+
when /red\s*hat/
|
247
|
+
:redhat
|
248
|
+
when /centos/
|
249
|
+
:centos
|
250
|
+
when /debian/
|
251
|
+
:debian
|
252
|
+
else
|
253
|
+
:linux
|
254
|
+
end
|
255
|
+
else
|
256
|
+
@@linux_distro = :none
|
257
|
+
end
|
258
|
+
|
259
|
+
def self.is_win32
|
260
|
+
@@is_win32
|
261
|
+
end
|
262
|
+
def self.is_win64
|
263
|
+
@@is_win64
|
264
|
+
end
|
265
|
+
def self.is_linux
|
266
|
+
@@is_linux
|
267
|
+
end
|
268
|
+
def self.linux_distro
|
269
|
+
@@linux_distro
|
270
|
+
end
|
271
|
+
def self.is_osx
|
272
|
+
@@is_osx
|
273
|
+
end
|
274
|
+
|
275
|
+
@@cpu_cores = (@@is_linux ? `cat /proc/cpuinfo | grep processor | wc -l`.to_i : (ENV['NUMBER_OF_PROCESSORS'] || 1).to_i)
|
276
|
+
|
277
|
+
def self.cpu_cores
|
278
|
+
@@cpu_cores
|
279
|
+
end
|
280
|
+
|
281
|
+
@@ridl_local = nil
|
282
|
+
@@ridlc = nil
|
283
|
+
|
284
|
+
def self.ridl_is_local?
|
285
|
+
@@ridl_local
|
286
|
+
end
|
287
|
+
|
288
|
+
def self.ridlc
|
289
|
+
@@ridlc.dup
|
290
|
+
end
|
291
|
+
|
292
|
+
@@rpath_patch = nil
|
293
|
+
|
294
|
+
def self.rpath_patch
|
295
|
+
@@rpath_patch
|
296
|
+
end
|
297
|
+
|
298
|
+
def self.init
|
299
|
+
if defined?(JRUBY_VERSION)
|
300
|
+
# check/set environment settings for JacORB
|
301
|
+
ENV['JACORB_HOME'] ||= get_config('jacorb_home')
|
302
|
+
else
|
303
|
+
|
304
|
+
if Dir[File.join('ext', 'libACE.*')].empty? # Don't check for ACE/TAO installation when executed for binary gem install
|
305
|
+
|
306
|
+
# check/set environment settings for ACE+TAO
|
307
|
+
ENV['ACE_ROOT'] = get_config('aceroot')
|
308
|
+
ENV['TAO_ROOT'] = get_config('taoroot')
|
309
|
+
ENV['MPC_ROOT'] = get_config('mpcroot')
|
310
|
+
|
311
|
+
if is_win32
|
312
|
+
ENV['PATH'] = "#{File.join(ENV['ACE_ROOT'], 'lib')}#{';'}#{ENV['PATH']}"
|
313
|
+
ENV['SSL_ROOT'] = get_config('sslroot') if get_config('with-ssl')
|
314
|
+
elsif RUBY_PLATFORM =~ /darwin/
|
315
|
+
ENV['DYLD_LIBRARY_PATH'] = "#{File.join(ENV['ACE_ROOT'], 'lib')}#{File::PATH_SEPARATOR}#{ENV['DYLD_LIBRARY_PATH'] || ""}"
|
316
|
+
ENV['SSL_ROOT'] = get_config('sslroot') if get_config('with-ssl') && get_config('sslroot') != '/usr'
|
317
|
+
else
|
318
|
+
ENV['LD_LIBRARY_PATH'] = "#{File.join(ENV['ACE_ROOT'], 'lib')}#{File::PATH_SEPARATOR}#{ENV['LD_LIBRARY_PATH'] || ""}"
|
319
|
+
ENV['SSL_ROOT'] = get_config('sslroot') if get_config('with-ssl') && get_config('sslroot') != '/usr'
|
320
|
+
end
|
321
|
+
|
322
|
+
else
|
323
|
+
|
324
|
+
unless is_win32
|
325
|
+
# check for required tools to patch RPATH setting of shared libs
|
326
|
+
if is_osx
|
327
|
+
if system('which install_name_tool > /dev/null 2>&1')
|
328
|
+
@@rpath_patch = 'install_name_tool'
|
329
|
+
else
|
330
|
+
raise 'Installation of binary gem requires an installed version of the install_name_tool utility.'
|
331
|
+
end
|
332
|
+
else
|
333
|
+
if system('which patchelf > /dev/null 2>&1')
|
334
|
+
@@rpath_patch = 'patchelf --set-rpath'
|
335
|
+
elsif system('which chrpath > /dev/null 2>&1')
|
336
|
+
@@rpath_patch = 'chrpath --replace'
|
337
|
+
else
|
338
|
+
raise 'Installation of binary gem requires an installed version of either the patchelf OR chrpath utility.'
|
339
|
+
end
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
end
|
344
|
+
|
345
|
+
end
|
346
|
+
|
347
|
+
@@ridlc = File.join('bin', 'ridlc')
|
348
|
+
|
349
|
+
# check availability of RIDL; either as gem or in subdir
|
350
|
+
if (@@ridl_local = File.exist?(File.join('ridl', 'lib', 'ridl', 'ridl.rb')))
|
351
|
+
incdirs = [
|
352
|
+
File.expand_path(File.join('ridl', 'lib')),
|
353
|
+
File.expand_path('lib'),
|
354
|
+
ENV['RUBYLIB']
|
355
|
+
].compact
|
356
|
+
ENV['RUBYLIB'] = incdirs.join(File::PATH_SEPARATOR)
|
357
|
+
else # RIDL probably installed as gem
|
358
|
+
incdirs = [
|
359
|
+
File.expand_path('lib'),
|
360
|
+
ENV['RUBYLIB']
|
361
|
+
].compact
|
362
|
+
ENV['RUBYLIB'] = incdirs.join(File::PATH_SEPARATOR)
|
363
|
+
end
|
364
|
+
|
365
|
+
end
|
366
|
+
|
367
|
+
def self.define
|
368
|
+
_argv = Rake.application.cleanup_args(ARGV)
|
369
|
+
OptionParser.new do |opts|
|
370
|
+
opts.banner = 'Usage: rake [rake options] -- configure [options]'
|
371
|
+
|
372
|
+
opts.separator ''
|
373
|
+
|
374
|
+
opts.on('--prefix=path',
|
375
|
+
"path prefix of target environment [#{get_config(:prefix)}]") {|v| set_config(:prefix, File.expand_path(v))}
|
376
|
+
opts.on('--bindir=path',
|
377
|
+
"the directory for commands [#{RB_CONFIG['bindir']}]") {|v| CONFIG[:bindir] = v}
|
378
|
+
opts.on('--libdir=path',
|
379
|
+
"the directory for libraries [#{RB_CONFIG['libdir']}]") {|v| CONFIG[:libdir] = v}
|
380
|
+
opts.on('--datadir=path',
|
381
|
+
"the directory for shared data [#{RB_CONFIG['datadir']}]") {|v| CONFIG[:datadir] = v}
|
382
|
+
opts.on('--mandir=path',
|
383
|
+
"the directory for man pages [#{RB_CONFIG['mandir']}]") {|v| CONFIG[:mandir] = v}
|
384
|
+
opts.on('--sysconfdir=path',
|
385
|
+
"the directory for system configuration files [#{RB_CONFIG['sysconfdir']}]") {|v| CONFIG[:sysconfdir] = v}
|
386
|
+
opts.on('--localstatedir=path',
|
387
|
+
"the directory for local state data [#{RB_CONFIG['localstatedir']}]") {|v| CONFIG[:localstatedir] = v}
|
388
|
+
opts.on('--libruby=path',
|
389
|
+
"the directory for ruby libraries [#{get_config('libruby')}]") {|v| CONFIG[:libruby] = v}
|
390
|
+
opts.on('--librubyver=path',
|
391
|
+
"the directory for standard ruby libraries [#{get_config('librubyver')}]") {|v| CONFIG[:librubyver] = v}
|
392
|
+
opts.on('--librubyverarch=path',
|
393
|
+
"the directory for standard ruby extensions [#{get_config('librubyverarch')}]") {|v| CONFIG[:librubyverarch] = v}
|
394
|
+
opts.on('--siteruby=path',
|
395
|
+
"the directory for version-independent aux ruby libraries [#{get_config('siteruby')}]") {|v| CONFIG[:siteruby] = v}
|
396
|
+
opts.on('--siterubyver=path',
|
397
|
+
"the directory for aux ruby libraries [#{get_config('siterubyver')}]") {|v| CONFIG[:siterubyver] = v}
|
398
|
+
opts.on('--siterubyverarch=path',
|
399
|
+
"the directory for aux ruby binaries [#{get_config('siterubyverarch')}]") {|v| CONFIG[:siterubyverarch] = v}
|
400
|
+
opts.on('--rbdir=path',
|
401
|
+
"the directory for ruby scripts [#{get_config(:rbdir)}]") {|v| CONFIG[:rbdir] = v}
|
402
|
+
opts.on('--sodir=path',
|
403
|
+
"the directory for ruby extensions [#{get_config(:sodir)}]") {|v| CONFIG[:sodir] = v}
|
404
|
+
if defined?(JRUBY_VERSION)
|
405
|
+
opts.on('--without-jacorb',
|
406
|
+
"do *not* install JacORB JAR files with R2CORBA [#{get_config('without-jacorb')}]") {|v| CONFIG[:'without-jacorb'] = true}
|
407
|
+
opts.on('--jacorb-home=path',
|
408
|
+
"the path to the root directory of JacORB [#{get_config(:jacorb_home)}]") {|v| CONFIG[:jacorb_home] = v}
|
409
|
+
else
|
410
|
+
opts.on('--makeprog=name',
|
411
|
+
"the make program to compile ruby extensions [#{get_config(:makeprog)}]") {|v| CONFIG[:makeprog] = v}
|
412
|
+
opts.on('--without-tao',
|
413
|
+
"do *not* configure/build/clean the ACE+TAO libraries [#{get_config('without-tao')}]") {|v| CONFIG[:'without-tao'] = true }
|
414
|
+
opts.on('--aceroot=path',
|
415
|
+
"the path to the root directory of ACE [#{get_config(:aceroot)}]") {|v| CONFIG[:aceroot] = v}
|
416
|
+
opts.on('--taoroot=path',
|
417
|
+
"the path to the root directory of TAO [#{get_config(:taoroot)}]") {|v| CONFIG[:taoroot] = v}
|
418
|
+
opts.on('--mpcroot=path',
|
419
|
+
"the path to the root directory of MPC [#{get_config(:mpcroot)}]") {|v| CONFIG[:mpcroot] = v}
|
420
|
+
opts.on('--aceinstdir=path',
|
421
|
+
"the directory where the ACE+TAO dlls are installed (automatically determined if not specified) [#{get_config(:aceinstdir)}]") {|v| CONFIG[:aceinstdir] = v}
|
422
|
+
opts.on('--with-ipv6',
|
423
|
+
"build ACE+TAO libraries with IPv6 support enabled [#{get_config('with-ipv6')}]") {|v| CONFIG[:'with-ipv6'] = true}
|
424
|
+
opts.on('--with-ssl',
|
425
|
+
"build ACE+TAO libraries with SSL support enabled (autodetected with prebuilt ACE/TAO) [#{get_config('with-ssl')}]") {|v| CONFIG[:'with-ssl'] = true}
|
426
|
+
opts.on('--sslroot=path',
|
427
|
+
"the root path where SSL includes and libraries can be found [#{get_config(:sslroot)}]") {|v| CONFIG[:sslroot] = v}
|
428
|
+
opts.on('--with-debug',
|
429
|
+
"build with debugger support [#{get_config('with-debug')}]") {|v| CONFIG[:'with-debug'] = true}
|
430
|
+
end
|
431
|
+
|
432
|
+
opts.separator ''
|
433
|
+
|
434
|
+
opts.on('--help', 'Show this help message') { puts opts; puts; exit }
|
435
|
+
end.parse!(_argv)
|
436
|
+
end
|
437
|
+
|
438
|
+
def self.check
|
439
|
+
if defined?(JRUBY_VERSION)
|
440
|
+
# check availability of JacORB
|
441
|
+
if get_config('jacorb_home') == '' && File.directory?('jacorb')
|
442
|
+
set_config('jacorb_home', File.expand_path('jacorb'))
|
443
|
+
end
|
444
|
+
raise 'Cannot find JacORB. Missing JACORB_HOME configuration!' if get_config('jacorb_home').empty?
|
445
|
+
else
|
446
|
+
if Dir[File.join('ext', 'libACE.*')].empty? # Don't check for ACE/TAO installation when executed for binary gem install
|
447
|
+
|
448
|
+
if get_config('without-tao') && !(File.directory?(File.join('ACE', 'ACE_wrappers')) || File.directory?(File.join('ACE', 'ACE')))
|
449
|
+
|
450
|
+
# check if a user defined ACE/TAO location is specified or we're using a system standard install
|
451
|
+
if get_config('aceroot').empty?
|
452
|
+
# assume system standard install; will be checked below
|
453
|
+
set_config('aceroot', '/usr/include')
|
454
|
+
set_config('taoroot', '/usr/include')
|
455
|
+
set_config('mpcroot', '/usr/share/mpc')
|
456
|
+
set_config('aceinstdir', get_config('libdir')) if get_config('aceinstdir').empty?
|
457
|
+
else
|
458
|
+
set_config('aceinstdir', File.join(get_config('aceroot'), 'lib')) if get_config('aceinstdir').empty?
|
459
|
+
end
|
460
|
+
|
461
|
+
else
|
462
|
+
# check availability of ACE/TAO
|
463
|
+
if get_config('aceroot').empty? && (File.directory?(File.join('ACE', 'ACE_wrappers')) || File.directory?(File.join('ACE', 'ACE')))
|
464
|
+
set_config('aceroot', File.directory?(File.join('ACE', 'ACE_wrappers')) ? File.expand_path(File.join('ACE', 'ACE_wrappers')) : File.expand_path(File.join('ACE', 'ACE')))
|
465
|
+
end
|
466
|
+
if get_config('taoroot').empty? && (File.directory?(File.join(get_config('aceroot'), 'TAO')) || File.directory?(File.join('ACE', 'TAO')))
|
467
|
+
set_config('taoroot', File.directory?(File.join(get_config('aceroot'), 'TAO')) ? File.expand_path(File.join(get_config('aceroot'), 'TAO')) : File.expand_path(File.join('ACE', 'TAO')))
|
468
|
+
end
|
469
|
+
if get_config('mpcroot').empty? && (File.directory?(File.join('ACE', 'MPC')) || File.directory?(File.join(get_config('aceroot'), 'MPC')))
|
470
|
+
set_config('mpcroot', File.directory?(File.join('ACE', 'MPC')) ? File.expand_path(File.join('ACE', 'MPC')) : File.expand_path(File.join(get_config('aceroot'), 'MPC')))
|
471
|
+
end
|
472
|
+
|
473
|
+
set_config('aceinstdir', get_config('sodir')) if get_config('aceinstdir').empty?
|
474
|
+
end
|
475
|
+
|
476
|
+
raise 'Cannot find ACE+TAO. Missing ACE_ROOT configuration!' if get_config('aceroot').empty? || !File.directory?(File.join(get_config('aceroot'), 'ace'))
|
477
|
+
raise 'Cannot find ACE+TAO. Missing TAO_ROOT configuration!' if get_config('taoroot').empty? || !File.directory?(File.join(get_config('taoroot'), 'tao'))
|
478
|
+
raise 'Cannot find MPC. Missing MPC_ROOT configuration!' if get_config('mpcroot').empty? || !File.file?(File.join(get_config('mpcroot'), 'mpc.pl'))
|
479
|
+
|
480
|
+
unless get_config('without-tao') || get_config('with-ssl')
|
481
|
+
set_config('with-ssl', Dir.glob(File.join(get_config('aceroot'), 'lib', '*ACE_SLL.*')).empty?() ? false : true)
|
482
|
+
end
|
483
|
+
|
484
|
+
if is_osx
|
485
|
+
if system('which install_name_tool > /dev/null 2>&1')
|
486
|
+
@@rpath_patch = 'install_name_tool'
|
487
|
+
else
|
488
|
+
raise 'Building R2CORBA requires an installed version of the install_name_tool utility.'
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
else
|
493
|
+
|
494
|
+
unless is_win32
|
495
|
+
# check for required tools to patch RPATH setting of shared libs
|
496
|
+
if is_osx
|
497
|
+
if system('which install_name_tool > /dev/null 2>&1')
|
498
|
+
@@rpath_patch = 'install_name_tool'
|
499
|
+
else
|
500
|
+
raise 'Installation of binary gem requires an installed version of the install_name_tool utility.'
|
501
|
+
end
|
502
|
+
else
|
503
|
+
if system('which patchelf > /dev/null 2>&1')
|
504
|
+
@@rpath_patch = 'patchelf --set-rpath'
|
505
|
+
elsif system('which chrpath > /dev/null 2>&1')
|
506
|
+
@@rpath_patch = 'chrpath --replace'
|
507
|
+
else
|
508
|
+
raise 'Installation of binary gem requires an installed version of either the patchelf OR chrpath utility.'
|
509
|
+
end
|
510
|
+
end
|
511
|
+
end
|
512
|
+
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
# check availability of RIDL; either as gem or in subdir
|
517
|
+
unless File.exist?(File.join('ridl', 'lib', 'ridl', 'ridl.rb')) || (`gem search -i -q ridl`.strip) == 'true'
|
518
|
+
raise 'Missing RIDL installation. R2CORBA requires RIDL installed either as gem or in subdirectory ridl.'
|
519
|
+
end
|
520
|
+
end
|
521
|
+
|
522
|
+
def self.save
|
523
|
+
File.open(BUILD_CFG, 'w') do |f|
|
524
|
+
f << YAML.dump(CONFIG)
|
525
|
+
end
|
526
|
+
end
|
527
|
+
|
528
|
+
def self.load
|
529
|
+
if File.file?(BUILD_CFG)
|
530
|
+
File.open(BUILD_CFG, 'r') do |f|
|
531
|
+
CONFIG.merge!(YAML.load(f.read))
|
532
|
+
end
|
533
|
+
init
|
534
|
+
end
|
535
|
+
end
|
536
|
+
end
|
537
|
+
end
|
538
|
+
|
539
|
+
include R2CORBA::AccessMethods
|
540
|
+
|
541
|
+
# load current config (if any)
|
542
|
+
R2CORBA::Config.load
|