text_ux 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +25 -0
  3. data/.rspec +2 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +51 -0
  7. data/Rakefile +18 -0
  8. data/ext/text_ux/extconf.rb +5 -0
  9. data/ext/text_ux/text_ux.cpp +252 -0
  10. data/lib/text_ux.rb +5 -0
  11. data/lib/text_ux/version.rb +3 -0
  12. data/spec/fixtures/test.ux +0 -0
  13. data/spec/spec_helper.rb +19 -0
  14. data/spec/text_ux_spec.rb +137 -0
  15. data/text_ux.gemspec +26 -0
  16. data/vendor/ux-trie/ux-0.1.9/.lock-waf_darwin_build +8 -0
  17. data/vendor/ux-trie/ux-0.1.9/.unittest-gtest/gtest-1.6.0/fused-src/gtest/gtest-all.cc +9118 -0
  18. data/vendor/ux-trie/ux-0.1.9/.unittest-gtest/gtest-1.6.0/fused-src/gtest/gtest.h +19537 -0
  19. data/vendor/ux-trie/ux-0.1.9/.unittest-gtest/gtest-1.6.0/fused-src/gtest/gtest_main.cc +39 -0
  20. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Build.py +733 -0
  21. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Build.pyc +0 -0
  22. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/ConfigSet.py +147 -0
  23. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/ConfigSet.pyc +0 -0
  24. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Configure.py +314 -0
  25. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Configure.pyc +0 -0
  26. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Context.py +298 -0
  27. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Context.pyc +0 -0
  28. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Errors.py +37 -0
  29. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Errors.pyc +0 -0
  30. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Logs.py +149 -0
  31. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Logs.pyc +0 -0
  32. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Node.py +500 -0
  33. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Node.pyc +0 -0
  34. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Options.py +130 -0
  35. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Options.pyc +0 -0
  36. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Runner.py +191 -0
  37. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Runner.pyc +0 -0
  38. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Scripting.py +358 -0
  39. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Scripting.pyc +0 -0
  40. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Task.py +669 -0
  41. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Task.pyc +0 -0
  42. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/TaskGen.py +341 -0
  43. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/TaskGen.pyc +0 -0
  44. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/__init__.py +4 -0
  45. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/__init__.pyc +0 -0
  46. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ar.py +12 -0
  47. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ar.pyc +0 -0
  48. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/asm.py +25 -0
  49. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/bison.py +29 -0
  50. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c.py +27 -0
  51. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_aliases.py +56 -0
  52. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_aliases.pyc +0 -0
  53. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_config.py +708 -0
  54. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_config.pyc +0 -0
  55. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_osx.py +121 -0
  56. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_osx.pyc +0 -0
  57. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_preproc.py +606 -0
  58. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_preproc.pyc +0 -0
  59. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_tests.py +110 -0
  60. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/c_tests.pyc +0 -0
  61. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ccroot.py +372 -0
  62. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ccroot.pyc +0 -0
  63. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/compiler_c.py +39 -0
  64. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/compiler_cxx.py +39 -0
  65. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/compiler_cxx.pyc +0 -0
  66. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/compiler_d.py +30 -0
  67. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/compiler_fc.py +45 -0
  68. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/cs.py +98 -0
  69. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/cxx.py +27 -0
  70. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/cxx.pyc +0 -0
  71. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/d.py +51 -0
  72. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/d_config.py +47 -0
  73. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/d_scan.py +133 -0
  74. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/dbus.py +30 -0
  75. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/dmd.py +43 -0
  76. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/errcheck.py +153 -0
  77. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/fc.py +123 -0
  78. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/fc_config.py +271 -0
  79. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/fc_scan.py +68 -0
  80. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/flex.py +27 -0
  81. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/g95.py +55 -0
  82. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gas.py +10 -0
  83. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gcc.py +98 -0
  84. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gdc.py +34 -0
  85. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gfortran.py +69 -0
  86. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/glib2.py +174 -0
  87. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gnu_dirs.py +65 -0
  88. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gxx.py +98 -0
  89. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/gxx.pyc +0 -0
  90. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/icc.py +31 -0
  91. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/icpc.py +30 -0
  92. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ifort.py +42 -0
  93. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/intltool.py +78 -0
  94. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/irixcc.py +49 -0
  95. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/javaw.py +272 -0
  96. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/kde4.py +49 -0
  97. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/lua.py +19 -0
  98. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/msvc.py +650 -0
  99. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/nasm.py +13 -0
  100. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/perl.py +78 -0
  101. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/python.py +303 -0
  102. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/qt4.py +424 -0
  103. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/ruby.py +104 -0
  104. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/suncc.py +54 -0
  105. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/suncxx.py +55 -0
  106. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/tex.py +222 -0
  107. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/vala.py +215 -0
  108. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/waf_unit_test.py +79 -0
  109. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/winres.py +34 -0
  110. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/xlc.py +46 -0
  111. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Tools/xlcxx.py +46 -0
  112. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Utils.py +334 -0
  113. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/Utils.pyc +0 -0
  114. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/__init__.py +4 -0
  115. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/__init__.pyc +0 -0
  116. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/ansiterm.py +173 -0
  117. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/ansiterm.pyc +0 -0
  118. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/extras/__init__.py +4 -0
  119. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/extras/__init__.pyc +0 -0
  120. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/extras/compat15.py +223 -0
  121. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/extras/compat15.pyc +0 -0
  122. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/fixpy2.py +50 -0
  123. data/vendor/ux-trie/ux-0.1.9/.waf-1.6.8-3e3391c5f23fbabad81e6d17c63a1b1e/waflib/fixpy2.pyc +0 -0
  124. data/vendor/ux-trie/ux-0.1.9/src/bitVec.cpp +119 -0
  125. data/vendor/ux-trie/ux-0.1.9/src/bitVec.hpp +64 -0
  126. data/vendor/ux-trie/ux-0.1.9/src/bitVecTest.cpp +143 -0
  127. data/vendor/ux-trie/ux-0.1.9/src/cmdline.h +809 -0
  128. data/vendor/ux-trie/ux-0.1.9/src/rsDic.cpp +121 -0
  129. data/vendor/ux-trie/ux-0.1.9/src/rsDic.hpp +57 -0
  130. data/vendor/ux-trie/ux-0.1.9/src/ux.hpp +26 -0
  131. data/vendor/ux-trie/ux-0.1.9/src/uxMain.cpp +206 -0
  132. data/vendor/ux-trie/ux-0.1.9/src/uxMap.cpp +0 -0
  133. data/vendor/ux-trie/ux-0.1.9/src/uxMap.hpp +248 -0
  134. data/vendor/ux-trie/ux-0.1.9/src/uxMapTest.cpp +139 -0
  135. data/vendor/ux-trie/ux-0.1.9/src/uxTest.cpp +229 -0
  136. data/vendor/ux-trie/ux-0.1.9/src/uxTrie.cpp +529 -0
  137. data/vendor/ux-trie/ux-0.1.9/src/uxTrie.hpp +220 -0
  138. data/vendor/ux-trie/ux-0.1.9/src/uxUtil.cpp +92 -0
  139. data/vendor/ux-trie/ux-0.1.9/src/uxUtil.hpp +35 -0
  140. data/vendor/ux-trie/ux-0.1.9/src/wscript +43 -0
  141. data/vendor/ux-trie/ux-0.1.9/unittest_gtest.py +0 -0
  142. data/vendor/ux-trie/ux-0.1.9/unittest_gtest.pyc +0 -0
  143. data/vendor/ux-trie/ux-0.1.9/unittestt.py +166 -0
  144. data/vendor/ux-trie/ux-0.1.9/ux.pc.in +10 -0
  145. data/vendor/ux-trie/ux-0.1.9/waf +0 -0
  146. data/vendor/ux-trie/ux-0.1.9/wscript +32 -0
  147. metadata +249 -0
