r2corba 1.4.1-x86-mingw32 → 1.5.1-x86-mingw32

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