r2corba 1.5.2 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +8 -5
- data/ext/libr2tao/any.cpp +12 -11
- data/ext/libr2tao/exception.cpp +6 -8
- data/ext/libr2tao/exception.h +1 -2
- data/ext/libr2tao/longdouble.cpp +5 -9
- data/ext/libr2tao/object.cpp +37 -53
- data/ext/libr2tao/orb.cpp +46 -73
- data/ext/libr2tao/r2tao_export.h +1 -1
- data/ext/libr2tao/r2tao_ext.h +8 -19
- data/ext/libr2tao/required.cpp +4 -28
- data/ext/libr2tao/required.h +23 -80
- data/ext/libr2tao/values.cpp +97 -98
- data/ext/libr2tao/values.h +36 -40
- data/ext/librpoa/iortable.cpp +6 -7
- data/ext/librpoa/poa.cpp +29 -32
- data/ext/librpoa/servant.cpp +39 -113
- data/ext/librpoa/servant.h +18 -40
- data/lib/corba.rb +1 -1
- data/lib/corba/cbase/ORB.rb +26 -23
- data/lib/corba/cbase/Request.rb +3 -3
- data/lib/corba/cbase/Streams.rb +2 -2
- data/lib/corba/cbase/Typecode.rb +6 -6
- data/lib/corba/cbase/Values.rb +4 -2
- data/lib/corba/cbase/exception.rb +6 -4
- data/lib/corba/cbase/poa.rb +1 -1
- data/lib/corba/cbase/policies.rb +2 -2
- data/lib/corba/cbase/require.rb +8 -1
- data/lib/corba/cmds/base.rb +1 -1
- data/lib/corba/common/Any.rb +3 -2
- data/lib/corba/common/IDL.rb +4 -7
- data/lib/corba/common/ORB.rb +22 -22
- data/lib/corba/common/Object.rb +14 -14
- data/lib/corba/common/Servant.rb +4 -4
- data/lib/corba/common/Stub.rb +6 -6
- data/lib/corba/common/Typecode.rb +72 -45
- data/lib/corba/common/Union.rb +5 -0
- data/lib/corba/common/Values.rb +1 -0
- data/lib/corba/common/const.rb +2 -2
- data/lib/corba/common/exception.rb +2 -1
- data/lib/corba/common/require.rb +8 -0
- data/lib/corba/common/version.rb +2 -2
- data/lib/corba/idl/IDL.rb +1 -1
- data/lib/corba/jbase/Any.rb +28 -26
- data/lib/corba/jbase/ORB.rb +5 -5
- data/lib/corba/jbase/Object.rb +13 -13
- data/lib/corba/jbase/Request.rb +8 -8
- data/lib/corba/jbase/Servant.rb +10 -10
- data/lib/corba/jbase/ServerRequest.rb +7 -7
- data/lib/corba/jbase/Streams.rb +67 -3
- data/lib/corba/jbase/Typecode.rb +17 -16
- data/lib/corba/jbase/Values.rb +2 -0
- data/lib/corba/jbase/exception.rb +2 -1
- data/lib/corba/jbase/poa.rb +20 -20
- data/lib/corba/jbase/policies.rb +32 -32
- data/lib/corba/jbase/require.rb +4 -0
- data/lib/corba/poa.rb +1 -1
- data/lib/corba/policies.rb +1 -1
- data/lib/corba/require.rb +2 -2
- data/lib/corba/svcs/ins/cos_naming.rb +37 -28
- data/lib/corba/svcs/ins/ins.rb +51 -51
- data/lib/corba/svcs/ins/naming_service.rb +8 -8
- data/lib/ridlbe/ruby/config.rb +78 -72
- data/lib/ridlbe/ruby/walker.rb +295 -272
- data/mkrf_conf_srcgem.rb +6 -6
- data/rakelib/bin.rake +1 -1
- data/rakelib/bin.rb +3 -3
- data/rakelib/build.rake +16 -16
- data/rakelib/config.rake +1 -1
- data/rakelib/config.rb +24 -25
- data/rakelib/ext.rake +7 -68
- data/rakelib/ext.rb +13 -13
- data/rakelib/ext_r2tao.rb +11 -54
- data/rakelib/gem.rake +40 -24
- data/rakelib/gem.rb +6 -6
- data/rakelib/package.rake +1 -1
- data/test/BiDirectional/client.rb +17 -17
- data/test/BiDirectional/run_test.rb +11 -11
- data/test/BiDirectional/server.rb +24 -25
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +17 -17
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +13 -13
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +19 -19
- data/test/CORBA_Services/Naming/Corbaname/client.rb +15 -15
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +13 -13
- data/test/CORBA_Services/Naming/Corbaname/server.rb +30 -30
- data/test/CORBA_Services/Naming/Simple/client.rb +16 -16
- data/test/CORBA_Services/Naming/Simple/run_test.rb +13 -13
- data/test/CORBA_Services/Naming/Simple/server.rb +19 -19
- data/test/Collocation/run_test.rb +10 -10
- data/test/Collocation/test.rb +27 -20
- data/test/Connect_Timeout/client.rb +16 -17
- data/test/Connect_Timeout/run_test.rb +10 -10
- data/test/DII/client.rb +30 -30
- data/test/DII/run_test.rb +11 -11
- data/test/DII/server.rb +16 -16
- data/test/DSI/client.rb +16 -16
- data/test/DSI/run_test.rb +11 -11
- data/test/DSI/server.rb +17 -17
- data/test/Exceptions/client.rb +21 -21
- data/test/Exceptions/run_test.rb +11 -11
- data/test/Exceptions/server.rb +16 -16
- data/test/Hello/client.rb +16 -16
- data/test/Hello/run_test.rb +11 -11
- data/test/Hello/server.rb +17 -17
- data/test/IDL_Test/client.rb +21 -21
- data/test/IDL_Test/run_test.rb +11 -11
- data/test/IDL_Test/server.rb +19 -19
- data/test/IORMap/client.rb +14 -14
- data/test/IORMap/run_test.rb +11 -11
- data/test/IORMap/server.rb +26 -26
- data/test/IORTable/client.rb +14 -14
- data/test/IORTable/run_test.rb +11 -11
- data/test/IORTable/server.rb +26 -26
- data/test/Implicit_Conversion/client.rb +20 -17
- data/test/Implicit_Conversion/run_test.rb +11 -11
- data/test/Implicit_Conversion/server.rb +16 -16
- data/test/Multi_Threading/Multiple_ORB/client.rb +14 -14
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +12 -12
- data/test/Multi_Threading/Multiple_ORB/server.rb +17 -17
- data/test/Multi_Threading/Simple/client.rb +17 -17
- data/test/Multi_Threading/Simple/run_test.rb +11 -11
- data/test/Multi_Threading/Simple/server.rb +16 -16
- data/test/Multi_Threading/Threads/client.rb +16 -16
- data/test/Multi_Threading/Threads/run_test.rb +11 -11
- data/test/Multi_Threading/Threads/server.rb +22 -22
- data/test/Multi_Threading/Threads/watchdog.rb +16 -16
- data/test/Multiple_Servant_Interfaces/client.rb +14 -14
- data/test/Multiple_Servant_Interfaces/run_test.rb +11 -11
- data/test/Multiple_Servant_Interfaces/server.rb +18 -18
- data/test/Nil/run_test.rb +10 -10
- data/test/Nil/test.rb +22 -19
- data/test/OBV/AbstractInterface/client.rb +14 -14
- data/test/OBV/AbstractInterface/run_test.rb +11 -11
- data/test/OBV/AbstractInterface/server.rb +20 -19
- data/test/OBV/Custom/OBV_impl.rb +2 -0
- data/test/OBV/Custom/client.rb +14 -14
- data/test/OBV/Custom/run_test.rb +11 -11
- data/test/OBV/Custom/server.rb +16 -16
- data/test/OBV/Simple/OBV_impl.rb +1 -0
- data/test/OBV/Simple/client.rb +14 -14
- data/test/OBV/Simple/run_test.rb +11 -11
- data/test/OBV/Simple/server.rb +16 -16
- data/test/OBV/Simple_Event/Event_impl.rb +1 -0
- data/test/OBV/Simple_Event/client.rb +14 -14
- data/test/OBV/Simple_Event/run_test.rb +11 -11
- data/test/OBV/Simple_Event/server.rb +16 -16
- data/test/OBV/Supports/client.rb +19 -19
- data/test/OBV/Supports/run_test.rb +11 -11
- data/test/OBV/Supports/server.rb +15 -15
- data/test/OBV/Supports/supports_impl.rb +3 -0
- data/test/OBV/Tree/client.rb +14 -14
- data/test/OBV/Tree/run_test.rb +11 -11
- data/test/OBV/Tree/server.rb +19 -19
- data/test/OBV/Truncatable/Truncatable_impl.rb +1 -1
- data/test/OBV/Truncatable/client.rb +57 -57
- data/test/OBV/Truncatable/run_test.rb +11 -11
- data/test/OBV/Truncatable/server.rb +15 -15
- data/test/OBV/ValueBox/client.rb +154 -153
- data/test/OBV/ValueBox/run_test.rb +11 -11
- data/test/OBV/ValueBox/server.rb +42 -42
- data/test/Object/client.rb +15 -15
- data/test/Object/run_test.rb +11 -11
- data/test/Object/server.rb +19 -19
- data/test/POA/run_test.rb +10 -10
- data/test/POA/test.rb +16 -16
- data/test/Param_Test/client.rb +51 -51
- data/test/Param_Test/run_test.rb +11 -11
- data/test/Param_Test/server.rb +59 -59
- data/test/Performance/Simple/client.rb +16 -16
- data/test/Performance/Simple/run_test.rb +11 -11
- data/test/Performance/Simple/server.rb +16 -16
- data/test/Policies/run_test.rb +10 -10
- data/test/Policies/test.rb +23 -24
- data/test/Timeout/client.rb +21 -21
- data/test/Timeout/run_test.rb +11 -11
- data/test/Timeout/server.rb +22 -22
- data/test/lib/assert.rb +0 -1
- data/test/lib/test.rb +27 -22
- data/test/test_runner.rb +20 -21
- metadata +11 -13
- data/ext/extload/extload.c +0 -60
- data/ext/librpoa/srvreq_fix.cpp +0 -282
- data/ext/librpoa/srvreq_fix.h +0 -148
data/mkrf_conf_srcgem.rb
CHANGED
@@ -33,7 +33,7 @@ require 'optparse'
|
|
33
33
|
|
34
34
|
if defined?(JRUBY_VERSION)
|
35
35
|
|
36
|
-
usage_text
|
36
|
+
usage_text = <<-__EOT
|
37
37
|
Make sure you have provided a JACORB_HOME definition pointing at a valid JacORB installation
|
38
38
|
with all required .jar files located at JACORB_HOME\lib. You can do this either by setting
|
39
39
|
the JACORB_HOME environment variable or by providing the --jacorb-home buildflag to the
|
@@ -51,13 +51,13 @@ __EOT
|
|
51
51
|
|
52
52
|
# check for proper JacORB installation
|
53
53
|
if jacorb_home
|
54
|
-
jar_files = Dir.glob(File.join(jacorb_home, 'lib', 'jacorb.jar'))+
|
54
|
+
jar_files = Dir.glob(File.join(jacorb_home, 'lib', 'jacorb.jar')) +
|
55
55
|
Dir.glob(File.join(jacorb_home, 'lib', 'jacorb-services.jar')) +
|
56
56
|
Dir.glob(File.join(jacorb_home, 'lib', 'slf4j*.jar')) +
|
57
57
|
Dir.glob(File.join(jacorb_home, 'lib', 'antlr*.jar'))
|
58
58
|
if jar_files.size == 5
|
59
59
|
# run configure with appropriate settings
|
60
|
-
puts "Valid JacORB installation found.\n"+
|
60
|
+
puts "Valid JacORB installation found.\n" +
|
61
61
|
"Running 'ruby -S rake -- configure --without-jacorb --jacorb-home=#{jacorb_home}'"
|
62
62
|
unless system("ruby -S rake -- configure --without-jacorb --jacorb-home=#{jacorb_home}")
|
63
63
|
puts 'Failed to configure R2CORBA'
|
@@ -82,7 +82,7 @@ else
|
|
82
82
|
RB_CONFIG = ::Config
|
83
83
|
end unless defined? RB_CONFIG
|
84
84
|
RB_CONFIG::MAKEFILE_CONFIG['TRY_LINK'] = "$(CXX) #{RB_CONFIG::MAKEFILE_CONFIG['OUTFLAG']}conftest#{$EXEEXT} $(INCFLAGS) $(CPPFLAGS) " \
|
85
|
-
|
85
|
+
'$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)'
|
86
86
|
require 'mkmf'
|
87
87
|
if defined?(MakeMakefile)
|
88
88
|
MakeMakefile::COMMON_HEADERS.clear
|
@@ -90,7 +90,7 @@ else
|
|
90
90
|
COMMON_HEADERS.slice!(/./)
|
91
91
|
end
|
92
92
|
|
93
|
-
usage_txt
|
93
|
+
usage_txt = <<-__EOT
|
94
94
|
Please define a valid ACE/TAO build environment either by defining the ACE_ROOT and (optionally)
|
95
95
|
the TAO_ROOT (defaults to ACE_ROOT/TAO) and MPC_ROOT (defaults to ACE_ROOT/MPC) environment
|
96
96
|
variable OR by providing the --aceroot and (optionally) --taoroot and --mpcroot build flags to
|
@@ -138,7 +138,7 @@ __EOT
|
|
138
138
|
end
|
139
139
|
inst = Gem::DependencyInstaller.new
|
140
140
|
begin
|
141
|
-
inst.install
|
141
|
+
inst.install 'taosource', '>= 7.0.0'
|
142
142
|
rescue
|
143
143
|
$stderr.puts 'Failed to install taosource gem.'
|
144
144
|
exit(1)
|
data/rakelib/bin.rake
CHANGED
@@ -44,7 +44,7 @@ namespace :r2corba do
|
|
44
44
|
R2CORBA::Bin.binaries.each do |bin|
|
45
45
|
if File.exist?(File.join('bin', bin))
|
46
46
|
content = IO.read(File.join('bin', bin))
|
47
|
-
rm_f(File.join('bin', bin)) unless content == R2CORBA::Bin.__send__(bin.gsub('.','_').to_sym)
|
47
|
+
rm_f(File.join('bin', bin)) unless content == R2CORBA::Bin.__send__(bin.gsub('.', '_').to_sym)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/rakelib/bin.rb
CHANGED
@@ -18,7 +18,7 @@ module R2CORBA
|
|
18
18
|
|
19
19
|
def self.ridlc
|
20
20
|
<<_SH_TXT
|
21
|
-
#!#{Config.is_win32 ? '/bin/' : (`which env`).strip+' '}#{R2CORBA::RB_CONFIG['ruby_install_name']}
|
21
|
+
#!#{Config.is_win32 ? '/bin/' : (`which env`).strip + ' '}#{R2CORBA::RB_CONFIG['ruby_install_name']}
|
22
22
|
#---------------------------------
|
23
23
|
# This file is generated
|
24
24
|
#---------------------------------
|
@@ -86,7 +86,7 @@ _BAT_TXT
|
|
86
86
|
|
87
87
|
def self.rins
|
88
88
|
<<_SH_TXT
|
89
|
-
#!#{Config.is_win32 ? '/bin/' : (`which env`).strip+' '}#{R2CORBA::RB_CONFIG['ruby_install_name']}
|
89
|
+
#!#{Config.is_win32 ? '/bin/' : (`which env`).strip + ' '}#{R2CORBA::RB_CONFIG['ruby_install_name']}
|
90
90
|
#---------------------------------
|
91
91
|
# This file is generated
|
92
92
|
#---------------------------------
|
@@ -98,7 +98,7 @@ _SH_TXT
|
|
98
98
|
|
99
99
|
def self.r2corba
|
100
100
|
<<_SH_TXT
|
101
|
-
#!#{Config.is_win32 ? '/bin/' : (`which env`).strip+' '}#{R2CORBA::RB_CONFIG['ruby_install_name']}
|
101
|
+
#!#{Config.is_win32 ? '/bin/' : (`which env`).strip + ' '}#{R2CORBA::RB_CONFIG['ruby_install_name']}
|
102
102
|
#---------------------------------
|
103
103
|
# This file is generated
|
104
104
|
#---------------------------------
|
data/rakelib/build.rake
CHANGED
@@ -31,50 +31,50 @@ task :build => 'r2corba:build'
|
|
31
31
|
|
32
32
|
## compile base IDL
|
33
33
|
|
34
|
-
r2c_idlc_root = File.join('lib','corba','idl')
|
34
|
+
r2c_idlc_root = File.join('lib', 'corba', 'idl')
|
35
35
|
stdidl_root = File.join('lib', 'idl')
|
36
36
|
|
37
|
-
orb_pidlc = File.join('lib', 'ridlbe','ruby','orb.pidlc')
|
37
|
+
orb_pidlc = File.join('lib', 'ridlbe', 'ruby', 'orb.pidlc')
|
38
38
|
file orb_pidlc => [R2CORBA::BUILD_CFG] do |t|
|
39
39
|
sh("#{R2CORBA::Config.ridlc} --preprocess --output #{t.name} --include=#{stdidl_root} orb.idl")
|
40
40
|
end
|
41
41
|
Rake::Task['r2corba:build_idl'].enhance [orb_pidlc]
|
42
42
|
CLOBBER.include orb_pidlc
|
43
43
|
|
44
|
-
file File.join(r2c_idlc_root,'r2c_orb.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
44
|
+
file File.join(r2c_idlc_root, 'r2c_orb.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
45
45
|
cmd = R2CORBA::Config.ridlc
|
46
46
|
cmd << " --ignore-pidl --output #{t.name} --namespace=R2CORBA --include=#{stdidl_root}" <<
|
47
|
-
|
47
|
+
' --stubs-only --expand-includes --search-includepath --no-libinit --interface-as-class=TypeCode orb.idl'
|
48
48
|
sh(cmd)
|
49
49
|
end
|
50
|
-
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,'r2c_orb.rb')]
|
51
|
-
CLOBBER.include File.join(r2c_idlc_root,'r2c_orb.rb')
|
50
|
+
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root, 'r2c_orb.rb')]
|
51
|
+
CLOBBER.include File.join(r2c_idlc_root, 'r2c_orb.rb')
|
52
52
|
|
53
53
|
[ ['POA', 'PortableServer.pidl'],
|
54
54
|
['Messaging', 'Messaging.pidl'],
|
55
55
|
['BiDirPolicy', 'BiDirPolicy.pidl'],
|
56
56
|
].each do |stub, pidl|
|
57
|
-
file File.join(r2c_idlc_root,stub+'C.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
57
|
+
file File.join(r2c_idlc_root, stub + 'C.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
58
58
|
cmd = R2CORBA::Config.ridlc
|
59
59
|
cmd << " --output #{t.name} --namespace=R2CORBA --include=#{stdidl_root} --stubs-only --expand-includes --search-includepath --no-libinit #{pidl}"
|
60
60
|
sh(cmd)
|
61
61
|
end
|
62
|
-
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,stub+'C.rb')]
|
63
|
-
CLOBBER.include File.join(r2c_idlc_root,stub+'C.rb')
|
62
|
+
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root, stub + 'C.rb')]
|
63
|
+
CLOBBER.include File.join(r2c_idlc_root, stub + 'C.rb')
|
64
64
|
end
|
65
65
|
|
66
66
|
unless defined?(JRUBY_VERSION)
|
67
|
-
r2tao_root = File.join('lib','corba','cbase')
|
67
|
+
r2tao_root = File.join('lib', 'corba', 'cbase')
|
68
68
|
tao_root = get_config('taoroot')
|
69
69
|
[ 'TAO_Ext', 'IORTable' ].each do |stub|
|
70
|
-
file File.join(r2c_idlc_root,stub+'C.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
70
|
+
file File.join(r2c_idlc_root, stub + 'C.rb') => [R2CORBA::BUILD_CFG, orb_pidlc] do |t|
|
71
71
|
cmd = R2CORBA::Config.ridlc
|
72
72
|
cmd << " --output #{t.name} --namespace=R2CORBA --include=#{stdidl_root} --stubs-only --expand-includes -I#{tao_root}" <<
|
73
|
-
" --search-includepath --no-libinit #{File.join(r2c_idlc_root, stub+'.pidl')}"
|
73
|
+
" --search-includepath --no-libinit #{File.join(r2c_idlc_root, stub + '.pidl')}"
|
74
74
|
sh(cmd)
|
75
75
|
end
|
76
|
-
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,stub+'C.rb')]
|
77
|
-
CLOBBER.include File.join(r2c_idlc_root,stub+'C.rb')
|
76
|
+
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root, stub + 'C.rb')]
|
77
|
+
CLOBBER.include File.join(r2c_idlc_root, stub + 'C.rb')
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
@@ -83,5 +83,5 @@ file File.join(r2c_idlc_root, 'CosNamingC.rb') => [R2CORBA::BUILD_CFG, orb_pidlc
|
|
83
83
|
cmd << " -o #{r2c_idlc_root} --include=#{stdidl_root} --expand-includes --search-includepath CosNaming.idl"
|
84
84
|
sh(cmd)
|
85
85
|
end
|
86
|
-
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root,'CosNamingC.rb')]
|
87
|
-
CLOBBER.include File.join(r2c_idlc_root,'CosNamingC.rb')
|
86
|
+
Rake::Task['r2corba:build_idl'].enhance [File.join(r2c_idlc_root, 'CosNamingC.rb')]
|
87
|
+
CLOBBER.include File.join(r2c_idlc_root, 'CosNamingC.rb')
|
data/rakelib/config.rake
CHANGED
data/rakelib/config.rb
CHANGED
@@ -86,8 +86,8 @@ if (Rake::Version::MAJOR.to_i == 10 &&
|
|
86
86
|
|
87
87
|
begin
|
88
88
|
return OptionParser.new do |opts|
|
89
|
-
opts.banner =
|
90
|
-
opts.separator
|
89
|
+
opts.banner = ''
|
90
|
+
opts.separator ''
|
91
91
|
|
92
92
|
standard_rake_options.each { |args| opts.on(*args) }
|
93
93
|
opts.environment('RAKEOPT')
|
@@ -212,11 +212,10 @@ module R2CORBA
|
|
212
212
|
|
213
213
|
if @@is_linux
|
214
214
|
# determin distro
|
215
|
-
io_args = [$/, {:encoding => 'utf-8'}] if rb_ver_major > 1 || (rb_ver_minor > 8 && rb_ver_major == 1)
|
216
215
|
name = 'linux'
|
217
216
|
if File.readable?('/etc/os-release')
|
218
217
|
# find 'NAME=...'
|
219
|
-
File.foreach('/etc/os-release',
|
218
|
+
File.foreach('/etc/os-release', :encoding => 'utf-8') do |ln|
|
220
219
|
if /^NAME=(.*)$/ =~ ln.strip
|
221
220
|
name = $1.downcase
|
222
221
|
break
|
@@ -224,7 +223,7 @@ module R2CORBA
|
|
224
223
|
end
|
225
224
|
elsif File.readable?('/etc/lsb-release')
|
226
225
|
# find 'DISTRIB_ID='
|
227
|
-
File.foreach('/etc/lsb-release',
|
226
|
+
File.foreach('/etc/lsb-release', :encoding => 'utf-8') do |ln|
|
228
227
|
if /^DISTRIB_ID=(.*)$/ =~ ln.strip
|
229
228
|
name = $1.downcase
|
230
229
|
break
|
@@ -273,7 +272,7 @@ module R2CORBA
|
|
273
272
|
@@is_osx
|
274
273
|
end
|
275
274
|
|
276
|
-
@@cpu_cores = (@@is_linux ? `cat /proc/cpuinfo | grep processor | wc -l`.to_i : 1)
|
275
|
+
@@cpu_cores = (@@is_linux ? `cat /proc/cpuinfo | grep processor | wc -l`.to_i : (ENV['NUMBER_OF_PROCESSORS'] || 1).to_i)
|
277
276
|
|
278
277
|
def self.cpu_cores
|
279
278
|
@@cpu_cores
|
@@ -310,14 +309,14 @@ module R2CORBA
|
|
310
309
|
ENV['MPC_ROOT'] = get_config('mpcroot')
|
311
310
|
|
312
311
|
if is_win32
|
313
|
-
ENV['PATH'] = "#{File.join(ENV['ACE_ROOT'],'lib')}#{';'}#{ENV['PATH']}"
|
312
|
+
ENV['PATH'] = "#{File.join(ENV['ACE_ROOT'], 'lib')}#{';'}#{ENV['PATH']}"
|
314
313
|
ENV['SSL_ROOT'] = get_config('sslroot') if get_config('with-ssl')
|
315
314
|
elsif RUBY_PLATFORM =~ /darwin/
|
316
|
-
ENV['DYLD_LIBRARY_PATH'] = "#{File.join(ENV['ACE_ROOT'],'lib')}#{File::PATH_SEPARATOR}#{ENV['DYLD_LIBRARY_PATH'] || ""}"
|
317
|
-
ENV['SSL_ROOT'] = get_config('sslroot') if get_config('with-ssl') && get_config('sslroot')!='/usr'
|
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'
|
318
317
|
else
|
319
|
-
ENV['LD_LIBRARY_PATH'] = "#{File.join(ENV['ACE_ROOT'],'lib')}#{File::PATH_SEPARATOR}#{ENV['LD_LIBRARY_PATH'] || ""}"
|
320
|
-
ENV['SSL_ROOT'] = get_config('sslroot') if get_config('with-ssl') && get_config('sslroot')!='/usr'
|
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'
|
321
320
|
end
|
322
321
|
|
323
322
|
else
|
@@ -368,9 +367,9 @@ module R2CORBA
|
|
368
367
|
def self.define
|
369
368
|
_argv = Rake.application.cleanup_args(ARGV)
|
370
369
|
OptionParser.new do |opts|
|
371
|
-
opts.banner =
|
370
|
+
opts.banner = 'Usage: rake [rake options] -- configure [options]'
|
372
371
|
|
373
|
-
opts.separator
|
372
|
+
opts.separator ''
|
374
373
|
|
375
374
|
opts.on('--prefix=path',
|
376
375
|
"path prefix of target environment [#{get_config(:prefix)}]") {|v| set_config(:prefix, File.expand_path(v))}
|
@@ -430,7 +429,7 @@ module R2CORBA
|
|
430
429
|
"build with debugger support [#{get_config('with-debug')}]") {|v| CONFIG[:'with-debug'] = true}
|
431
430
|
end
|
432
431
|
|
433
|
-
opts.separator
|
432
|
+
opts.separator ''
|
434
433
|
|
435
434
|
opts.on('--help', 'Show this help message') { puts opts; puts; exit }
|
436
435
|
end.parse!(_argv)
|
@@ -439,14 +438,14 @@ module R2CORBA
|
|
439
438
|
def self.check
|
440
439
|
if defined?(JRUBY_VERSION)
|
441
440
|
# check availability of JacORB
|
442
|
-
if get_config('jacorb_home')=='' && File.directory?('jacorb')
|
441
|
+
if get_config('jacorb_home') == '' && File.directory?('jacorb')
|
443
442
|
set_config('jacorb_home', File.expand_path('jacorb'))
|
444
443
|
end
|
445
|
-
raise
|
444
|
+
raise 'Cannot find JacORB. Missing JACORB_HOME configuration!' if get_config('jacorb_home').empty?
|
446
445
|
else
|
447
446
|
if Dir[File.join('ext', 'libACE.*')].empty? # Don't check for ACE/TAO installation when executed for binary gem install
|
448
447
|
|
449
|
-
if get_config('without-tao') && !(File.directory?(File.join('ACE','ACE_wrappers')) || File.directory?(File.join('ACE','ACE')))
|
448
|
+
if get_config('without-tao') && !(File.directory?(File.join('ACE', 'ACE_wrappers')) || File.directory?(File.join('ACE', 'ACE')))
|
450
449
|
|
451
450
|
# check if a user defined ACE/TAO location is specified or we're using a system standard install
|
452
451
|
if get_config('aceroot').empty?
|
@@ -461,14 +460,14 @@ module R2CORBA
|
|
461
460
|
|
462
461
|
else
|
463
462
|
# check availability of ACE/TAO
|
464
|
-
if get_config('aceroot').empty? && (File.directory?(File.join('ACE','ACE_wrappers')) || File.directory?(File.join('ACE','ACE')))
|
465
|
-
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')))
|
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')))
|
466
465
|
end
|
467
|
-
if get_config('taoroot').empty? && (File.directory?(File.join(get_config('aceroot'),'TAO')) || File.directory?(File.join('ACE','TAO')))
|
468
|
-
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')))
|
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')))
|
469
468
|
end
|
470
|
-
if get_config('mpcroot').empty? && (File.directory?(File.join(
|
471
|
-
set_config('mpcroot', File.directory?(File.join(
|
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')))
|
472
471
|
end
|
473
472
|
|
474
473
|
set_config('aceinstdir', get_config('sodir')) if get_config('aceinstdir').empty?
|
@@ -516,7 +515,7 @@ module R2CORBA
|
|
516
515
|
|
517
516
|
# check availability of RIDL; either as gem or in subdir
|
518
517
|
unless File.exist?(File.join('ridl', 'lib', 'ridl', 'ridl.rb')) || (`gem search -i -q ridl`.strip) == 'true'
|
519
|
-
raise
|
518
|
+
raise 'Missing RIDL installation. R2CORBA requires RIDL installed either as gem or in subdirectory ridl.'
|
520
519
|
end
|
521
520
|
end
|
522
521
|
|
@@ -540,4 +539,4 @@ end
|
|
540
539
|
include R2CORBA::AccessMethods
|
541
540
|
|
542
541
|
# load current config (if any)
|
543
|
-
R2CORBA::Config.load
|
542
|
+
R2CORBA::Config.load
|
data/rakelib/ext.rake
CHANGED
@@ -42,7 +42,7 @@ else # !JRUBY_VERSION
|
|
42
42
|
R2CORBA::Ext.rpoa_mpc_file,
|
43
43
|
R2CORBA::Ext.rpol_mpc_file] do
|
44
44
|
# check availability of PERL
|
45
|
-
raise
|
45
|
+
raise 'PERL missing! A working version of PERL in the PATH is required.' unless system('perl -v')
|
46
46
|
# configure R2TAO build
|
47
47
|
_mwc = File.join(get_config('aceroot'), 'bin', 'mwc.pl')
|
48
48
|
|
@@ -85,68 +85,11 @@ else # !JRUBY_VERSION
|
|
85
85
|
|
86
86
|
Rake::Task['clobber'].enhance ['r2corba:ext:clobber']
|
87
87
|
|
88
|
-
if R2CORBA::Config.is_win32
|
89
|
-
|
90
|
-
file R2CORBA::Ext.extload_mpc_file do |t|
|
91
|
-
File.open(t.name, 'w') {|f| f.puts R2CORBA::Ext::EXTLOAD_MPC }
|
92
|
-
end
|
93
|
-
|
94
|
-
file R2CORBA::Ext.extload_makefile => [R2CORBA::BUILD_CFG,
|
95
|
-
R2CORBA::Ext.default_features_path,
|
96
|
-
R2CORBA::Ext.ace_config_path,
|
97
|
-
R2CORBA::Ext.platform_macros_path,
|
98
|
-
R2CORBA::Ext.extload_mpc_file] do
|
99
|
-
# check availability of PERL
|
100
|
-
raise "PERL missing! A working version of PERL in the PATH is required." unless system('perl -v')
|
101
|
-
# configure extload build
|
102
|
-
_mwc = File.join(get_config('aceroot'), 'bin', 'mwc.pl')
|
103
|
-
|
104
|
-
cur_dir = Dir.getwd
|
105
|
-
Dir.chdir File.join('ext', 'extload')
|
106
|
-
begin
|
107
|
-
sh("perl #{_mwc} -type gnuace -workers #{R2CORBA::Config.cpu_cores}")
|
108
|
-
ensure
|
109
|
-
Dir.chdir cur_dir
|
110
|
-
end
|
111
|
-
end
|
112
|
-
|
113
|
-
CLOBBER.include [R2CORBA::Ext.extload_makefile, R2CORBA::Ext.extload_mpc_file]
|
114
|
-
|
115
|
-
namespace :r2corba do
|
116
|
-
namespace :ext do
|
117
|
-
#desc 'Build extension loader'
|
118
|
-
task :build_extload => R2CORBA::Ext.extload_makefile do
|
119
|
-
cur_dir = Dir.getwd
|
120
|
-
Dir.chdir File.join('ext', 'extload')
|
121
|
-
begin
|
122
|
-
sh("#{get_config('makeprog')}#{get_config('with-debug') ? ' debug=1' : ''}")
|
123
|
-
ensure
|
124
|
-
Dir.chdir cur_dir
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
task :clobber_extload do
|
129
|
-
cur_dir = Dir.getwd
|
130
|
-
Dir.chdir File.join('ext', 'extload')
|
131
|
-
begin
|
132
|
-
sh("#{get_config('makeprog')} realclean") if File.exist?('GNUmakefile')
|
133
|
-
ensure
|
134
|
-
Dir.chdir cur_dir
|
135
|
-
end
|
136
|
-
end
|
137
|
-
end
|
138
|
-
end
|
139
|
-
|
140
|
-
Rake::Task['r2corba:ext:build'].enhance ['r2corba:ext:build_extload']
|
141
|
-
Rake::Task['clobber'].enhance ['r2corba:ext:clobber_extload']
|
142
|
-
|
143
|
-
end
|
144
|
-
|
145
88
|
# Do we handle ACE+TAO here?
|
146
89
|
unless get_config('without-tao')
|
147
90
|
|
148
91
|
file R2CORBA::Ext.ace_config_path => R2CORBA::BUILD_CFG do |t|
|
149
|
-
File.open(t.name,
|
92
|
+
File.open(t.name, 'w') {|f|
|
150
93
|
f.puts R2CORBA::Ext.ace_config
|
151
94
|
}
|
152
95
|
end
|
@@ -154,7 +97,7 @@ else # !JRUBY_VERSION
|
|
154
97
|
CLOBBER.include R2CORBA::Ext.ace_config_path
|
155
98
|
|
156
99
|
file R2CORBA::Ext.platform_macros_path => R2CORBA::BUILD_CFG do |t|
|
157
|
-
File.open(t.name,
|
100
|
+
File.open(t.name, 'w') {|f|
|
158
101
|
f.puts R2CORBA::Ext.platform_macros
|
159
102
|
}
|
160
103
|
end
|
@@ -162,7 +105,7 @@ else # !JRUBY_VERSION
|
|
162
105
|
CLOBBER.include R2CORBA::Ext.platform_macros_path
|
163
106
|
|
164
107
|
file R2CORBA::Ext.default_features_path => R2CORBA::BUILD_CFG do |t|
|
165
|
-
File.open(t.name,
|
108
|
+
File.open(t.name, 'w') do |f|
|
166
109
|
f.puts R2CORBA::Ext.default_features
|
167
110
|
end
|
168
111
|
end
|
@@ -170,7 +113,7 @@ else # !JRUBY_VERSION
|
|
170
113
|
CLOBBER.include R2CORBA::Ext.default_features_path
|
171
114
|
|
172
115
|
file R2CORBA::Ext.tao_mwc_path => R2CORBA::BUILD_CFG do |t|
|
173
|
-
File.open(t.name,
|
116
|
+
File.open(t.name, 'w') do |f|
|
174
117
|
f.puts R2CORBA::Ext.tao_mwc
|
175
118
|
end
|
176
119
|
end
|
@@ -182,7 +125,7 @@ else # !JRUBY_VERSION
|
|
182
125
|
R2CORBA::Ext.default_features_path,
|
183
126
|
R2CORBA::Ext.tao_mwc_path] do
|
184
127
|
# check availability of PERL
|
185
|
-
raise
|
128
|
+
raise 'PERL missing! A working version of PERL in the PATH is required.' unless system('perl -v')
|
186
129
|
# generate ACE+TAO makefile
|
187
130
|
cur_dir = Dir.getwd
|
188
131
|
Dir.chdir File.expand_path(get_config('aceroot'))
|
@@ -205,11 +148,7 @@ else # !JRUBY_VERSION
|
|
205
148
|
cur_dir = Dir.getwd
|
206
149
|
Dir.chdir File.expand_path(get_config('aceroot'))
|
207
150
|
begin
|
208
|
-
|
209
|
-
sh("#{get_config('makeprog')} -j#{R2CORBA::Config.cpu_cores} #{get_config('with-debug') ? ' debug=1' : ''}")
|
210
|
-
else
|
211
|
-
sh("#{get_config('makeprog')}#{get_config('with-debug') ? ' debug=1' : ''}")
|
212
|
-
end
|
151
|
+
sh("#{get_config('makeprog')} -j#{R2CORBA::Config.cpu_cores} #{get_config('with-debug') ? ' debug=1' : ''}")
|
213
152
|
ensure
|
214
153
|
Dir.chdir cur_dir
|
215
154
|
end
|
data/rakelib/ext.rb
CHANGED
@@ -16,7 +16,7 @@ require File.join(File.dirname(__FILE__), 'ext_r2tao.rb')
|
|
16
16
|
module R2CORBA
|
17
17
|
|
18
18
|
module Ext
|
19
|
-
ACE_FILES
|
19
|
+
ACE_FILES = [
|
20
20
|
'ACE',
|
21
21
|
'TAO',
|
22
22
|
'TAO_TypeCodeFactory',
|
@@ -122,6 +122,7 @@ debug=#{get_config('with-debug') ? 1 : 0}
|
|
122
122
|
fl_reactor=0
|
123
123
|
tk_reactor=0
|
124
124
|
boost=0
|
125
|
+
inline=0
|
125
126
|
include $(ACE_ROOT)/include/makeinclude/platform_mingw32.GNU
|
126
127
|
}
|
127
128
|
when /linux/
|
@@ -143,7 +144,7 @@ debug=#{get_config('with-debug') ? 1 : 0}
|
|
143
144
|
fl_reactor=0
|
144
145
|
tk_reactor=0
|
145
146
|
no_hidden_visibility=1
|
146
|
-
#{ /^cc/i =~ RB_CONFIG['CC'] ? 'include $(ACE_ROOT)/include/makeinclude/platform_sunos5_sunc++.GNU' :
|
147
|
+
#{ /^cc/i =~ RB_CONFIG['CC'] ? 'include $(ACE_ROOT)/include/makeinclude/platform_sunos5_sunc++.GNU' : 'include $(ACE_ROOT)/include/makeinclude/platform_sunos5_g++.GNU' }
|
147
148
|
LDFLAGS += #{RB_CONFIG['SOLIBS']} #{ /^cc/i =~ RB_CONFIG['CC'] ? '-lCrun -lCstd' : ''}
|
148
149
|
}
|
149
150
|
when /darwin/
|
@@ -207,23 +208,23 @@ ipv6=#{get_config('with-ipv6') ? 1 : 0}
|
|
207
208
|
end
|
208
209
|
|
209
210
|
def self.ace_config_path
|
210
|
-
File.join(get_config('aceroot'),'ace','config.h')
|
211
|
+
File.join(get_config('aceroot'), 'ace', 'config.h')
|
211
212
|
end
|
212
213
|
|
213
214
|
def self.platform_macros_path
|
214
|
-
File.join(get_config('aceroot'),'include','makeinclude','platform_macros.GNU')
|
215
|
+
File.join(get_config('aceroot'), 'include', 'makeinclude', 'platform_macros.GNU')
|
215
216
|
end
|
216
217
|
|
217
218
|
def self.default_features_path
|
218
|
-
File.join(get_config('aceroot'),'bin','MakeProjectCreator','config','default.features')
|
219
|
+
File.join(get_config('aceroot'), 'bin', 'MakeProjectCreator', 'config', 'default.features')
|
219
220
|
end
|
220
221
|
|
221
222
|
def self.tao_mwc_path
|
222
|
-
File.join(get_config('aceroot'),'TAO4Ruby.mwc')
|
223
|
+
File.join(get_config('aceroot'), 'TAO4Ruby.mwc')
|
223
224
|
end
|
224
225
|
|
225
226
|
def self.tao_makefile
|
226
|
-
File.join(get_config('aceroot'),'GNUmakefile')
|
227
|
+
File.join(get_config('aceroot'), 'GNUmakefile')
|
227
228
|
end
|
228
229
|
|
229
230
|
def self.ext_makefile
|
@@ -238,12 +239,12 @@ ipv6=#{get_config('with-ipv6') ? 1 : 0}
|
|
238
239
|
so_ext = '.dylib'
|
239
240
|
|
240
241
|
inst_extlibs = Dir.glob(File.join('ext', '*.bundle'))
|
241
|
-
inst_dylibs = inst_extlibs + ACE_FILES.collect {|dep| File.join(get_config('aceroot'),'lib', 'lib'+dep+so_ext)}
|
242
|
+
inst_dylibs = inst_extlibs + ACE_FILES.collect {|dep| File.join(get_config('aceroot'), 'lib', 'lib' + dep + so_ext)}
|
242
243
|
# cross dependencies of ext dynamic libs on each other
|
243
244
|
# make sure they refer to *.bundle NOT *.dylib
|
244
245
|
inst_extlibs.each do |extlib|
|
245
246
|
inst_extlibs.each do |dep|
|
246
|
-
dep_org = File.basename(dep, '.bundle')+so_ext
|
247
|
+
dep_org = File.basename(dep, '.bundle') + so_ext
|
247
248
|
sh("install_name_tool -change #{dep_org} @rpath/#{File.basename(dep)} #{extlib}")
|
248
249
|
end
|
249
250
|
# add install directory as rpath; first delete rpath ignoring errors, next add the rpath
|
@@ -253,7 +254,7 @@ ipv6=#{get_config('with-ipv6') ? 1 : 0}
|
|
253
254
|
# dependencies on ACE+TAO libs
|
254
255
|
inst_dylibs.each do |dylib|
|
255
256
|
ACE_FILES.each do |dep|
|
256
|
-
command("install_name_tool -change lib#{dep+so_ext} @rpath/lib#{dep+so_ext} #{dylib}")
|
257
|
+
command("install_name_tool -change lib#{dep + so_ext} @rpath/lib#{dep + so_ext} #{dylib}")
|
257
258
|
end
|
258
259
|
# add current dir and install dir as rpath entries; first delete rpath ignoring errors, next add the rpath
|
259
260
|
sh("install_name_tool -delete_rpath . #{dylib} >/dev/null 2>&1")
|
@@ -264,8 +265,8 @@ ipv6=#{get_config('with-ipv6') ? 1 : 0}
|
|
264
265
|
elsif !is_win32
|
265
266
|
# create unversioned ACE+TAO lib symlinks
|
266
267
|
|
267
|
-
ACE_FILES.collect {|dep| File.join(get_config('aceroot'),'lib', 'lib'+dep+'.so')}.each do |lib|
|
268
|
-
Dir.glob(lib+'.*').each {|verlib| File.symlink(verlib, lib) unless File.exist?(lib)}
|
268
|
+
ACE_FILES.collect {|dep| File.join(get_config('aceroot'), 'lib', 'lib' + dep + '.so')}.each do |lib|
|
269
|
+
Dir.glob(lib + '.*').each {|verlib| File.symlink(verlib, lib) unless File.exist?(lib)}
|
269
270
|
end
|
270
271
|
end
|
271
272
|
end
|
@@ -274,4 +275,3 @@ ipv6=#{get_config('with-ipv6') ? 1 : 0}
|
|
274
275
|
end # Ext
|
275
276
|
|
276
277
|
end # R2CORBA
|
277
|
-
|