@@ -0,0 +1,39 @@
1
+ #! /usr/bin/env python
2
+ # encoding: utf-8
3
+ # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
+
5
+ import os,sys,imp,types
6
+ from waflib.Tools import ccroot
7
+ from waflib import Utils,Configure
8
+ from waflib.Logs import debug
9
+ c_compiler={'win32':['msvc','gcc'],'cygwin':['gcc'],'darwin':['gcc'],'aix':['xlc','gcc'],'linux':['gcc','icc'],'sunos':['suncc','gcc'],'irix':['gcc','irixcc'],'hpux':['gcc'],'gnu':['gcc'],'java':['gcc','msvc','icc'],'default':['gcc'],}
10
+ def configure(conf):
11
+ try:test_for_compiler=conf.options.check_c_compiler
12
+ except AttributeError:conf.fatal("Add options(opt): opt.load('compiler_c')")
13
+ for compiler in test_for_compiler.split():
14
+ conf.env.stash()
15
+ conf.start_msg('Checking for %r (c compiler)'%compiler)
16
+ try:
17
+ conf.load(compiler)
18
+ except conf.errors.ConfigurationError ,e:
19
+ conf.env.revert()
20
+ conf.end_msg(False)
21
+ debug('compiler_c: %r'%e)
22
+ else:
23
+ if conf.env['CC']:
24
+ conf.end_msg(conf.env.get_flat('CC'))
25
+ conf.env['COMPILER_CC']=compiler
26
+ break
27
+ conf.end_msg(False)
28
+ else:
29
+ conf.fatal('could not configure a c compiler!')
30
+ def options(opt):
31
+ opt.load_special_tools('c_*.py',ban=['c_dumbpreproc.py'])
32
+ global c_compiler
33
+ build_platform=Utils.unversioned_sys_platform()
34
+ possible_compiler_list=c_compiler[build_platform in c_compiler and build_platform or'default']
35
+ test_for_compiler=' '.join(possible_compiler_list)
36
+ cc_compiler_opts=opt.add_option_group("C Compiler Options")
37
+ cc_compiler_opts.add_option('--check-c-compiler',default="%s"%test_for_compiler,help='On this platform (%s) the following C-Compiler will be checked by default: "%s"'%(build_platform,test_for_compiler),dest="check_c_compiler")
38
+ for x in test_for_compiler.split():
39
+ opt.load('%s'%x)
@@ -0,0 +1,39 @@
1
+ #! /usr/bin/env python
2
+ # encoding: utf-8
3
+ # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
+
5
+ import os,sys,imp,types
6
+ from waflib.Tools import ccroot
7
+ from waflib import Utils,Configure
8
+ from waflib.Logs import debug
9
+ cxx_compiler={'win32':['msvc','g++'],'cygwin':['g++'],'darwin':['g++'],'aix':['xlc++','g++'],'linux':['g++','icpc'],'sunos':['sunc++','g++'],'irix':['g++'],'hpux':['g++'],'gnu':['g++'],'java':['g++','msvc','icpc'],'default':['g++']}
10
+ def configure(conf):
11
+ try:test_for_compiler=conf.options.check_cxx_compiler
12
+ except AttributeError:conf.fatal("Add options(opt): opt.load('compiler_cxx')")
13
+ for compiler in test_for_compiler.split():
14
+ conf.env.stash()
15
+ conf.start_msg('Checking for %r (c++ compiler)'%compiler)
16
+ try:
17
+ conf.load(compiler)
18
+ except conf.errors.ConfigurationError ,e:
19
+ conf.env.revert()
20
+ conf.end_msg(False)
21
+ debug('compiler_cxx: %r'%e)
22
+ else:
23
+ if conf.env['CXX']:
24
+ conf.end_msg(conf.env.get_flat('CXX'))
25
+ conf.env['COMPILER_CXX']=compiler
26
+ break
27
+ conf.end_msg(False)
28
+ else:
29
+ conf.fatal('could not configure a c++ compiler!')
30
+ def options(opt):
31
+ opt.load_special_tools('cxx_*.py')
32
+ global cxx_compiler
33
+ build_platform=Utils.unversioned_sys_platform()
34
+ possible_compiler_list=cxx_compiler[build_platform in cxx_compiler and build_platform or'default']
35
+ test_for_compiler=' '.join(possible_compiler_list)
36
+ cxx_compiler_opts=opt.add_option_group('C++ Compiler Options')
37
+ cxx_compiler_opts.add_option('--check-cxx-compiler',default="%s"%test_for_compiler,help='On this platform (%s) the following C++ Compiler will be checked by default: "%s"'%(build_platform,test_for_compiler),dest="check_cxx_compiler")
38
+ for x in test_for_compiler.split():
39
+ opt.load('%s'%x)
@@ -0,0 +1,30 @@
1
+ #! /usr/bin/env python
2
+ # encoding: utf-8
3
+ # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
+
5
+ import os,sys,imp,types
6
+ from waflib import Utils,Configure,Options,Logs
7
+ def configure(conf):
8
+ for compiler in conf.options.dcheck.split(','):
9
+ conf.env.stash()
10
+ conf.start_msg('Checking for %r (d compiler)'%compiler)
11
+ try:
12
+ conf.load(compiler)
13
+ except conf.errors.ConfigurationError ,e:
14
+ conf.env.revert()
15
+ conf.end_msg(False)
16
+ Logs.debug('compiler_cxx: %r'%e)
17
+ else:
18
+ if conf.env.D:
19
+ conf.end_msg(conf.env.get_flat('D'))
20
+ conf.env['COMPILER_D']=compiler
21
+ conf.env.D_COMPILER=conf.env.D
22
+ break
23
+ conf.end_msg(False)
24
+ else:
25
+ conf.fatal('no suitable d compiler was found')
26
+ def options(opt):
27
+ d_compiler_opts=opt.add_option_group('D Compiler Options')
28
+ d_compiler_opts.add_option('--check-d-compiler',default='gdc,dmd',action='store',help='check for the compiler [Default:gdc,dmd]',dest='dcheck')
29
+ for d_compiler in['gdc','dmd']:
30
+ opt.load('%s'%d_compiler)
@@ -0,0 +1,45 @@
1
+ #! /usr/bin/env python
2
+ # encoding: utf-8
3
+ # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
+
5
+ import os,sys,imp,types
6
+ from waflib import Utils,Configure,Options,Logs,Errors
7
+ from waflib.Tools import fc
8
+ fc_compiler={'win32':['gfortran','ifort'],'darwin':['gfortran','g95','ifort'],'linux':['gfortran','g95','ifort'],'java':['gfortran','g95','ifort'],'default':['gfortran'],'aix':['gfortran']}
9
+ def __list_possible_compiler(platform):
10
+ try:
11
+ return fc_compiler[platform]
12
+ except KeyError:
13
+ return fc_compiler["default"]
14
+ def configure(conf):
15
+ try:test_for_compiler=conf.options.check_fc
16
+ except AttributeError:conf.fatal("Add options(opt): opt.load('compiler_fc')")
17
+ orig=conf.env
18
+ for compiler in test_for_compiler.split():
19
+ try:
20
+ conf.start_msg('Checking for %r (fortran compiler)'%compiler)
21
+ conf.env=orig.derive()
22
+ conf.load(compiler)
23
+ except conf.errors.ConfigurationError ,e:
24
+ conf.end_msg(False)
25
+ Logs.debug('compiler_fortran: %r'%e)
26
+ else:
27
+ if conf.env['FC']:
28
+ orig.table=conf.env.get_merged_dict()
29
+ conf.env=orig
30
+ conf.end_msg(conf.env.get_flat('FC'))
31
+ conf.env.COMPILER_FORTRAN=compiler
32
+ break
33
+ conf.end_msg(False)
34
+ else:
35
+ conf.fatal('could not configure a fortran compiler!')
36
+ def options(opt):
37
+ opt.load_special_tools('fc_*.py')
38
+ build_platform=Utils.unversioned_sys_platform()
39
+ detected_platform=Options.platform
40
+ possible_compiler_list=__list_possible_compiler(detected_platform)
41
+ test_for_compiler=' '.join(possible_compiler_list)
42
+ fortran_compiler_opts=opt.add_option_group("Fortran Compiler Options")
43
+ fortran_compiler_opts.add_option('--check-fortran-compiler',default="%s"%test_for_compiler,help='On this platform (%s) the following Fortran Compiler will be checked by default: "%s"'%(detected_platform,test_for_compiler),dest="check_fc")
44
+ for compiler in test_for_compiler.split():
45
+ opt.load('%s'%compiler)
@@ -0,0 +1,98 @@
1
+ #! /usr/bin/env python
2
+ # encoding: utf-8
3
+ # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
+
5
+ import sys
6
+ if sys.hexversion < 0x020400f0: from sets import Set as set
7
+ from waflib import Utils,Task,Options,Logs,Errors
8
+ from waflib.TaskGen import before_method,after_method,feature
9
+ from waflib.Tools import ccroot
10
+ from waflib.Configure import conf
11
+ ccroot.USELIB_VARS['cs']=set(['CSFLAGS','ASSEMBLIES','RESOURCES'])
12
+ ccroot.lib_patterns['csshlib']=['%s']
13
+ def apply_cs(self):
14
+ cs_nodes=[]
15
+ no_nodes=[]
16
+ for x in self.to_nodes(self.source):
17
+ if x.name.endswith('.cs'):
18
+ cs_nodes.append(x)
19
+ else:
20
+ no_nodes.append(x)
21
+ self.source=no_nodes
22
+ bintype=getattr(self,'type',self.gen.endswith('.dll')and'library'or'exe')
23
+ self.cs_task=tsk=self.create_task('mcs',cs_nodes,self.path.find_or_declare(self.gen))
24
+ tsk.env.CSTYPE='/target:%s'%bintype
25
+ tsk.env.OUT='/out:%s'%tsk.outputs[0].abspath()
26
+ inst_to=getattr(self,'install_path',bintype=='exe'and'${BINDIR}'or'${LIBDIR}')
27
+ if inst_to:
28
+ mod=getattr(self,'chmod',bintype=='exe'and Utils.O755 or Utils.O644)
29
+ self.install_task=self.bld.install_files(inst_to,self.cs_task.outputs[:],env=self.env,chmod=mod)
30
+ def use_cs(self):
31
+ names=self.to_list(getattr(self,'use',[]))
32
+ get=self.bld.get_tgen_by_name
33
+ for x in names:
34
+ try:
35
+ y=get(x)
36
+ except Errors.WafError:
37
+ self.cs_task.env.append_value('CSFLAGS','/reference:%s'%x)
38
+ continue
39
+ y.post()
40
+ tsk=getattr(y,'cs_task',None)or getattr(y,'link_task',None)
41
+ if not tsk:
42
+ self.bld.fatal('cs task has no link task for use %r'%self)
43
+ self.cs_task.dep_nodes.extend(tsk.outputs)
44
+ self.cs_task.set_run_after(tsk)
45
+ self.cs_task.env.append_value('CSFLAGS','/reference:%s'%tsk.outputs[0].abspath())
46
+ def debug_cs(self):
47
+ csdebug=getattr(self,'csdebug',self.env.CSDEBUG)
48
+ if not csdebug:
49
+ return
50
+ node=self.cs_task.outputs[0]
51
+ if self.env.CS_NAME=='mono':
52
+ out=node.parent.find_or_declare(node.name+'.mdb')
53
+ else:
54
+ out=node.change_ext('.pdb')
55
+ self.cs_task.outputs.append(out)
56
+ try:
57
+ self.install_task.source.append(out)
58
+ except AttributeError:
59
+ pass
60
+ if csdebug=='pdbonly':
61
+ val=['/debug+','/debug:pdbonly']
62
+ elif csdebug=='full':
63
+ val=['/debug+','/debug:full']
64
+ else:
65
+ val=['/debug-']
66
+ self.cs_task.env.append_value('CSFLAGS',val)
67
+ class mcs(Task.Task):
68
+ color='YELLOW'
69
+ run_str='${MCS} ${CSTYPE} ${CSFLAGS} ${ASS_ST:ASSEMBLIES} ${RES_ST:RESOURCES} ${OUT} ${SRC}'
70
+ def configure(conf):
71
+ csc=getattr(Options.options,'cscbinary',None)
72
+ if csc:
73
+ conf.env.MCS=csc
74
+ conf.find_program(['csc','mcs','gmcs'],var='MCS')
75
+ conf.env.ASS_ST='/r:%s'
76
+ conf.env.RES_ST='/resource:%s'
77
+ conf.env.CS_NAME='csc'
78
+ if str(conf.env.MCS).lower().find('mcs')>-1:
79
+ conf.env.CS_NAME='mono'
80
+ def options(opt):
81
+ opt.add_option('--with-csc-binary',type='string',dest='cscbinary')
82
+ class fake_csshlib(Task.Task):
83
+ color='YELLOW'
84
+ inst_to=None
85
+ def runnable_status(self):
86
+ for x in self.outputs:
87
+ x.sig=Utils.h_file(x.abspath())
88
+ return Task.SKIP_ME
89
+ def read_csshlib(self,name,paths=[]):
90
+ return self(name=name,features='fake_lib',lib_paths=paths,lib_type='csshlib')
91
+
92
+ feature('cs')(apply_cs)
93
+ before_method('process_source')(apply_cs)
94
+ feature('cs')(use_cs)
95
+ after_method('apply_cs')(use_cs)
96
+ feature('cs')(debug_cs)
97
+ after_method('apply_cs','use_cs')(debug_cs)
98
+ conf(read_csshlib)
@@ -0,0 +1,27 @@
1
+ #! /usr/bin/env python
2
+ # encoding: utf-8
3
+ # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
+
5
+ from waflib import TaskGen,Task,Utils
6
+ from waflib.Tools import c_preproc
7
+ from waflib.Tools.ccroot import link_task,stlink_task
8
+ def cxx_hook(self,node):
9
+ return self.create_compiled_task('cxx',node)
10
+ TaskGen.extension('.cpp','.cc','.cxx','.C','.c++')(cxx_hook)
11
+ if not'.c'in TaskGen.task_gen.mappings:
12
+ TaskGen.task_gen.mappings['.c']=TaskGen.task_gen.mappings['.cpp']
13
+ class cxx(Task.Task):
14
+ run_str='${CXX} ${ARCH_ST:ARCH} ${CXXFLAGS} ${CPPFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CXX_SRC_F}${SRC} ${CXX_TGT_F}${TGT}'
15
+ vars=['CXXDEPS']
16
+ ext_in=['.h']
17
+ scan=c_preproc.scan
18
+ class cxxprogram(link_task):
19
+ run_str='${LINK_CXX} ${LINKFLAGS} ${CXXLNK_SRC_F}${SRC} ${CXXLNK_TGT_F}${TGT[0].abspath()} ${RPATH_ST:RPATH} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${FRAMEWORK_ST:FRAMEWORK} ${ARCH_ST:ARCH} ${STLIB_MARKER} ${STLIBPATH_ST:STLIBPATH} ${STLIB_ST:STLIB} ${SHLIB_MARKER} ${LIBPATH_ST:LIBPATH} ${LIB_ST:LIB}'
20
+ vars=['LINKDEPS']
21
+ ext_out=['.bin']
22
+ inst_to='${BINDIR}'
23
+ chmod=Utils.O755
24
+ class cxxshlib(cxxprogram):
25
+ inst_to='${LIBDIR}'
26
+ class cxxstlib(stlink_task):
27
+ pass
@@ -0,0 +1,51 @@
1
+ #! /usr/bin/env python
2
+ # encoding: utf-8
3
+ # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
+
5
+ import os,sys
6
+ from waflib import Utils,Task,Errors
7
+ from waflib.TaskGen import taskgen_method,feature,after_method,before_method,extension
8
+ from waflib.Configure import conf
9
+ from waflib.Tools.ccroot import link_task
10
+ from waflib.Tools import d_scan,d_config
11
+ from waflib.Tools.ccroot import link_task,stlink_task
12
+ class d(Task.Task):
13
+ color='GREEN'
14
+ run_str='${D} ${DFLAGS} ${DINC_ST:INCPATHS} ${D_SRC_F:SRC} ${D_TGT_F:TGT}'
15
+ scan=d_scan.scan
16
+ class d_with_header(d):
17
+ run_str='${D} ${DFLAGS} ${DINC_ST:INCPATHS} ${D_HDR_F:tgt.outputs[1].bldpath()} ${D_SRC_F:SRC} ${D_TGT_F:tgt.outputs[0].bldpath()}'
18
+ class d_header(Task.Task):
19
+ color='BLUE'
20
+ run_str='${D} ${D_HEADER} ${SRC}'
21
+ class dprogram(link_task):
22
+ run_str='${D_LINKER} ${LINKFLAGS} ${DLNK_SRC_F}${SRC} ${DLNK_TGT_F:TGT} ${RPATH_ST:RPATH} ${DSTLIB_MARKER} ${DSTLIBPATH_ST:STLIBPATH} ${DSTLIB_ST:STLIB} ${DSHLIB_MARKER} ${LIBPATH_ST:LIBPATH} ${DSHLIB_ST:LIB}'
23
+ inst_to='${BINDIR}'
24
+ chmod=Utils.O755
25
+ class dshlib(dprogram):
26
+ inst_to='${LIBDIR}'
27
+ class dstlib(stlink_task):
28
+ pass
29
+ def d_hook(self,node):
30
+ if getattr(self,'generate_headers',None):
31
+ task=self.create_compiled_task('d_with_header',node)
32
+ header_node=node.change_ext(self.env['DHEADER_ext'])
33
+ task.outputs.append(header_node)
34
+ else:
35
+ task=self.create_compiled_task('d',node)
36
+ return task
37
+ def generate_header(self,filename,install_path=None):
38
+ try:
39
+ self.header_lst.append([filename,install_path])
40
+ except AttributeError:
41
+ self.header_lst=[[filename,install_path]]
42
+ def process_header(self):
43
+ for i in getattr(self,'header_lst',[]):
44
+ node=self.path.find_resource(i[0])
45
+ if not node:
46
+ raise Errors.WafError('file %r not found on d obj'%i[0])
47
+ self.create_task('d_header',node,node.change_ext('.di'))
48
+
49
+ extension('.d','.di','.D')(d_hook)
50
+ taskgen_method(generate_header)
51
+ feature('d')(process_header)
@@ -0,0 +1,47 @@
1
+ #! /usr/bin/env python
2
+ # encoding: utf-8
3
+ # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
+
5
+ from waflib import Utils
6
+ from waflib.Configure import conf
7
+ def d_platform_flags(self):
8
+ v=self.env
9
+ if not v.DEST_OS:
10
+ v.DEST_OS=Utils.unversioned_sys_platform()
11
+ if Utils.destos_to_binfmt(self.env.DEST_OS)=='pe':
12
+ v['dprogram_PATTERN']='%s.exe'
13
+ v['dshlib_PATTERN']='lib%s.dll'
14
+ v['dstlib_PATTERN']='lib%s.a'
15
+ else:
16
+ v['dprogram_PATTERN']='%s'
17
+ v['dshlib_PATTERN']='lib%s.so'
18
+ v['dstlib_PATTERN']='lib%s.a'
19
+ DLIB='''
20
+ version(D_Version2) {
21
+ import std.stdio;
22
+ int main() {
23
+ writefln("phobos2");
24
+ return 0;
25
+ }
26
+ } else {
27
+ version(Tango) {
28
+ import tango.stdc.stdio;
29
+ int main() {
30
+ printf("tango");
31
+ return 0;
32
+ }
33
+ } else {
34
+ import std.stdio;
35
+ int main() {
36
+ writefln("phobos1");
37
+ return 0;
38
+ }
39
+ }
40
+ }
41
+ '''
42
+ def check_dlibrary(self):
43
+ ret=self.check_cc(features='d dprogram',fragment=DLIB,compile_filename='test.d',execute=True,define_ret=True)
44
+ self.env.DLIBRARY=ret.strip()
45
+
46
+ conf(d_platform_flags)
47
+ conf(check_dlibrary)
@@ -0,0 +1,133 @@
1
+ #! /usr/bin/env python
2
+ # encoding: utf-8
3
+ # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
4
+
5
+ import re
6
+ from waflib import Utils,Logs
7
+ def filter_comments(filename):
8
+ txt=Utils.readf(filename)
9
+ i=0
10
+ buf=[]
11
+ max=len(txt)
12
+ begin=0
13
+ while i<max:
14
+ c=txt[i]
15
+ if c=='"'or c=="'":
16
+ buf.append(txt[begin:i])
17
+ delim=c
18
+ i+=1
19
+ while i<max:
20
+ c=txt[i]
21
+ if c==delim:break
22
+ elif c=='\\':
23
+ i+=1
24
+ i+=1
25
+ i+=1
26
+ begin=i
27
+ elif c=='/':
28
+ buf.append(txt[begin:i])
29
+ i+=1
30
+ if i==max:break
31
+ c=txt[i]
32
+ if c=='+':
33
+ i+=1
34
+ nesting=1
35
+ c=None
36
+ while i<max:
37
+ prev=c
38
+ c=txt[i]
39
+ if prev=='/'and c=='+':
40
+ nesting+=1
41
+ c=None
42
+ elif prev=='+'and c=='/':
43
+ nesting-=1
44
+ if nesting==0:break
45
+ c=None
46
+ i+=1
47
+ elif c=='*':
48
+ i+=1
49
+ c=None
50
+ while i<max:
51
+ prev=c
52
+ c=txt[i]
53
+ if prev=='*'and c=='/':break
54
+ i+=1
55
+ elif c=='/':
56
+ i+=1
57
+ while i<max and txt[i]!='\n':
58
+ i+=1
59
+ else:
60
+ begin=i-1
61
+ continue
62
+ i+=1
63
+ begin=i
64
+ buf.append(' ')
65
+ else:
66
+ i+=1
67
+ buf.append(txt[begin:])
68
+ return buf
69
+ class d_parser(object):
70
+ def __init__(self,env,incpaths):
71
+ self.allnames=[]
72
+ self.re_module=re.compile("module\s+([^;]+)")
73
+ self.re_import=re.compile("import\s+([^;]+)")
74
+ self.re_import_bindings=re.compile("([^:]+):(.*)")
75
+ self.re_import_alias=re.compile("[^=]+=(.+)")
76
+ self.env=env
77
+ self.nodes=[]
78
+ self.names=[]
79
+ self.incpaths=incpaths
80
+ def tryfind(self,filename):
81
+ found=0
82
+ for n in self.incpaths:
83
+ found=n.find_resource(filename.replace('.','/')+'.d')
84
+ if found:
85
+ self.nodes.append(found)
86
+ self.waiting.append(found)
87
+ break
88
+ if not found:
89
+ if not filename in self.names:
90
+ self.names.append(filename)
91
+ def get_strings(self,code):
92
+ self.module=''
93
+ lst=[]
94
+ mod_name=self.re_module.search(code)
95
+ if mod_name:
96
+ self.module=re.sub('\s+','',mod_name.group(1))
97
+ import_iterator=self.re_import.finditer(code)
98
+ if import_iterator:
99
+ for import_match in import_iterator:
100
+ import_match_str=re.sub('\s+','',import_match.group(1))
101
+ bindings_match=self.re_import_bindings.match(import_match_str)
102
+ if bindings_match:
103
+ import_match_str=bindings_match.group(1)
104
+ matches=import_match_str.split(',')
105
+ for match in matches:
106
+ alias_match=self.re_import_alias.match(match)
107
+ if alias_match:
108
+ match=alias_match.group(1)
109
+ lst.append(match)
110
+ return lst
111
+ def start(self,node):
112
+ self.waiting=[node]
113
+ while self.waiting:
114
+ nd=self.waiting.pop(0)
115
+ self.iter(nd)
116
+ def iter(self,node):
117
+ path=node.abspath()
118
+ code="".join(filter_comments(path))
119
+ names=self.get_strings(code)
120
+ for x in names:
121
+ if x in self.allnames:continue
122
+ self.allnames.append(x)
123
+ self.tryfind(x)
124
+ def scan(self):
125
+ env=self.env
126
+ gruik=d_parser(env,self.generator.includes_nodes)
127
+ node=self.inputs[0]
128
+ gruik.start(node)
129
+ nodes=gruik.nodes
130
+ names=gruik.names
131
+ if Logs.verbose:
132
+ Logs.debug('deps: deps for %s: %r; unresolved %r'%(str(node),nodes,names))
133
+ return(nodes,names)