@ai-ecoverse/wasix-ruby 3.4.11-3 → 3.4.11-4

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 (1127) hide show
  1. package/PRESTAGE.md +22 -38
  2. package/bin/bundle +1 -1
  3. package/bin/bundler +1 -1
  4. package/bin/erb +1 -1
  5. package/bin/gem +1 -1
  6. package/bin/irb +1 -1
  7. package/bin/rake +1 -1
  8. package/bin/ruby.wasm +0 -0
  9. package/lib/ruby/3.4.0/expect.rb +71 -0
  10. package/lib/ruby/3.4.0/wasm32-wasi/rbconfig.rb +1 -1
  11. package/package.json +8 -6
  12. package/lib/ruby/3.4.11/English.gemspec +0 -22
  13. package/lib/ruby/3.4.11/English.rb +0 -164
  14. package/lib/ruby/3.4.11/benchmark.gemspec +0 -32
  15. package/lib/ruby/3.4.11/benchmark.rb +0 -594
  16. package/lib/ruby/3.4.11/bundled_gems.rb +0 -248
  17. package/lib/ruby/3.4.11/bundler/.document +0 -1
  18. package/lib/ruby/3.4.11/bundler/build_metadata.rb +0 -43
  19. package/lib/ruby/3.4.11/bundler/bundler.gemspec +0 -45
  20. package/lib/ruby/3.4.11/bundler/capistrano.rb +0 -22
  21. package/lib/ruby/3.4.11/bundler/checksum.rb +0 -264
  22. package/lib/ruby/3.4.11/bundler/ci_detector.rb +0 -75
  23. package/lib/ruby/3.4.11/bundler/cli/add.rb +0 -49
  24. package/lib/ruby/3.4.11/bundler/cli/binstubs.rb +0 -57
  25. package/lib/ruby/3.4.11/bundler/cli/cache.rb +0 -43
  26. package/lib/ruby/3.4.11/bundler/cli/check.rb +0 -40
  27. package/lib/ruby/3.4.11/bundler/cli/clean.rb +0 -25
  28. package/lib/ruby/3.4.11/bundler/cli/common.rb +0 -138
  29. package/lib/ruby/3.4.11/bundler/cli/config.rb +0 -204
  30. package/lib/ruby/3.4.11/bundler/cli/console.rb +0 -42
  31. package/lib/ruby/3.4.11/bundler/cli/doctor/diagnose.rb +0 -167
  32. package/lib/ruby/3.4.11/bundler/cli/doctor/ssl.rb +0 -249
  33. package/lib/ruby/3.4.11/bundler/cli/doctor.rb +0 -33
  34. package/lib/ruby/3.4.11/bundler/cli/exec.rb +0 -89
  35. package/lib/ruby/3.4.11/bundler/cli/fund.rb +0 -36
  36. package/lib/ruby/3.4.11/bundler/cli/gem.rb +0 -467
  37. package/lib/ruby/3.4.11/bundler/cli/info.rb +0 -83
  38. package/lib/ruby/3.4.11/bundler/cli/init.rb +0 -51
  39. package/lib/ruby/3.4.11/bundler/cli/inject.rb +0 -60
  40. package/lib/ruby/3.4.11/bundler/cli/install.rb +0 -199
  41. package/lib/ruby/3.4.11/bundler/cli/issue.rb +0 -41
  42. package/lib/ruby/3.4.11/bundler/cli/list.rb +0 -66
  43. package/lib/ruby/3.4.11/bundler/cli/lock.rb +0 -94
  44. package/lib/ruby/3.4.11/bundler/cli/open.rb +0 -29
  45. package/lib/ruby/3.4.11/bundler/cli/outdated.rb +0 -297
  46. package/lib/ruby/3.4.11/bundler/cli/platform.rb +0 -48
  47. package/lib/ruby/3.4.11/bundler/cli/plugin.rb +0 -35
  48. package/lib/ruby/3.4.11/bundler/cli/pristine.rb +0 -60
  49. package/lib/ruby/3.4.11/bundler/cli/remove.rb +0 -17
  50. package/lib/ruby/3.4.11/bundler/cli/show.rb +0 -75
  51. package/lib/ruby/3.4.11/bundler/cli/update.rb +0 -123
  52. package/lib/ruby/3.4.11/bundler/cli/viz.rb +0 -31
  53. package/lib/ruby/3.4.11/bundler/cli.rb +0 -790
  54. package/lib/ruby/3.4.11/bundler/compact_index_client/cache.rb +0 -96
  55. package/lib/ruby/3.4.11/bundler/compact_index_client/cache_file.rb +0 -148
  56. package/lib/ruby/3.4.11/bundler/compact_index_client/parser.rb +0 -84
  57. package/lib/ruby/3.4.11/bundler/compact_index_client/updater.rb +0 -105
  58. package/lib/ruby/3.4.11/bundler/compact_index_client.rb +0 -97
  59. package/lib/ruby/3.4.11/bundler/constants.rb +0 -14
  60. package/lib/ruby/3.4.11/bundler/current_ruby.rb +0 -82
  61. package/lib/ruby/3.4.11/bundler/definition.rb +0 -1187
  62. package/lib/ruby/3.4.11/bundler/dependency.rb +0 -151
  63. package/lib/ruby/3.4.11/bundler/deployment.rb +0 -69
  64. package/lib/ruby/3.4.11/bundler/deprecate.rb +0 -44
  65. package/lib/ruby/3.4.11/bundler/digest.rb +0 -71
  66. package/lib/ruby/3.4.11/bundler/dsl.rb +0 -638
  67. package/lib/ruby/3.4.11/bundler/endpoint_specification.rb +0 -174
  68. package/lib/ruby/3.4.11/bundler/env.rb +0 -148
  69. package/lib/ruby/3.4.11/bundler/environment_preserver.rb +0 -68
  70. package/lib/ruby/3.4.11/bundler/errors.rb +0 -281
  71. package/lib/ruby/3.4.11/bundler/feature_flag.rb +0 -50
  72. package/lib/ruby/3.4.11/bundler/fetcher/base.rb +0 -52
  73. package/lib/ruby/3.4.11/bundler/fetcher/compact_index.rb +0 -120
  74. package/lib/ruby/3.4.11/bundler/fetcher/dependency.rb +0 -78
  75. package/lib/ruby/3.4.11/bundler/fetcher/downloader.rb +0 -91
  76. package/lib/ruby/3.4.11/bundler/fetcher/gem_remote_fetcher.rb +0 -16
  77. package/lib/ruby/3.4.11/bundler/fetcher/index.rb +0 -25
  78. package/lib/ruby/3.4.11/bundler/fetcher.rb +0 -331
  79. package/lib/ruby/3.4.11/bundler/force_platform.rb +0 -16
  80. package/lib/ruby/3.4.11/bundler/friendly_errors.rb +0 -126
  81. package/lib/ruby/3.4.11/bundler/gem_helper.rb +0 -237
  82. package/lib/ruby/3.4.11/bundler/gem_helpers.rb +0 -144
  83. package/lib/ruby/3.4.11/bundler/gem_tasks.rb +0 -7
  84. package/lib/ruby/3.4.11/bundler/gem_version_promoter.rb +0 -147
  85. package/lib/ruby/3.4.11/bundler/graph.rb +0 -152
  86. package/lib/ruby/3.4.11/bundler/index.rb +0 -205
  87. package/lib/ruby/3.4.11/bundler/injector.rb +0 -285
  88. package/lib/ruby/3.4.11/bundler/inline.rb +0 -98
  89. package/lib/ruby/3.4.11/bundler/installer/gem_installer.rb +0 -85
  90. package/lib/ruby/3.4.11/bundler/installer/parallel_installer.rb +0 -203
  91. package/lib/ruby/3.4.11/bundler/installer/standalone.rb +0 -113
  92. package/lib/ruby/3.4.11/bundler/installer.rb +0 -243
  93. package/lib/ruby/3.4.11/bundler/lazy_specification.rb +0 -243
  94. package/lib/ruby/3.4.11/bundler/lockfile_generator.rb +0 -104
  95. package/lib/ruby/3.4.11/bundler/lockfile_parser.rb +0 -300
  96. package/lib/ruby/3.4.11/bundler/man/.document +0 -1
  97. package/lib/ruby/3.4.11/bundler/man/bundle-add.1 +0 -76
  98. package/lib/ruby/3.4.11/bundler/man/bundle-add.1.ronn +0 -87
  99. package/lib/ruby/3.4.11/bundler/man/bundle-binstubs.1 +0 -33
  100. package/lib/ruby/3.4.11/bundler/man/bundle-binstubs.1.ronn +0 -44
  101. package/lib/ruby/3.4.11/bundler/man/bundle-cache.1 +0 -68
  102. package/lib/ruby/3.4.11/bundler/man/bundle-cache.1.ronn +0 -108
  103. package/lib/ruby/3.4.11/bundler/man/bundle-check.1 +0 -24
  104. package/lib/ruby/3.4.11/bundler/man/bundle-check.1.ronn +0 -31
  105. package/lib/ruby/3.4.11/bundler/man/bundle-clean.1 +0 -17
  106. package/lib/ruby/3.4.11/bundler/man/bundle-clean.1.ronn +0 -18
  107. package/lib/ruby/3.4.11/bundler/man/bundle-config.1 +0 -317
  108. package/lib/ruby/3.4.11/bundler/man/bundle-config.1.ronn +0 -408
  109. package/lib/ruby/3.4.11/bundler/man/bundle-console.1 +0 -33
  110. package/lib/ruby/3.4.11/bundler/man/bundle-console.1.ronn +0 -39
  111. package/lib/ruby/3.4.11/bundler/man/bundle-doctor.1 +0 -30
  112. package/lib/ruby/3.4.11/bundler/man/bundle-doctor.1.ronn +0 -33
  113. package/lib/ruby/3.4.11/bundler/man/bundle-env.1 +0 -9
  114. package/lib/ruby/3.4.11/bundler/man/bundle-env.1.ronn +0 -10
  115. package/lib/ruby/3.4.11/bundler/man/bundle-exec.1 +0 -107
  116. package/lib/ruby/3.4.11/bundler/man/bundle-exec.1.ronn +0 -154
  117. package/lib/ruby/3.4.11/bundler/man/bundle-fund.1 +0 -22
  118. package/lib/ruby/3.4.11/bundler/man/bundle-fund.1.ronn +0 -25
  119. package/lib/ruby/3.4.11/bundler/man/bundle-gem.1 +0 -87
  120. package/lib/ruby/3.4.11/bundler/man/bundle-gem.1.ronn +0 -149
  121. package/lib/ruby/3.4.11/bundler/man/bundle-help.1 +0 -9
  122. package/lib/ruby/3.4.11/bundler/man/bundle-help.1.ronn +0 -12
  123. package/lib/ruby/3.4.11/bundler/man/bundle-info.1 +0 -17
  124. package/lib/ruby/3.4.11/bundler/man/bundle-info.1.ronn +0 -21
  125. package/lib/ruby/3.4.11/bundler/man/bundle-init.1 +0 -20
  126. package/lib/ruby/3.4.11/bundler/man/bundle-init.1.ronn +0 -32
  127. package/lib/ruby/3.4.11/bundler/man/bundle-inject.1 +0 -31
  128. package/lib/ruby/3.4.11/bundler/man/bundle-inject.1.ronn +0 -32
  129. package/lib/ruby/3.4.11/bundler/man/bundle-install.1 +0 -218
  130. package/lib/ruby/3.4.11/bundler/man/bundle-install.1.ronn +0 -387
  131. package/lib/ruby/3.4.11/bundler/man/bundle-issue.1 +0 -45
  132. package/lib/ruby/3.4.11/bundler/man/bundle-issue.1.ronn +0 -37
  133. package/lib/ruby/3.4.11/bundler/man/bundle-licenses.1 +0 -9
  134. package/lib/ruby/3.4.11/bundler/man/bundle-licenses.1.ronn +0 -10
  135. package/lib/ruby/3.4.11/bundler/man/bundle-list.1 +0 -35
  136. package/lib/ruby/3.4.11/bundler/man/bundle-list.1.ronn +0 -36
  137. package/lib/ruby/3.4.11/bundler/man/bundle-lock.1 +0 -75
  138. package/lib/ruby/3.4.11/bundler/man/bundle-lock.1.ronn +0 -115
  139. package/lib/ruby/3.4.11/bundler/man/bundle-open.1 +0 -32
  140. package/lib/ruby/3.4.11/bundler/man/bundle-open.1.ronn +0 -28
  141. package/lib/ruby/3.4.11/bundler/man/bundle-outdated.1 +0 -103
  142. package/lib/ruby/3.4.11/bundler/man/bundle-outdated.1.ronn +0 -110
  143. package/lib/ruby/3.4.11/bundler/man/bundle-platform.1 +0 -49
  144. package/lib/ruby/3.4.11/bundler/man/bundle-platform.1.ronn +0 -49
  145. package/lib/ruby/3.4.11/bundler/man/bundle-plugin.1 +0 -58
  146. package/lib/ruby/3.4.11/bundler/man/bundle-plugin.1.ronn +0 -63
  147. package/lib/ruby/3.4.11/bundler/man/bundle-pristine.1 +0 -23
  148. package/lib/ruby/3.4.11/bundler/man/bundle-pristine.1.ronn +0 -34
  149. package/lib/ruby/3.4.11/bundler/man/bundle-remove.1 +0 -21
  150. package/lib/ruby/3.4.11/bundler/man/bundle-remove.1.ronn +0 -23
  151. package/lib/ruby/3.4.11/bundler/man/bundle-show.1 +0 -19
  152. package/lib/ruby/3.4.11/bundler/man/bundle-show.1.ronn +0 -25
  153. package/lib/ruby/3.4.11/bundler/man/bundle-update.1 +0 -281
  154. package/lib/ruby/3.4.11/bundler/man/bundle-update.1.ronn +0 -359
  155. package/lib/ruby/3.4.11/bundler/man/bundle-version.1 +0 -22
  156. package/lib/ruby/3.4.11/bundler/man/bundle-version.1.ronn +0 -24
  157. package/lib/ruby/3.4.11/bundler/man/bundle-viz.1 +0 -30
  158. package/lib/ruby/3.4.11/bundler/man/bundle-viz.1.ronn +0 -36
  159. package/lib/ruby/3.4.11/bundler/man/bundle.1 +0 -102
  160. package/lib/ruby/3.4.11/bundler/man/bundle.1.ronn +0 -116
  161. package/lib/ruby/3.4.11/bundler/man/gemfile.5 +0 -472
  162. package/lib/ruby/3.4.11/bundler/man/gemfile.5.ronn +0 -558
  163. package/lib/ruby/3.4.11/bundler/man/index.txt +0 -33
  164. package/lib/ruby/3.4.11/bundler/match_metadata.rb +0 -30
  165. package/lib/ruby/3.4.11/bundler/match_platform.rb +0 -23
  166. package/lib/ruby/3.4.11/bundler/match_remote_metadata.rb +0 -29
  167. package/lib/ruby/3.4.11/bundler/materialization.rb +0 -59
  168. package/lib/ruby/3.4.11/bundler/mirror.rb +0 -221
  169. package/lib/ruby/3.4.11/bundler/plugin/api/source.rb +0 -322
  170. package/lib/ruby/3.4.11/bundler/plugin/api.rb +0 -81
  171. package/lib/ruby/3.4.11/bundler/plugin/dsl.rb +0 -53
  172. package/lib/ruby/3.4.11/bundler/plugin/events.rb +0 -85
  173. package/lib/ruby/3.4.11/bundler/plugin/index.rb +0 -197
  174. package/lib/ruby/3.4.11/bundler/plugin/installer/git.rb +0 -34
  175. package/lib/ruby/3.4.11/bundler/plugin/installer/path.rb +0 -26
  176. package/lib/ruby/3.4.11/bundler/plugin/installer/rubygems.rb +0 -19
  177. package/lib/ruby/3.4.11/bundler/plugin/installer.rb +0 -132
  178. package/lib/ruby/3.4.11/bundler/plugin/source_list.rb +0 -31
  179. package/lib/ruby/3.4.11/bundler/plugin.rb +0 -378
  180. package/lib/ruby/3.4.11/bundler/process_lock.rb +0 -20
  181. package/lib/ruby/3.4.11/bundler/remote_specification.rb +0 -126
  182. package/lib/ruby/3.4.11/bundler/resolver/base.rb +0 -118
  183. package/lib/ruby/3.4.11/bundler/resolver/candidate.rb +0 -85
  184. package/lib/ruby/3.4.11/bundler/resolver/incompatibility.rb +0 -15
  185. package/lib/ruby/3.4.11/bundler/resolver/package.rb +0 -94
  186. package/lib/ruby/3.4.11/bundler/resolver/root.rb +0 -25
  187. package/lib/ruby/3.4.11/bundler/resolver/spec_group.rb +0 -74
  188. package/lib/ruby/3.4.11/bundler/resolver/strategy.rb +0 -40
  189. package/lib/ruby/3.4.11/bundler/resolver.rb +0 -526
  190. package/lib/ruby/3.4.11/bundler/retry.rb +0 -66
  191. package/lib/ruby/3.4.11/bundler/ruby_dsl.rb +0 -62
  192. package/lib/ruby/3.4.11/bundler/ruby_version.rb +0 -137
  193. package/lib/ruby/3.4.11/bundler/rubygems_ext.rb +0 -485
  194. package/lib/ruby/3.4.11/bundler/rubygems_gem_installer.rb +0 -172
  195. package/lib/ruby/3.4.11/bundler/rubygems_integration.rb +0 -455
  196. package/lib/ruby/3.4.11/bundler/runtime.rb +0 -320
  197. package/lib/ruby/3.4.11/bundler/safe_marshal.rb +0 -31
  198. package/lib/ruby/3.4.11/bundler/self_manager.rb +0 -206
  199. package/lib/ruby/3.4.11/bundler/settings/validator.rb +0 -102
  200. package/lib/ruby/3.4.11/bundler/settings.rb +0 -599
  201. package/lib/ruby/3.4.11/bundler/setup.rb +0 -39
  202. package/lib/ruby/3.4.11/bundler/shared_helpers.rb +0 -398
  203. package/lib/ruby/3.4.11/bundler/similarity_detector.rb +0 -63
  204. package/lib/ruby/3.4.11/bundler/source/gemspec.rb +0 -15
  205. package/lib/ruby/3.4.11/bundler/source/git/git_proxy.rb +0 -472
  206. package/lib/ruby/3.4.11/bundler/source/git.rb +0 -452
  207. package/lib/ruby/3.4.11/bundler/source/metadata.rb +0 -63
  208. package/lib/ruby/3.4.11/bundler/source/path/installer.rb +0 -53
  209. package/lib/ruby/3.4.11/bundler/source/path.rb +0 -250
  210. package/lib/ruby/3.4.11/bundler/source/rubygems/remote.rb +0 -76
  211. package/lib/ruby/3.4.11/bundler/source/rubygems.rb +0 -522
  212. package/lib/ruby/3.4.11/bundler/source/rubygems_aggregate.rb +0 -68
  213. package/lib/ruby/3.4.11/bundler/source.rb +0 -118
  214. package/lib/ruby/3.4.11/bundler/source_list.rb +0 -273
  215. package/lib/ruby/3.4.11/bundler/source_map.rb +0 -71
  216. package/lib/ruby/3.4.11/bundler/spec_set.rb +0 -395
  217. package/lib/ruby/3.4.11/bundler/stub_specification.rb +0 -146
  218. package/lib/ruby/3.4.11/bundler/templates/.document +0 -1
  219. package/lib/ruby/3.4.11/bundler/templates/Executable +0 -27
  220. package/lib/ruby/3.4.11/bundler/templates/Executable.bundler +0 -109
  221. package/lib/ruby/3.4.11/bundler/templates/Executable.standalone +0 -14
  222. package/lib/ruby/3.4.11/bundler/templates/Gemfile +0 -5
  223. package/lib/ruby/3.4.11/bundler/templates/newgem/CHANGELOG.md.tt +0 -5
  224. package/lib/ruby/3.4.11/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +0 -132
  225. package/lib/ruby/3.4.11/bundler/templates/newgem/Cargo.toml.tt +0 -7
  226. package/lib/ruby/3.4.11/bundler/templates/newgem/Gemfile.tt +0 -24
  227. package/lib/ruby/3.4.11/bundler/templates/newgem/LICENSE.txt.tt +0 -21
  228. package/lib/ruby/3.4.11/bundler/templates/newgem/README.md.tt +0 -49
  229. package/lib/ruby/3.4.11/bundler/templates/newgem/Rakefile.tt +0 -67
  230. package/lib/ruby/3.4.11/bundler/templates/newgem/bin/console.tt +0 -11
  231. package/lib/ruby/3.4.11/bundler/templates/newgem/bin/setup.tt +0 -8
  232. package/lib/ruby/3.4.11/bundler/templates/newgem/circleci/config.yml.tt +0 -25
  233. package/lib/ruby/3.4.11/bundler/templates/newgem/exe/newgem.tt +0 -3
  234. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +0 -15
  235. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/extconf-c.rb.tt +0 -10
  236. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/extconf-rust.rb.tt +0 -6
  237. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/newgem.c.tt +0 -9
  238. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/newgem.h.tt +0 -6
  239. package/lib/ruby/3.4.11/bundler/templates/newgem/ext/newgem/src/lib.rs.tt +0 -12
  240. package/lib/ruby/3.4.11/bundler/templates/newgem/github/workflows/main.yml.tt +0 -37
  241. package/lib/ruby/3.4.11/bundler/templates/newgem/gitignore.tt +0 -23
  242. package/lib/ruby/3.4.11/bundler/templates/newgem/gitlab-ci.yml.tt +0 -18
  243. package/lib/ruby/3.4.11/bundler/templates/newgem/lib/newgem/version.rb.tt +0 -9
  244. package/lib/ruby/3.4.11/bundler/templates/newgem/lib/newgem.rb.tt +0 -15
  245. package/lib/ruby/3.4.11/bundler/templates/newgem/newgem.gemspec.tt +0 -52
  246. package/lib/ruby/3.4.11/bundler/templates/newgem/rspec.tt +0 -3
  247. package/lib/ruby/3.4.11/bundler/templates/newgem/rubocop.yml.tt +0 -8
  248. package/lib/ruby/3.4.11/bundler/templates/newgem/sig/newgem.rbs.tt +0 -8
  249. package/lib/ruby/3.4.11/bundler/templates/newgem/spec/newgem_spec.rb.tt +0 -11
  250. package/lib/ruby/3.4.11/bundler/templates/newgem/spec/spec_helper.rb.tt +0 -15
  251. package/lib/ruby/3.4.11/bundler/templates/newgem/standard.yml.tt +0 -3
  252. package/lib/ruby/3.4.11/bundler/templates/newgem/test/minitest/test_helper.rb.tt +0 -6
  253. package/lib/ruby/3.4.11/bundler/templates/newgem/test/minitest/test_newgem.rb.tt +0 -13
  254. package/lib/ruby/3.4.11/bundler/templates/newgem/test/test-unit/newgem_test.rb.tt +0 -15
  255. package/lib/ruby/3.4.11/bundler/templates/newgem/test/test-unit/test_helper.rb.tt +0 -6
  256. package/lib/ruby/3.4.11/bundler/ui/rg_proxy.rb +0 -19
  257. package/lib/ruby/3.4.11/bundler/ui/shell.rb +0 -187
  258. package/lib/ruby/3.4.11/bundler/ui/silent.rb +0 -96
  259. package/lib/ruby/3.4.11/bundler/ui.rb +0 -9
  260. package/lib/ruby/3.4.11/bundler/uri_credentials_filter.rb +0 -43
  261. package/lib/ruby/3.4.11/bundler/uri_normalizer.rb +0 -23
  262. package/lib/ruby/3.4.11/bundler/vendor/.document +0 -1
  263. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/.document +0 -1
  264. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/timed_stack.rb +0 -224
  265. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/version.rb +0 -3
  266. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb +0 -56
  267. package/lib/ruby/3.4.11/bundler/vendor/connection_pool/lib/connection_pool.rb +0 -186
  268. package/lib/ruby/3.4.11/bundler/vendor/fileutils/.document +0 -1
  269. package/lib/ruby/3.4.11/bundler/vendor/fileutils/lib/fileutils.rb +0 -2696
  270. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/.document +0 -1
  271. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb +0 -41
  272. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/pool.rb +0 -65
  273. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent/timed_stack_multi.rb +0 -79
  274. package/lib/ruby/3.4.11/bundler/vendor/net-http-persistent/lib/net/http/persistent.rb +0 -1111
  275. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/.document +0 -1
  276. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/assignment.rb +0 -20
  277. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/basic_package_source.rb +0 -169
  278. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/failure_writer.rb +0 -182
  279. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/incompatibility.rb +0 -150
  280. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/package.rb +0 -43
  281. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/partial_solution.rb +0 -121
  282. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/rubygems.rb +0 -45
  283. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/solve_failure.rb +0 -19
  284. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/static_package_source.rb +0 -61
  285. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/strategy.rb +0 -42
  286. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/term.rb +0 -105
  287. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version.rb +0 -3
  288. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_constraint.rb +0 -129
  289. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_range.rb +0 -423
  290. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_solver.rb +0 -236
  291. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub/version_union.rb +0 -178
  292. package/lib/ruby/3.4.11/bundler/vendor/pub_grub/lib/pub_grub.rb +0 -31
  293. package/lib/ruby/3.4.11/bundler/vendor/securerandom/.document +0 -1
  294. package/lib/ruby/3.4.11/bundler/vendor/securerandom/lib/securerandom.rb +0 -102
  295. package/lib/ruby/3.4.11/bundler/vendor/thor/.document +0 -1
  296. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/create_file.rb +0 -105
  297. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/create_link.rb +0 -61
  298. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/directory.rb +0 -108
  299. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/empty_directory.rb +0 -143
  300. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/file_manipulation.rb +0 -371
  301. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions/inject_into_file.rb +0 -130
  302. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/actions.rb +0 -340
  303. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/base.rb +0 -825
  304. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/command.rb +0 -151
  305. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +0 -107
  306. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/error.rb +0 -106
  307. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/group.rb +0 -292
  308. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/invocation.rb +0 -178
  309. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor/basic.rb +0 -37
  310. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor/readline.rb +0 -88
  311. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/line_editor.rb +0 -17
  312. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/nested_context.rb +0 -29
  313. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/argument.rb +0 -86
  314. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/arguments.rb +0 -195
  315. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/option.rb +0 -178
  316. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser/options.rb +0 -294
  317. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/parser.rb +0 -4
  318. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/rake_compat.rb +0 -72
  319. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/runner.rb +0 -335
  320. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/basic.rb +0 -388
  321. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/color.rb +0 -112
  322. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/column_printer.rb +0 -29
  323. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/html.rb +0 -81
  324. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/table_printer.rb +0 -118
  325. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/terminal.rb +0 -42
  326. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell/wrapped_printer.rb +0 -38
  327. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/shell.rb +0 -81
  328. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/util.rb +0 -285
  329. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor/version.rb +0 -3
  330. package/lib/ruby/3.4.11/bundler/vendor/thor/lib/thor.rb +0 -674
  331. package/lib/ruby/3.4.11/bundler/vendor/tsort/.document +0 -1
  332. package/lib/ruby/3.4.11/bundler/vendor/tsort/lib/tsort.rb +0 -455
  333. package/lib/ruby/3.4.11/bundler/vendor/uri/.document +0 -1
  334. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/common.rb +0 -880
  335. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/file.rb +0 -100
  336. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ftp.rb +0 -267
  337. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/generic.rb +0 -1592
  338. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/http.rb +0 -125
  339. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/https.rb +0 -23
  340. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ldap.rb +0 -261
  341. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ldaps.rb +0 -22
  342. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/mailto.rb +0 -293
  343. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +0 -546
  344. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/rfc3986_parser.rb +0 -206
  345. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/version.rb +0 -6
  346. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/ws.rb +0 -83
  347. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri/wss.rb +0 -23
  348. package/lib/ruby/3.4.11/bundler/vendor/uri/lib/uri.rb +0 -104
  349. package/lib/ruby/3.4.11/bundler/vendored_fileutils.rb +0 -4
  350. package/lib/ruby/3.4.11/bundler/vendored_net_http.rb +0 -23
  351. package/lib/ruby/3.4.11/bundler/vendored_persistent.rb +0 -11
  352. package/lib/ruby/3.4.11/bundler/vendored_pub_grub.rb +0 -4
  353. package/lib/ruby/3.4.11/bundler/vendored_securerandom.rb +0 -12
  354. package/lib/ruby/3.4.11/bundler/vendored_thor.rb +0 -8
  355. package/lib/ruby/3.4.11/bundler/vendored_timeout.rb +0 -12
  356. package/lib/ruby/3.4.11/bundler/vendored_tsort.rb +0 -4
  357. package/lib/ruby/3.4.11/bundler/vendored_uri.rb +0 -21
  358. package/lib/ruby/3.4.11/bundler/version.rb +0 -13
  359. package/lib/ruby/3.4.11/bundler/vlad.rb +0 -17
  360. package/lib/ruby/3.4.11/bundler/worker.rb +0 -117
  361. package/lib/ruby/3.4.11/bundler/yaml_serializer.rb +0 -98
  362. package/lib/ruby/3.4.11/bundler.rb +0 -701
  363. package/lib/ruby/3.4.11/cgi/cgi.gemspec +0 -43
  364. package/lib/ruby/3.4.11/cgi/cookie.rb +0 -210
  365. package/lib/ruby/3.4.11/cgi/core.rb +0 -900
  366. package/lib/ruby/3.4.11/cgi/html.rb +0 -1035
  367. package/lib/ruby/3.4.11/cgi/session/pstore.rb +0 -91
  368. package/lib/ruby/3.4.11/cgi/session.rb +0 -562
  369. package/lib/ruby/3.4.11/cgi/util.rb +0 -258
  370. package/lib/ruby/3.4.11/cgi.rb +0 -297
  371. package/lib/ruby/3.4.11/delegate.gemspec +0 -29
  372. package/lib/ruby/3.4.11/delegate.rb +0 -444
  373. package/lib/ruby/3.4.11/did_you_mean/core_ext/name_error.rb +0 -57
  374. package/lib/ruby/3.4.11/did_you_mean/did_you_mean.gemspec +0 -25
  375. package/lib/ruby/3.4.11/did_you_mean/experimental.rb +0 -2
  376. package/lib/ruby/3.4.11/did_you_mean/formatter.rb +0 -44
  377. package/lib/ruby/3.4.11/did_you_mean/formatters/plain_formatter.rb +0 -4
  378. package/lib/ruby/3.4.11/did_you_mean/formatters/verbose_formatter.rb +0 -10
  379. package/lib/ruby/3.4.11/did_you_mean/jaro_winkler.rb +0 -84
  380. package/lib/ruby/3.4.11/did_you_mean/levenshtein.rb +0 -57
  381. package/lib/ruby/3.4.11/did_you_mean/spell_checker.rb +0 -46
  382. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/key_error_checker.rb +0 -28
  383. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/method_name_checker.rb +0 -79
  384. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb +0 -49
  385. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb +0 -85
  386. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/name_error_checkers.rb +0 -20
  387. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/null_checker.rb +0 -6
  388. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/pattern_key_name_checker.rb +0 -28
  389. package/lib/ruby/3.4.11/did_you_mean/spell_checkers/require_path_checker.rb +0 -39
  390. package/lib/ruby/3.4.11/did_you_mean/tree_spell_checker.rb +0 -109
  391. package/lib/ruby/3.4.11/did_you_mean/verbose.rb +0 -2
  392. package/lib/ruby/3.4.11/did_you_mean/version.rb +0 -3
  393. package/lib/ruby/3.4.11/did_you_mean.rb +0 -131
  394. package/lib/ruby/3.4.11/erb/compiler.rb +0 -472
  395. package/lib/ruby/3.4.11/erb/def_method.rb +0 -47
  396. package/lib/ruby/3.4.11/erb/util.rb +0 -63
  397. package/lib/ruby/3.4.11/erb/version.rb +0 -5
  398. package/lib/ruby/3.4.11/erb.gemspec +0 -38
  399. package/lib/ruby/3.4.11/erb.rb +0 -509
  400. package/lib/ruby/3.4.11/error_highlight/base.rb +0 -830
  401. package/lib/ruby/3.4.11/error_highlight/core_ext.rb +0 -47
  402. package/lib/ruby/3.4.11/error_highlight/error_highlight.gemspec +0 -27
  403. package/lib/ruby/3.4.11/error_highlight/formatter.rb +0 -74
  404. package/lib/ruby/3.4.11/error_highlight/version.rb +0 -3
  405. package/lib/ruby/3.4.11/error_highlight.rb +0 -2
  406. package/lib/ruby/3.4.11/fileutils.gemspec +0 -31
  407. package/lib/ruby/3.4.11/fileutils.rb +0 -2696
  408. package/lib/ruby/3.4.11/find.gemspec +0 -29
  409. package/lib/ruby/3.4.11/find.rb +0 -90
  410. package/lib/ruby/3.4.11/forwardable/forwardable.gemspec +0 -26
  411. package/lib/ruby/3.4.11/forwardable/impl.rb +0 -17
  412. package/lib/ruby/3.4.11/forwardable.rb +0 -321
  413. package/lib/ruby/3.4.11/ipaddr.gemspec +0 -36
  414. package/lib/ruby/3.4.11/ipaddr.rb +0 -841
  415. package/lib/ruby/3.4.11/irb/cmd/nop.rb +0 -4
  416. package/lib/ruby/3.4.11/irb/color.rb +0 -262
  417. package/lib/ruby/3.4.11/irb/color_printer.rb +0 -55
  418. package/lib/ruby/3.4.11/irb/command/backtrace.rb +0 -17
  419. package/lib/ruby/3.4.11/irb/command/base.rb +0 -60
  420. package/lib/ruby/3.4.11/irb/command/break.rb +0 -17
  421. package/lib/ruby/3.4.11/irb/command/catch.rb +0 -17
  422. package/lib/ruby/3.4.11/irb/command/cd.rb +0 -51
  423. package/lib/ruby/3.4.11/irb/command/chws.rb +0 -40
  424. package/lib/ruby/3.4.11/irb/command/context.rb +0 -16
  425. package/lib/ruby/3.4.11/irb/command/continue.rb +0 -17
  426. package/lib/ruby/3.4.11/irb/command/debug.rb +0 -73
  427. package/lib/ruby/3.4.11/irb/command/delete.rb +0 -17
  428. package/lib/ruby/3.4.11/irb/command/disable_irb.rb +0 -19
  429. package/lib/ruby/3.4.11/irb/command/edit.rb +0 -63
  430. package/lib/ruby/3.4.11/irb/command/exit.rb +0 -18
  431. package/lib/ruby/3.4.11/irb/command/finish.rb +0 -17
  432. package/lib/ruby/3.4.11/irb/command/force_exit.rb +0 -18
  433. package/lib/ruby/3.4.11/irb/command/help.rb +0 -83
  434. package/lib/ruby/3.4.11/irb/command/history.rb +0 -45
  435. package/lib/ruby/3.4.11/irb/command/info.rb +0 -17
  436. package/lib/ruby/3.4.11/irb/command/internal_helpers.rb +0 -27
  437. package/lib/ruby/3.4.11/irb/command/irb_info.rb +0 -33
  438. package/lib/ruby/3.4.11/irb/command/load.rb +0 -91
  439. package/lib/ruby/3.4.11/irb/command/ls.rb +0 -167
  440. package/lib/ruby/3.4.11/irb/command/measure.rb +0 -49
  441. package/lib/ruby/3.4.11/irb/command/next.rb +0 -17
  442. package/lib/ruby/3.4.11/irb/command/pushws.rb +0 -65
  443. package/lib/ruby/3.4.11/irb/command/show_doc.rb +0 -51
  444. package/lib/ruby/3.4.11/irb/command/show_source.rb +0 -74
  445. package/lib/ruby/3.4.11/irb/command/step.rb +0 -17
  446. package/lib/ruby/3.4.11/irb/command/subirb.rb +0 -123
  447. package/lib/ruby/3.4.11/irb/command/whereami.rb +0 -23
  448. package/lib/ruby/3.4.11/irb/command.rb +0 -23
  449. package/lib/ruby/3.4.11/irb/completion.rb +0 -504
  450. package/lib/ruby/3.4.11/irb/context.rb +0 -716
  451. package/lib/ruby/3.4.11/irb/debug/ui.rb +0 -101
  452. package/lib/ruby/3.4.11/irb/debug.rb +0 -127
  453. package/lib/ruby/3.4.11/irb/default_commands.rb +0 -276
  454. package/lib/ruby/3.4.11/irb/easter-egg.rb +0 -152
  455. package/lib/ruby/3.4.11/irb/ext/change-ws.rb +0 -37
  456. package/lib/ruby/3.4.11/irb/ext/eval_history.rb +0 -149
  457. package/lib/ruby/3.4.11/irb/ext/loader.rb +0 -127
  458. package/lib/ruby/3.4.11/irb/ext/multi-irb.rb +0 -258
  459. package/lib/ruby/3.4.11/irb/ext/tracer.rb +0 -39
  460. package/lib/ruby/3.4.11/irb/ext/use-loader.rb +0 -67
  461. package/lib/ruby/3.4.11/irb/ext/workspaces.rb +0 -36
  462. package/lib/ruby/3.4.11/irb/frame.rb +0 -80
  463. package/lib/ruby/3.4.11/irb/help.rb +0 -28
  464. package/lib/ruby/3.4.11/irb/helper_method/base.rb +0 -16
  465. package/lib/ruby/3.4.11/irb/helper_method/conf.rb +0 -11
  466. package/lib/ruby/3.4.11/irb/helper_method.rb +0 -29
  467. package/lib/ruby/3.4.11/irb/history.rb +0 -112
  468. package/lib/ruby/3.4.11/irb/init.rb +0 -538
  469. package/lib/ruby/3.4.11/irb/input-method.rb +0 -515
  470. package/lib/ruby/3.4.11/irb/inspector.rb +0 -131
  471. package/lib/ruby/3.4.11/irb/irb.gemspec +0 -46
  472. package/lib/ruby/3.4.11/irb/lc/error.rb +0 -52
  473. package/lib/ruby/3.4.11/irb/lc/help-message +0 -55
  474. package/lib/ruby/3.4.11/irb/lc/ja/error.rb +0 -53
  475. package/lib/ruby/3.4.11/irb/lc/ja/help-message +0 -58
  476. package/lib/ruby/3.4.11/irb/locale.rb +0 -153
  477. package/lib/ruby/3.4.11/irb/nesting_parser.rb +0 -239
  478. package/lib/ruby/3.4.11/irb/notifier.rb +0 -230
  479. package/lib/ruby/3.4.11/irb/output-method.rb +0 -80
  480. package/lib/ruby/3.4.11/irb/pager.rb +0 -100
  481. package/lib/ruby/3.4.11/irb/ruby-lex.rb +0 -476
  482. package/lib/ruby/3.4.11/irb/ruby_logo.aa +0 -118
  483. package/lib/ruby/3.4.11/irb/source_finder.rb +0 -138
  484. package/lib/ruby/3.4.11/irb/statement.rb +0 -80
  485. package/lib/ruby/3.4.11/irb/version.rb +0 -11
  486. package/lib/ruby/3.4.11/irb/workspace.rb +0 -171
  487. package/lib/ruby/3.4.11/irb/ws-for-case-2.rb +0 -9
  488. package/lib/ruby/3.4.11/irb/xmp.rb +0 -164
  489. package/lib/ruby/3.4.11/irb.rb +0 -1593
  490. package/lib/ruby/3.4.11/logger/errors.rb +0 -9
  491. package/lib/ruby/3.4.11/logger/formatter.rb +0 -36
  492. package/lib/ruby/3.4.11/logger/log_device.rb +0 -236
  493. package/lib/ruby/3.4.11/logger/logger.gemspec +0 -22
  494. package/lib/ruby/3.4.11/logger/period.rb +0 -47
  495. package/lib/ruby/3.4.11/logger/severity.rb +0 -38
  496. package/lib/ruby/3.4.11/logger/version.rb +0 -5
  497. package/lib/ruby/3.4.11/logger.rb +0 -761
  498. package/lib/ruby/3.4.11/mkmf.rb +0 -3045
  499. package/lib/ruby/3.4.11/net/http/exceptions.rb +0 -34
  500. package/lib/ruby/3.4.11/net/http/generic_request.rb +0 -414
  501. package/lib/ruby/3.4.11/net/http/header.rb +0 -981
  502. package/lib/ruby/3.4.11/net/http/net-http.gemspec +0 -39
  503. package/lib/ruby/3.4.11/net/http/proxy_delta.rb +0 -17
  504. package/lib/ruby/3.4.11/net/http/request.rb +0 -88
  505. package/lib/ruby/3.4.11/net/http/requests.rb +0 -430
  506. package/lib/ruby/3.4.11/net/http/response.rb +0 -738
  507. package/lib/ruby/3.4.11/net/http/responses.rb +0 -1174
  508. package/lib/ruby/3.4.11/net/http/status.rb +0 -84
  509. package/lib/ruby/3.4.11/net/http.rb +0 -2574
  510. package/lib/ruby/3.4.11/net/https.rb +0 -23
  511. package/lib/ruby/3.4.11/net/net-protocol.gemspec +0 -34
  512. package/lib/ruby/3.4.11/net/protocol.rb +0 -544
  513. package/lib/ruby/3.4.11/open-uri.gemspec +0 -32
  514. package/lib/ruby/3.4.11/open-uri.rb +0 -895
  515. package/lib/ruby/3.4.11/open3/open3.gemspec +0 -33
  516. package/lib/ruby/3.4.11/open3/version.rb +0 -3
  517. package/lib/ruby/3.4.11/open3.rb +0 -1410
  518. package/lib/ruby/3.4.11/optionparser.rb +0 -2
  519. package/lib/ruby/3.4.11/optparse/ac.rb +0 -70
  520. package/lib/ruby/3.4.11/optparse/date.rb +0 -18
  521. package/lib/ruby/3.4.11/optparse/kwargs.rb +0 -27
  522. package/lib/ruby/3.4.11/optparse/optparse.gemspec +0 -31
  523. package/lib/ruby/3.4.11/optparse/shellwords.rb +0 -7
  524. package/lib/ruby/3.4.11/optparse/time.rb +0 -11
  525. package/lib/ruby/3.4.11/optparse/uri.rb +0 -7
  526. package/lib/ruby/3.4.11/optparse/version.rb +0 -80
  527. package/lib/ruby/3.4.11/optparse.rb +0 -2429
  528. package/lib/ruby/3.4.11/ostruct.gemspec +0 -24
  529. package/lib/ruby/3.4.11/ostruct.rb +0 -489
  530. package/lib/ruby/3.4.11/pp.gemspec +0 -35
  531. package/lib/ruby/3.4.11/pp.rb +0 -699
  532. package/lib/ruby/3.4.11/prettyprint.gemspec +0 -29
  533. package/lib/ruby/3.4.11/prettyprint.rb +0 -558
  534. package/lib/ruby/3.4.11/prism/compiler.rb +0 -801
  535. package/lib/ruby/3.4.11/prism/desugar_compiler.rb +0 -392
  536. package/lib/ruby/3.4.11/prism/dispatcher.rb +0 -2210
  537. package/lib/ruby/3.4.11/prism/dsl.rb +0 -1003
  538. package/lib/ruby/3.4.11/prism/ffi.rb +0 -570
  539. package/lib/ruby/3.4.11/prism/inspect_visitor.rb +0 -2392
  540. package/lib/ruby/3.4.11/prism/lex_compat.rb +0 -928
  541. package/lib/ruby/3.4.11/prism/mutation_compiler.rb +0 -772
  542. package/lib/ruby/3.4.11/prism/node.rb +0 -18816
  543. package/lib/ruby/3.4.11/prism/node_ext.rb +0 -511
  544. package/lib/ruby/3.4.11/prism/pack.rb +0 -230
  545. package/lib/ruby/3.4.11/prism/parse_result/comments.rb +0 -188
  546. package/lib/ruby/3.4.11/prism/parse_result/errors.rb +0 -66
  547. package/lib/ruby/3.4.11/prism/parse_result/newlines.rb +0 -155
  548. package/lib/ruby/3.4.11/prism/parse_result.rb +0 -911
  549. package/lib/ruby/3.4.11/prism/pattern.rb +0 -269
  550. package/lib/ruby/3.4.11/prism/polyfill/append_as_bytes.rb +0 -15
  551. package/lib/ruby/3.4.11/prism/polyfill/byteindex.rb +0 -13
  552. package/lib/ruby/3.4.11/prism/polyfill/scan_byte.rb +0 -14
  553. package/lib/ruby/3.4.11/prism/polyfill/unpack1.rb +0 -14
  554. package/lib/ruby/3.4.11/prism/polyfill/warn.rb +0 -36
  555. package/lib/ruby/3.4.11/prism/prism.gemspec +0 -174
  556. package/lib/ruby/3.4.11/prism/reflection.rb +0 -416
  557. package/lib/ruby/3.4.11/prism/relocation.rb +0 -505
  558. package/lib/ruby/3.4.11/prism/serialize.rb +0 -2400
  559. package/lib/ruby/3.4.11/prism/string_query.rb +0 -31
  560. package/lib/ruby/3.4.11/prism/translation/parser/builder.rb +0 -62
  561. package/lib/ruby/3.4.11/prism/translation/parser/compiler.rb +0 -2234
  562. package/lib/ruby/3.4.11/prism/translation/parser/lexer.rb +0 -820
  563. package/lib/ruby/3.4.11/prism/translation/parser.rb +0 -374
  564. package/lib/ruby/3.4.11/prism/translation/parser33.rb +0 -13
  565. package/lib/ruby/3.4.11/prism/translation/parser34.rb +0 -13
  566. package/lib/ruby/3.4.11/prism/translation/parser35.rb +0 -13
  567. package/lib/ruby/3.4.11/prism/translation/parser_current.rb +0 -24
  568. package/lib/ruby/3.4.11/prism/translation/ripper/sexp.rb +0 -126
  569. package/lib/ruby/3.4.11/prism/translation/ripper/shim.rb +0 -5
  570. package/lib/ruby/3.4.11/prism/translation/ripper.rb +0 -3474
  571. package/lib/ruby/3.4.11/prism/translation/ruby_parser.rb +0 -1929
  572. package/lib/ruby/3.4.11/prism/translation.rb +0 -16
  573. package/lib/ruby/3.4.11/prism/visitor.rb +0 -813
  574. package/lib/ruby/3.4.11/prism.rb +0 -91
  575. package/lib/ruby/3.4.11/pstore.gemspec +0 -32
  576. package/lib/ruby/3.4.11/pstore.rb +0 -736
  577. package/lib/ruby/3.4.11/random/formatter.rb +0 -372
  578. package/lib/ruby/3.4.11/rdoc/.document +0 -2
  579. package/lib/ruby/3.4.11/rdoc/code_object/alias.rb +0 -104
  580. package/lib/ruby/3.4.11/rdoc/code_object/anon_class.rb +0 -10
  581. package/lib/ruby/3.4.11/rdoc/code_object/any_method.rb +0 -374
  582. package/lib/ruby/3.4.11/rdoc/code_object/attr.rb +0 -172
  583. package/lib/ruby/3.4.11/rdoc/code_object/class_module.rb +0 -888
  584. package/lib/ruby/3.4.11/rdoc/code_object/constant.rb +0 -186
  585. package/lib/ruby/3.4.11/rdoc/code_object/context/section.rb +0 -175
  586. package/lib/ruby/3.4.11/rdoc/code_object/context.rb +0 -1222
  587. package/lib/ruby/3.4.11/rdoc/code_object/extend.rb +0 -9
  588. package/lib/ruby/3.4.11/rdoc/code_object/ghost_method.rb +0 -6
  589. package/lib/ruby/3.4.11/rdoc/code_object/include.rb +0 -9
  590. package/lib/ruby/3.4.11/rdoc/code_object/meta_method.rb +0 -6
  591. package/lib/ruby/3.4.11/rdoc/code_object/method_attr.rb +0 -410
  592. package/lib/ruby/3.4.11/rdoc/code_object/mixin.rb +0 -120
  593. package/lib/ruby/3.4.11/rdoc/code_object/normal_class.rb +0 -92
  594. package/lib/ruby/3.4.11/rdoc/code_object/normal_module.rb +0 -73
  595. package/lib/ruby/3.4.11/rdoc/code_object/require.rb +0 -51
  596. package/lib/ruby/3.4.11/rdoc/code_object/single_class.rb +0 -30
  597. package/lib/ruby/3.4.11/rdoc/code_object/top_level.rb +0 -273
  598. package/lib/ruby/3.4.11/rdoc/code_object.rb +0 -395
  599. package/lib/ruby/3.4.11/rdoc/code_objects.rb +0 -5
  600. package/lib/ruby/3.4.11/rdoc/comment.rb +0 -236
  601. package/lib/ruby/3.4.11/rdoc/cross_reference.rb +0 -228
  602. package/lib/ruby/3.4.11/rdoc/encoding.rb +0 -120
  603. package/lib/ruby/3.4.11/rdoc/erb_partial.rb +0 -18
  604. package/lib/ruby/3.4.11/rdoc/erbio.rb +0 -37
  605. package/lib/ruby/3.4.11/rdoc/generator/darkfish.rb +0 -812
  606. package/lib/ruby/3.4.11/rdoc/generator/json_index.rb +0 -284
  607. package/lib/ruby/3.4.11/rdoc/generator/markup.rb +0 -171
  608. package/lib/ruby/3.4.11/rdoc/generator/pot/message_extractor.rb +0 -68
  609. package/lib/ruby/3.4.11/rdoc/generator/pot/po.rb +0 -84
  610. package/lib/ruby/3.4.11/rdoc/generator/pot/po_entry.rb +0 -141
  611. package/lib/ruby/3.4.11/rdoc/generator/pot.rb +0 -94
  612. package/lib/ruby/3.4.11/rdoc/generator/ri.rb +0 -30
  613. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/.document +0 -0
  614. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_footer.rhtml +0 -5
  615. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_head.rhtml +0 -48
  616. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_classes.rhtml +0 -5
  617. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +0 -15
  618. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +0 -15
  619. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +0 -15
  620. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +0 -21
  621. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_navigation.rhtml +0 -11
  622. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +0 -32
  623. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +0 -6
  624. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_search.rhtml +0 -14
  625. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +0 -11
  626. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +0 -39
  627. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/_sidebar_toggle.rhtml +0 -3
  628. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/class.rhtml +0 -221
  629. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/css/fonts.css +0 -167
  630. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/css/rdoc.css +0 -683
  631. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf +0 -0
  632. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf +0 -0
  633. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf +0 -0
  634. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf +0 -0
  635. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/SourceCodePro-Bold.ttf +0 -0
  636. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/fonts/SourceCodePro-Regular.ttf +0 -0
  637. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/add.png +0 -0
  638. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/arrow_up.png +0 -0
  639. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/brick.png +0 -0
  640. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/brick_link.png +0 -0
  641. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bug.png +0 -0
  642. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_black.png +0 -0
  643. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_toggle_minus.png +0 -0
  644. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/bullet_toggle_plus.png +0 -0
  645. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/date.png +0 -0
  646. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/delete.png +0 -0
  647. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/find.png +0 -0
  648. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/loadingAnimation.gif +0 -0
  649. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/macFFBgHack.png +0 -0
  650. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/package.png +0 -0
  651. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_green.png +0 -0
  652. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_white_text.png +0 -0
  653. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/page_white_width.png +0 -0
  654. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/plugin.png +0 -0
  655. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/ruby.png +0 -0
  656. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/tag_blue.png +0 -0
  657. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/tag_green.png +0 -0
  658. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/transparent.png +0 -0
  659. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/wrench.png +0 -0
  660. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/wrench_orange.png +0 -0
  661. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/images/zoom.png +0 -0
  662. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/index.rhtml +0 -23
  663. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/js/darkfish.js +0 -120
  664. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/js/search.js +0 -110
  665. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/page.rhtml +0 -18
  666. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/servlet_not_found.rhtml +0 -20
  667. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/servlet_root.rhtml +0 -65
  668. package/lib/ruby/3.4.11/rdoc/generator/template/darkfish/table_of_contents.rhtml +0 -70
  669. package/lib/ruby/3.4.11/rdoc/generator/template/json_index/.document +0 -1
  670. package/lib/ruby/3.4.11/rdoc/generator/template/json_index/js/navigation.js +0 -105
  671. package/lib/ruby/3.4.11/rdoc/generator/template/json_index/js/searcher.js +0 -229
  672. package/lib/ruby/3.4.11/rdoc/generator.rb +0 -51
  673. package/lib/ruby/3.4.11/rdoc/i18n/locale.rb +0 -102
  674. package/lib/ruby/3.4.11/rdoc/i18n/text.rb +0 -126
  675. package/lib/ruby/3.4.11/rdoc/i18n.rb +0 -10
  676. package/lib/ruby/3.4.11/rdoc/known_classes.rb +0 -74
  677. package/lib/ruby/3.4.11/rdoc/markdown/.document +0 -1
  678. package/lib/ruby/3.4.11/rdoc/markdown/entities.rb +0 -2131
  679. package/lib/ruby/3.4.11/rdoc/markdown/literals.rb +0 -454
  680. package/lib/ruby/3.4.11/rdoc/markdown.rb +0 -16806
  681. package/lib/ruby/3.4.11/rdoc/markup/attr_changer.rb +0 -22
  682. package/lib/ruby/3.4.11/rdoc/markup/attr_span.rb +0 -35
  683. package/lib/ruby/3.4.11/rdoc/markup/attribute_manager.rb +0 -405
  684. package/lib/ruby/3.4.11/rdoc/markup/attributes.rb +0 -70
  685. package/lib/ruby/3.4.11/rdoc/markup/blank_line.rb +0 -27
  686. package/lib/ruby/3.4.11/rdoc/markup/block_quote.rb +0 -14
  687. package/lib/ruby/3.4.11/rdoc/markup/document.rb +0 -164
  688. package/lib/ruby/3.4.11/rdoc/markup/formatter.rb +0 -272
  689. package/lib/ruby/3.4.11/rdoc/markup/hard_break.rb +0 -31
  690. package/lib/ruby/3.4.11/rdoc/markup/heading.rb +0 -84
  691. package/lib/ruby/3.4.11/rdoc/markup/include.rb +0 -42
  692. package/lib/ruby/3.4.11/rdoc/markup/indented_paragraph.rb +0 -47
  693. package/lib/ruby/3.4.11/rdoc/markup/list.rb +0 -101
  694. package/lib/ruby/3.4.11/rdoc/markup/list_item.rb +0 -99
  695. package/lib/ruby/3.4.11/rdoc/markup/paragraph.rb +0 -28
  696. package/lib/ruby/3.4.11/rdoc/markup/parser.rb +0 -585
  697. package/lib/ruby/3.4.11/rdoc/markup/pre_process.rb +0 -318
  698. package/lib/ruby/3.4.11/rdoc/markup/raw.rb +0 -69
  699. package/lib/ruby/3.4.11/rdoc/markup/regexp_handling.rb +0 -40
  700. package/lib/ruby/3.4.11/rdoc/markup/rule.rb +0 -20
  701. package/lib/ruby/3.4.11/rdoc/markup/table.rb +0 -56
  702. package/lib/ruby/3.4.11/rdoc/markup/to_ansi.rb +0 -93
  703. package/lib/ruby/3.4.11/rdoc/markup/to_bs.rb +0 -102
  704. package/lib/ruby/3.4.11/rdoc/markup/to_html.rb +0 -462
  705. package/lib/ruby/3.4.11/rdoc/markup/to_html_crossref.rb +0 -226
  706. package/lib/ruby/3.4.11/rdoc/markup/to_html_snippet.rb +0 -287
  707. package/lib/ruby/3.4.11/rdoc/markup/to_joined_paragraph.rb +0 -46
  708. package/lib/ruby/3.4.11/rdoc/markup/to_label.rb +0 -74
  709. package/lib/ruby/3.4.11/rdoc/markup/to_markdown.rb +0 -191
  710. package/lib/ruby/3.4.11/rdoc/markup/to_rdoc.rb +0 -353
  711. package/lib/ruby/3.4.11/rdoc/markup/to_table_of_contents.rb +0 -88
  712. package/lib/ruby/3.4.11/rdoc/markup/to_test.rb +0 -69
  713. package/lib/ruby/3.4.11/rdoc/markup/to_tt_only.rb +0 -120
  714. package/lib/ruby/3.4.11/rdoc/markup/verbatim.rb +0 -83
  715. package/lib/ruby/3.4.11/rdoc/markup.rb +0 -240
  716. package/lib/ruby/3.4.11/rdoc/options.rb +0 -1416
  717. package/lib/ruby/3.4.11/rdoc/parser/c.rb +0 -1257
  718. package/lib/ruby/3.4.11/rdoc/parser/changelog.rb +0 -350
  719. package/lib/ruby/3.4.11/rdoc/parser/markdown.rb +0 -22
  720. package/lib/ruby/3.4.11/rdoc/parser/prism_ruby.rb +0 -1092
  721. package/lib/ruby/3.4.11/rdoc/parser/rd.rb +0 -22
  722. package/lib/ruby/3.4.11/rdoc/parser/ripper_state_lex.rb +0 -302
  723. package/lib/ruby/3.4.11/rdoc/parser/ruby.rb +0 -2378
  724. package/lib/ruby/3.4.11/rdoc/parser/ruby_tools.rb +0 -165
  725. package/lib/ruby/3.4.11/rdoc/parser/simple.rb +0 -61
  726. package/lib/ruby/3.4.11/rdoc/parser/text.rb +0 -11
  727. package/lib/ruby/3.4.11/rdoc/parser.rb +0 -297
  728. package/lib/ruby/3.4.11/rdoc/rd/.document +0 -1
  729. package/lib/ruby/3.4.11/rdoc/rd/block_parser.rb +0 -1706
  730. package/lib/ruby/3.4.11/rdoc/rd/inline.rb +0 -71
  731. package/lib/ruby/3.4.11/rdoc/rd/inline_parser.rb +0 -1854
  732. package/lib/ruby/3.4.11/rdoc/rd.rb +0 -99
  733. package/lib/ruby/3.4.11/rdoc/rdoc.gemspec +0 -68
  734. package/lib/ruby/3.4.11/rdoc/rdoc.rb +0 -551
  735. package/lib/ruby/3.4.11/rdoc/ri/driver.rb +0 -1566
  736. package/lib/ruby/3.4.11/rdoc/ri/formatter.rb +0 -6
  737. package/lib/ruby/3.4.11/rdoc/ri/paths.rb +0 -171
  738. package/lib/ruby/3.4.11/rdoc/ri/store.rb +0 -6
  739. package/lib/ruby/3.4.11/rdoc/ri/task.rb +0 -71
  740. package/lib/ruby/3.4.11/rdoc/ri.rb +0 -20
  741. package/lib/ruby/3.4.11/rdoc/rubygems_hook.rb +0 -327
  742. package/lib/ruby/3.4.11/rdoc/servlet.rb +0 -452
  743. package/lib/ruby/3.4.11/rdoc/stats/normal.rb +0 -58
  744. package/lib/ruby/3.4.11/rdoc/stats/quiet.rb +0 -59
  745. package/lib/ruby/3.4.11/rdoc/stats/verbose.rb +0 -44
  746. package/lib/ruby/3.4.11/rdoc/stats.rb +0 -461
  747. package/lib/ruby/3.4.11/rdoc/store.rb +0 -997
  748. package/lib/ruby/3.4.11/rdoc/task.rb +0 -354
  749. package/lib/ruby/3.4.11/rdoc/text.rb +0 -322
  750. package/lib/ruby/3.4.11/rdoc/token_stream.rb +0 -118
  751. package/lib/ruby/3.4.11/rdoc/tom_doc.rb +0 -257
  752. package/lib/ruby/3.4.11/rdoc/version.rb +0 -10
  753. package/lib/ruby/3.4.11/rdoc.rb +0 -211
  754. package/lib/ruby/3.4.11/readline.gemspec +0 -33
  755. package/lib/ruby/3.4.11/readline.rb +0 -7
  756. package/lib/ruby/3.4.11/reline/config.rb +0 -373
  757. package/lib/ruby/3.4.11/reline/face.rb +0 -199
  758. package/lib/ruby/3.4.11/reline/history.rb +0 -76
  759. package/lib/ruby/3.4.11/reline/io/ansi.rb +0 -325
  760. package/lib/ruby/3.4.11/reline/io/dumb.rb +0 -120
  761. package/lib/ruby/3.4.11/reline/io/windows.rb +0 -530
  762. package/lib/ruby/3.4.11/reline/io.rb +0 -55
  763. package/lib/ruby/3.4.11/reline/key_actor/base.rb +0 -37
  764. package/lib/ruby/3.4.11/reline/key_actor/composite.rb +0 -17
  765. package/lib/ruby/3.4.11/reline/key_actor/emacs.rb +0 -517
  766. package/lib/ruby/3.4.11/reline/key_actor/vi_command.rb +0 -518
  767. package/lib/ruby/3.4.11/reline/key_actor/vi_insert.rb +0 -517
  768. package/lib/ruby/3.4.11/reline/key_actor.rb +0 -8
  769. package/lib/ruby/3.4.11/reline/key_stroke.rb +0 -119
  770. package/lib/ruby/3.4.11/reline/kill_ring.rb +0 -125
  771. package/lib/ruby/3.4.11/reline/line_editor.rb +0 -2382
  772. package/lib/ruby/3.4.11/reline/reline.gemspec +0 -30
  773. package/lib/ruby/3.4.11/reline/unicode/east_asian_width.rb +0 -1267
  774. package/lib/ruby/3.4.11/reline/unicode.rb +0 -415
  775. package/lib/ruby/3.4.11/reline/version.rb +0 -3
  776. package/lib/ruby/3.4.11/reline.rb +0 -519
  777. package/lib/ruby/3.4.11/resolv.gemspec +0 -30
  778. package/lib/ruby/3.4.11/resolv.rb +0 -3587
  779. package/lib/ruby/3.4.11/ruby2_keywords.gemspec +0 -23
  780. package/lib/ruby/3.4.11/ruby_vm/rjit/.document +0 -1
  781. package/lib/ruby/3.4.11/ruby_vm/rjit/assembler.rb +0 -1160
  782. package/lib/ruby/3.4.11/ruby_vm/rjit/block.rb +0 -11
  783. package/lib/ruby/3.4.11/ruby_vm/rjit/branch_stub.rb +0 -24
  784. package/lib/ruby/3.4.11/ruby_vm/rjit/c_pointer.rb +0 -394
  785. package/lib/ruby/3.4.11/ruby_vm/rjit/c_type.rb +0 -99
  786. package/lib/ruby/3.4.11/ruby_vm/rjit/code_block.rb +0 -91
  787. package/lib/ruby/3.4.11/ruby_vm/rjit/compiler.rb +0 -518
  788. package/lib/ruby/3.4.11/ruby_vm/rjit/context.rb +0 -377
  789. package/lib/ruby/3.4.11/ruby_vm/rjit/entry_stub.rb +0 -7
  790. package/lib/ruby/3.4.11/ruby_vm/rjit/exit_compiler.rb +0 -164
  791. package/lib/ruby/3.4.11/ruby_vm/rjit/hooks.rb +0 -36
  792. package/lib/ruby/3.4.11/ruby_vm/rjit/insn_compiler.rb +0 -6046
  793. package/lib/ruby/3.4.11/ruby_vm/rjit/instruction.rb +0 -1326
  794. package/lib/ruby/3.4.11/ruby_vm/rjit/invariants.rb +0 -155
  795. package/lib/ruby/3.4.11/ruby_vm/rjit/jit_state.rb +0 -65
  796. package/lib/ruby/3.4.11/ruby_vm/rjit/stats.rb +0 -191
  797. package/lib/ruby/3.4.11/ruby_vm/rjit/type.rb +0 -221
  798. package/lib/ruby/3.4.11/rubygems/available_set.rb +0 -165
  799. package/lib/ruby/3.4.11/rubygems/basic_specification.rb +0 -383
  800. package/lib/ruby/3.4.11/rubygems/bundler_version_finder.rb +0 -77
  801. package/lib/ruby/3.4.11/rubygems/ci_detector.rb +0 -75
  802. package/lib/ruby/3.4.11/rubygems/command.rb +0 -664
  803. package/lib/ruby/3.4.11/rubygems/command_manager.rb +0 -255
  804. package/lib/ruby/3.4.11/rubygems/commands/build_command.rb +0 -127
  805. package/lib/ruby/3.4.11/rubygems/commands/cert_command.rb +0 -325
  806. package/lib/ruby/3.4.11/rubygems/commands/check_command.rb +0 -97
  807. package/lib/ruby/3.4.11/rubygems/commands/cleanup_command.rb +0 -178
  808. package/lib/ruby/3.4.11/rubygems/commands/contents_command.rb +0 -196
  809. package/lib/ruby/3.4.11/rubygems/commands/dependency_command.rb +0 -206
  810. package/lib/ruby/3.4.11/rubygems/commands/environment_command.rb +0 -181
  811. package/lib/ruby/3.4.11/rubygems/commands/exec_command.rb +0 -256
  812. package/lib/ruby/3.4.11/rubygems/commands/fetch_command.rb +0 -109
  813. package/lib/ruby/3.4.11/rubygems/commands/generate_index_command.rb +0 -51
  814. package/lib/ruby/3.4.11/rubygems/commands/help_command.rb +0 -375
  815. package/lib/ruby/3.4.11/rubygems/commands/info_command.rb +0 -38
  816. package/lib/ruby/3.4.11/rubygems/commands/install_command.rb +0 -269
  817. package/lib/ruby/3.4.11/rubygems/commands/list_command.rb +0 -42
  818. package/lib/ruby/3.4.11/rubygems/commands/lock_command.rb +0 -109
  819. package/lib/ruby/3.4.11/rubygems/commands/mirror_command.rb +0 -26
  820. package/lib/ruby/3.4.11/rubygems/commands/open_command.rb +0 -83
  821. package/lib/ruby/3.4.11/rubygems/commands/outdated_command.rb +0 -33
  822. package/lib/ruby/3.4.11/rubygems/commands/owner_command.rb +0 -124
  823. package/lib/ruby/3.4.11/rubygems/commands/pristine_command.rb +0 -217
  824. package/lib/ruby/3.4.11/rubygems/commands/push_command.rb +0 -135
  825. package/lib/ruby/3.4.11/rubygems/commands/query_command.rb +0 -43
  826. package/lib/ruby/3.4.11/rubygems/commands/rdoc_command.rb +0 -90
  827. package/lib/ruby/3.4.11/rubygems/commands/rebuild_command.rb +0 -262
  828. package/lib/ruby/3.4.11/rubygems/commands/search_command.rb +0 -41
  829. package/lib/ruby/3.4.11/rubygems/commands/server_command.rb +0 -26
  830. package/lib/ruby/3.4.11/rubygems/commands/setup_command.rb +0 -663
  831. package/lib/ruby/3.4.11/rubygems/commands/signin_command.rb +0 -34
  832. package/lib/ruby/3.4.11/rubygems/commands/signout_command.rb +0 -32
  833. package/lib/ruby/3.4.11/rubygems/commands/sources_command.rb +0 -227
  834. package/lib/ruby/3.4.11/rubygems/commands/specification_command.rb +0 -156
  835. package/lib/ruby/3.4.11/rubygems/commands/stale_command.rb +0 -40
  836. package/lib/ruby/3.4.11/rubygems/commands/uninstall_command.rb +0 -204
  837. package/lib/ruby/3.4.11/rubygems/commands/unpack_command.rb +0 -168
  838. package/lib/ruby/3.4.11/rubygems/commands/update_command.rb +0 -326
  839. package/lib/ruby/3.4.11/rubygems/commands/which_command.rb +0 -88
  840. package/lib/ruby/3.4.11/rubygems/commands/yank_command.rb +0 -99
  841. package/lib/ruby/3.4.11/rubygems/compatibility.rb +0 -41
  842. package/lib/ruby/3.4.11/rubygems/config_file.rb +0 -618
  843. package/lib/ruby/3.4.11/rubygems/core_ext/kernel_gem.rb +0 -68
  844. package/lib/ruby/3.4.11/rubygems/core_ext/kernel_require.rb +0 -149
  845. package/lib/ruby/3.4.11/rubygems/core_ext/kernel_warn.rb +0 -45
  846. package/lib/ruby/3.4.11/rubygems/core_ext/tcpsocket_init.rb +0 -54
  847. package/lib/ruby/3.4.11/rubygems/defaults.rb +0 -308
  848. package/lib/ruby/3.4.11/rubygems/dependency.rb +0 -348
  849. package/lib/ruby/3.4.11/rubygems/dependency_installer.rb +0 -335
  850. package/lib/ruby/3.4.11/rubygems/dependency_list.rb +0 -243
  851. package/lib/ruby/3.4.11/rubygems/deprecate.rb +0 -169
  852. package/lib/ruby/3.4.11/rubygems/doctor.rb +0 -132
  853. package/lib/ruby/3.4.11/rubygems/errors.rb +0 -177
  854. package/lib/ruby/3.4.11/rubygems/exceptions.rb +0 -293
  855. package/lib/ruby/3.4.11/rubygems/ext/build_error.rb +0 -9
  856. package/lib/ruby/3.4.11/rubygems/ext/builder.rb +0 -260
  857. package/lib/ruby/3.4.11/rubygems/ext/cargo_builder/link_flag_converter.rb +0 -27
  858. package/lib/ruby/3.4.11/rubygems/ext/cargo_builder.rb +0 -346
  859. package/lib/ruby/3.4.11/rubygems/ext/cmake_builder.rb +0 -21
  860. package/lib/ruby/3.4.11/rubygems/ext/configure_builder.rb +0 -26
  861. package/lib/ruby/3.4.11/rubygems/ext/ext_conf_builder.rb +0 -77
  862. package/lib/ruby/3.4.11/rubygems/ext/rake_builder.rb +0 -37
  863. package/lib/ruby/3.4.11/rubygems/ext.rb +0 -20
  864. package/lib/ruby/3.4.11/rubygems/gem_runner.rb +0 -89
  865. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_listener/response.rb +0 -163
  866. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_listener.rb +0 -105
  867. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities/webauthn_poller.rb +0 -80
  868. package/lib/ruby/3.4.11/rubygems/gemcutter_utilities.rb +0 -397
  869. package/lib/ruby/3.4.11/rubygems/gemspec_helpers.rb +0 -19
  870. package/lib/ruby/3.4.11/rubygems/install_default_message.rb +0 -13
  871. package/lib/ruby/3.4.11/rubygems/install_message.rb +0 -13
  872. package/lib/ruby/3.4.11/rubygems/install_update_options.rb +0 -204
  873. package/lib/ruby/3.4.11/rubygems/installer.rb +0 -1031
  874. package/lib/ruby/3.4.11/rubygems/installer_uninstaller_utils.rb +0 -27
  875. package/lib/ruby/3.4.11/rubygems/local_remote_options.rb +0 -146
  876. package/lib/ruby/3.4.11/rubygems/name_tuple.rb +0 -119
  877. package/lib/ruby/3.4.11/rubygems/openssl.rb +0 -7
  878. package/lib/ruby/3.4.11/rubygems/package/digest_io.rb +0 -63
  879. package/lib/ruby/3.4.11/rubygems/package/file_source.rb +0 -32
  880. package/lib/ruby/3.4.11/rubygems/package/io_source.rb +0 -48
  881. package/lib/ruby/3.4.11/rubygems/package/old.rb +0 -169
  882. package/lib/ruby/3.4.11/rubygems/package/source.rb +0 -4
  883. package/lib/ruby/3.4.11/rubygems/package/tar_header.rb +0 -277
  884. package/lib/ruby/3.4.11/rubygems/package/tar_reader/entry.rb +0 -244
  885. package/lib/ruby/3.4.11/rubygems/package/tar_reader.rb +0 -101
  886. package/lib/ruby/3.4.11/rubygems/package/tar_writer.rb +0 -332
  887. package/lib/ruby/3.4.11/rubygems/package.rb +0 -742
  888. package/lib/ruby/3.4.11/rubygems/package_task.rb +0 -123
  889. package/lib/ruby/3.4.11/rubygems/path_support.rb +0 -85
  890. package/lib/ruby/3.4.11/rubygems/platform.rb +0 -269
  891. package/lib/ruby/3.4.11/rubygems/psych_tree.rb +0 -37
  892. package/lib/ruby/3.4.11/rubygems/query_utils.rb +0 -349
  893. package/lib/ruby/3.4.11/rubygems/rdoc.rb +0 -26
  894. package/lib/ruby/3.4.11/rubygems/remote_fetcher.rb +0 -341
  895. package/lib/ruby/3.4.11/rubygems/request/connection_pools.rb +0 -95
  896. package/lib/ruby/3.4.11/rubygems/request/http_pool.rb +0 -47
  897. package/lib/ruby/3.4.11/rubygems/request/https_pool.rb +0 -10
  898. package/lib/ruby/3.4.11/rubygems/request.rb +0 -298
  899. package/lib/ruby/3.4.11/rubygems/request_set/gem_dependency_api.rb +0 -841
  900. package/lib/ruby/3.4.11/rubygems/request_set/lockfile/parser.rb +0 -344
  901. package/lib/ruby/3.4.11/rubygems/request_set/lockfile/tokenizer.rb +0 -122
  902. package/lib/ruby/3.4.11/rubygems/request_set/lockfile.rb +0 -235
  903. package/lib/ruby/3.4.11/rubygems/request_set.rb +0 -468
  904. package/lib/ruby/3.4.11/rubygems/requirement.rb +0 -298
  905. package/lib/ruby/3.4.11/rubygems/resolver/activation_request.rb +0 -159
  906. package/lib/ruby/3.4.11/rubygems/resolver/api_set/gem_parser.rb +0 -21
  907. package/lib/ruby/3.4.11/rubygems/resolver/api_set.rb +0 -139
  908. package/lib/ruby/3.4.11/rubygems/resolver/api_specification.rb +0 -105
  909. package/lib/ruby/3.4.11/rubygems/resolver/best_set.rb +0 -49
  910. package/lib/ruby/3.4.11/rubygems/resolver/composed_set.rb +0 -65
  911. package/lib/ruby/3.4.11/rubygems/resolver/conflict.rb +0 -146
  912. package/lib/ruby/3.4.11/rubygems/resolver/current_set.rb +0 -12
  913. package/lib/ruby/3.4.11/rubygems/resolver/dependency_request.rb +0 -119
  914. package/lib/ruby/3.4.11/rubygems/resolver/git_set.rb +0 -120
  915. package/lib/ruby/3.4.11/rubygems/resolver/git_specification.rb +0 -57
  916. package/lib/ruby/3.4.11/rubygems/resolver/index_set.rb +0 -79
  917. package/lib/ruby/3.4.11/rubygems/resolver/index_specification.rb +0 -101
  918. package/lib/ruby/3.4.11/rubygems/resolver/installed_specification.rb +0 -57
  919. package/lib/ruby/3.4.11/rubygems/resolver/installer_set.rb +0 -271
  920. package/lib/ruby/3.4.11/rubygems/resolver/local_specification.rb +0 -40
  921. package/lib/ruby/3.4.11/rubygems/resolver/lock_set.rb +0 -81
  922. package/lib/ruby/3.4.11/rubygems/resolver/lock_specification.rb +0 -86
  923. package/lib/ruby/3.4.11/rubygems/resolver/requirement_list.rb +0 -82
  924. package/lib/ruby/3.4.11/rubygems/resolver/set.rb +0 -55
  925. package/lib/ruby/3.4.11/rubygems/resolver/source_set.rb +0 -47
  926. package/lib/ruby/3.4.11/rubygems/resolver/spec_specification.rb +0 -76
  927. package/lib/ruby/3.4.11/rubygems/resolver/specification.rb +0 -126
  928. package/lib/ruby/3.4.11/rubygems/resolver/stats.rb +0 -46
  929. package/lib/ruby/3.4.11/rubygems/resolver/vendor_set.rb +0 -86
  930. package/lib/ruby/3.4.11/rubygems/resolver/vendor_specification.rb +0 -23
  931. package/lib/ruby/3.4.11/rubygems/resolver.rb +0 -341
  932. package/lib/ruby/3.4.11/rubygems/s3_uri_signer.rb +0 -177
  933. package/lib/ruby/3.4.11/rubygems/safe_marshal/elements.rb +0 -146
  934. package/lib/ruby/3.4.11/rubygems/safe_marshal/reader.rb +0 -325
  935. package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/stream_printer.rb +0 -31
  936. package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/to_ruby.rb +0 -428
  937. package/lib/ruby/3.4.11/rubygems/safe_marshal/visitors/visitor.rb +0 -74
  938. package/lib/ruby/3.4.11/rubygems/safe_marshal.rb +0 -74
  939. package/lib/ruby/3.4.11/rubygems/safe_yaml.rb +0 -45
  940. package/lib/ruby/3.4.11/rubygems/security/policies.rb +0 -114
  941. package/lib/ruby/3.4.11/rubygems/security/policy.rb +0 -288
  942. package/lib/ruby/3.4.11/rubygems/security/signer.rb +0 -212
  943. package/lib/ruby/3.4.11/rubygems/security/trust_dir.rb +0 -117
  944. package/lib/ruby/3.4.11/rubygems/security.rb +0 -615
  945. package/lib/ruby/3.4.11/rubygems/security_option.rb +0 -43
  946. package/lib/ruby/3.4.11/rubygems/source/git.rb +0 -244
  947. package/lib/ruby/3.4.11/rubygems/source/installed.rb +0 -39
  948. package/lib/ruby/3.4.11/rubygems/source/local.rb +0 -131
  949. package/lib/ruby/3.4.11/rubygems/source/lock.rb +0 -49
  950. package/lib/ruby/3.4.11/rubygems/source/specific_file.rb +0 -73
  951. package/lib/ruby/3.4.11/rubygems/source/vendor.rb +0 -24
  952. package/lib/ruby/3.4.11/rubygems/source.rb +0 -247
  953. package/lib/ruby/3.4.11/rubygems/source_list.rb +0 -146
  954. package/lib/ruby/3.4.11/rubygems/spec_fetcher.rb +0 -290
  955. package/lib/ruby/3.4.11/rubygems/specification.rb +0 -2666
  956. package/lib/ruby/3.4.11/rubygems/specification_policy.rb +0 -558
  957. package/lib/ruby/3.4.11/rubygems/specification_record.rb +0 -212
  958. package/lib/ruby/3.4.11/rubygems/ssl_certs/.document +0 -1
  959. package/lib/ruby/3.4.11/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem +0 -21
  960. package/lib/ruby/3.4.11/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem +0 -21
  961. package/lib/ruby/3.4.11/rubygems/stub_specification.rb +0 -235
  962. package/lib/ruby/3.4.11/rubygems/target_rbconfig.rb +0 -50
  963. package/lib/ruby/3.4.11/rubygems/text.rb +0 -85
  964. package/lib/ruby/3.4.11/rubygems/uninstaller.rb +0 -429
  965. package/lib/ruby/3.4.11/rubygems/unknown_command_spell_checker.rb +0 -21
  966. package/lib/ruby/3.4.11/rubygems/update_suggestion.rb +0 -56
  967. package/lib/ruby/3.4.11/rubygems/uri.rb +0 -126
  968. package/lib/ruby/3.4.11/rubygems/uri_formatter.rb +0 -47
  969. package/lib/ruby/3.4.11/rubygems/user_interaction.rb +0 -650
  970. package/lib/ruby/3.4.11/rubygems/util/licenses.rb +0 -834
  971. package/lib/ruby/3.4.11/rubygems/util/list.rb +0 -40
  972. package/lib/ruby/3.4.11/rubygems/util.rb +0 -118
  973. package/lib/ruby/3.4.11/rubygems/validator.rb +0 -144
  974. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/.document +0 -1
  975. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb +0 -57
  976. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb +0 -88
  977. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/action.rb +0 -36
  978. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb +0 -66
  979. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb +0 -62
  980. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb +0 -63
  981. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb +0 -61
  982. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb +0 -126
  983. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb +0 -46
  984. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb +0 -36
  985. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb +0 -164
  986. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb +0 -255
  987. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/errors.rb +0 -149
  988. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb +0 -6
  989. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/modules/specification_provider.rb +0 -112
  990. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/modules/ui.rb +0 -67
  991. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/resolution.rb +0 -839
  992. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/resolver.rb +0 -46
  993. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo/state.rb +0 -58
  994. package/lib/ruby/3.4.11/rubygems/vendor/molinillo/lib/molinillo.rb +0 -11
  995. package/lib/ruby/3.4.11/rubygems/vendor/net-http/.document +0 -1
  996. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/exceptions.rb +0 -34
  997. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/generic_request.rb +0 -414
  998. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/header.rb +0 -981
  999. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/proxy_delta.rb +0 -17
  1000. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/request.rb +0 -88
  1001. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/requests.rb +0 -430
  1002. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/response.rb +0 -738
  1003. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/responses.rb +0 -1174
  1004. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http/status.rb +0 -84
  1005. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/http.rb +0 -2580
  1006. package/lib/ruby/3.4.11/rubygems/vendor/net-http/lib/net/https.rb +0 -23
  1007. package/lib/ruby/3.4.11/rubygems/vendor/net-protocol/.document +0 -1
  1008. package/lib/ruby/3.4.11/rubygems/vendor/net-protocol/lib/net/protocol.rb +0 -544
  1009. package/lib/ruby/3.4.11/rubygems/vendor/optparse/.document +0 -1
  1010. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optionparser.rb +0 -2
  1011. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/ac.rb +0 -70
  1012. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/date.rb +0 -18
  1013. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/kwargs.rb +0 -27
  1014. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/shellwords.rb +0 -7
  1015. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/time.rb +0 -11
  1016. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/uri.rb +0 -7
  1017. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse/version.rb +0 -80
  1018. package/lib/ruby/3.4.11/rubygems/vendor/optparse/lib/optparse.rb +0 -2426
  1019. package/lib/ruby/3.4.11/rubygems/vendor/resolv/.document +0 -1
  1020. package/lib/ruby/3.4.11/rubygems/vendor/resolv/lib/resolv.rb +0 -3455
  1021. package/lib/ruby/3.4.11/rubygems/vendor/securerandom/.document +0 -1
  1022. package/lib/ruby/3.4.11/rubygems/vendor/securerandom/lib/securerandom.rb +0 -102
  1023. package/lib/ruby/3.4.11/rubygems/vendor/timeout/.document +0 -1
  1024. package/lib/ruby/3.4.11/rubygems/vendor/timeout/lib/timeout.rb +0 -198
  1025. package/lib/ruby/3.4.11/rubygems/vendor/tsort/.document +0 -1
  1026. package/lib/ruby/3.4.11/rubygems/vendor/tsort/lib/tsort.rb +0 -455
  1027. package/lib/ruby/3.4.11/rubygems/vendor/uri/.document +0 -1
  1028. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/common.rb +0 -880
  1029. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/file.rb +0 -100
  1030. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ftp.rb +0 -267
  1031. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/generic.rb +0 -1592
  1032. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/http.rb +0 -125
  1033. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/https.rb +0 -23
  1034. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ldap.rb +0 -261
  1035. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ldaps.rb +0 -22
  1036. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/mailto.rb +0 -293
  1037. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/rfc2396_parser.rb +0 -546
  1038. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/rfc3986_parser.rb +0 -206
  1039. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/version.rb +0 -6
  1040. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/ws.rb +0 -83
  1041. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri/wss.rb +0 -23
  1042. package/lib/ruby/3.4.11/rubygems/vendor/uri/lib/uri.rb +0 -104
  1043. package/lib/ruby/3.4.11/rubygems/vendored_molinillo.rb +0 -3
  1044. package/lib/ruby/3.4.11/rubygems/vendored_net_http.rb +0 -5
  1045. package/lib/ruby/3.4.11/rubygems/vendored_optparse.rb +0 -3
  1046. package/lib/ruby/3.4.11/rubygems/vendored_securerandom.rb +0 -3
  1047. package/lib/ruby/3.4.11/rubygems/vendored_timeout.rb +0 -5
  1048. package/lib/ruby/3.4.11/rubygems/vendored_tsort.rb +0 -3
  1049. package/lib/ruby/3.4.11/rubygems/version.rb +0 -441
  1050. package/lib/ruby/3.4.11/rubygems/version_option.rb +0 -80
  1051. package/lib/ruby/3.4.11/rubygems/yaml_serializer.rb +0 -98
  1052. package/lib/ruby/3.4.11/rubygems.rb +0 -1417
  1053. package/lib/ruby/3.4.11/securerandom.gemspec +0 -34
  1054. package/lib/ruby/3.4.11/securerandom.rb +0 -102
  1055. package/lib/ruby/3.4.11/set/set.gemspec +0 -30
  1056. package/lib/ruby/3.4.11/set/sorted_set.rb +0 -6
  1057. package/lib/ruby/3.4.11/set.rb +0 -855
  1058. package/lib/ruby/3.4.11/shellwords.gemspec +0 -31
  1059. package/lib/ruby/3.4.11/shellwords.rb +0 -254
  1060. package/lib/ruby/3.4.11/singleton.gemspec +0 -30
  1061. package/lib/ruby/3.4.11/singleton.rb +0 -239
  1062. package/lib/ruby/3.4.11/syntax_suggest/api.rb +0 -233
  1063. package/lib/ruby/3.4.11/syntax_suggest/around_block_scan.rb +0 -232
  1064. package/lib/ruby/3.4.11/syntax_suggest/block_expand.rb +0 -165
  1065. package/lib/ruby/3.4.11/syntax_suggest/capture/before_after_keyword_ends.rb +0 -85
  1066. package/lib/ruby/3.4.11/syntax_suggest/capture/falling_indent_lines.rb +0 -71
  1067. package/lib/ruby/3.4.11/syntax_suggest/capture_code_context.rb +0 -245
  1068. package/lib/ruby/3.4.11/syntax_suggest/clean_document.rb +0 -306
  1069. package/lib/ruby/3.4.11/syntax_suggest/cli.rb +0 -130
  1070. package/lib/ruby/3.4.11/syntax_suggest/code_block.rb +0 -100
  1071. package/lib/ruby/3.4.11/syntax_suggest/code_frontier.rb +0 -178
  1072. package/lib/ruby/3.4.11/syntax_suggest/code_line.rb +0 -243
  1073. package/lib/ruby/3.4.11/syntax_suggest/code_search.rb +0 -139
  1074. package/lib/ruby/3.4.11/syntax_suggest/core_ext.rb +0 -96
  1075. package/lib/ruby/3.4.11/syntax_suggest/display_code_with_line_numbers.rb +0 -70
  1076. package/lib/ruby/3.4.11/syntax_suggest/display_invalid_blocks.rb +0 -83
  1077. package/lib/ruby/3.4.11/syntax_suggest/explain_syntax.rb +0 -117
  1078. package/lib/ruby/3.4.11/syntax_suggest/left_right_lex_count.rb +0 -168
  1079. package/lib/ruby/3.4.11/syntax_suggest/lex_all.rb +0 -74
  1080. package/lib/ruby/3.4.11/syntax_suggest/lex_value.rb +0 -70
  1081. package/lib/ruby/3.4.11/syntax_suggest/mini_stringio.rb +0 -30
  1082. package/lib/ruby/3.4.11/syntax_suggest/parse_blocks_from_indent_line.rb +0 -60
  1083. package/lib/ruby/3.4.11/syntax_suggest/pathname_from_message.rb +0 -59
  1084. package/lib/ruby/3.4.11/syntax_suggest/priority_engulf_queue.rb +0 -63
  1085. package/lib/ruby/3.4.11/syntax_suggest/priority_queue.rb +0 -105
  1086. package/lib/ruby/3.4.11/syntax_suggest/ripper_errors.rb +0 -39
  1087. package/lib/ruby/3.4.11/syntax_suggest/scan_history.rb +0 -134
  1088. package/lib/ruby/3.4.11/syntax_suggest/syntax_suggest.gemspec +0 -32
  1089. package/lib/ruby/3.4.11/syntax_suggest/unvisited_lines.rb +0 -36
  1090. package/lib/ruby/3.4.11/syntax_suggest/version.rb +0 -5
  1091. package/lib/ruby/3.4.11/syntax_suggest.rb +0 -3
  1092. package/lib/ruby/3.4.11/tempfile.gemspec +0 -33
  1093. package/lib/ruby/3.4.11/tempfile.rb +0 -640
  1094. package/lib/ruby/3.4.11/time.gemspec +0 -35
  1095. package/lib/ruby/3.4.11/time.rb +0 -731
  1096. package/lib/ruby/3.4.11/timeout.gemspec +0 -33
  1097. package/lib/ruby/3.4.11/timeout.rb +0 -200
  1098. package/lib/ruby/3.4.11/tmpdir.gemspec +0 -30
  1099. package/lib/ruby/3.4.11/tmpdir.rb +0 -189
  1100. package/lib/ruby/3.4.11/tsort.gemspec +0 -29
  1101. package/lib/ruby/3.4.11/tsort.rb +0 -455
  1102. package/lib/ruby/3.4.11/un.gemspec +0 -31
  1103. package/lib/ruby/3.4.11/un.rb +0 -441
  1104. package/lib/ruby/3.4.11/unicode_normalize/normalize.rb +0 -181
  1105. package/lib/ruby/3.4.11/unicode_normalize/tables.rb +0 -9259
  1106. package/lib/ruby/3.4.11/uri/common.rb +0 -880
  1107. package/lib/ruby/3.4.11/uri/file.rb +0 -100
  1108. package/lib/ruby/3.4.11/uri/ftp.rb +0 -267
  1109. package/lib/ruby/3.4.11/uri/generic.rb +0 -1592
  1110. package/lib/ruby/3.4.11/uri/http.rb +0 -125
  1111. package/lib/ruby/3.4.11/uri/https.rb +0 -23
  1112. package/lib/ruby/3.4.11/uri/ldap.rb +0 -261
  1113. package/lib/ruby/3.4.11/uri/ldaps.rb +0 -22
  1114. package/lib/ruby/3.4.11/uri/mailto.rb +0 -293
  1115. package/lib/ruby/3.4.11/uri/rfc2396_parser.rb +0 -546
  1116. package/lib/ruby/3.4.11/uri/rfc3986_parser.rb +0 -206
  1117. package/lib/ruby/3.4.11/uri/uri.gemspec +0 -42
  1118. package/lib/ruby/3.4.11/uri/version.rb +0 -6
  1119. package/lib/ruby/3.4.11/uri/ws.rb +0 -83
  1120. package/lib/ruby/3.4.11/uri/wss.rb +0 -23
  1121. package/lib/ruby/3.4.11/uri.rb +0 -104
  1122. package/lib/ruby/3.4.11/weakref.gemspec +0 -34
  1123. package/lib/ruby/3.4.11/weakref.rb +0 -58
  1124. package/lib/ruby/3.4.11/yaml/dbm.rb +0 -295
  1125. package/lib/ruby/3.4.11/yaml/store.rb +0 -98
  1126. package/lib/ruby/3.4.11/yaml/yaml.gemspec +0 -30
  1127. package/lib/ruby/3.4.11/yaml.rb +0 -70
@@ -1,3045 +0,0 @@
1
- # -*- coding: us-ascii -*-
2
- # frozen-string-literal: false
3
- # module to create Makefile for extension modules
4
- # invoke like: ruby -r mkmf extconf.rb
5
-
6
- require 'rbconfig'
7
- require 'fileutils'
8
- require 'shellwords'
9
-
10
- class String # :nodoc:
11
- # Wraps a string in escaped quotes if it contains whitespace.
12
- def quote
13
- /\s/ =~ self ? "\"#{self}\"" : "#{self}"
14
- end
15
-
16
- # Escape whitespaces for Makefile.
17
- def unspace
18
- gsub(/\s/, '\\\\\\&')
19
- end
20
-
21
- # Generates a string used as cpp macro name.
22
- def tr_cpp
23
- strip.upcase.tr_s("^A-Z0-9_*", "_").tr_s("*", "P")
24
- end
25
-
26
- def funcall_style
27
- /\)\z/ =~ self ? dup : "#{self}()"
28
- end
29
-
30
- def sans_arguments
31
- self[/\A[^()]+/]
32
- end
33
- end
34
-
35
- class Array # :nodoc:
36
- # Wraps all strings in escaped quotes if they contain whitespace.
37
- def quote
38
- map {|s| s.quote}
39
- end
40
- end
41
-
42
- ##
43
- # mkmf.rb is used by Ruby C extensions to generate a Makefile which will
44
- # correctly compile and link the C extension to Ruby and a third-party
45
- # library.
46
- module MakeMakefile
47
-
48
- target_rbconfig = nil
49
- ARGV.delete_if do |arg|
50
- opt = arg.delete_prefix("--target-rbconfig=")
51
- unless opt == arg
52
- target_rbconfig = opt
53
- end
54
- end
55
- if target_rbconfig
56
- # Load the RbConfig for the target platform into this module.
57
- # Cross-compiling needs the same version of Ruby.
58
- Kernel.load target_rbconfig, self
59
- else
60
- # The RbConfig for the target platform where the built extension runs.
61
- RbConfig = ::RbConfig
62
- end
63
-
64
- #### defer until this module become global-state free.
65
- # def self.extended(obj)
66
- # obj.init_mkmf
67
- # super
68
- # end
69
- #
70
- # def initialize(*args, rbconfig: RbConfig, **rest)
71
- # init_mkmf(rbconfig::MAKEFILE_CONFIG, rbconfig::CONFIG)
72
- # super(*args, **rest)
73
- # end
74
-
75
- ##
76
- # The makefile configuration using the defaults from when Ruby was built.
77
-
78
- CONFIG = RbConfig::MAKEFILE_CONFIG
79
-
80
- ##
81
- # The saved original value of +LIB+ environment variable
82
- ORIG_LIBPATH = ENV['LIB']
83
-
84
- ##
85
- # Extensions for files compiled with a C compiler
86
-
87
- C_EXT = %w[c m]
88
-
89
- ##
90
- # Extensions for files compiled with a C++ compiler
91
-
92
- CXX_EXT = %w[cc mm cxx cpp]
93
- unless File.exist?(File.join(*File.split(__FILE__).tap {|d, b| b.swapcase}))
94
- CXX_EXT.concat(%w[C])
95
- end
96
-
97
- ##
98
- # Extensions for source files
99
-
100
- SRC_EXT = C_EXT + CXX_EXT
101
-
102
- ##
103
- # Extensions for header files
104
-
105
- HDR_EXT = %w[h hpp]
106
- $static = nil
107
- $config_h = '$(arch_hdrdir)/ruby/config.h'
108
- $default_static = $static
109
-
110
- unless defined? $configure_args
111
- $configure_args = {}
112
- args = CONFIG["configure_args"].shellsplit
113
- if arg = ENV["CONFIGURE_ARGS"]
114
- args.push(*arg.shellsplit)
115
- end
116
- args.delete_if {|a| /\A--(?:top(?:src)?|src|cur)dir(?=\z|=)/ =~ a}
117
- for arg in args.concat(ARGV)
118
- arg, val = arg.split('=', 2)
119
- next unless arg
120
- arg.tr!('_', '-')
121
- if arg.sub!(/\A(?!--)/, '--')
122
- val or next
123
- arg.downcase!
124
- end
125
- $configure_args[arg] = val || true
126
- end
127
- end
128
-
129
- $libdir = CONFIG["libdir"]
130
- $rubylibdir = CONFIG["rubylibdir"]
131
- $archdir = CONFIG["archdir"]
132
- $sitedir = CONFIG["sitedir"]
133
- $sitelibdir = CONFIG["sitelibdir"]
134
- $sitearchdir = CONFIG["sitearchdir"]
135
- $vendordir = CONFIG["vendordir"]
136
- $vendorlibdir = CONFIG["vendorlibdir"]
137
- $vendorarchdir = CONFIG["vendorarchdir"]
138
-
139
- $mswin = /mswin/ =~ RUBY_PLATFORM
140
- $mingw = /mingw/ =~ RUBY_PLATFORM
141
- $cygwin = /cygwin/ =~ RUBY_PLATFORM
142
- $netbsd = /netbsd/ =~ RUBY_PLATFORM
143
- $haiku = /haiku/ =~ RUBY_PLATFORM
144
- $solaris = /solaris/ =~ RUBY_PLATFORM
145
- $universal = /universal/ =~ RUBY_PLATFORM
146
- $dest_prefix_pattern = (File::PATH_SEPARATOR == ';' ? /\A([[:alpha:]]:)?/ : /\A/)
147
-
148
- # :stopdoc:
149
-
150
- def config_string(key, config = CONFIG)
151
- s = config[key] and !s.empty? and block_given? ? yield(s) : s
152
- end
153
- module_function :config_string
154
-
155
- def dir_re(dir)
156
- Regexp.new('\$(?:\('+dir+'\)|\{'+dir+'\})(?:\$(?:\(target_prefix\)|\{target_prefix\}))?')
157
- end
158
- module_function :dir_re
159
-
160
- def relative_from(path, base)
161
- dir = File.join(path, "")
162
- if File.expand_path(dir) == File.expand_path(dir, base)
163
- path
164
- else
165
- File.join(base, path)
166
- end
167
- end
168
-
169
- INSTALL_DIRS = [
170
- [dir_re('commondir'), "$(RUBYCOMMONDIR)"],
171
- [dir_re('sitedir'), "$(RUBYCOMMONDIR)"],
172
- [dir_re('vendordir'), "$(RUBYCOMMONDIR)"],
173
- [dir_re('rubylibdir'), "$(RUBYLIBDIR)"],
174
- [dir_re('archdir'), "$(RUBYARCHDIR)"],
175
- [dir_re('sitelibdir'), "$(RUBYLIBDIR)"],
176
- [dir_re('vendorlibdir'), "$(RUBYLIBDIR)"],
177
- [dir_re('sitearchdir'), "$(RUBYARCHDIR)"],
178
- [dir_re('vendorarchdir'), "$(RUBYARCHDIR)"],
179
- [dir_re('rubyhdrdir'), "$(RUBYHDRDIR)"],
180
- [dir_re('sitehdrdir'), "$(SITEHDRDIR)"],
181
- [dir_re('vendorhdrdir'), "$(VENDORHDRDIR)"],
182
- [dir_re('bindir'), "$(BINDIR)"],
183
- ]
184
-
185
- def install_dirs(target_prefix = nil)
186
- if $extout and $extmk
187
- dirs = [
188
- ['BINDIR', '$(extout)/bin'],
189
- ['RUBYCOMMONDIR', '$(extout)/common'],
190
- ['RUBYLIBDIR', '$(RUBYCOMMONDIR)$(target_prefix)'],
191
- ['RUBYARCHDIR', '$(extout)/$(arch)$(target_prefix)'],
192
- ['HDRDIR', '$(extout)/include/ruby$(target_prefix)'],
193
- ['ARCHHDRDIR', '$(extout)/include/$(arch)/ruby$(target_prefix)'],
194
- ['extout', "#$extout"],
195
- ['extout_prefix', "#$extout_prefix"],
196
- ]
197
- elsif $extmk
198
- dirs = [
199
- ['BINDIR', '$(bindir)'],
200
- ['RUBYCOMMONDIR', '$(rubylibdir)'],
201
- ['RUBYLIBDIR', '$(rubylibdir)$(target_prefix)'],
202
- ['RUBYARCHDIR', '$(archdir)$(target_prefix)'],
203
- ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'],
204
- ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
205
- ]
206
- elsif $configure_args.has_key?('--vendor')
207
- dirs = [
208
- ['BINDIR', '$(bindir)'],
209
- ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'],
210
- ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'],
211
- ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'],
212
- ['HDRDIR', '$(vendorhdrdir)$(target_prefix)'],
213
- ['ARCHHDRDIR', '$(vendorarchhdrdir)$(target_prefix)'],
214
- ]
215
- else
216
- dirs = [
217
- ['BINDIR', '$(bindir)'],
218
- ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'],
219
- ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'],
220
- ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'],
221
- ['HDRDIR', '$(sitehdrdir)$(target_prefix)'],
222
- ['ARCHHDRDIR', '$(sitearchhdrdir)$(target_prefix)'],
223
- ]
224
- end
225
- dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")]
226
- dirs
227
- end
228
-
229
- def map_dir(dir, map = nil)
230
- map ||= INSTALL_DIRS
231
- map.inject(dir) {|d, (orig, new)| d.gsub(orig, new)}
232
- end
233
-
234
- topdir = File.dirname(File.dirname(__FILE__))
235
- path = File.expand_path($0)
236
- until (dir = File.dirname(path)) == path
237
- if File.identical?(dir, topdir)
238
- $extmk = true if %r"\A(?:ext|enc|tool|test)\z" =~ File.basename(path)
239
- break
240
- end
241
- path = dir
242
- end
243
- $extmk ||= false
244
- if not $extmk and File.exist?(($hdrdir = RbConfig::CONFIG["rubyhdrdir"]) + "/ruby/ruby.h")
245
- $topdir = $hdrdir
246
- $top_srcdir = $hdrdir
247
- $arch_hdrdir = RbConfig::CONFIG["rubyarchhdrdir"]
248
- elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include") + "/ruby.h")
249
- $topdir ||= RbConfig::CONFIG["topdir"]
250
- $arch_hdrdir = "$(extout)/include/$(arch)"
251
- else
252
- abort <<MESSAGE
253
- mkmf.rb can't find header files for ruby at #{$hdrdir}/ruby.h
254
-
255
- You might have to install separate package for the ruby development
256
- environment, ruby-dev or ruby-devel for example.
257
- MESSAGE
258
- end
259
-
260
- CONFTEST = "conftest".freeze
261
- CONFTEST_C = "#{CONFTEST}.c"
262
-
263
- OUTFLAG = CONFIG['OUTFLAG']
264
- COUTFLAG = CONFIG['COUTFLAG']
265
- CSRCFLAG = CONFIG['CSRCFLAG']
266
- CPPOUTFILE = config_string('CPPOUTFILE') {|str| str.sub(/\bconftest\b/, CONFTEST)}
267
-
268
- # :startdoc:
269
-
270
- # Removes _files_.
271
- def rm_f(*files)
272
- opt = (Hash === files.last ? [files.pop] : [])
273
- FileUtils.rm_f(Dir[*files.flatten], *opt)
274
- end
275
- module_function :rm_f
276
-
277
- # Removes _files_ recursively.
278
- def rm_rf(*files)
279
- opt = (Hash === files.last ? [files.pop] : [])
280
- FileUtils.rm_rf(Dir[*files.flatten], *opt)
281
- end
282
- module_function :rm_rf
283
-
284
- # Returns time stamp of the +target+ file if it exists and is newer than or
285
- # equal to all of +times+.
286
- def modified?(target, times)
287
- (t = File.mtime(target)) rescue return nil
288
- Array === times or times = [times]
289
- t if times.all? {|n| n <= t}
290
- end
291
-
292
- # :stopdoc:
293
-
294
- def split_libs(*strs)
295
- sep = $mswin ? /\s+/ : /\s+(?=-|\z)/
296
- strs.flat_map {|s| s.lstrip.split(sep)}
297
- end
298
-
299
- def merge_libs(*libs)
300
- libs.inject([]) do |x, y|
301
- y = y.inject([]) {|ary, e| ary.last == e ? ary : ary << e}
302
- y.each_with_index do |v, yi|
303
- if xi = x.rindex(v)
304
- x[(xi+1)..-1] = merge_libs(y[(yi+1)..-1], x[(xi+1)..-1])
305
- x[xi, 0] = y[0...yi]
306
- break
307
- end
308
- end and x.concat(y)
309
- x
310
- end
311
- end
312
-
313
- # This is a custom logging module. It generates an mkmf.log file when you
314
- # run your extconf.rb script. This can be useful for debugging unexpected
315
- # failures.
316
- #
317
- # This module and its associated methods are meant for internal use only.
318
- #
319
- module Logging
320
- @log = nil
321
- @logfile = 'mkmf.log'
322
- @orgerr = $stderr.dup
323
- @orgout = $stdout.dup
324
- @postpone = 0
325
- @quiet = $extmk
326
-
327
- def self::log_open
328
- @log ||= File::open(@logfile, 'wb')
329
- @log.sync = true
330
- end
331
-
332
- def self::log_opened?
333
- @log and not @log.closed?
334
- end
335
-
336
- def self::open
337
- log_open
338
- $stderr.reopen(@log)
339
- $stdout.reopen(@log)
340
- yield
341
- ensure
342
- $stderr.reopen(@orgerr)
343
- $stdout.reopen(@orgout)
344
- end
345
-
346
- def self::message(*s)
347
- log_open
348
- @log.printf(*s)
349
- end
350
-
351
- def self::logfile file
352
- @logfile = file
353
- log_close
354
- end
355
-
356
- def self::log_close
357
- if @log and not @log.closed?
358
- @log.flush
359
- @log.close
360
- @log = nil
361
- end
362
- end
363
-
364
- def self::postpone
365
- tmplog = "mkmftmp#{@postpone += 1}.log"
366
- open do
367
- log, *save = @log, @logfile, @orgout, @orgerr
368
- @log, @logfile, @orgout, @orgerr = nil, tmplog, log, log
369
- begin
370
- log.print(open {yield @log})
371
- ensure
372
- @log.close if @log and not @log.closed?
373
- File::open(tmplog) {|t| FileUtils.copy_stream(t, log)} if File.exist?(tmplog)
374
- @log, @logfile, @orgout, @orgerr = log, *save
375
- @postpone -= 1
376
- MakeMakefile.rm_f tmplog
377
- end
378
- end
379
- end
380
-
381
- class << self
382
- attr_accessor :quiet
383
- end
384
- end
385
-
386
- def libpath_env
387
- # used only if native compiling
388
- if libpathenv = config_string("LIBPATHENV")
389
- pathenv = ENV[libpathenv]
390
- libpath = RbConfig.expand($DEFLIBPATH.join(File::PATH_SEPARATOR))
391
- {libpathenv => [libpath, pathenv].compact.join(File::PATH_SEPARATOR)}
392
- else
393
- {}
394
- end
395
- end
396
-
397
- def expand_command(commands, envs = libpath_env)
398
- varpat = /\$\((\w+)\)|\$\{(\w+)\}/
399
- vars = nil
400
- expand = proc do |command|
401
- case command
402
- when Array
403
- command.map(&expand)
404
- when String
405
- if varpat =~ command
406
- vars ||= Hash.new {|h, k| h[k] = ENV[k]}
407
- command = command.dup
408
- nil while command.gsub!(varpat) {vars[$1||$2]}
409
- end
410
- command
411
- else
412
- command
413
- end
414
- end
415
- if Array === commands
416
- env, *commands = commands if Hash === commands.first
417
- envs.merge!(env) if env
418
- end
419
-
420
- # disable ASAN leak reporting - conftest programs almost always don't bother
421
- # to free their memory.
422
- envs['ASAN_OPTIONS'] = "detect_leaks=0" unless ENV.key?('ASAN_OPTIONS')
423
-
424
- return envs, expand[commands]
425
- end
426
-
427
- def env_quote(envs)
428
- envs.map {|e, v| "#{e}=#{v.quote}"}
429
- end
430
-
431
- # :startdoc:
432
-
433
- # call-seq:
434
- # xsystem(command, werror: false) -> true or false
435
- #
436
- # Executes _command_ with expanding variables, and returns the exit
437
- # status like as Kernel#system. If _werror_ is true and the error
438
- # output is not empty, returns +false+. The output will logged.
439
- def xsystem(command, werror: false)
440
- env, command = expand_command(command)
441
- Logging::open do
442
- puts [env_quote(env), command.quote].join(' ')
443
- if werror
444
- result = nil
445
- Logging.postpone do |log|
446
- output = IO.popen(env, command, &:read)
447
- result = ($?.success? and File.zero?(log.path))
448
- output
449
- end
450
- result
451
- else
452
- system(env, *command)
453
- end
454
- end
455
- end
456
-
457
- # Executes _command_ similarly to xsystem, but yields opened pipe.
458
- def xpopen command, *mode, &block
459
- env, commands = expand_command(command)
460
- command = [env_quote(env), command].join(' ')
461
- Logging::open do
462
- case mode[0]
463
- when nil, Hash, /^r/
464
- puts "#{command} |"
465
- else
466
- puts "| #{command}"
467
- end
468
- IO.popen(env, commands, *mode, &block)
469
- end
470
- end
471
-
472
- # Logs _src_
473
- def log_src(src, heading="checked program was")
474
- src = src.split(/^/)
475
- fmt = "%#{src.size.to_s.size}d: %s"
476
- Logging::message <<"EOM"
477
- #{heading}:
478
- /* begin */
479
- EOM
480
- src.each_with_index {|line, no| Logging::message fmt, no+1, line}
481
- Logging::message <<"EOM"
482
- /* end */
483
-
484
- EOM
485
- end
486
-
487
- # Returns the language-dependent source file name for configuration
488
- # checks.
489
- def conftest_source
490
- CONFTEST_C
491
- end
492
-
493
- # Creats temporary source file from +COMMON_HEADERS+ and _src_.
494
- # Yields the created source string and uses the returned string as
495
- # the source code, if the block is given.
496
- def create_tmpsrc(src)
497
- src = "#{COMMON_HEADERS}\n#{src}"
498
- src = yield(src) if block_given?
499
- src.gsub!(/[ \t]+$/, '')
500
- src.gsub!(/\A\n+|^\n+$/, '')
501
- src.sub!(/[^\n]\z/, "\\&\n")
502
- count = 0
503
- begin
504
- File.open(conftest_source, "wb") do |cfile|
505
- cfile.print src
506
- end
507
- rescue Errno::EACCES
508
- if (count += 1) < 5
509
- sleep 0.2
510
- retry
511
- end
512
- end
513
- src
514
- end
515
-
516
- # :stopdoc:
517
-
518
- def have_devel?
519
- unless defined? $have_devel
520
- $have_devel = true
521
- $have_devel = try_link(MAIN_DOES_NOTHING)
522
- end
523
- $have_devel
524
- end
525
-
526
- def try_do(src, command, **opts, &b)
527
- unless have_devel?
528
- raise <<MSG
529
- The compiler failed to generate an executable file.
530
- You have to install development tools first.
531
- MSG
532
- end
533
- begin
534
- src = create_tmpsrc(src, &b)
535
- xsystem(command, **opts)
536
- ensure
537
- log_src(src)
538
- end
539
- end
540
-
541
- def link_config(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
542
- librubyarg = $extmk ? $LIBRUBYARG_STATIC : "$(LIBRUBYARG)"
543
- conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote,
544
- 'src' => "#{conftest_source}",
545
- 'arch_hdrdir' => $arch_hdrdir.quote,
546
- 'top_srcdir' => $top_srcdir.quote,
547
- 'INCFLAGS' => "#$INCFLAGS",
548
- 'CPPFLAGS' => "#$CPPFLAGS",
549
- 'CFLAGS' => "#$CFLAGS",
550
- 'ARCH_FLAG' => "#$ARCH_FLAG",
551
- 'LDFLAGS' => "#$LDFLAGS #{ldflags}",
552
- 'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
553
- 'LIBS' => "#{librubyarg} #{opt} #$LIBS")
554
- conf['LIBPATH'] = libpathflag(libpath.map {|s| RbConfig::expand(s.dup, conf)})
555
- conf
556
- end
557
-
558
- def link_command(ldflags, *opts)
559
- conf = link_config(ldflags, *opts)
560
- RbConfig::expand(TRY_LINK.dup, conf)
561
- end
562
-
563
- def cc_config(opt="")
564
- conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote,
565
- 'arch_hdrdir' => $arch_hdrdir.quote,
566
- 'top_srcdir' => $top_srcdir.quote)
567
- conf
568
- end
569
-
570
- def cc_command(opt="")
571
- conf = cc_config(opt)
572
- RbConfig::expand("$(CC) #$INCFLAGS #$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_C}",
573
- conf)
574
- end
575
-
576
- def cpp_command(outfile, opt="")
577
- conf = cc_config(opt)
578
- if $universal and (arch_flag = conf['ARCH_FLAG']) and !arch_flag.empty?
579
- conf['ARCH_FLAG'] = arch_flag.gsub(/(?:\G|\s)-arch\s+\S+/, '')
580
- end
581
- RbConfig::expand("$(CPP) #$INCFLAGS #$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}",
582
- conf)
583
- end
584
-
585
- def libpathflag(libpath=$DEFLIBPATH|$LIBPATH)
586
- libpathflags = nil
587
- libpath.map{|x|
588
- case x
589
- when "$(topdir)", /\A\./
590
- LIBPATHFLAG
591
- else
592
- libpathflags ||= [LIBPATHFLAG, RPATHFLAG].grep(/\S/).join(" ")
593
- end % x.quote
594
- }.join(" ")
595
- end
596
-
597
- def werror_flag(opt = nil)
598
- config_string("WERRORFLAG") {|flag| opt = opt && !opt.empty? ? "#{opt} #{flag}" : flag}
599
- opt
600
- end
601
-
602
- def with_werror(opt, opts = nil)
603
- opt = werror_flag(opt) if opts and (opts = opts.dup).delete(:werror)
604
- yield(opt, opts)
605
- end
606
-
607
- def try_link0(src, opt = "", ldflags: "", **opts, &b) # :nodoc:
608
- exe = CONFTEST+$EXEEXT
609
- cmd = link_command(ldflags, opt)
610
- if $universal
611
- require 'tmpdir'
612
- Dir.mktmpdir("mkmf_", oldtmpdir = ENV["TMPDIR"]) do |tmpdir|
613
- begin
614
- ENV["TMPDIR"] = tmpdir
615
- try_do(src, cmd, **opts, &b)
616
- ensure
617
- ENV["TMPDIR"] = oldtmpdir
618
- end
619
- end
620
- else
621
- try_do(src, cmd, **opts, &b)
622
- end and File.executable?(exe) or return nil
623
- exe
624
- ensure
625
- MakeMakefile.rm_rf(*Dir["#{CONFTEST}*"]-[exe])
626
- end
627
-
628
- # Returns whether or not the +src+ can be compiled as a C source and linked
629
- # with its depending libraries successfully. +opt+ is passed to the linker
630
- # as options. Note that <tt>$CFLAGS</tt> and <tt>$LDFLAGS</tt> are also
631
- # passed to the linker.
632
- #
633
- # If a block given, it is called with the source before compilation. You can
634
- # modify the source in the block.
635
- #
636
- # [+src+] a String which contains a C source
637
- # [+opt+] a String which contains linker options
638
- def try_link(src, opt = "", **opts, &b)
639
- exe = try_link0(src, opt, **opts, &b) or return false
640
- MakeMakefile.rm_f exe
641
- true
642
- end
643
-
644
- # Returns whether or not the +src+ can be compiled as a C source. +opt+ is
645
- # passed to the C compiler as options. Note that <tt>$CFLAGS</tt> is also
646
- # passed to the compiler.
647
- #
648
- # If a block given, it is called with the source before compilation. You can
649
- # modify the source in the block.
650
- #
651
- # [+src+] a String which contains a C source
652
- # [+opt+] a String which contains compiler options
653
- def try_compile(src, opt = "", werror: nil, **opts, &b)
654
- opt = werror_flag(opt) if werror
655
- try_do(src, cc_command(opt), werror: werror, **opts, &b) and
656
- File.file?("#{CONFTEST}.#{$OBJEXT}")
657
- ensure
658
- MakeMakefile.rm_f "#{CONFTEST}*"
659
- end
660
-
661
- # Returns whether or not the +src+ can be preprocessed with the C
662
- # preprocessor. +opt+ is passed to the preprocessor as options. Note that
663
- # <tt>$CFLAGS</tt> is also passed to the preprocessor.
664
- #
665
- # If a block given, it is called with the source before preprocessing. You
666
- # can modify the source in the block.
667
- #
668
- # [+src+] a String which contains a C source
669
- # [+opt+] a String which contains preprocessor options
670
- def try_cpp(src, opt = "", **opts, &b)
671
- try_do(src, cpp_command(CPPOUTFILE, opt), **opts, &b) and
672
- File.file?("#{CONFTEST}.i")
673
- ensure
674
- MakeMakefile.rm_f "#{CONFTEST}*"
675
- end
676
-
677
- alias try_header try_compile
678
-
679
- def cpp_include(header)
680
- if header
681
- header = [header] unless header.kind_of? Array
682
- header.map {|h| String === h ? "#include <#{h}>\n" : h}.join
683
- else
684
- ""
685
- end
686
- end
687
-
688
- # :startdoc:
689
-
690
- # Sets <tt>$CPPFLAGS</tt> to _flags_ and yields. If the block returns a
691
- # falsy value, <tt>$CPPFLAGS</tt> is reset to its previous value, remains
692
- # set to _flags_ otherwise.
693
- #
694
- # [+flags+] a C preprocessor flag as a +String+
695
- #
696
- def with_cppflags(flags)
697
- cppflags = $CPPFLAGS
698
- $CPPFLAGS = flags.dup
699
- ret = yield
700
- ensure
701
- $CPPFLAGS = cppflags unless ret
702
- end
703
-
704
- # :nodoc:
705
- def try_cppflags(flags, werror: true, **opts)
706
- try_header(MAIN_DOES_NOTHING, flags, werror: werror, **opts)
707
- end
708
-
709
- # Check whether each given C preprocessor flag is acceptable and append it
710
- # to <tt>$CPPFLAGS</tt> if so.
711
- #
712
- # [+flags+] a C preprocessor flag as a +String+ or an +Array+ of them
713
- #
714
- def append_cppflags(flags, **opts)
715
- Array(flags).each do |flag|
716
- if checking_for("whether #{flag} is accepted as CPPFLAGS") {
717
- try_cppflags(flag, **opts)
718
- }
719
- $CPPFLAGS << " " << flag
720
- end
721
- end
722
- end
723
-
724
- # Sets <tt>$CFLAGS</tt> to _flags_ and yields. If the block returns a falsy
725
- # value, <tt>$CFLAGS</tt> is reset to its previous value, remains set to
726
- # _flags_ otherwise.
727
- def with_cflags(flags)
728
- cflags = $CFLAGS
729
- $CFLAGS = flags.dup
730
- ret = yield
731
- ensure
732
- $CFLAGS = cflags unless ret
733
- end
734
-
735
- # :nodoc:
736
- def try_cflags(flags, werror: true, **opts)
737
- try_compile(MAIN_DOES_NOTHING, flags, werror: werror, **opts)
738
- end
739
-
740
- # Sets <tt>$LDFLAGS</tt> to _flags_ and yields. If the block returns a
741
- # falsy value, <tt>$LDFLAGS</tt> is reset to its previous value, remains set
742
- # to _flags_ otherwise.
743
- def with_ldflags(flags)
744
- ldflags = $LDFLAGS
745
- $LDFLAGS = flags.dup
746
- ret = yield
747
- ensure
748
- $LDFLAGS = ldflags unless ret
749
- end
750
-
751
- # :nodoc:
752
- def try_ldflags(flags, werror: $mswin, **opts)
753
- try_link(MAIN_DOES_NOTHING, "", ldflags: flags, werror: werror, **opts)
754
- end
755
-
756
- # :startdoc:
757
-
758
- # Check whether each given linker flag is acceptable and append it to
759
- # <tt>$LDFLAGS</tt> if so.
760
- #
761
- # [+flags+] a linker flag as a +String+ or an +Array+ of them
762
- #
763
- def append_ldflags(flags, **opts)
764
- Array(flags).each do |flag|
765
- if checking_for("whether #{flag} is accepted as LDFLAGS") {
766
- try_ldflags(flag, **opts)
767
- }
768
- $LDFLAGS << " " << flag
769
- end
770
- end
771
- end
772
-
773
- # :stopdoc:
774
-
775
- def try_static_assert(expr, headers = nil, opt = "", &b)
776
- headers = cpp_include(headers)
777
- try_compile(<<SRC, opt, &b)
778
- #{headers}
779
- /*top*/
780
- int conftest_const[(#{expr}) ? 1 : -1];
781
- SRC
782
- end
783
-
784
- def try_constant(const, headers = nil, opt = "", &b)
785
- includes = cpp_include(headers)
786
- neg = try_static_assert("#{const} < 0", headers, opt)
787
- if CROSS_COMPILING
788
- if neg
789
- const = "-(#{const})"
790
- elsif try_static_assert("#{const} > 0", headers, opt)
791
- # positive constant
792
- elsif try_static_assert("#{const} == 0", headers, opt)
793
- return 0
794
- else
795
- # not a constant
796
- return nil
797
- end
798
- upper = 1
799
- until try_static_assert("#{const} <= #{upper}", headers, opt)
800
- lower = upper
801
- upper <<= 1
802
- end
803
- return nil unless lower
804
- while upper > lower + 1
805
- mid = (upper + lower) / 2
806
- if try_static_assert("#{const} > #{mid}", headers, opt)
807
- lower = mid
808
- else
809
- upper = mid
810
- end
811
- end
812
- upper = -upper if neg
813
- return upper
814
- else
815
- src = %{#{includes}
816
- #include <stdio.h>
817
- /*top*/
818
- typedef#{neg ? '' : ' unsigned'}
819
- #ifdef PRI_LL_PREFIX
820
- #define PRI_CONFTEST_PREFIX PRI_LL_PREFIX
821
- LONG_LONG
822
- #else
823
- #define PRI_CONFTEST_PREFIX "l"
824
- long
825
- #endif
826
- conftest_type;
827
- conftest_type conftest_const = (conftest_type)(#{const});
828
- int main() {printf("%"PRI_CONFTEST_PREFIX"#{neg ? 'd' : 'u'}\\n", conftest_const); return 0;}
829
- }
830
- begin
831
- if try_link0(src, opt, &b)
832
- xpopen("./#{CONFTEST}") do |f|
833
- return Integer(f.gets)
834
- end
835
- end
836
- ensure
837
- MakeMakefile.rm_f "#{CONFTEST}#{$EXEEXT}"
838
- end
839
- end
840
- nil
841
- end
842
-
843
- # You should use +have_func+ rather than +try_func+.
844
- #
845
- # [+func+] a String which contains a symbol name
846
- # [+libs+] a String which contains library names.
847
- # [+headers+] a String or an Array of strings which contains names of header
848
- # files.
849
- def try_func(func, libs, headers = nil, opt = "", &b)
850
- headers = cpp_include(headers)
851
- prepare = String.new
852
- case func
853
- when /^&/
854
- decltype = proc {|x|"const volatile void *#{x}"}
855
- when /\)$/
856
- strvars = []
857
- call = func.gsub(/""/) {
858
- v = "s#{strvars.size + 1}"
859
- strvars << v
860
- v
861
- }
862
- unless strvars.empty?
863
- prepare << "char " << strvars.map {|v| "#{v}[1024]"}.join(", ") << "; "
864
- end
865
- when nil
866
- call = ""
867
- else
868
- call = "#{func}()"
869
- decltype = proc {|x| "void ((*#{x})())"}
870
- end
871
- if opt and !opt.empty?
872
- [[:to_str], [:join, " "], [:to_s]].each do |meth, *args|
873
- if opt.respond_to?(meth)
874
- break opt = opt.__send__(meth, *args)
875
- end
876
- end
877
- opt = "#{opt} #{libs}"
878
- else
879
- opt = libs
880
- end
881
- decltype && try_link(<<"SRC", opt, &b) or
882
- #{headers}
883
- /*top*/
884
- extern int t(void);
885
- #{MAIN_DOES_NOTHING 't'}
886
- int t(void) { #{decltype["volatile p"]}; p = (#{decltype[]})#{func}; return !p; }
887
- SRC
888
- call && try_link(<<"SRC", opt, &b)
889
- #{headers}
890
- /*top*/
891
- extern int t(void);
892
- #{MAIN_DOES_NOTHING 't'}
893
- #{"extern void #{call};" if decltype}
894
- int t(void) { #{prepare}#{call}; return 0; }
895
- SRC
896
- end
897
-
898
- # You should use +have_var+ rather than +try_var+.
899
- def try_var(var, headers = nil, opt = "", &b)
900
- headers = cpp_include(headers)
901
- try_compile(<<"SRC", opt, &b)
902
- #{headers}
903
- /*top*/
904
- extern int t(void);
905
- #{MAIN_DOES_NOTHING 't'}
906
- int t(void) { const volatile void *volatile p; p = &(&#{var})[0]; return !p; }
907
- SRC
908
- end
909
-
910
- # :startdoc:
911
-
912
- # Returns whether or not the +src+ can be preprocessed with the C
913
- # preprocessor and matches with +pat+.
914
- #
915
- # If a block given, it is called with the source before compilation. You can
916
- # modify the source in the block.
917
- #
918
- # [+pat+] a Regexp or a String
919
- # [+src+] a String which contains a C source
920
- # [+opt+] a String which contains preprocessor options
921
- #
922
- # NOTE: When pat is a Regexp the matching will be checked in process,
923
- # otherwise egrep(1) will be invoked to check it.
924
- def egrep_cpp(pat, src, opt = "", &b)
925
- src = create_tmpsrc(src, &b)
926
- xpopen(cpp_command('', opt)) do |f|
927
- if Regexp === pat
928
- puts(" ruby -ne 'print if #{pat.inspect}'")
929
- f.grep(pat) {|l|
930
- puts "#{f.lineno}: #{l}"
931
- return true
932
- }
933
- false
934
- else
935
- puts(" egrep '#{pat}'")
936
- begin
937
- stdin = $stdin.dup
938
- $stdin.reopen(f)
939
- system("egrep", pat)
940
- ensure
941
- $stdin.reopen(stdin)
942
- end
943
- end
944
- end
945
- ensure
946
- MakeMakefile.rm_f "#{CONFTEST}*"
947
- log_src(src)
948
- end
949
-
950
- # :stopdoc:
951
-
952
- # This is used internally by the have_macro? method.
953
- def macro_defined?(macro, src, opt = "", &b)
954
- src = src.sub(/[^\n]\z/, "\\&\n")
955
- try_compile(src + <<"SRC", opt, &b)
956
- /*top*/
957
- #ifndef #{macro}
958
- # error
959
- |:/ === #{macro} undefined === /:|
960
- #endif
961
- SRC
962
- end
963
-
964
- # Returns whether or not:
965
- # * the +src+ can be compiled as a C source,
966
- # * the result object can be linked with its depending libraries
967
- # successfully,
968
- # * the linked file can be invoked as an executable
969
- # * and the executable exits successfully
970
- #
971
- # +opt+ is passed to the linker as options. Note that <tt>$CFLAGS</tt> and
972
- # <tt>$LDFLAGS</tt> are also passed to the linker.
973
- #
974
- # If a block given, it is called with the source before compilation. You can
975
- # modify the source in the block.
976
- #
977
- # [+src+] a String which contains a C source
978
- # [+opt+] a String which contains linker options
979
- #
980
- # Returns true when the executable exits successfully, false when it fails,
981
- # or nil when preprocessing, compilation or link fails.
982
- def try_run(src, opt = "", &b)
983
- raise "cannot run test program while cross compiling" if CROSS_COMPILING
984
- if try_link0(src, opt, &b)
985
- xsystem("./#{CONFTEST}")
986
- else
987
- nil
988
- end
989
- ensure
990
- MakeMakefile.rm_f "#{CONFTEST}*"
991
- end
992
-
993
- def install_files(mfile, ifiles, map = nil, srcprefix = nil)
994
- ifiles or return
995
- ifiles.empty? and return
996
- srcprefix ||= "$(srcdir)/#{srcprefix}".chomp('/')
997
- RbConfig::expand(srcdir = srcprefix.dup)
998
- dirs = []
999
- path = Hash.new {|h, i| h[i] = dirs.push([i])[-1]}
1000
- ifiles.each do |files, dir, prefix|
1001
- dir = map_dir(dir, map)
1002
- prefix &&= %r|\A#{Regexp.quote(prefix)}/?|
1003
- if /\A\.\// =~ files
1004
- # install files which are in current working directory.
1005
- files = files[2..-1]
1006
- len = nil
1007
- else
1008
- # install files which are under the $(srcdir).
1009
- files = File.join(srcdir, files)
1010
- len = srcdir.size
1011
- end
1012
- f = nil
1013
- Dir.glob(files) do |fx|
1014
- f = fx
1015
- f[0..len] = "" if len
1016
- case File.basename(f)
1017
- when *$NONINSTALLFILES
1018
- next
1019
- end
1020
- d = File.dirname(f)
1021
- d.sub!(prefix, "") if prefix
1022
- d = (d.empty? || d == ".") ? dir : File.join(dir, d)
1023
- f = File.join(srcprefix, f) if len
1024
- path[d] << f
1025
- end
1026
- unless len or f
1027
- d = File.dirname(files)
1028
- d.sub!(prefix, "") if prefix
1029
- d = (d.empty? || d == ".") ? dir : File.join(dir, d)
1030
- path[d] << files
1031
- end
1032
- end
1033
- dirs
1034
- end
1035
-
1036
- def install_rb(mfile, dest, srcdir = nil)
1037
- install_files(mfile, [["lib/**/*.rb", dest, "lib"]], nil, srcdir)
1038
- end
1039
-
1040
- def append_library(libs, lib) # :no-doc:
1041
- format(LIBARG, lib) + " " + libs
1042
- end
1043
-
1044
- # Prints messages to $stdout, if verbose mode.
1045
- #
1046
- # Internal use only.
1047
- #
1048
- def message(*s)
1049
- unless Logging.quiet and not $VERBOSE
1050
- printf(*s)
1051
- $stdout.flush
1052
- end
1053
- end
1054
-
1055
- # This emits a string to stdout that allows users to see the results of the
1056
- # various have* and find* methods as they are tested.
1057
- #
1058
- # Internal use only.
1059
- #
1060
- def checking_for(m, fmt = nil)
1061
- if f = caller_locations(1, 1).first.base_label and /\A\w/ =~ f
1062
- f += ": "
1063
- else
1064
- f = ""
1065
- end
1066
- m = "checking #{/\Acheck/ =~ f ? '' : 'for '}#{m}... "
1067
- message "%s", m
1068
- a = r = nil
1069
- Logging::postpone do
1070
- r = yield
1071
- a = (fmt ? "#{fmt % r}" : r ? "yes" : "no")
1072
- "#{f}#{m}-------------------- #{a}\n\n"
1073
- end
1074
- message "%s\n", a
1075
- Logging::message "--------------------\n\n"
1076
- r
1077
- end
1078
-
1079
- # Build a message for checking.
1080
- #
1081
- # Internal use only.
1082
- #
1083
- def checking_message(target, place = nil, opt = nil)
1084
- [["in", place], ["with", opt]].inject("#{target}") do |msg, (pre, noun)|
1085
- if noun
1086
- [[:to_str], [:join, ","], [:to_s]].each do |meth, *args|
1087
- if noun.respond_to?(meth)
1088
- break noun = noun.__send__(meth, *args)
1089
- end
1090
- end
1091
- unless noun.empty?
1092
- msg << " #{pre} " unless msg.empty?
1093
- msg << noun
1094
- end
1095
- end
1096
- msg
1097
- end
1098
- end
1099
-
1100
- # :startdoc:
1101
-
1102
- # Check whether each given C compiler flag is acceptable and append it
1103
- # to <tt>$CFLAGS</tt> if so.
1104
- #
1105
- # [+flags+] a C compiler flag as a +String+ or an +Array+ of them
1106
- #
1107
- def append_cflags(flags, **opts)
1108
- Array(flags).each do |flag|
1109
- if checking_for("whether #{flag} is accepted as CFLAGS") {
1110
- try_cflags(flag, **opts)
1111
- }
1112
- $CFLAGS << " " << flag
1113
- end
1114
- end
1115
- end
1116
-
1117
- # Returns whether or not +macro+ is defined either in the common header
1118
- # files or within any +headers+ you provide.
1119
- #
1120
- # Any options you pass to +opt+ are passed along to the compiler.
1121
- #
1122
- def have_macro(macro, headers = nil, opt = "", &b)
1123
- checking_for checking_message(macro, headers, opt) do
1124
- macro_defined?(macro, cpp_include(headers), opt, &b)
1125
- end
1126
- end
1127
-
1128
- # Returns whether or not the given entry point +func+ can be found within
1129
- # +lib+. If +func+ is +nil+, the <code>main()</code> entry point is used by
1130
- # default. If found, it adds the library to list of libraries to be used
1131
- # when linking your extension.
1132
- #
1133
- # If +headers+ are provided, it will include those header files as the
1134
- # header files it looks in when searching for +func+.
1135
- #
1136
- # The real name of the library to be linked can be altered by
1137
- # <code>--with-FOOlib</code> configuration option.
1138
- #
1139
- def have_library(lib, func = nil, headers = nil, opt = "", &b)
1140
- dir_config(lib)
1141
- lib = with_config(lib+'lib', lib)
1142
- checking_for checking_message(func && func.funcall_style, LIBARG%lib, opt) do
1143
- if COMMON_LIBS.include?(lib)
1144
- true
1145
- else
1146
- libs = append_library($libs, lib)
1147
- if try_func(func, libs, headers, opt, &b)
1148
- $libs = libs
1149
- true
1150
- else
1151
- false
1152
- end
1153
- end
1154
- end
1155
- end
1156
-
1157
- # Returns whether or not the entry point +func+ can be found within the
1158
- # library +lib+ in one of the +paths+ specified, where +paths+ is an array
1159
- # of strings. If +func+ is +nil+ , then the <code>main()</code> function is
1160
- # used as the entry point.
1161
- #
1162
- # If +lib+ is found, then the path it was found on is added to the list of
1163
- # library paths searched and linked against.
1164
- #
1165
- def find_library(lib, func, *paths, &b)
1166
- dir_config(lib)
1167
- lib = with_config(lib+'lib', lib)
1168
- paths = paths.flat_map {|path| path.split(File::PATH_SEPARATOR)}
1169
- checking_for checking_message(func && func.funcall_style, LIBARG%lib) do
1170
- libpath = $LIBPATH
1171
- libs = append_library($libs, lib)
1172
- begin
1173
- until r = try_func(func, libs, &b) or paths.empty?
1174
- $LIBPATH = libpath | [paths.shift]
1175
- end
1176
- if r
1177
- $libs = libs
1178
- libpath = nil
1179
- end
1180
- ensure
1181
- $LIBPATH = libpath if libpath
1182
- end
1183
- r
1184
- end
1185
- end
1186
-
1187
- # Returns whether or not the function +func+ can be found in the common
1188
- # header files, or within any +headers+ that you provide. If found, a macro
1189
- # is passed as a preprocessor constant to the compiler using the function
1190
- # name, in uppercase, prepended with +HAVE_+.
1191
- #
1192
- # To check functions in an additional library, you need to check that
1193
- # library first using <code>have_library()</code>. The +func+ shall be
1194
- # either mere function name or function name with arguments.
1195
- #
1196
- # For example, if <code>have_func('foo')</code> returned +true+, then the
1197
- # +HAVE_FOO+ preprocessor macro would be passed to the compiler.
1198
- #
1199
- def have_func(func, headers = nil, opt = "", &b)
1200
- checking_for checking_message(func.funcall_style, headers, opt) do
1201
- if try_func(func, $libs, headers, opt, &b)
1202
- $defs << "-DHAVE_#{func.sans_arguments.tr_cpp}"
1203
- true
1204
- else
1205
- false
1206
- end
1207
- end
1208
- end
1209
-
1210
- # Returns whether or not the variable +var+ can be found in the common
1211
- # header files, or within any +headers+ that you provide. If found, a macro
1212
- # is passed as a preprocessor constant to the compiler using the variable
1213
- # name, in uppercase, prepended with +HAVE_+.
1214
- #
1215
- # To check variables in an additional library, you need to check that
1216
- # library first using <code>have_library()</code>.
1217
- #
1218
- # For example, if <code>have_var('foo')</code> returned true, then the
1219
- # +HAVE_FOO+ preprocessor macro would be passed to the compiler.
1220
- #
1221
- def have_var(var, headers = nil, opt = "", &b)
1222
- checking_for checking_message(var, headers, opt) do
1223
- if try_var(var, headers, opt, &b)
1224
- $defs.push(format("-DHAVE_%s", var.tr_cpp))
1225
- true
1226
- else
1227
- false
1228
- end
1229
- end
1230
- end
1231
-
1232
- # Returns whether or not the given +header+ file can be found on your system.
1233
- # If found, a macro is passed as a preprocessor constant to the compiler
1234
- # using the header file name, in uppercase, prepended with +HAVE_+.
1235
- #
1236
- # For example, if <code>have_header('foo.h')</code> returned true, then the
1237
- # +HAVE_FOO_H+ preprocessor macro would be passed to the compiler.
1238
- #
1239
- def have_header(header, preheaders = nil, opt = "", &b)
1240
- dir_config(header[/.*?(?=\/)|.*?(?=\.)/])
1241
- checking_for header do
1242
- if try_header(cpp_include(preheaders)+cpp_include(header), opt, &b)
1243
- $defs.push(format("-DHAVE_%s", header.tr_cpp))
1244
- true
1245
- else
1246
- false
1247
- end
1248
- end
1249
- end
1250
-
1251
- # Returns whether or not the given +framework+ can be found on your system.
1252
- # If found, a macro is passed as a preprocessor constant to the compiler
1253
- # using the framework name, in uppercase, prepended with +HAVE_FRAMEWORK_+.
1254
- #
1255
- # For example, if <code>have_framework('Ruby')</code> returned true, then
1256
- # the +HAVE_FRAMEWORK_RUBY+ preprocessor macro would be passed to the
1257
- # compiler.
1258
- #
1259
- # If +fw+ is a pair of the framework name and its header file name
1260
- # that header file is checked, instead of the normally used header
1261
- # file which is named same as the framework.
1262
- def have_framework(fw, &b)
1263
- if Array === fw
1264
- fw, header = *fw
1265
- else
1266
- header = "#{fw}.h"
1267
- end
1268
- checking_for fw do
1269
- src = cpp_include("#{fw}/#{header}") << "\n" "int main(void){return 0;}"
1270
- opt = " -framework #{fw}"
1271
- if try_link(src, opt, &b) or (objc = try_link(src, "-ObjC#{opt}", &b))
1272
- $defs.push(format("-DHAVE_FRAMEWORK_%s", fw.tr_cpp))
1273
- # TODO: non-worse way than this hack, to get rid of separating
1274
- # option and its argument.
1275
- $LDFLAGS << " -ObjC" if objc and /(\A|\s)-ObjC(\s|\z)/ !~ $LDFLAGS
1276
- $LIBS << opt
1277
- true
1278
- else
1279
- false
1280
- end
1281
- end
1282
- end
1283
-
1284
- # Instructs mkmf to search for the given +header+ in any of the +paths+
1285
- # provided, and returns whether or not it was found in those paths.
1286
- #
1287
- # If the header is found then the path it was found on is added to the list
1288
- # of included directories that are sent to the compiler (via the
1289
- # <code>-I</code> switch).
1290
- #
1291
- def find_header(header, *paths)
1292
- message = checking_message(header, paths)
1293
- header = cpp_include(header)
1294
- checking_for message do
1295
- if try_header(header)
1296
- true
1297
- else
1298
- found = false
1299
- paths.each do |dir|
1300
- opt = "-I#{dir}".quote
1301
- if try_header(header, opt)
1302
- $INCFLAGS << " " << opt
1303
- found = true
1304
- break
1305
- end
1306
- end
1307
- found
1308
- end
1309
- end
1310
- end
1311
-
1312
- # Returns whether or not the struct of type +type+ contains +member+. If
1313
- # it does not, or the struct type can't be found, then false is returned.
1314
- # You may optionally specify additional +headers+ in which to look for the
1315
- # struct (in addition to the common header files).
1316
- #
1317
- # If found, a macro is passed as a preprocessor constant to the compiler
1318
- # using the type name and the member name, in uppercase, prepended with
1319
- # +HAVE_+.
1320
- #
1321
- # For example, if <code>have_struct_member('struct foo', 'bar')</code>
1322
- # returned true, then the +HAVE_STRUCT_FOO_BAR+ preprocessor macro would be
1323
- # passed to the compiler.
1324
- #
1325
- # +HAVE_ST_BAR+ is also defined for backward compatibility.
1326
- #
1327
- def have_struct_member(type, member, headers = nil, opt = "", &b)
1328
- checking_for checking_message("#{type}.#{member}", headers) do
1329
- if try_compile(<<"SRC", opt, &b)
1330
- #{cpp_include(headers)}
1331
- /*top*/
1332
- int s = (char *)&((#{type}*)0)->#{member} - (char *)0;
1333
- #{MAIN_DOES_NOTHING}
1334
- SRC
1335
- $defs.push(format("-DHAVE_%s_%s", type.tr_cpp, member.tr_cpp))
1336
- $defs.push(format("-DHAVE_ST_%s", member.tr_cpp)) # backward compatibility
1337
- true
1338
- else
1339
- false
1340
- end
1341
- end
1342
- end
1343
-
1344
- # :nodoc:
1345
- # Returns whether or not the static type +type+ is defined.
1346
- #
1347
- # See also +have_type+
1348
- #
1349
- def try_type(type, headers = nil, opt = "", &b)
1350
- if try_compile(<<"SRC", opt, &b)
1351
- #{cpp_include(headers)}
1352
- /*top*/
1353
- typedef #{type} conftest_type;
1354
- int conftestval[sizeof(conftest_type)?1:-1];
1355
- SRC
1356
- $defs.push(format("-DHAVE_TYPE_%s", type.tr_cpp))
1357
- true
1358
- else
1359
- false
1360
- end
1361
- end
1362
-
1363
- # Returns whether or not the static type +type+ is defined. You may
1364
- # optionally pass additional +headers+ to check against in addition to the
1365
- # common header files.
1366
- #
1367
- # You may also pass additional flags to +opt+ which are then passed along to
1368
- # the compiler.
1369
- #
1370
- # If found, a macro is passed as a preprocessor constant to the compiler
1371
- # using the type name, in uppercase, prepended with +HAVE_TYPE_+.
1372
- #
1373
- # For example, if <code>have_type('foo')</code> returned true, then the
1374
- # +HAVE_TYPE_FOO+ preprocessor macro would be passed to the compiler.
1375
- #
1376
- def have_type(type, headers = nil, opt = "", &b)
1377
- checking_for checking_message(type, headers, opt) do
1378
- try_type(type, headers, opt, &b)
1379
- end
1380
- end
1381
-
1382
- # Returns where the static type +type+ is defined.
1383
- #
1384
- # You may also pass additional flags to +opt+ which are then passed along to
1385
- # the compiler.
1386
- #
1387
- # See also +have_type+.
1388
- #
1389
- def find_type(type, opt, *headers, &b)
1390
- opt ||= ""
1391
- fmt = "not found"
1392
- def fmt.%(x)
1393
- x ? x.respond_to?(:join) ? x.join(",") : x : self
1394
- end
1395
- checking_for checking_message(type, nil, opt), fmt do
1396
- headers.find do |h|
1397
- try_type(type, h, opt, &b)
1398
- end
1399
- end
1400
- end
1401
-
1402
- # :nodoc:
1403
- # Returns whether or not the constant +const+ is defined.
1404
- #
1405
- # See also +have_const+
1406
- #
1407
- def try_const(const, headers = nil, opt = "", &b)
1408
- const, type = *const
1409
- if try_compile(<<"SRC", opt, &b)
1410
- #{cpp_include(headers)}
1411
- /*top*/
1412
- typedef #{type || 'int'} conftest_type;
1413
- conftest_type conftestval = #{type ? '' : '(int)'}#{const};
1414
- SRC
1415
- $defs.push(format("-DHAVE_CONST_%s", const.tr_cpp))
1416
- true
1417
- else
1418
- false
1419
- end
1420
- end
1421
-
1422
- # Returns whether or not the constant +const+ is defined. You may
1423
- # optionally pass the +type+ of +const+ as <code>[const, type]</code>,
1424
- # such as:
1425
- #
1426
- # have_const(%w[PTHREAD_MUTEX_INITIALIZER pthread_mutex_t], "pthread.h")
1427
- #
1428
- # You may also pass additional +headers+ to check against in addition to the
1429
- # common header files, and additional flags to +opt+ which are then passed
1430
- # along to the compiler.
1431
- #
1432
- # If found, a macro is passed as a preprocessor constant to the compiler
1433
- # using the type name, in uppercase, prepended with +HAVE_CONST_+.
1434
- #
1435
- # For example, if <code>have_const('foo')</code> returned true, then the
1436
- # +HAVE_CONST_FOO+ preprocessor macro would be passed to the compiler.
1437
- #
1438
- def have_const(const, headers = nil, opt = "", &b)
1439
- checking_for checking_message([*const].compact.join(' '), headers, opt) do
1440
- try_const(const, headers, opt, &b)
1441
- end
1442
- end
1443
-
1444
- # :stopdoc:
1445
- STRING_OR_FAILED_FORMAT = "%s"
1446
- class << STRING_OR_FAILED_FORMAT # :nodoc:
1447
- def %(x)
1448
- x ? super : "failed"
1449
- end
1450
- end
1451
-
1452
- def typedef_expr(type, headers)
1453
- typename, member = type.split('.', 2)
1454
- prelude = cpp_include(headers).split(/$/)
1455
- prelude << "typedef #{typename} rbcv_typedef_;\n"
1456
- return "rbcv_typedef_", member, prelude
1457
- end
1458
-
1459
- def try_signedness(type, member, headers = nil, opts = nil)
1460
- raise ArgumentError, "don't know how to tell signedness of members" if member
1461
- if try_static_assert("(#{type})-1 < 0", headers, opts)
1462
- return -1
1463
- elsif try_static_assert("(#{type})-1 > 0", headers, opts)
1464
- return +1
1465
- end
1466
- end
1467
-
1468
- # :startdoc:
1469
-
1470
- # Returns the size of the given +type+. You may optionally specify
1471
- # additional +headers+ to search in for the +type+.
1472
- #
1473
- # If found, a macro is passed as a preprocessor constant to the compiler
1474
- # using the type name, in uppercase, prepended with +SIZEOF_+, followed by
1475
- # the type name, followed by <code>=X</code> where "X" is the actual size.
1476
- #
1477
- # For example, if <code>check_sizeof('mystruct')</code> returned 12, then
1478
- # the <code>SIZEOF_MYSTRUCT=12</code> preprocessor macro would be passed to
1479
- # the compiler.
1480
- #
1481
- def check_sizeof(type, headers = nil, opts = "", &b)
1482
- typedef, member, prelude = typedef_expr(type, headers)
1483
- prelude << "#{typedef} *rbcv_ptr_;\n"
1484
- prelude = [prelude]
1485
- expr = "sizeof((*rbcv_ptr_)#{"." << member if member})"
1486
- fmt = STRING_OR_FAILED_FORMAT
1487
- checking_for checking_message("size of #{type}", headers), fmt do
1488
- if size = try_constant(expr, prelude, opts, &b)
1489
- $defs.push(format("-DSIZEOF_%s=%s", type.tr_cpp, size))
1490
- size
1491
- end
1492
- end
1493
- end
1494
-
1495
- # Returns the signedness of the given +type+. You may optionally specify
1496
- # additional +headers+ to search in for the +type+.
1497
- #
1498
- # If the +type+ is found and is a numeric type, a macro is passed as a
1499
- # preprocessor constant to the compiler using the +type+ name, in uppercase,
1500
- # prepended with +SIGNEDNESS_OF_+, followed by the +type+ name, followed by
1501
- # <code>=X</code> where "X" is positive integer if the +type+ is unsigned
1502
- # and a negative integer if the +type+ is signed.
1503
- #
1504
- # For example, if +size_t+ is defined as unsigned, then
1505
- # <code>check_signedness('size_t')</code> would return +1 and the
1506
- # <code>SIGNEDNESS_OF_SIZE_T=+1</code> preprocessor macro would be passed to
1507
- # the compiler. The <code>SIGNEDNESS_OF_INT=-1</code> macro would be set
1508
- # for <code>check_signedness('int')</code>
1509
- #
1510
- def check_signedness(type, headers = nil, opts = nil, &b)
1511
- typedef, member, prelude = typedef_expr(type, headers)
1512
- signed = nil
1513
- checking_for("signedness of #{type}", STRING_OR_FAILED_FORMAT) do
1514
- signed = try_signedness(typedef, member, [prelude], opts, &b) or next nil
1515
- $defs.push("-DSIGNEDNESS_OF_%s=%+d" % [type.tr_cpp, signed])
1516
- signed < 0 ? "signed" : "unsigned"
1517
- end
1518
- signed
1519
- end
1520
-
1521
- # Returns the convertible integer type of the given +type+. You may
1522
- # optionally specify additional +headers+ to search in for the +type+.
1523
- # _convertible_ means actually the same type, or typedef'd from the same
1524
- # type.
1525
- #
1526
- # If the +type+ is an integer type and the _convertible_ type is found,
1527
- # the following macros are passed as preprocessor constants to the compiler
1528
- # using the +type+ name, in uppercase.
1529
- #
1530
- # * +TYPEOF_+, followed by the +type+ name, followed by <code>=X</code>
1531
- # where "X" is the found _convertible_ type name.
1532
- # * +TYP2NUM+ and +NUM2TYP+,
1533
- # where +TYP+ is the +type+ name in uppercase with replacing an +_t+
1534
- # suffix with "T", followed by <code>=X</code> where "X" is the macro name
1535
- # to convert +type+ to an Integer object, and vice versa.
1536
- #
1537
- # For example, if +foobar_t+ is defined as unsigned long, then
1538
- # <code>convertible_int("foobar_t")</code> would return "unsigned long", and
1539
- # define these macros:
1540
- #
1541
- # #define TYPEOF_FOOBAR_T unsigned long
1542
- # #define FOOBART2NUM ULONG2NUM
1543
- # #define NUM2FOOBART NUM2ULONG
1544
- #
1545
- def convertible_int(type, headers = nil, opts = nil, &b)
1546
- type, macname = *type
1547
- checking_for("convertible type of #{type}", STRING_OR_FAILED_FORMAT) do
1548
- if UNIVERSAL_INTS.include?(type)
1549
- type
1550
- else
1551
- typedef, member, prelude = typedef_expr(type, headers, &b)
1552
- if member
1553
- prelude << "static rbcv_typedef_ rbcv_var;"
1554
- compat = UNIVERSAL_INTS.find {|t|
1555
- try_static_assert("sizeof(rbcv_var.#{member}) == sizeof(#{t})", [prelude], opts, &b)
1556
- }
1557
- else
1558
- next unless signed = try_signedness(typedef, member, [prelude])
1559
- u = "unsigned " if signed > 0
1560
- prelude << "extern rbcv_typedef_ foo();"
1561
- compat = UNIVERSAL_INTS.find {|t|
1562
- try_compile([prelude, "extern #{u}#{t} foo();"].join("\n"), opts, werror: true, &b)
1563
- }
1564
- end
1565
- if compat
1566
- macname ||= type.sub(/_(?=t\z)/, '').tr_cpp
1567
- conv = (compat == "long long" ? "LL" : compat.upcase)
1568
- compat = "#{u}#{compat}"
1569
- typename = type.tr_cpp
1570
- $defs.push(format("-DSIZEOF_%s=SIZEOF_%s", typename, compat.tr_cpp))
1571
- $defs.push(format("-DTYPEOF_%s=%s", typename, compat.quote))
1572
- $defs.push(format("-DPRI_%s_PREFIX=PRI_%s_PREFIX", macname, conv))
1573
- conv = (u ? "U" : "") + conv
1574
- $defs.push(format("-D%s2NUM=%s2NUM", macname, conv))
1575
- $defs.push(format("-DNUM2%s=NUM2%s", macname, conv))
1576
- compat
1577
- end
1578
- end
1579
- end
1580
- end
1581
- # :stopdoc:
1582
-
1583
- # Used internally by the what_type? method to determine if +type+ is a scalar
1584
- # pointer.
1585
- def scalar_ptr_type?(type, member = nil, headers = nil, &b)
1586
- try_compile(<<"SRC", &b)
1587
- #{cpp_include(headers)}
1588
- /*top*/
1589
- volatile #{type} conftestval;
1590
- extern int t(void);
1591
- #{MAIN_DOES_NOTHING 't'}
1592
- int t(void) {return (int)(1-*(conftestval#{member ? ".#{member}" : ""}));}
1593
- SRC
1594
- end
1595
-
1596
- # Used internally by the what_type? method to determine if +type+ is a scalar
1597
- # pointer.
1598
- def scalar_type?(type, member = nil, headers = nil, &b)
1599
- try_compile(<<"SRC", &b)
1600
- #{cpp_include(headers)}
1601
- /*top*/
1602
- volatile #{type} conftestval;
1603
- extern int t(void);
1604
- #{MAIN_DOES_NOTHING 't'}
1605
- int t(void) {return (int)(1-(conftestval#{member ? ".#{member}" : ""}));}
1606
- SRC
1607
- end
1608
-
1609
- # Used internally by the what_type? method to check if the _typeof_ GCC
1610
- # extension is available.
1611
- def have_typeof?
1612
- return $typeof if defined?($typeof)
1613
- $typeof = %w[__typeof__ typeof].find do |t|
1614
- try_compile(<<SRC)
1615
- int rbcv_foo;
1616
- #{t}(rbcv_foo) rbcv_bar;
1617
- SRC
1618
- end
1619
- end
1620
-
1621
- # :startdoc:
1622
-
1623
- # Returns a string represents the type of _type_, or _member_ of
1624
- # _type_ if _member_ is not +nil+.
1625
- def what_type?(type, member = nil, headers = nil, &b)
1626
- m = "#{type}"
1627
- var = val = "*rbcv_var_"
1628
- func = "rbcv_func_(void)"
1629
- if member
1630
- m << "." << member
1631
- else
1632
- type, member = type.split('.', 2)
1633
- end
1634
- if member
1635
- val = "(#{var}).#{member}"
1636
- end
1637
- prelude = [cpp_include(headers).split(/^/)]
1638
- prelude << ["typedef #{type} rbcv_typedef_;\n",
1639
- "extern rbcv_typedef_ *#{func};\n",
1640
- "rbcv_typedef_ #{var};\n",
1641
- ]
1642
- type = "rbcv_typedef_"
1643
- fmt = member && !(typeof = have_typeof?) ? "seems %s" : "%s"
1644
- if typeof
1645
- var = "*rbcv_member_"
1646
- func = "rbcv_mem_func_(void)"
1647
- member = nil
1648
- type = "rbcv_mem_typedef_"
1649
- prelude[-1] << "typedef #{typeof}(#{val}) #{type};\n"
1650
- prelude[-1] << "extern #{type} *#{func};\n"
1651
- prelude[-1] << "#{type} #{var};\n"
1652
- val = var
1653
- end
1654
- def fmt.%(x)
1655
- x ? super : "unknown"
1656
- end
1657
- checking_for checking_message(m, headers), fmt do
1658
- if scalar_ptr_type?(type, member, prelude, &b)
1659
- if try_static_assert("sizeof(*#{var}) == 1", prelude)
1660
- return "string"
1661
- end
1662
- ptr = "*"
1663
- elsif scalar_type?(type, member, prelude, &b)
1664
- unless member and !typeof or try_static_assert("(#{type})-1 < 0", prelude)
1665
- unsigned = "unsigned"
1666
- end
1667
- ptr = ""
1668
- else
1669
- next
1670
- end
1671
- type = UNIVERSAL_INTS.find do |t|
1672
- pre = prelude
1673
- unless member
1674
- pre += [["#{unsigned} #{t} #{ptr}#{var};\n",
1675
- "extern #{unsigned} #{t} #{ptr}*#{func};\n"]]
1676
- end
1677
- try_static_assert("sizeof(#{ptr}#{val}) == sizeof(#{unsigned} #{t})", pre)
1678
- end
1679
- type or next
1680
- [unsigned, type, ptr].join(" ").strip
1681
- end
1682
- end
1683
-
1684
- # :nodoc:
1685
- #
1686
- # This method is used internally by the find_executable method.
1687
- #
1688
- # Internal use only.
1689
- #
1690
- def find_executable0(bin, path = nil)
1691
- executable_file = proc do |name|
1692
- begin
1693
- stat = File.stat(name)
1694
- rescue SystemCallError
1695
- else
1696
- next name if stat.file? and stat.executable?
1697
- end
1698
- end
1699
-
1700
- exts = config_string('EXECUTABLE_EXTS') {|s| s.split} || config_string('EXEEXT') {|s| [s]}
1701
- if File.expand_path(bin) == bin
1702
- return bin if executable_file.call(bin)
1703
- if exts
1704
- exts.each {|ext| executable_file.call(file = bin + ext) and return file}
1705
- end
1706
- return nil
1707
- end
1708
- if path ||= ENV['PATH']
1709
- path = path.split(File::PATH_SEPARATOR)
1710
- else
1711
- path = %w[/usr/local/bin /usr/ucb /usr/bin /bin]
1712
- end
1713
- file = nil
1714
- path.each do |dir|
1715
- dir.sub!(/\A"(.*)"\z/m, '\1') if $mswin or $mingw
1716
- return file if executable_file.call(file = File.join(dir, bin))
1717
- if exts
1718
- exts.each {|ext| executable_file.call(ext = file + ext) and return ext}
1719
- end
1720
- end
1721
- nil
1722
- end
1723
-
1724
- # Searches for the executable +bin+ on +path+. The default path is your
1725
- # +PATH+ environment variable. If that isn't defined, it will resort to
1726
- # searching /usr/local/bin, /usr/ucb, /usr/bin and /bin.
1727
- #
1728
- # If found, it will return the full path, including the executable name, of
1729
- # where it was found.
1730
- #
1731
- # Note that this method does not actually affect the generated Makefile.
1732
- #
1733
- def find_executable(bin, path = nil)
1734
- checking_for checking_message(bin, path) do
1735
- find_executable0(bin, path)
1736
- end
1737
- end
1738
-
1739
- # :stopdoc:
1740
-
1741
- def arg_config(config, default=nil, &block)
1742
- $arg_config << [config, default]
1743
- defaults = []
1744
- if default
1745
- defaults << default
1746
- elsif !block
1747
- defaults << nil
1748
- end
1749
- $configure_args.fetch(config.tr('_', '-'), *defaults, &block)
1750
- end
1751
-
1752
- # :startdoc:
1753
-
1754
- # Tests for the presence of a <tt>--with-</tt>_config_ or
1755
- # <tt>--without-</tt>_config_ option. Returns +true+ if the with option is
1756
- # given, +false+ if the without option is given, and the default value
1757
- # otherwise.
1758
- #
1759
- # This can be useful for adding custom definitions, such as debug
1760
- # information.
1761
- #
1762
- # Example:
1763
- #
1764
- # if with_config("debug")
1765
- # $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
1766
- # end
1767
- #
1768
- def with_config(config, default=nil)
1769
- config = config.sub(/^--with[-_]/, '')
1770
- val = arg_config("--with-"+config) do
1771
- if arg_config("--without-"+config)
1772
- false
1773
- elsif block_given?
1774
- yield(config, default)
1775
- else
1776
- break default
1777
- end
1778
- end
1779
- case val
1780
- when "yes"
1781
- true
1782
- when "no"
1783
- false
1784
- else
1785
- val
1786
- end
1787
- end
1788
-
1789
- # Tests for the presence of an <tt>--enable-</tt>_config_ or
1790
- # <tt>--disable-</tt>_config_ option. Returns +true+ if the enable option is
1791
- # given, +false+ if the disable option is given, and the default value
1792
- # otherwise.
1793
- #
1794
- # This can be useful for adding custom definitions, such as debug
1795
- # information.
1796
- #
1797
- # Example:
1798
- #
1799
- # if enable_config("debug")
1800
- # $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
1801
- # end
1802
- #
1803
- def enable_config(config, default=nil)
1804
- if arg_config("--enable-"+config)
1805
- true
1806
- elsif arg_config("--disable-"+config)
1807
- false
1808
- elsif block_given?
1809
- yield(config, default)
1810
- else
1811
- return default
1812
- end
1813
- end
1814
-
1815
- # Generates a header file consisting of the various macro definitions
1816
- # generated by other methods such as have_func and have_header. These are
1817
- # then wrapped in a custom <code>#ifndef</code> based on the +header+ file
1818
- # name, which defaults to "extconf.h".
1819
- #
1820
- # For example:
1821
- #
1822
- # # extconf.rb
1823
- # require 'mkmf'
1824
- # have_func('realpath')
1825
- # have_header('sys/utime.h')
1826
- # create_header
1827
- # create_makefile('foo')
1828
- #
1829
- # The above script would generate the following extconf.h file:
1830
- #
1831
- # #ifndef EXTCONF_H
1832
- # #define EXTCONF_H
1833
- # #define HAVE_REALPATH 1
1834
- # #define HAVE_SYS_UTIME_H 1
1835
- # #endif
1836
- #
1837
- # Given that the create_header method generates a file based on definitions
1838
- # set earlier in your extconf.rb file, you will probably want to make this
1839
- # one of the last methods you call in your script.
1840
- #
1841
- def create_header(header = "extconf.h")
1842
- message "creating %s\n", header
1843
- sym = header.tr_cpp
1844
- hdr = ["#ifndef #{sym}\n#define #{sym}\n"]
1845
- for line in $defs
1846
- case line
1847
- when /^-D([^=]+)(?:=(.*))?/
1848
- hdr << "#define #$1 #{$2 ? Shellwords.shellwords($2)[0].gsub(/(?=\t+)/, "\\\n") : 1}\n"
1849
- when /^-U(.*)/
1850
- hdr << "#undef #$1\n"
1851
- end
1852
- end
1853
- hdr << "#endif\n"
1854
- hdr = hdr.join("")
1855
- log_src(hdr, "#{header} is")
1856
- unless (File.read(header) == hdr rescue false)
1857
- File.open(header, "wb") do |hfile|
1858
- hfile.write(hdr)
1859
- end
1860
- end
1861
- $extconf_h = header
1862
- end
1863
-
1864
- # call-seq:
1865
- # dir_config(target)
1866
- # dir_config(target, prefix)
1867
- # dir_config(target, idefault, ldefault)
1868
- #
1869
- # Sets a +target+ name that the user can then use to configure
1870
- # various "with" options with on the command line by using that
1871
- # name. For example, if the target is set to "foo", then the user
1872
- # could use the <code>--with-foo-dir=prefix</code>,
1873
- # <code>--with-foo-include=dir</code> and
1874
- # <code>--with-foo-lib=dir</code> command line options to tell where
1875
- # to search for header/library files.
1876
- #
1877
- # You may pass along additional parameters to specify default
1878
- # values. If one is given it is taken as default +prefix+, and if
1879
- # two are given they are taken as "include" and "lib" defaults in
1880
- # that order.
1881
- #
1882
- # In any case, the return value will be an array of determined
1883
- # "include" and "lib" directories, either of which can be nil if no
1884
- # corresponding command line option is given when no default value
1885
- # is specified.
1886
- #
1887
- # Note that dir_config only adds to the list of places to search for
1888
- # libraries and include files. It does not link the libraries into your
1889
- # application.
1890
- #
1891
- def dir_config(target, idefault=nil, ldefault=nil)
1892
- key = [target, idefault, ldefault].compact.join("\0")
1893
- if conf = $config_dirs[key]
1894
- return conf
1895
- end
1896
-
1897
- if dir = with_config(target + "-dir", (idefault unless ldefault))
1898
- defaults = Array === dir ? dir : dir.split(File::PATH_SEPARATOR)
1899
- idefault = ldefault = nil
1900
- end
1901
-
1902
- idir = with_config(target + "-include", idefault)
1903
- if conf = $arg_config.assoc("--with-#{target}-include")
1904
- conf[1] ||= "${#{target}-dir}/include"
1905
- end
1906
- ldir = with_config(target + "-lib", ldefault)
1907
- if conf = $arg_config.assoc("--with-#{target}-lib")
1908
- conf[1] ||= "${#{target}-dir}/#{_libdir_basename}"
1909
- end
1910
-
1911
- idirs = idir ? Array === idir ? idir.dup : idir.split(File::PATH_SEPARATOR) : []
1912
- if defaults
1913
- idirs.concat(defaults.collect {|d| d + "/include"})
1914
- idir = ([idir] + idirs).compact.join(File::PATH_SEPARATOR)
1915
- end
1916
- unless idirs.empty?
1917
- idirs.collect! {|d| "-I" + d}
1918
- idirs -= Shellwords.shellwords($CPPFLAGS)
1919
- unless idirs.empty?
1920
- $CPPFLAGS = (idirs.quote << $CPPFLAGS).join(" ")
1921
- end
1922
- end
1923
-
1924
- ldirs = ldir ? Array === ldir ? ldir.dup : ldir.split(File::PATH_SEPARATOR) : []
1925
- if defaults
1926
- ldirs.concat(defaults.collect {|d| "#{d}/#{_libdir_basename}"})
1927
- ldir = ([ldir] + ldirs).compact.join(File::PATH_SEPARATOR)
1928
- end
1929
- $LIBPATH = ldirs | $LIBPATH
1930
-
1931
- $config_dirs[key] = [idir, ldir]
1932
- end
1933
-
1934
- # Returns compile/link information about an installed library in a tuple of <code>[cflags,
1935
- # ldflags, libs]</code>, by using the command found first in the following commands:
1936
- #
1937
- # 1. If <code>--with-{pkg}-config={command}</code> is given via
1938
- # command line option: <code>{command} {options}</code>
1939
- #
1940
- # 2. <code>{pkg}-config {options}</code>
1941
- #
1942
- # 3. <code>pkg-config {options} {pkg}</code>
1943
- #
1944
- # Where +options+ is the option name without dashes, for instance <code>"cflags"</code> for the
1945
- # <code>--cflags</code> flag.
1946
- #
1947
- # The values obtained are appended to <code>$INCFLAGS</code>, <code>$CFLAGS</code>,
1948
- # <code>$LDFLAGS</code> and <code>$libs</code>.
1949
- #
1950
- # If one or more <code>options</code> argument is given, the config command is
1951
- # invoked with the options and a stripped output string is returned without
1952
- # modifying any of the global values mentioned above.
1953
- def pkg_config(pkg, *options)
1954
- fmt = "not found"
1955
- def fmt.%(x)
1956
- x ? x.inspect : self
1957
- end
1958
-
1959
- checking_for "pkg-config for #{pkg}", fmt do
1960
- _, ldir = dir_config(pkg)
1961
- if ldir
1962
- pkg_config_path = "#{ldir}/pkgconfig"
1963
- if File.directory?(pkg_config_path)
1964
- Logging.message("PKG_CONFIG_PATH = %s\n", pkg_config_path)
1965
- envs = ["PKG_CONFIG_PATH"=>[pkg_config_path, ENV["PKG_CONFIG_PATH"]].compact.join(File::PATH_SEPARATOR)]
1966
- end
1967
- end
1968
- if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
1969
- # if and only if package specific config command is given
1970
- elsif ($PKGCONFIG ||=
1971
- (pkgconfig = with_config("pkg-config") {config_string("PKG_CONFIG") || ENV["PKG_CONFIG"] || "pkg-config"}) &&
1972
- find_executable0(pkgconfig) && pkgconfig) and
1973
- xsystem([*envs, $PKGCONFIG, "--exists", pkg])
1974
- # default to pkg-config command
1975
- pkgconfig = $PKGCONFIG
1976
- args = [pkg]
1977
- elsif find_executable0(pkgconfig = "#{pkg}-config")
1978
- # default to package specific config command, as a last resort.
1979
- else
1980
- pkgconfig = nil
1981
- end
1982
- if pkgconfig
1983
- get = proc {|opts|
1984
- opts = Array(opts).map { |o| "--#{o}" }
1985
- opts = xpopen([*envs, pkgconfig, *opts, *args], err:[:child, :out], &:read)
1986
- Logging.open {puts opts.each_line.map{|s|"=> #{s.inspect}"}}
1987
- if $?.success?
1988
- opts = opts.strip
1989
- libarg, libpath = LIBARG, LIBPATHFLAG.strip
1990
- opts = opts.shellsplit.map { |s|
1991
- if s.start_with?('-l')
1992
- libarg % s[2..]
1993
- elsif s.start_with?('-L')
1994
- libpath % s[2..]
1995
- else
1996
- s
1997
- end
1998
- }.quote.join(" ")
1999
- opts
2000
- end
2001
- }
2002
- end
2003
- orig_ldflags = $LDFLAGS
2004
- if get and !options.empty?
2005
- get[options]
2006
- elsif get and try_ldflags(ldflags = get['libs'])
2007
- if incflags = get['cflags-only-I']
2008
- $INCFLAGS << " " << incflags
2009
- cflags = get['cflags-only-other']
2010
- else
2011
- cflags = get['cflags']
2012
- end
2013
- libs = get['libs-only-l']
2014
- if cflags
2015
- $CFLAGS += " " << cflags
2016
- $CXXFLAGS += " " << cflags
2017
- end
2018
- if libs
2019
- ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ")
2020
- else
2021
- libs, ldflags = Shellwords.shellwords(ldflags).partition {|s| s =~ /-l([^ ]+)/ }.map {|l|l.quote.join(" ")}
2022
- end
2023
- $libs += " " << libs
2024
-
2025
- $LDFLAGS = [orig_ldflags, ldflags].join(' ')
2026
- Logging::message "package configuration for %s\n", pkg
2027
- Logging::message "incflags: %s\ncflags: %s\nldflags: %s\nlibs: %s\n\n",
2028
- incflags, cflags, ldflags, libs
2029
- [[incflags, cflags].join(' '), ldflags, libs]
2030
- else
2031
- Logging::message "package configuration for %s is not found\n", pkg
2032
- nil
2033
- end
2034
- end
2035
- end
2036
-
2037
- # :stopdoc:
2038
-
2039
- def with_destdir(dir)
2040
- dir = dir.sub($dest_prefix_pattern, '')
2041
- /\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir
2042
- end
2043
-
2044
- # Converts forward slashes to backslashes. Aimed at MS Windows.
2045
- #
2046
- # Internal use only.
2047
- #
2048
- def winsep(s)
2049
- s.tr('/', '\\')
2050
- end
2051
-
2052
- # Converts native path to format acceptable in Makefile
2053
- #
2054
- # Internal use only.
2055
- #
2056
- if !CROSS_COMPILING
2057
- case CONFIG['build_os']
2058
- when 'mingw32'
2059
- def mkintpath(path)
2060
- # mingw uses make from msys and it needs special care
2061
- # converts from C:\some\path to /C/some/path
2062
- path = path.dup
2063
- path.tr!('\\', '/')
2064
- path.sub!(/\A([A-Za-z]):(?=\/)/, '/\1')
2065
- path
2066
- end
2067
- when 'cygwin', 'msys'
2068
- if CONFIG['target_os'] != 'cygwin'
2069
- def mkintpath(path)
2070
- IO.popen(["cygpath", "-u", path], &:read).chomp
2071
- end
2072
- end
2073
- end
2074
- end
2075
- unless method_defined?(:mkintpath)
2076
- def mkintpath(path)
2077
- path
2078
- end
2079
- end
2080
-
2081
- def configuration(srcdir)
2082
- mk = []
2083
- verbose = with_config('verbose') ? "1" : (CONFIG['MKMF_VERBOSE'] || "0")
2084
- vpath = $VPATH.dup
2085
- CONFIG["hdrdir"] ||= $hdrdir
2086
- mk << %{
2087
- SHELL = /bin/sh
2088
-
2089
- # V=0 quiet, V=1 verbose. other values don't work.
2090
- V = #{verbose}
2091
- V0 = $(V:0=)
2092
- Q1 = $(V:1=)
2093
- Q = $(Q1:0=@)
2094
- ECHO1 = $(V:1=@ #{CONFIG['NULLCMD']})
2095
- ECHO = $(ECHO1:0=@ echo)
2096
- NULLCMD = #{CONFIG['NULLCMD']}
2097
-
2098
- #### Start of system configuration section. ####
2099
- #{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk}
2100
- srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}}
2101
- topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace}
2102
- hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace}
2103
- arch_hdrdir = #{mkintpath($arch_hdrdir).unspace}
2104
- PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']}
2105
- VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
2106
- }
2107
- if $extmk
2108
- mk << "RUBYLIB =\n""RUBYOPT = -\n"
2109
- end
2110
- prefix = mkintpath(CONFIG["prefix"])
2111
- if destdir = prefix[$dest_prefix_pattern, 1]
2112
- mk << "\nDESTDIR = #{destdir}\n"
2113
- prefix = prefix[destdir.size..-1]
2114
- end
2115
- mk << "prefix = #{with_destdir(prefix).unspace}\n"
2116
- CONFIG.each do |key, var|
2117
- mk << "#{key} = #{with_destdir(mkintpath(var)).unspace}\n" if /.prefix$/ =~ key
2118
- end
2119
- CONFIG.each do |key, var|
2120
- next if /^abs_/ =~ key
2121
- next if /^(?:src|top(?:_src)?|build|hdr)dir$/ =~ key
2122
- next unless /dir$/ =~ key
2123
- mk << "#{key} = #{with_destdir(var)}\n"
2124
- end
2125
- if !$extmk and !$configure_args.has_key?('--ruby') and
2126
- sep = config_string('BUILD_FILE_SEPARATOR')
2127
- sep = ":/=#{sep}"
2128
- else
2129
- sep = ""
2130
- end
2131
- possible_command = (proc {|s| s if /top_srcdir|tooldir/ !~ s} unless $extmk)
2132
- extconf_h = $extconf_h ? "-DRUBY_EXTCONF_H=\\\"$(RUBY_EXTCONF_H)\\\" " : $defs.join(" ") << " "
2133
- headers = %w[
2134
- $(hdrdir)/ruby.h
2135
- $(hdrdir)/ruby/backward.h
2136
- $(hdrdir)/ruby/ruby.h
2137
- $(hdrdir)/ruby/defines.h
2138
- $(hdrdir)/ruby/missing.h
2139
- $(hdrdir)/ruby/intern.h
2140
- $(hdrdir)/ruby/st.h
2141
- $(hdrdir)/ruby/subst.h
2142
- ]
2143
- headers += $headers
2144
- if RULE_SUBST
2145
- headers.each {|h| h.sub!(/.*/, &RULE_SUBST.method(:%))}
2146
- end
2147
- headers << $config_h
2148
- headers << '$(RUBY_EXTCONF_H)' if $extconf_h
2149
- mk << %{
2150
-
2151
- CC_WRAPPER = #{CONFIG['CC_WRAPPER']}
2152
- CC = #{CONFIG['CC']}
2153
- CXX = #{CONFIG['CXX']}
2154
- LIBRUBY = #{CONFIG['LIBRUBY']}
2155
- LIBRUBY_A = #{CONFIG['LIBRUBY_A']}
2156
- LIBRUBYARG_SHARED = #$LIBRUBYARG_SHARED
2157
- LIBRUBYARG_STATIC = #$LIBRUBYARG_STATIC
2158
- empty =
2159
- OUTFLAG = #{OUTFLAG}$(empty)
2160
- COUTFLAG = #{COUTFLAG}$(empty)
2161
- CSRCFLAG = #{CSRCFLAG}$(empty)
2162
-
2163
- RUBY_EXTCONF_H = #{$extconf_h}
2164
- cflags = #{CONFIG['cflags']}
2165
- cxxflags = #{CONFIG['cxxflags']}
2166
- optflags = #{CONFIG['optflags']}
2167
- debugflags = #{CONFIG['debugflags']}
2168
- warnflags = #{$warnflags}
2169
- cppflags = #{CONFIG['cppflags']}
2170
- CCDLFLAGS = #{$static ? '' : CONFIG['CCDLFLAGS']}
2171
- CFLAGS = $(CCDLFLAGS) #$CFLAGS $(ARCH_FLAG)
2172
- INCFLAGS = -I. #$INCFLAGS
2173
- DEFS = #{CONFIG['DEFS']}
2174
- CPPFLAGS = #{extconf_h}#{$CPPFLAGS}
2175
- CXXFLAGS = $(CCDLFLAGS) #$CXXFLAGS $(ARCH_FLAG)
2176
- ldflags = #{$LDFLAGS}
2177
- dldflags = #{$DLDFLAGS} #{CONFIG['EXTDLDFLAGS']}
2178
- ARCH_FLAG = #{$ARCH_FLAG}
2179
- DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
2180
- LDSHARED = #{CONFIG['LDSHARED']}
2181
- LDSHAREDXX = #{config_string('LDSHAREDXX') || '$(LDSHARED)'}
2182
- POSTLINK = #{config_string('POSTLINK', RbConfig::CONFIG)}
2183
- AR = #{CONFIG['AR']}
2184
- LD = #{CONFIG['LD']}
2185
- EXEEXT = #{CONFIG['EXEEXT']}
2186
-
2187
- }
2188
- CONFIG.each do |key, val|
2189
- mk << "#{key} = #{val}\n" if /^RUBY.*NAME/ =~ key
2190
- end
2191
- mk << %{
2192
- arch = #{CONFIG['arch']}
2193
- sitearch = #{CONFIG['sitearch']}
2194
- ruby_version = #{RbConfig::CONFIG['ruby_version']}
2195
- ruby = #{$ruby.sub(%r[\A#{Regexp.quote(RbConfig::CONFIG['bindir'])}(?=/|\z)]) {'$(bindir)'}}
2196
- RUBY = $(ruby#{sep})
2197
- BUILTRUBY = #{if defined?($builtruby) && $builtruby
2198
- $builtruby
2199
- else
2200
- File.join('$(bindir)', CONFIG["RUBY_INSTALL_NAME"] + CONFIG['EXEEXT'])
2201
- end}
2202
- ruby_headers = #{headers.join(' ')}
2203
-
2204
- RM = #{config_string('RM', &possible_command) || '$(RUBY) -run -e rm -- -f'}
2205
- RM_RF = #{config_string('RMALL', &possible_command) || '$(RUBY) -run -e rm -- -rf'}
2206
- RMDIRS = #{config_string('RMDIRS', &possible_command) || '$(RUBY) -run -e rmdir -- -p'}
2207
- MAKEDIRS = #{config_string('MAKEDIRS', &possible_command) || '@$(RUBY) -run -e mkdir -- -p'}
2208
- INSTALL = #{config_string('INSTALL', &possible_command) || '@$(RUBY) -run -e install -- -vp'}
2209
- INSTALL_PROG = #{config_string('INSTALL_PROG') || '$(INSTALL) -m 0755'}
2210
- INSTALL_DATA = #{config_string('INSTALL_DATA') || '$(INSTALL) -m 0644'}
2211
- COPY = #{config_string('CP', &possible_command) || '@$(RUBY) -run -e cp -- -v'}
2212
- TOUCH = exit >
2213
-
2214
- #### End of system configuration section. ####
2215
-
2216
- preload = #{defined?($preload) && $preload ? $preload.join(' ') : ''}
2217
- }
2218
- mk
2219
- end
2220
-
2221
- def timestamp_file(name, target_prefix = nil)
2222
- pat = {}
2223
- name = '$(RUBYARCHDIR)' if name == '$(TARGET_SO_DIR)'
2224
- install_dirs.each do |n, d|
2225
- pat[n] = $` if /\$\(target_prefix\)\z/ =~ d
2226
- end
2227
- name = name.gsub(/\$\((#{pat.keys.join("|")})\)/) {pat[$1]+target_prefix}
2228
- name.sub!(/(\$\((?:site)?arch\))\/*/, '')
2229
- arch = $1 || ''
2230
- name.chomp!('/')
2231
- name = name.gsub(/(\$[({]|[})])|(\/+)|[^-.\w]+/) {$1 ? "" : $2 ? ".-." : "_"}
2232
- File.join("$(TIMESTAMP_DIR)", arch, "#{name.sub(/\A(?=.)/, '.')}.time")
2233
- end
2234
- # :startdoc:
2235
-
2236
- # Creates a stub Makefile.
2237
- #
2238
- def dummy_makefile(srcdir)
2239
- configuration(srcdir) << <<RULES << CLEANINGS
2240
- CLEANFILES = #{$cleanfiles.join(' ')}
2241
- DISTCLEANFILES = #{$distcleanfiles.join(' ')}
2242
-
2243
- all install static install-so install-rb: Makefile
2244
- @$(NULLCMD)
2245
- .PHONY: all install static install-so install-rb
2246
- .PHONY: clean clean-so clean-static clean-rb
2247
-
2248
- RULES
2249
- end
2250
-
2251
- def each_compile_rules # :nodoc:
2252
- vpath_splat = /\$\(\*VPATH\*\)/
2253
- COMPILE_RULES.each do |rule|
2254
- if vpath_splat =~ rule
2255
- $VPATH.each do |path|
2256
- yield rule.sub(vpath_splat) {path}
2257
- end
2258
- else
2259
- yield rule
2260
- end
2261
- end
2262
- end
2263
-
2264
- # Processes the data contents of the "depend" file. Each line of this file
2265
- # is expected to be a file name.
2266
- #
2267
- # Returns the output of findings, in Makefile format.
2268
- #
2269
- def depend_rules(depend)
2270
- suffixes = []
2271
- depout = []
2272
- cont = implicit = nil
2273
- impconv = proc do
2274
- each_compile_rules {|rule| depout << (rule % implicit[0]) << implicit[1]}
2275
- implicit = nil
2276
- end
2277
- ruleconv = proc do |line|
2278
- if implicit
2279
- if /\A\t/ =~ line
2280
- implicit[1] << line
2281
- next
2282
- else
2283
- impconv[]
2284
- end
2285
- end
2286
- if m = /\A\.(\w+)\.(\w+)(?:\s*:)/.match(line)
2287
- suffixes << m[1] << m[2]
2288
- implicit = [[m[1], m[2]], [m.post_match]]
2289
- next
2290
- elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line
2291
- line.sub!(/\s*\#.*$/, '')
2292
- comment = $&
2293
- line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2}
2294
- line = line.chomp + comment + "\n" if comment
2295
- end
2296
- depout << line
2297
- end
2298
- depend.each_line do |line|
2299
- line.gsub!(/\.o\b/, ".#{$OBJEXT}")
2300
- line.gsub!(/\{\$\(VPATH\)\}/, "") unless $nmake
2301
- line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h)
2302
- if $nmake && /\A\s*\$\(RM|COPY\)/ =~ line
2303
- line.gsub!(%r"[-\w\./]{2,}"){$&.tr("/", "\\")}
2304
- line.gsub!(/(\$\((?!RM|COPY)[^:)]+)(?=\))/, '\1:/=\\')
2305
- end
2306
- if /(?:^|[^\\])(?:\\\\)*\\$/ =~ line
2307
- (cont ||= []) << line
2308
- next
2309
- elsif cont
2310
- line = (cont << line).join
2311
- cont = nil
2312
- end
2313
- ruleconv.call(line)
2314
- end
2315
- if cont
2316
- ruleconv.call(cont.join)
2317
- elsif implicit
2318
- impconv.call
2319
- end
2320
- unless suffixes.empty?
2321
- depout.unshift(".SUFFIXES: ." + suffixes.uniq.join(" .") + "\n\n")
2322
- end
2323
- if $extconf_h
2324
- depout.unshift("$(OBJS): $(RUBY_EXTCONF_H)\n\n")
2325
- depout.unshift("$(OBJS): $(hdrdir)/ruby/win32.h\n\n") if $mswin or $mingw
2326
- end
2327
- depout.flatten!
2328
- depout
2329
- end
2330
-
2331
- # Generates the Makefile for your extension, passing along any options and
2332
- # preprocessor constants that you may have generated through other methods.
2333
- #
2334
- # The +target+ name should correspond the name of the global function name
2335
- # defined within your C extension, minus the +Init_+. For example, if your
2336
- # C extension is defined as +Init_foo+, then your target would simply be
2337
- # "foo".
2338
- #
2339
- # If any "/" characters are present in the target name, only the last name
2340
- # is interpreted as the target name, and the rest are considered toplevel
2341
- # directory names, and the generated Makefile will be altered accordingly to
2342
- # follow that directory structure.
2343
- #
2344
- # For example, if you pass "test/foo" as a target name, your extension will
2345
- # be installed under the "test" directory. This means that in order to
2346
- # load the file within a Ruby program later, that directory structure will
2347
- # have to be followed, e.g. <code>require 'test/foo'</code>.
2348
- #
2349
- # The +srcprefix+ should be used when your source files are not in the same
2350
- # directory as your build script. This will not only eliminate the need for
2351
- # you to manually copy the source files into the same directory as your
2352
- # build script, but it also sets the proper +target_prefix+ in the generated
2353
- # Makefile.
2354
- #
2355
- # Setting the +target_prefix+ will, in turn, install the generated binary in
2356
- # a directory under your <code>RbConfig::CONFIG['sitearchdir']</code> that
2357
- # mimics your local filesystem when you run <code>make install</code>.
2358
- #
2359
- # For example, given the following file tree:
2360
- #
2361
- # ext/
2362
- # extconf.rb
2363
- # test/
2364
- # foo.c
2365
- #
2366
- # And given the following code:
2367
- #
2368
- # create_makefile('test/foo', 'test')
2369
- #
2370
- # That will set the +target_prefix+ in the generated Makefile to "test".
2371
- # That, in turn, will create the following file tree when installed via the
2372
- # <code>make install</code> command:
2373
- #
2374
- # /path/to/ruby/sitearchdir/test/foo.so
2375
- #
2376
- # It is recommended that you use this approach to generate your makefiles,
2377
- # instead of copying files around manually, because some third party
2378
- # libraries may depend on the +target_prefix+ being set properly.
2379
- #
2380
- # The +srcprefix+ argument can be used to override the default source
2381
- # directory, i.e. the current directory. It is included as part of the
2382
- # +VPATH+ and added to the list of +INCFLAGS+.
2383
- #
2384
- def create_makefile(target, srcprefix = nil)
2385
- $target = target
2386
- libpath = $DEFLIBPATH|$LIBPATH
2387
- message "creating Makefile\n"
2388
- MakeMakefile.rm_f "#{CONFTEST}*"
2389
- if CONFIG["DLEXT"] == $OBJEXT
2390
- for lib in libs = $libs.split(' ')
2391
- lib.sub!(/-l(.*)/, %%"lib\\1.#{$LIBEXT}"%)
2392
- end
2393
- $defs.push(format("-DEXTLIB='%s'", libs.join(",")))
2394
- end
2395
-
2396
- if target.include?('/')
2397
- target_prefix, target = File.split(target)
2398
- target_prefix[0,0] = '/'
2399
- else
2400
- target_prefix = ""
2401
- end
2402
-
2403
- srcprefix ||= "$(srcdir)/#{srcprefix}".chomp('/')
2404
- RbConfig.expand(srcdir = srcprefix.dup)
2405
-
2406
- ext = ".#{$OBJEXT}"
2407
- orig_srcs = Dir[File.join(srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
2408
- if not $objs
2409
- srcs = $srcs || orig_srcs
2410
- $objs = []
2411
- objs = srcs.inject(Hash.new {[]}) {|h, f|
2412
- h.key?(o = File.basename(f, ".*") << ext) or $objs << o
2413
- h[o] <<= f
2414
- h
2415
- }
2416
- unless objs.delete_if {|b, f| f.size == 1}.empty?
2417
- dups = objs.map {|b, f|
2418
- "#{b[/.*\./]}{#{f.collect {|n| n[/([^.]+)\z/]}.join(',')}}"
2419
- }
2420
- abort "source files duplication - #{dups.join(", ")}"
2421
- end
2422
- else
2423
- $objs.collect! {|o| File.basename(o, ".*") << ext} unless $OBJEXT == "o"
2424
- srcs = $srcs || $objs.collect {|o| o.chomp(ext) << ".c"}
2425
- end
2426
- $srcs = srcs
2427
-
2428
- hdrs = Dir[File.join(srcdir, "*.{#{HDR_EXT.join(%q{,})}}")]
2429
-
2430
- target = nil if $objs.empty?
2431
-
2432
- if target and EXPORT_PREFIX
2433
- if File.exist?(File.join(srcdir, target + '.def'))
2434
- deffile = "$(srcdir)/$(TARGET).def"
2435
- unless EXPORT_PREFIX.empty?
2436
- makedef = %{$(RUBY) -pe "$$_.sub!(/^(?=\\w)/,'#{EXPORT_PREFIX}') unless 1../^EXPORTS$/i" #{deffile}}
2437
- end
2438
- else
2439
- makedef = %{(echo EXPORTS && echo $(TARGET_ENTRY))}
2440
- end
2441
- if makedef
2442
- $cleanfiles << '$(DEFFILE)'
2443
- origdef = deffile
2444
- deffile = "$(TARGET)-$(arch).def"
2445
- end
2446
- end
2447
- origdef ||= ''
2448
-
2449
- if $extout and $INSTALLFILES
2450
- $cleanfiles.concat($INSTALLFILES.collect {|files, dir|File.join(dir, files.delete_prefix('./'))})
2451
- $distcleandirs.concat($INSTALLFILES.collect {|files, dir| dir})
2452
- end
2453
-
2454
- if $extmk and $static
2455
- $defs << "-DRUBY_EXPORT=1"
2456
- end
2457
-
2458
- if $extmk and not $extconf_h
2459
- create_header
2460
- end
2461
-
2462
- libpath = libpathflag(libpath)
2463
-
2464
- dllib = target ? "$(TARGET).#{CONFIG['DLEXT']}" : ""
2465
- staticlib = target ? "$(TARGET).#$LIBEXT" : ""
2466
- conf = configuration(srcprefix)
2467
- conf << "\
2468
- libpath = #{($DEFLIBPATH|$LIBPATH).join(" ")}
2469
- LIBPATH = #{libpath}
2470
- DEFFILE = #{deffile}
2471
-
2472
- CLEANFILES = #{$cleanfiles.join(' ')}
2473
- DISTCLEANFILES = #{$distcleanfiles.join(' ')}
2474
- DISTCLEANDIRS = #{$distcleandirs.join(' ')}
2475
-
2476
- extout = #{$extout && $extout.quote}
2477
- extout_prefix = #{$extout_prefix}
2478
- target_prefix = #{target_prefix}
2479
- LOCAL_LIBS = #{$LOCAL_LIBS}
2480
- LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS}
2481
- ORIG_SRCS = #{orig_srcs.collect(&File.method(:basename)).join(' ')}
2482
- SRCS = $(ORIG_SRCS) #{(srcs - orig_srcs).collect(&File.method(:basename)).join(' ')}
2483
- OBJS = #{$objs.join(" ")}
2484
- HDRS = #{hdrs.map{|h| '$(srcdir)/' + File.basename(h)}.join(' ')}
2485
- LOCAL_HDRS = #{$headers.join(' ')}
2486
- TARGET = #{target}
2487
- TARGET_NAME = #{target && target[/\A\w+/]}
2488
- TARGET_ENTRY = #{EXPORT_PREFIX || ''}Init_$(TARGET_NAME)
2489
- DLLIB = #{dllib}
2490
- EXTSTATIC = #{$static || ""}
2491
- STATIC_LIB = #{staticlib unless $static.nil?}
2492
- #{!$extout && defined?($installed_list) ? %[INSTALLED_LIST = #{$installed_list}\n] : ""}
2493
- TIMESTAMP_DIR = #{$extout && $extmk ? '$(extout)/.timestamp' : '.'}
2494
- " #"
2495
- # TODO: fixme
2496
- install_dirs.each {|d| conf << ("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]}
2497
- sodir = $extout ? '$(TARGET_SO_DIR)' : '$(RUBYARCHDIR)'
2498
- n = '$(TARGET_SO_DIR)$(TARGET)'
2499
- cleanobjs = ["$(OBJS)"]
2500
- if $extmk
2501
- %w[bc i s].each {|ex| cleanobjs << "$(OBJS:.#{$OBJEXT}=.#{ex})"}
2502
- end
2503
- if target
2504
- config_string('cleanobjs') {|t| cleanobjs << t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")}
2505
- end
2506
- conf << "\
2507
- TARGET_SO_DIR =#{$extout ? " $(RUBYARCHDIR)/" : ''}
2508
- TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
2509
- CLEANLIBS = #{'$(TARGET_SO) ' if target}#{config_string('cleanlibs') {|t| t.gsub(/\$\*/) {n}}}
2510
- CLEANOBJS = #{cleanobjs.join(' ')} *.bak
2511
- TARGET_SO_DIR_TIMESTAMP = #{timestamp_file(sodir, target_prefix)}
2512
- " #"
2513
-
2514
- conf = yield(conf) if block_given?
2515
- mfile = File.open("Makefile", "wb")
2516
- mfile.puts(conf)
2517
- mfile.print "
2518
- all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"}
2519
- static: #{$extmk && !$static ? "all" : %[$(STATIC_LIB)#{$extout ? " install-rb" : ""}]}
2520
- .PHONY: all install static install-so install-rb
2521
- .PHONY: clean clean-so clean-static clean-rb
2522
- " #"
2523
- mfile.print CLEANINGS
2524
- fsep = config_string('BUILD_FILE_SEPARATOR') {|s| s unless s == "/"}
2525
- if fsep
2526
- sep = ":/=#{fsep}"
2527
- fseprepl = proc {|s|
2528
- s = s.gsub("/", fsep)
2529
- s = s.gsub(/(\$\(\w+)(\))/) {$1+sep+$2}
2530
- s.gsub(/(\$\{\w+)(\})/) {$1+sep+$2}
2531
- }
2532
- rsep = ":#{fsep}=/"
2533
- else
2534
- fseprepl = proc {|s| s}
2535
- sep = ""
2536
- rsep = ""
2537
- end
2538
- dirs = []
2539
- mfile.print "install: install-so install-rb\n\n"
2540
- dir = sodir.dup
2541
- mfile.print("install-so: ")
2542
- if target
2543
- f = "$(DLLIB)"
2544
- dest = "$(TARGET_SO)"
2545
- stamp = '$(TARGET_SO_DIR_TIMESTAMP)'
2546
- if $extout
2547
- mfile.puts dest
2548
- mfile.print "clean-so::\n"
2549
- mfile.print "\t-$(Q)$(RM) #{fseprepl[dest]} #{fseprepl[stamp]}\n"
2550
- mfile.print "\t-$(Q)$(RM_RF) #{fseprepl['$(CLEANLIBS)']}\n"
2551
- mfile.print "\t-$(Q)$(RMDIRS) #{fseprepl[dir]}#{$ignore_error}\n"
2552
- else
2553
- mfile.print "#{f} #{stamp}\n"
2554
- mfile.print "\t$(INSTALL_PROG) #{fseprepl[f]} #{dir}\n"
2555
- if defined?($installed_list)
2556
- mfile.print "\t@echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n"
2557
- end
2558
- end
2559
- mfile.print "clean-static::\n"
2560
- mfile.print "\t-$(Q)$(RM) $(STATIC_LIB)\n"
2561
- else
2562
- mfile.puts "Makefile"
2563
- end
2564
- mfile.print("install-rb: pre-install-rb do-install-rb install-rb-default\n")
2565
- mfile.print("install-rb-default: pre-install-rb-default do-install-rb-default\n")
2566
- mfile.print("pre-install-rb: Makefile\n")
2567
- mfile.print("pre-install-rb-default: Makefile\n")
2568
- mfile.print("do-install-rb:\n")
2569
- mfile.print("do-install-rb-default:\n")
2570
- for sfx, i in [["-default", [["lib/**/*.rb", "$(RUBYLIBDIR)", "lib"]]], ["", $INSTALLFILES]]
2571
- files = install_files(mfile, i, nil, srcprefix) or next
2572
- for dir, *files in files
2573
- unless dirs.include?(dir)
2574
- dirs << dir
2575
- mfile.print "pre-install-rb#{sfx}: #{timestamp_file(dir, target_prefix)}\n"
2576
- end
2577
- for f in files
2578
- dest = "#{dir}/#{File.basename(f)}"
2579
- mfile.print("do-install-rb#{sfx}: #{dest}\n")
2580
- mfile.print("#{dest}: #{f} #{timestamp_file(dir, target_prefix)}\n")
2581
- mfile.print("\t$(Q) $(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $@\n")
2582
- if defined?($installed_list) and !$extout
2583
- mfile.print("\t@echo #{dest}>>$(INSTALLED_LIST)\n")
2584
- end
2585
- if $extout
2586
- mfile.print("clean-rb#{sfx}::\n")
2587
- mfile.print("\t-$(Q)$(RM) #{fseprepl[dest]}\n")
2588
- end
2589
- end
2590
- end
2591
- mfile.print "pre-install-rb#{sfx}:\n"
2592
- if files.empty?
2593
- mfile.print("\t@$(NULLCMD)\n")
2594
- else
2595
- q = "$(MAKE) -q do-install-rb#{sfx}"
2596
- if $nmake
2597
- mfile.print "!if \"$(Q)\" == \"@\"\n\t@#{q} || \\\n!endif\n\t"
2598
- else
2599
- mfile.print "\t$(Q1:0=@#{q} || )"
2600
- end
2601
- mfile.print "$(ECHO1:0=echo) installing#{sfx.sub(/^-/, " ")} #{target} libraries\n"
2602
- end
2603
- if $extout
2604
- dirs.uniq!
2605
- unless dirs.empty?
2606
- mfile.print("clean-rb#{sfx}::\n")
2607
- for dir in dirs.sort_by {|d| -d.count('/')}
2608
- stamp = timestamp_file(dir, target_prefix)
2609
- mfile.print("\t-$(Q)$(RM) #{fseprepl[stamp]}\n")
2610
- mfile.print("\t-$(Q)$(RMDIRS) #{fseprepl[dir]}#{$ignore_error}\n")
2611
- end
2612
- end
2613
- end
2614
- end
2615
- if target and !dirs.include?(sodir)
2616
- mfile.print "$(TARGET_SO_DIR_TIMESTAMP):\n\t$(Q) $(MAKEDIRS) $(@D) #{sodir}\n\t$(Q) $(TOUCH) $@\n"
2617
- end
2618
- dirs.each do |d|
2619
- t = timestamp_file(d, target_prefix)
2620
- mfile.print "#{t}:\n\t$(Q) $(MAKEDIRS) $(@D) #{d}\n\t$(Q) $(TOUCH) $@\n"
2621
- end
2622
-
2623
- mfile.print <<-SITEINSTALL
2624
-
2625
- site-install: site-install-so site-install-rb
2626
- site-install-so: install-so
2627
- site-install-rb: install-rb
2628
-
2629
- SITEINSTALL
2630
-
2631
- return unless target
2632
-
2633
- mfile.print ".SUFFIXES: .#{(SRC_EXT + [$OBJEXT, $ASMEXT]).compact.join(' .')}\n"
2634
- mfile.print "\n"
2635
-
2636
- compile_command = "\n\t$(ECHO) compiling $(<#{rsep})\n\t$(Q) %s\n\n"
2637
- command = compile_command % COMPILE_CXX
2638
- asm_command = compile_command.sub(/compiling/, 'translating') % ASSEMBLE_CXX
2639
- CXX_EXT.each do |e|
2640
- each_compile_rules do |rule|
2641
- mfile.printf(rule, e, $OBJEXT)
2642
- mfile.print(command)
2643
- mfile.printf(rule, e, $ASMEXT)
2644
- mfile.print(asm_command)
2645
- end
2646
- end
2647
- command = compile_command % COMPILE_C
2648
- asm_command = compile_command.sub(/compiling/, 'translating') % ASSEMBLE_C
2649
- C_EXT.each do |e|
2650
- each_compile_rules do |rule|
2651
- mfile.printf(rule, e, $OBJEXT)
2652
- mfile.print(command)
2653
- mfile.printf(rule, e, $ASMEXT)
2654
- mfile.print(asm_command)
2655
- end
2656
- end
2657
-
2658
- mfile.print "$(TARGET_SO): "
2659
- mfile.print "$(DEFFILE) " if makedef
2660
- mfile.print "$(OBJS) Makefile"
2661
- mfile.print " $(TARGET_SO_DIR_TIMESTAMP)" if $extout
2662
- mfile.print "\n"
2663
- mfile.print "\t$(ECHO) linking shared-object #{target_prefix.sub(/\A\/(.*)/, '\1/')}$(DLLIB)\n"
2664
- mfile.print "\t-$(Q)$(RM) $(@#{sep})\n"
2665
- link_so = LINK_SO.gsub(/^/, "\t$(Q) ")
2666
- if srcs.any?(&%r"\.(?:#{CXX_EXT.join('|')})\z".method(:===))
2667
- link_so = link_so.sub(/\bLDSHARED\b/, '\&XX')
2668
- end
2669
- mfile.print link_so, "\n\n"
2670
- unless $static.nil?
2671
- mfile.print "$(STATIC_LIB): $(OBJS)\n\t-$(Q)$(RM) $(@#{sep})\n\t"
2672
- mfile.print "$(ECHO) linking static-library $(@#{rsep})\n\t$(Q) "
2673
- mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)"
2674
- config_string('RANLIB') do |ranlib|
2675
- mfile.print "\n\t-$(Q)#{ranlib} $(@)#{$ignore_error}"
2676
- end
2677
- end
2678
- mfile.print "\n\n"
2679
- if makedef
2680
- mfile.print "$(DEFFILE): #{origdef}\n"
2681
- mfile.print "\t$(ECHO) generating $(@#{rsep})\n"
2682
- mfile.print "\t$(Q) #{makedef} > $@\n\n"
2683
- end
2684
-
2685
- depend = File.join(srcdir, "depend")
2686
- if File.exist?(depend)
2687
- mfile.print("###\n", *depend_rules(File.read(depend)))
2688
- else
2689
- mfile.print "$(OBJS): $(HDRS) $(ruby_headers)\n"
2690
- end
2691
-
2692
- $makefile_created = true
2693
- ensure
2694
- mfile.close if mfile
2695
- end
2696
-
2697
- # :stopdoc:
2698
-
2699
- def init_mkmf(config = CONFIG, rbconfig = RbConfig::CONFIG)
2700
- $makefile_created = false
2701
- $arg_config = []
2702
- $enable_shared = config['ENABLE_SHARED'] == 'yes'
2703
- $defs = []
2704
- $extconf_h = nil
2705
- $config_dirs = {}
2706
-
2707
- if $warnflags = CONFIG['warnflags'] and CONFIG['GCC'] == 'yes'
2708
- # turn warnings into errors only for bundled extensions.
2709
- config['warnflags'] = $warnflags.gsub(/(?:\A|\s)-W\Kerror[-=](?!implicit-function-declaration)/, '')
2710
- if /icc\z/ =~ config['CC']
2711
- config['warnflags'].gsub!(/(\A|\s)-W(?:division-by-zero|deprecated-declarations)/, '\1')
2712
- end
2713
- RbConfig.expand(rbconfig['warnflags'] = config['warnflags'].dup)
2714
- config.each do |key, val|
2715
- RbConfig.expand(rbconfig[key] = val.dup) if /warnflags/ =~ val
2716
- end
2717
- $warnflags = config['warnflags'] unless $extmk
2718
- end
2719
- if (w = rbconfig['CC_WRAPPER']) and !w.empty? and !File.executable?(w)
2720
- rbconfig['CC_WRAPPER'] = config['CC_WRAPPER'] = ''
2721
- end
2722
- $CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup
2723
- $CXXFLAGS = (with_config("cxxflags", arg_config("CXXFLAGS", config["CXXFLAGS"]))||'').dup
2724
- $ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup
2725
- $CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup
2726
- $LDFLAGS = with_config("ldflags", arg_config("LDFLAGS", config["LDFLAGS"])).dup
2727
- $INCFLAGS = "-I$(arch_hdrdir)"
2728
- $INCFLAGS << " -I$(hdrdir)/ruby/backward" unless $extmk
2729
- $INCFLAGS << " -I$(hdrdir) -I$(srcdir)"
2730
- $DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup
2731
- config_string("ADDITIONAL_DLDFLAGS") {|flags| $DLDFLAGS << " " << flags} unless $extmk
2732
- $LIBEXT = config['LIBEXT'].dup
2733
- $OBJEXT = config["OBJEXT"].dup
2734
- $EXEEXT = config["EXEEXT"].dup
2735
- $ASMEXT = config_string('ASMEXT', &:dup) || 'S'
2736
- $LIBS = "#{config['LIBS']} #{config['DLDLIBS']}"
2737
- $LIBRUBYARG = ""
2738
- $LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC']
2739
- $LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED']
2740
- $DEFLIBPATH = [$extmk ? "$(topdir)" : "$(#{config["libdirname"] || "libdir"})"]
2741
- $DEFLIBPATH.unshift(".")
2742
- $LIBPATH = []
2743
- $INSTALLFILES = []
2744
- $NONINSTALLFILES = [/~\z/, /\A#.*#\z/, /\A\.#/, /\.bak\z/i, /\.orig\z/, /\.rej\z/, /\.l[ao]\z/, /\.o\z/]
2745
- $VPATH = %w[$(srcdir) $(arch_hdrdir)/ruby $(hdrdir)/ruby]
2746
-
2747
- $objs = nil
2748
- $srcs = nil
2749
- $headers = []
2750
- $libs = ""
2751
- if $enable_shared or RbConfig.expand(config["LIBRUBY"].dup) != RbConfig.expand(config["LIBRUBY_A"].dup)
2752
- $LIBRUBYARG = config['LIBRUBYARG']
2753
- end
2754
-
2755
- $LOCAL_LIBS = ""
2756
-
2757
- $cleanfiles = config_string('CLEANFILES') {|s| Shellwords.shellwords(s)} || []
2758
- $cleanfiles << "mkmf.log"
2759
- $distcleanfiles = config_string('DISTCLEANFILES') {|s| Shellwords.shellwords(s)} || []
2760
- $distcleandirs = config_string('DISTCLEANDIRS') {|s| Shellwords.shellwords(s)} || []
2761
-
2762
- $extout ||= nil
2763
- $extout_prefix ||= nil
2764
-
2765
- $arg_config.clear
2766
- $config_dirs.clear
2767
- dir_config("opt")
2768
- end
2769
-
2770
- FailedMessage = <<MESSAGE
2771
- Could not create Makefile due to some reason, probably lack of necessary
2772
- libraries and/or headers. Check the mkmf.log file for more details. You may
2773
- need configuration options.
2774
-
2775
- Provided configuration options:
2776
- MESSAGE
2777
-
2778
- # Returns whether or not the Makefile was successfully generated. If not,
2779
- # the script will abort with an error message.
2780
- #
2781
- # Internal use only.
2782
- #
2783
- def mkmf_failed(path)
2784
- unless $makefile_created or File.exist?("Makefile")
2785
- opts = $arg_config.collect {|t, n| "\t#{t}#{n ? "=#{n}" : ""}\n"}
2786
- abort "*** #{path} failed ***\n" + FailedMessage + opts.join
2787
- end
2788
- end
2789
-
2790
- private
2791
-
2792
- def _libdir_basename
2793
- @libdir_basename ||= config_string("libdir") {|name| name[/\A\$\(exec_prefix\)\/(.*)/, 1]} || "lib"
2794
- end
2795
-
2796
- def MAIN_DOES_NOTHING(*refs)
2797
- src = MAIN_DOES_NOTHING
2798
- unless refs.empty?
2799
- src = src.sub(/\{/) do
2800
- $& +
2801
- "\n if (argc > 1000000) {\n" +
2802
- refs.map {|n|" int (* volatile #{n}p)(void)=(int (*)(void))&#{n};\n"}.join("") +
2803
- refs.map {|n|" printf(\"%d\", (*#{n}p)());\n"}.join("") +
2804
- " }\n"
2805
- end
2806
- end
2807
- src
2808
- end
2809
-
2810
- extend self
2811
- init_mkmf
2812
-
2813
- $make = with_config("make-prog", ENV["MAKE"] || "make")
2814
- make, = Shellwords.shellwords($make)
2815
- $nmake = nil
2816
- case
2817
- when $mswin
2818
- $nmake = ?m if /nmake/i =~ make
2819
- end
2820
- $ignore_error = " 2> #{File::NULL} || #{$mswin ? 'exit /b0' : 'true'}"
2821
-
2822
- RbConfig::CONFIG["srcdir"] = CONFIG["srcdir"] =
2823
- $srcdir = arg_config("--srcdir", File.dirname($0))
2824
- $configure_args["--topsrcdir"] ||= $srcdir
2825
- if $curdir = arg_config("--curdir")
2826
- RbConfig.expand(curdir = $curdir.dup)
2827
- else
2828
- curdir = $curdir = "."
2829
- end
2830
- unless File.expand_path(RbConfig::CONFIG["topdir"]) == File.expand_path(curdir)
2831
- CONFIG["topdir"] = $curdir
2832
- RbConfig::CONFIG["topdir"] = curdir
2833
- end
2834
- $configure_args["--topdir"] ||= $curdir
2835
- $ruby = arg_config("--ruby", File.join(RbConfig::CONFIG["bindir"], CONFIG["ruby_install_name"]))
2836
-
2837
- RbConfig.expand(CONFIG["RUBY_SO_NAME"])
2838
-
2839
- # :startdoc:
2840
-
2841
- split = Shellwords.method(:shellwords).to_proc
2842
-
2843
- ##
2844
- # The prefix added to exported symbols automatically
2845
-
2846
- EXPORT_PREFIX = config_string('EXPORT_PREFIX') {|s| s.strip}
2847
-
2848
- hdr = ['#include "ruby.h"' "\n"]
2849
- config_string('COMMON_MACROS') do |s|
2850
- Shellwords.shellwords(s).each do |w|
2851
- w, v = w.split(/=/, 2)
2852
- hdr << "#ifndef #{w}"
2853
- hdr << "#define #{[w, v].compact.join(" ")}"
2854
- hdr << "#endif /* #{w} */"
2855
- end
2856
- end
2857
- config_string('COMMON_HEADERS') do |s|
2858
- Shellwords.shellwords(s).each {|w| hdr << "#include <#{w}>"}
2859
- end
2860
-
2861
- ##
2862
- # Common headers for Ruby C extensions
2863
-
2864
- COMMON_HEADERS = hdr.join("\n")
2865
-
2866
- ##
2867
- # Common libraries for Ruby C extensions
2868
-
2869
- COMMON_LIBS = config_string('COMMON_LIBS', &split) || []
2870
-
2871
- ##
2872
- # make compile rules
2873
-
2874
- COMPILE_RULES = config_string('COMPILE_RULES', &split) || %w[.%s.%s:]
2875
-
2876
- ##
2877
- # Substitution in rules for NMake
2878
-
2879
- RULE_SUBST = config_string('RULE_SUBST')
2880
-
2881
- ##
2882
- # Command which will compile C files in the generated Makefile
2883
-
2884
- COMPILE_C = config_string('COMPILE_C') || '$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<'
2885
-
2886
- ##
2887
- # Command which will compile C++ files in the generated Makefile
2888
-
2889
- COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<'
2890
-
2891
- ##
2892
- # Command which will translate C files to assembler sources in the generated Makefile
2893
-
2894
- ASSEMBLE_C = config_string('ASSEMBLE_C') || COMPILE_C.sub(/(?<=\s)-c(?=\s)/, '-S')
2895
-
2896
- ##
2897
- # Command which will translate C++ files to assembler sources in the generated Makefile
2898
-
2899
- ASSEMBLE_CXX = config_string('ASSEMBLE_CXX') || COMPILE_CXX.sub(/(?<=\s)-c(?=\s)/, '-S')
2900
-
2901
- ##
2902
- # Command which will compile a program in order to test linking a library
2903
-
2904
- TRY_LINK = config_string('TRY_LINK') ||
2905
- "$(CC) #{OUTFLAG}#{CONFTEST}#{$EXEEXT} $(INCFLAGS) $(CPPFLAGS) " \
2906
- "$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"
2907
-
2908
- ##
2909
- # Command which will link a shared library
2910
-
2911
- LINK_SO = (config_string('LINK_SO') || "").sub(/^$/) do
2912
- if CONFIG["DLEXT"] == $OBJEXT
2913
- "ld $(DLDFLAGS) -r -o $@ $(OBJS)\n"
2914
- else
2915
- "$(LDSHARED) #{OUTFLAG}$@ $(OBJS) " \
2916
- "$(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)"
2917
- end
2918
- end
2919
-
2920
- ##
2921
- # Argument which will add a library path to the linker
2922
-
2923
- LIBPATHFLAG = config_string('LIBPATHFLAG') || '-L%s'
2924
-
2925
- ##
2926
- # Argument which will add a runtime library path to the linker
2927
-
2928
- RPATHFLAG = config_string('RPATHFLAG') || ''
2929
-
2930
- ##
2931
- # Argument which will add a library to the linker
2932
-
2933
- LIBARG = config_string('LIBARG') || '-l%s'
2934
-
2935
- ##
2936
- # A C main function which does no work
2937
-
2938
- MAIN_DOES_NOTHING = config_string('MAIN_DOES_NOTHING') || "int main(int argc, char **argv)\n{\n return !!argv[argc];\n}"
2939
-
2940
- ##
2941
- # The type names for convertible_int
2942
-
2943
- UNIVERSAL_INTS = config_string('UNIVERSAL_INTS') {|s| Shellwords.shellwords(s)} ||
2944
- %w[int short long long\ long]
2945
-
2946
- sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if s != "/"} || ""
2947
-
2948
- ##
2949
- # Makefile rules that will clean the extension build directory
2950
-
2951
- CLEANINGS = "
2952
- clean-static::
2953
- clean-rb-default::
2954
- clean-rb::
2955
- clean-so::
2956
- clean: clean-so clean-static clean-rb-default clean-rb
2957
- \t\t-$(Q)$(RM_RF) $(CLEANLIBS#{sep}) $(CLEANOBJS#{sep}) $(CLEANFILES#{sep}) .*.time
2958
-
2959
- distclean-rb-default::
2960
- distclean-rb::
2961
- distclean-so::
2962
- distclean-static::
2963
- distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
2964
- \t\t-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) #{CONFTEST}.* mkmf.log#{' exts.mk' if $extmk}
2965
- \t\t-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep})
2966
- \t\t-$(Q)$(RMDIRS) $(DISTCLEANDIRS#{sep})#{$ignore_error}
2967
-
2968
- realclean: distclean
2969
- "
2970
-
2971
- @lang = Hash.new(self)
2972
-
2973
- ##
2974
- # Retrieves the module for _name_ language.
2975
- def self.[](name)
2976
- @lang.fetch(name)
2977
- end
2978
-
2979
- ##
2980
- # Defines the module for _name_ language.
2981
- def self.[]=(name, mod)
2982
- @lang[name] = mod
2983
- end
2984
-
2985
- ##
2986
- # The language that this module is for
2987
- LANGUAGE = -"C"
2988
-
2989
- self[self::LANGUAGE] = self
2990
-
2991
- cxx = Module.new do
2992
- # Module for C++
2993
-
2994
- include MakeMakefile
2995
- extend self
2996
-
2997
- # :stopdoc:
2998
-
2999
- CONFTEST_CXX = "#{CONFTEST}.#{config_string('CXX_EXT') || CXX_EXT[0]}"
3000
-
3001
- TRY_LINK_CXX = config_string('TRY_LINK_CXX') ||
3002
- ((cmd = TRY_LINK.gsub(/\$\(C(?:C|(FLAGS))\)/, '$(CXX\1)')) != TRY_LINK && cmd) ||
3003
- "$(CXX) #{OUTFLAG}#{CONFTEST}#{$EXEEXT} $(INCFLAGS) $(CPPFLAGS) " \
3004
- "$(CXXFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"
3005
-
3006
- def have_devel?
3007
- unless defined? @have_devel
3008
- @have_devel = true
3009
- @have_devel = try_link(MAIN_DOES_NOTHING)
3010
- end
3011
- @have_devel
3012
- end
3013
-
3014
- def conftest_source
3015
- CONFTEST_CXX
3016
- end
3017
-
3018
- def cc_command(opt="")
3019
- conf = cc_config(opt)
3020
- RbConfig::expand("$(CXX) #$INCFLAGS #$CPPFLAGS #$CXXFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_CXX}",
3021
- conf)
3022
- end
3023
-
3024
- def link_command(ldflags, *opts)
3025
- conf = link_config(ldflags, *opts)
3026
- RbConfig::expand(TRY_LINK_CXX.dup, conf)
3027
- end
3028
-
3029
- # :startdoc:
3030
- end
3031
-
3032
- cxx::LANGUAGE = -"C++"
3033
- self[cxx::LANGUAGE] = cxx
3034
- end
3035
-
3036
- # MakeMakefile::Global = #
3037
- m = Module.new {
3038
- include(MakeMakefile)
3039
- private(*MakeMakefile.public_instance_methods(false))
3040
- }
3041
- include m
3042
-
3043
- if not $extmk and /\A(extconf|makefile).rb\z/ =~ File.basename($0)
3044
- END {mkmf_failed($0)}
3045
- end