cairo 1.10.0-x86-mingw32 → 1.10.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cairo might be problematic. Click here for more details.

Files changed (560) hide show
  1. data/Gemfile +14 -0
  2. data/NEWS +33 -0
  3. data/README.rdoc +115 -0
  4. data/Rakefile +69 -80
  5. data/ext/cairo/cairo.def +1 -1
  6. data/ext/cairo/depend +2 -0
  7. data/ext/cairo/extconf.rb +7 -5
  8. data/ext/cairo/rb_cairo.c +4 -1
  9. data/ext/cairo/rb_cairo.h +4 -0
  10. data/ext/cairo/rb_cairo_constants.c +6 -2
  11. data/ext/cairo/rb_cairo_context.c +3 -2
  12. data/ext/cairo/rb_cairo_device.c +8 -0
  13. data/ext/cairo/rb_cairo_font_face.c +1 -1
  14. data/ext/cairo/rb_cairo_surface.c +40 -0
  15. data/lib/1.8/cairo.so +0 -0
  16. data/lib/1.9/cairo.so +0 -0
  17. data/lib/cairo.rb +3 -3
  18. data/lib/cairo/color.rb +4 -4
  19. data/lib/cairo/context/path.rb +2 -1
  20. data/test/run-test.rb +1 -1
  21. data/test/test_context.rb +1 -1
  22. data/test/test_font_face.rb +1 -1
  23. data/test/test_recording_surface.rb +4 -1
  24. data/test/test_xml_surface.rb +2 -1
  25. data/vendor/local/bin/fc-cache.exe +0 -0
  26. data/vendor/local/bin/fc-cat.exe +0 -0
  27. data/vendor/local/bin/fc-list.exe +0 -0
  28. data/vendor/local/bin/freetype-config +160 -0
  29. data/vendor/local/bin/libcairo-2.dll +0 -0
  30. data/vendor/local/bin/libcairo-gobject-2.dll +0 -0
  31. data/vendor/local/bin/libcairo-script-interpreter-2.dll +0 -0
  32. data/vendor/local/bin/xmlwf.exe +0 -0
  33. data/vendor/local/etc/fonts/fonts.dtd +224 -0
  34. data/vendor/local/include/cairo/cairo-version.h +1 -1
  35. data/vendor/local/include/cairo/cairo.h +1 -1
  36. data/vendor/local/include/expat.h +1014 -0
  37. data/vendor/local/include/expat_external.h +115 -0
  38. data/vendor/local/include/fontconfig/fcfreetype.h +59 -0
  39. data/vendor/local/include/fontconfig/fcprivate.h +123 -0
  40. data/vendor/local/include/fontconfig/fontconfig.h +963 -0
  41. data/vendor/local/include/freetype2/freetype/config/ftconfig.h +477 -0
  42. data/vendor/local/include/freetype2/freetype/config/ftheader.h +780 -0
  43. data/vendor/local/include/freetype2/freetype/config/ftmodule.h +20 -0
  44. data/vendor/local/include/freetype2/freetype/config/ftoption.h +733 -0
  45. data/vendor/local/include/freetype2/freetype/config/ftstdlib.h +173 -0
  46. data/vendor/local/include/freetype2/freetype/freetype.h +3919 -0
  47. data/vendor/local/include/freetype2/freetype/ftadvanc.h +179 -0
  48. data/vendor/local/include/freetype2/freetype/ftbbox.h +94 -0
  49. data/vendor/local/include/freetype2/freetype/ftbdf.h +209 -0
  50. data/vendor/local/include/freetype2/freetype/ftbitmap.h +227 -0
  51. data/vendor/local/include/freetype2/freetype/ftcache.h +1125 -0
  52. data/vendor/local/include/freetype2/freetype/ftchapters.h +103 -0
  53. data/vendor/local/include/freetype2/freetype/ftcid.h +166 -0
  54. data/vendor/local/include/freetype2/freetype/fterrdef.h +244 -0
  55. data/vendor/local/include/freetype2/freetype/fterrors.h +206 -0
  56. data/vendor/local/include/freetype2/freetype/ftgasp.h +120 -0
  57. data/vendor/local/include/freetype2/freetype/ftglyph.h +613 -0
  58. data/vendor/local/include/freetype2/freetype/ftgxval.h +358 -0
  59. data/vendor/local/include/freetype2/freetype/ftgzip.h +102 -0
  60. data/vendor/local/include/freetype2/freetype/ftimage.h +1301 -0
  61. data/vendor/local/include/freetype2/freetype/ftincrem.h +353 -0
  62. data/vendor/local/include/freetype2/freetype/ftlcdfil.h +213 -0
  63. data/vendor/local/include/freetype2/freetype/ftlist.h +277 -0
  64. data/vendor/local/include/freetype2/freetype/ftlzw.h +99 -0
  65. data/vendor/local/include/freetype2/freetype/ftmac.h +274 -0
  66. data/vendor/local/include/freetype2/freetype/ftmm.h +378 -0
  67. data/vendor/local/include/freetype2/freetype/ftmodapi.h +483 -0
  68. data/vendor/local/include/freetype2/freetype/ftmoderr.h +155 -0
  69. data/vendor/local/include/freetype2/freetype/ftotval.h +203 -0
  70. data/vendor/local/include/freetype2/freetype/ftoutln.h +537 -0
  71. data/vendor/local/include/freetype2/freetype/ftpfr.h +172 -0
  72. data/vendor/local/include/freetype2/freetype/ftrender.h +230 -0
  73. data/vendor/local/include/freetype2/freetype/ftsizes.h +159 -0
  74. data/vendor/local/include/freetype2/freetype/ftsnames.h +200 -0
  75. data/vendor/local/include/freetype2/freetype/ftstroke.h +716 -0
  76. data/vendor/local/include/freetype2/freetype/ftsynth.h +80 -0
  77. data/vendor/local/include/freetype2/freetype/ftsystem.h +347 -0
  78. data/vendor/local/include/freetype2/freetype/fttrigon.h +350 -0
  79. data/vendor/local/include/freetype2/freetype/fttypes.h +588 -0
  80. data/vendor/local/include/freetype2/freetype/ftwinfnt.h +274 -0
  81. data/vendor/local/include/freetype2/freetype/ftxf86.h +83 -0
  82. data/vendor/local/include/freetype2/freetype/t1tables.h +504 -0
  83. data/vendor/local/include/freetype2/freetype/ttnameid.h +1247 -0
  84. data/vendor/local/include/freetype2/freetype/tttables.h +759 -0
  85. data/vendor/local/include/freetype2/freetype/tttags.h +107 -0
  86. data/vendor/local/include/freetype2/freetype/ttunpat.h +59 -0
  87. data/vendor/local/include/ft2build.h +61 -0
  88. data/vendor/local/include/libpng14/png.h +2701 -0
  89. data/vendor/local/include/libpng14/pngconf.h +1525 -0
  90. data/vendor/local/include/png.h +2701 -0
  91. data/vendor/local/include/pngconf.h +1525 -0
  92. data/vendor/local/include/zconf.h +461 -0
  93. data/vendor/local/include/zlib.h +1589 -0
  94. data/vendor/local/lib/cairo.lib +0 -0
  95. data/vendor/local/lib/expat.lib +0 -0
  96. data/vendor/local/lib/fontconfig.def +195 -0
  97. data/vendor/local/lib/fontconfig.lib +0 -0
  98. data/vendor/local/lib/freetype.def +186 -0
  99. data/vendor/local/lib/freetype.lib +0 -0
  100. data/vendor/local/lib/libcairo-gobject.dll.a +0 -0
  101. data/vendor/local/lib/libcairo-script-interpreter.dll.a +0 -0
  102. data/vendor/local/lib/libcairo.dll.a +0 -0
  103. data/vendor/local/lib/libexpat.def +73 -0
  104. data/vendor/local/lib/libexpat.dll.a +0 -0
  105. data/vendor/local/lib/libfontconfig.dll.a +0 -0
  106. data/vendor/local/lib/libfreetype.dll.a +0 -0
  107. data/vendor/local/lib/libpng.def +192 -0
  108. data/vendor/local/lib/libpng.lib +0 -0
  109. data/vendor/local/lib/libpng14.dll.a +0 -0
  110. data/vendor/local/lib/libz.dll.a +0 -0
  111. data/vendor/local/lib/pkgconfig/cairo-fc.pc +2 -2
  112. data/vendor/local/lib/pkgconfig/cairo-ft.pc +2 -2
  113. data/vendor/local/lib/pkgconfig/cairo-gobject.pc +2 -2
  114. data/vendor/local/lib/pkgconfig/cairo-pdf.pc +2 -2
  115. data/vendor/local/lib/pkgconfig/cairo-png.pc +2 -2
  116. data/vendor/local/lib/pkgconfig/cairo-ps.pc +2 -2
  117. data/vendor/local/lib/pkgconfig/cairo-svg.pc +2 -2
  118. data/vendor/local/lib/pkgconfig/cairo-win32-font.pc +2 -2
  119. data/vendor/local/lib/pkgconfig/cairo-win32.pc +2 -2
  120. data/vendor/local/lib/pkgconfig/cairo.pc +2 -2
  121. data/vendor/local/lib/pkgconfig/fontconfig.pc +11 -0
  122. data/vendor/local/lib/pkgconfig/freetype2.pc +12 -0
  123. data/vendor/local/lib/pkgconfig/libpng.pc +11 -0
  124. data/vendor/local/lib/pkgconfig/libpng14.pc +11 -0
  125. data/vendor/local/lib/zdll.lib +0 -0
  126. data/vendor/local/lib/zlib.def +67 -0
  127. data/vendor/local/man/man1/xmlwf.1 +251 -0
  128. data/vendor/local/manifest/{cairo-dev_1.10.0-1_win32.mft → cairo-dev_1.10.2-1_win32.mft} +6 -3
  129. data/vendor/local/manifest/cairo_1.10.2-1_win32.mft +7 -0
  130. data/vendor/local/manifest/expat-dev_2.0.1-1_win32.mft +10 -0
  131. data/vendor/local/manifest/fontconfig-dev_2.8.0-2_win32.mft +387 -0
  132. data/vendor/local/manifest/freetype-dev_2.4.2-1_win32.mft +56 -0
  133. data/vendor/local/manifest/libpng-dev_1.4.3-1_win32.mft +15 -0
  134. data/vendor/local/manifest/zlib-dev_1.2.5-2_win32.mft +8 -0
  135. data/vendor/local/share/aclocal/freetype2.m4 +194 -0
  136. data/vendor/local/share/doc/{cairo_1.10.0-1_win32 → cairo_1.10.2-1_win32}/COPYING +0 -0
  137. data/vendor/local/share/doc/{cairo_1.10.0-1_win32 → cairo_1.10.2-1_win32}/COPYING-LGPL-2.1 +0 -0
  138. data/vendor/local/share/doc/{cairo_1.10.0-1_win32 → cairo_1.10.2-1_win32}/COPYING-MPL-1.1 +0 -0
  139. data/vendor/local/share/doc/fontconfig/fontconfig-devel.pdf +42484 -4
  140. data/vendor/local/share/doc/fontconfig/fontconfig-devel.txt +5046 -0
  141. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomiccreate.html +224 -0
  142. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicdeletenew.html +216 -0
  143. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicdestroy.html +210 -0
  144. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomiclock.html +223 -0
  145. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicnewfile.html +222 -0
  146. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicorigfile.html +221 -0
  147. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicreplaceorig.html +223 -0
  148. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcatomicunlock.html +216 -0
  149. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcblanksadd.html +222 -0
  150. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcblankscreate.html +216 -0
  151. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcblanksdestroy.html +216 -0
  152. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcblanksismember.html +211 -0
  153. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccachecopyset.html +228 -0
  154. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccachedir.html +221 -0
  155. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccachenumfont.html +211 -0
  156. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccachenumsubdir.html +221 -0
  157. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccachesubdir.html +244 -0
  158. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetaddchar.html +226 -0
  159. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetcopy.html +227 -0
  160. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetcount.html +221 -0
  161. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetcoverage.html +249 -0
  162. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetcreate.html +220 -0
  163. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetdestroy.html +226 -0
  164. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetequal.html +232 -0
  165. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetfirstpage.html +238 -0
  166. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsethaschar.html +231 -0
  167. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetintersect.html +232 -0
  168. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetintersectcount.html +231 -0
  169. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetissubset.html +231 -0
  170. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetmerge.html +261 -0
  171. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetnew.html +208 -0
  172. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetnextpage.html +243 -0
  173. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetsubtract.html +231 -0
  174. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetsubtractcount.html +231 -0
  175. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fccharsetunion.html +231 -0
  176. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigappfontadddir.html +229 -0
  177. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigappfontaddfile.html +228 -0
  178. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigappfontclear.html +222 -0
  179. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigbuildfonts.html +224 -0
  180. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigcreate.html +216 -0
  181. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigdestroy.html +219 -0
  182. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigenablehome.html +230 -0
  183. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigfilename.html +237 -0
  184. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetblanks.html +225 -0
  185. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetcache.html +217 -0
  186. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetcachedirs.html +227 -0
  187. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetconfigdirs.html +228 -0
  188. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetconfigfiles.html +227 -0
  189. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetcurrent.html +216 -0
  190. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetfontdirs.html +229 -0
  191. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetfonts.html +234 -0
  192. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiggetrescaninterval.html +230 -0
  193. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfighome.html +221 -0
  194. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigparseandload.html +220 -0
  195. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigreference.html +231 -0
  196. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigsetcurrent.html +222 -0
  197. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigsetrescaninterval.html +229 -0
  198. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigsubstitute.html +233 -0
  199. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfigsubstitutewithpat.html +251 -0
  200. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcconfiguptodate.html +228 -0
  201. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdefaultsubstitute.html +234 -0
  202. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircacheload.html +239 -0
  203. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircacheloadfile.html +233 -0
  204. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircacheread.html +239 -0
  205. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircacheunlink.html +239 -0
  206. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircacheunload.html +211 -0
  207. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdircachevalid.html +222 -0
  208. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdirsave.html +245 -0
  209. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcdirscan.html +266 -0
  210. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfileisdir.html +222 -0
  211. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfilescan.html +276 -0
  212. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfini.html +219 -0
  213. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontlist.html +244 -0
  214. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontmatch.html +262 -0
  215. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontrenderprepare.html +259 -0
  216. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetadd.html +223 -0
  217. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetcreate.html +216 -0
  218. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetdestroy.html +217 -0
  219. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetlist.html +261 -0
  220. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetmatch.html +273 -0
  221. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetprint.html +224 -0
  222. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetsort.html +303 -0
  223. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsetsortdestroy.html +222 -0
  224. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfontsort.html +289 -0
  225. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfreetypecharindex.html +226 -0
  226. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfreetypecharset.html +225 -0
  227. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfreetypecharsetandspacing.html +241 -0
  228. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfreetypequery.html +233 -0
  229. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcfreetypequeryface.html +222 -0
  230. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcgetlangs.html +216 -0
  231. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcgetversion.html +216 -0
  232. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcinit.html +219 -0
  233. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcinitbringuptodate.html +208 -0
  234. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcinitloadconfig.html +217 -0
  235. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcinitloadconfigandfonts.html +217 -0
  236. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcinitreinitialize.html +219 -0
  237. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcislower.html +222 -0
  238. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcisupper.html +222 -0
  239. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclanggetcharset.html +205 -0
  240. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetadd.html +239 -0
  241. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetcompare.html +239 -0
  242. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetcontains.html +259 -0
  243. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetcopy.html +225 -0
  244. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetcreate.html +219 -0
  245. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetdestroy.html +220 -0
  246. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetequal.html +232 -0
  247. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsetgetlangs.html +221 -0
  248. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsethash.html +233 -0
  249. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fclangsethaslang.html +255 -0
  250. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixcopy.html +225 -0
  251. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixequal.html +236 -0
  252. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixinit.html +225 -0
  253. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixmultiply.html +246 -0
  254. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixrotate.html +261 -0
  255. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixscale.html +261 -0
  256. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcmatrixshear.html +250 -0
  257. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameconstant.html +221 -0
  258. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnamegetconstant.html +221 -0
  259. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnamegetobjecttype.html +210 -0
  260. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameparse.html +221 -0
  261. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameregisterconstants.html +228 -0
  262. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameregisterobjecttypes.html +228 -0
  263. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameunparse.html +218 -0
  264. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameunregisterconstants.html +228 -0
  265. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcnameunregisterobjecttypes.html +226 -0
  266. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcobjectsetadd.html +222 -0
  267. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcobjectsetbuild.html +262 -0
  268. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcobjectsetcreate.html +216 -0
  269. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcobjectsetdestroy.html +216 -0
  270. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternadd-type.html +404 -0
  271. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternadd.html +240 -0
  272. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternaddweak.html +242 -0
  273. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternbuild.html +313 -0
  274. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatterncreate.html +216 -0
  275. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatterndel.html +222 -0
  276. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatterndestroy.html +217 -0
  277. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternduplicate.html +223 -0
  278. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternequal.html +231 -0
  279. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternequalsubset.html +242 -0
  280. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternfilter.html +244 -0
  281. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternformat.html +602 -0
  282. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternget-type.html +435 -0
  283. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternget.html +249 -0
  284. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternhash.html +217 -0
  285. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternprint.html +218 -0
  286. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternreference.html +222 -0
  287. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcpatternremove.html +227 -0
  288. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrbasename.html +212 -0
  289. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrcmp.html +232 -0
  290. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrcmpignorecase.html +233 -0
  291. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrcopy.html +226 -0
  292. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrcopyfilename.html +234 -0
  293. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrdirname.html +223 -0
  294. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrdowncase.html +222 -0
  295. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrfree.html +217 -0
  296. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrlistcreate.html +221 -0
  297. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrlistdone.html +210 -0
  298. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrlistnext.html +221 -0
  299. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrplus.html +233 -0
  300. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetadd.html +231 -0
  301. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetaddfilename.html +233 -0
  302. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetcreate.html +216 -0
  303. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetdel.html +237 -0
  304. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetdestroy.html +221 -0
  305. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetequal.html +233 -0
  306. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrsetmember.html +232 -0
  307. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrstr.html +244 -0
  308. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcstrstrignorecase.html +244 -0
  309. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fctolower.html +222 -0
  310. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcucs4toutf8.html +233 -0
  311. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcutf16len.html +278 -0
  312. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcutf16toucs4.html +265 -0
  313. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcutf8len.html +261 -0
  314. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcutf8toucs4.html +249 -0
  315. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcvaluedestroy.html +222 -0
  316. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcvalueequal.html +212 -0
  317. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcvalueprint.html +223 -0
  318. data/vendor/local/share/doc/fontconfig/fontconfig-devel/fcvaluesave.html +227 -0
  319. data/vendor/local/share/doc/fontconfig/fontconfig-devel/ln12.html +128 -0
  320. data/vendor/local/share/doc/fontconfig/fontconfig-devel/t1.html +133 -0
  321. data/vendor/local/share/doc/fontconfig/fontconfig-devel/x102.html +1463 -0
  322. data/vendor/local/share/doc/fontconfig/fontconfig-devel/x19.html +264 -0
  323. data/vendor/local/share/doc/fontconfig/fontconfig-devel/x31.html +590 -0
  324. data/vendor/local/share/doc/fontconfig/fontconfig-user.html +1352 -0
  325. data/vendor/local/share/doc/fontconfig/fontconfig-user.pdf +0 -0
  326. data/vendor/local/share/doc/fontconfig/fontconfig-user.txt +644 -0
  327. data/vendor/local/share/gtk-doc/html/cairo/cairo-FreeType-Fonts.html +11 -28
  328. data/vendor/local/share/gtk-doc/html/cairo/cairo-Image-Surfaces.html +10 -26
  329. data/vendor/local/share/gtk-doc/html/cairo/cairo-Paths.html +42 -99
  330. data/vendor/local/share/gtk-doc/html/cairo/cairo-PostScript-Surfaces.html +22 -47
  331. data/vendor/local/share/gtk-doc/html/cairo/cairo-Quartz-(CGFont)-Fonts.html +1 -2
  332. data/vendor/local/share/gtk-doc/html/cairo/cairo-Quartz-Surfaces.html +5 -15
  333. data/vendor/local/share/gtk-doc/html/cairo/cairo-Recording-Surfaces.html +201 -0
  334. data/vendor/local/share/gtk-doc/html/cairo/cairo-Types.html +5 -15
  335. data/vendor/local/share/gtk-doc/html/cairo/cairo-Version-Information.html +43 -113
  336. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Fonts.html +1 -2
  337. data/vendor/local/share/gtk-doc/html/cairo/cairo-Win32-Surfaces.html +3 -4
  338. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-device-t.html +21 -48
  339. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-pattern-t.html +8 -26
  340. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-t.html +61 -148
  341. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-surface-t.html +19 -45
  342. data/vendor/local/share/gtk-doc/html/cairo/cairo-cairo-t.html +15 -39
  343. data/vendor/local/share/gtk-doc/html/cairo/cairo-surfaces.html +3 -0
  344. data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp +6 -2
  345. data/vendor/local/share/gtk-doc/html/cairo/cairo.devhelp2 +6 -2
  346. data/vendor/local/share/gtk-doc/html/cairo/index-1.10.html +9 -0
  347. data/vendor/local/share/gtk-doc/html/cairo/index-all.html +6 -0
  348. data/vendor/local/share/gtk-doc/html/cairo/index.html +4 -1
  349. data/vendor/local/share/gtk-doc/html/cairo/index.sgml +8 -0
  350. data/vendor/local/share/man/man1/fc-cache.1 +70 -0
  351. data/vendor/local/share/man/man1/fc-cat.1 +44 -0
  352. data/vendor/local/share/man/man1/fc-list.1 +72 -0
  353. data/vendor/local/share/man/man1/fc-match.1 +73 -0
  354. data/vendor/local/share/man/man1/fc-query.1 +57 -0
  355. data/vendor/local/share/man/man1/fc-scan.1 +52 -0
  356. data/vendor/local/share/man/man3/FcAtomicCreate.3 +19 -0
  357. data/vendor/local/share/man/man3/FcAtomicDeleteNew.3 +16 -0
  358. data/vendor/local/share/man/man3/FcAtomicDestroy.3 +16 -0
  359. data/vendor/local/share/man/man3/FcAtomicLock.3 +18 -0
  360. data/vendor/local/share/man/man3/FcAtomicNewFile.3 +17 -0
  361. data/vendor/local/share/man/man3/FcAtomicOrigFile.3 +16 -0
  362. data/vendor/local/share/man/man3/FcAtomicReplaceOrig.3 +18 -0
  363. data/vendor/local/share/man/man3/FcAtomicUnlock.3 +16 -0
  364. data/vendor/local/share/man/man3/FcBlanksAdd.3 +18 -0
  365. data/vendor/local/share/man/man3/FcBlanksCreate.3 +16 -0
  366. data/vendor/local/share/man/man3/FcBlanksDestroy.3 +16 -0
  367. data/vendor/local/share/man/man3/FcBlanksIsMember.3 +18 -0
  368. data/vendor/local/share/man/man3/FcCacheCopySet.3 +18 -0
  369. data/vendor/local/share/man/man3/FcCacheDir.3 +16 -0
  370. data/vendor/local/share/man/man3/FcCacheNumFont.3 +17 -0
  371. data/vendor/local/share/man/man3/FcCacheNumSubdir.3 +16 -0
  372. data/vendor/local/share/man/man3/FcCacheSubdir.3 +20 -0
  373. data/vendor/local/share/man/man3/FcCharSetAddChar.3 +19 -0
  374. data/vendor/local/share/man/man3/FcCharSetCopy.3 +17 -0
  375. data/vendor/local/share/man/man3/FcCharSetCount.3 +16 -0
  376. data/vendor/local/share/man/man3/FcCharSetCoverage.3 +23 -0
  377. data/vendor/local/share/man/man3/FcCharSetCreate.3 +17 -0
  378. data/vendor/local/share/man/man3/FcCharSetDestroy.3 +18 -0
  379. data/vendor/local/share/man/man3/FcCharSetEqual.3 +18 -0
  380. data/vendor/local/share/man/man3/FcCharSetFirstPage.3 +20 -0
  381. data/vendor/local/share/man/man3/FcCharSetHasChar.3 +17 -0
  382. data/vendor/local/share/man/man3/FcCharSetIntersect.3 +18 -0
  383. data/vendor/local/share/man/man3/FcCharSetIntersectCount.3 +17 -0
  384. data/vendor/local/share/man/man3/FcCharSetIsSubset.3 +17 -0
  385. data/vendor/local/share/man/man3/FcCharSetMerge.3 +23 -0
  386. data/vendor/local/share/man/man3/FcCharSetNew.3 +16 -0
  387. data/vendor/local/share/man/man3/FcCharSetNextPage.3 +20 -0
  388. data/vendor/local/share/man/man3/FcCharSetSubtract.3 +17 -0
  389. data/vendor/local/share/man/man3/FcCharSetSubtractCount.3 +17 -0
  390. data/vendor/local/share/man/man3/FcCharSetUnion.3 +17 -0
  391. data/vendor/local/share/man/man3/FcConfigAppFontAddDir.3 +20 -0
  392. data/vendor/local/share/man/man3/FcConfigAppFontAddFile.3 +19 -0
  393. data/vendor/local/share/man/man3/FcConfigAppFontClear.3 +17 -0
  394. data/vendor/local/share/man/man3/FcConfigBuildFonts.3 +19 -0
  395. data/vendor/local/share/man/man3/FcConfigCreate.3 +16 -0
  396. data/vendor/local/share/man/man3/FcConfigDestroy.3 +19 -0
  397. data/vendor/local/share/man/man3/FcConfigEnableHome.3 +20 -0
  398. data/vendor/local/share/man/man3/FcConfigFilename.3 +26 -0
  399. data/vendor/local/share/man/man3/FcConfigGetBlanks.3 +20 -0
  400. data/vendor/local/share/man/man3/FcConfigGetCache.3 +17 -0
  401. data/vendor/local/share/man/man3/FcConfigGetCacheDirs.3 +19 -0
  402. data/vendor/local/share/man/man3/FcConfigGetConfigDirs.3 +18 -0
  403. data/vendor/local/share/man/man3/FcConfigGetConfigFiles.3 +17 -0
  404. data/vendor/local/share/man/man3/FcConfigGetCurrent.3 +16 -0
  405. data/vendor/local/share/man/man3/FcConfigGetFontDirs.3 +19 -0
  406. data/vendor/local/share/man/man3/FcConfigGetFonts.3 +20 -0
  407. data/vendor/local/share/man/man3/FcConfigGetRescanInterval.3 +20 -0
  408. data/vendor/local/share/man/man3/FcConfigHome.3 +18 -0
  409. data/vendor/local/share/man/man3/FcConfigParseAndLoad.3 +23 -0
  410. data/vendor/local/share/man/man3/FcConfigReference.3 +21 -0
  411. data/vendor/local/share/man/man3/FcConfigSetCurrent.3 +17 -0
  412. data/vendor/local/share/man/man3/FcConfigSetRescanInterval.3 +20 -0
  413. data/vendor/local/share/man/man3/FcConfigSubstitute.3 +20 -0
  414. data/vendor/local/share/man/man3/FcConfigSubstituteWithPat.3 +24 -0
  415. data/vendor/local/share/man/man3/FcConfigUptoDate.3 +18 -0
  416. data/vendor/local/share/man/man3/FcDefaultSubstitute.3 +27 -0
  417. data/vendor/local/share/man/man3/FcDirCacheLoad.3 +21 -0
  418. data/vendor/local/share/man/man3/FcDirCacheLoadFile.3 +19 -0
  419. data/vendor/local/share/man/man3/FcDirCacheRead.3 +21 -0
  420. data/vendor/local/share/man/man3/FcDirCacheUnlink.3 +20 -0
  421. data/vendor/local/share/man/man3/FcDirCacheUnload.3 +17 -0
  422. data/vendor/local/share/man/man3/FcDirCacheValid.3 +17 -0
  423. data/vendor/local/share/man/man3/FcDirSave.3 +22 -0
  424. data/vendor/local/share/man/man3/FcDirScan.3 +26 -0
  425. data/vendor/local/share/man/man3/FcFileIsDir.3 +17 -0
  426. data/vendor/local/share/man/man3/FcFileScan.3 +31 -0
  427. data/vendor/local/share/man/man3/FcFini.3 +19 -0
  428. data/vendor/local/share/man/man3/FcFontList.3 +21 -0
  429. data/vendor/local/share/man/man3/FcFontMatch.3 +25 -0
  430. data/vendor/local/share/man/man3/FcFontRenderPrepare.3 +21 -0
  431. data/vendor/local/share/man/man3/FcFontSetAdd.3 +19 -0
  432. data/vendor/local/share/man/man3/FcFontSetCreate.3 +16 -0
  433. data/vendor/local/share/man/man3/FcFontSetDestroy.3 +17 -0
  434. data/vendor/local/share/man/man3/FcFontSetList.3 +25 -0
  435. data/vendor/local/share/man/man3/FcFontSetMatch.3 +28 -0
  436. data/vendor/local/share/man/man3/FcFontSetPrint.3 +19 -0
  437. data/vendor/local/share/man/man3/FcFontSetSort.3 +39 -0
  438. data/vendor/local/share/man/man3/FcFontSetSortDestroy.3 +19 -0
  439. data/vendor/local/share/man/man3/FcFontSort.3 +33 -0
  440. data/vendor/local/share/man/man3/FcFreeTypeCharIndex.3 +22 -0
  441. data/vendor/local/share/man/man3/FcFreeTypeCharSet.3 +21 -0
  442. data/vendor/local/share/man/man3/FcFreeTypeCharSetAndSpacing.3 +28 -0
  443. data/vendor/local/share/man/man3/FcFreeTypeQuery.3 +21 -0
  444. data/vendor/local/share/man/man3/FcFreeTypeQueryFace.3 +21 -0
  445. data/vendor/local/share/man/man3/FcGetLangs.3 +16 -0
  446. data/vendor/local/share/man/man3/FcGetVersion.3 +16 -0
  447. data/vendor/local/share/man/man3/FcInit.3 +19 -0
  448. data/vendor/local/share/man/man3/FcInitBringUptoDate.3 +19 -0
  449. data/vendor/local/share/man/man3/FcInitLoadConfig.3 +17 -0
  450. data/vendor/local/share/man/man3/FcInitLoadConfigAndFonts.3 +17 -0
  451. data/vendor/local/share/man/man3/FcInitReinitialize.3 +19 -0
  452. data/vendor/local/share/man/man3/FcIsLower.3 +17 -0
  453. data/vendor/local/share/man/man3/FcIsUpper.3 +17 -0
  454. data/vendor/local/share/man/man3/FcLangGetCharSet.3 +16 -0
  455. data/vendor/local/share/man/man3/FcLangSetAdd.3 +20 -0
  456. data/vendor/local/share/man/man3/FcLangSetCompare.3 +22 -0
  457. data/vendor/local/share/man/man3/FcLangSetContains.3 +22 -0
  458. data/vendor/local/share/man/man3/FcLangSetCopy.3 +17 -0
  459. data/vendor/local/share/man/man3/FcLangSetCreate.3 +16 -0
  460. data/vendor/local/share/man/man3/FcLangSetDestroy.3 +17 -0
  461. data/vendor/local/share/man/man3/FcLangSetEqual.3 +18 -0
  462. data/vendor/local/share/man/man3/FcLangSetGetLangs.3 +16 -0
  463. data/vendor/local/share/man/man3/FcLangSetHasLang.3 +23 -0
  464. data/vendor/local/share/man/man3/FcLangSetHash.3 +20 -0
  465. data/vendor/local/share/man/man3/FcMatrixCopy.3 +17 -0
  466. data/vendor/local/share/man/man3/FcMatrixEqual.3 +19 -0
  467. data/vendor/local/share/man/man3/FcMatrixInit.3 +17 -0
  468. data/vendor/local/share/man/man3/FcMatrixMultiply.3 +20 -0
  469. data/vendor/local/share/man/man3/FcMatrixRotate.3 +27 -0
  470. data/vendor/local/share/man/man3/FcMatrixScale.3 +27 -0
  471. data/vendor/local/share/man/man3/FcMatrixShear.3 +27 -0
  472. data/vendor/local/share/man/man3/FcNameConstant.3 +18 -0
  473. data/vendor/local/share/man/man3/FcNameGetConstant.3 +16 -0
  474. data/vendor/local/share/man/man3/FcNameGetObjectType.3 +16 -0
  475. data/vendor/local/share/man/man3/FcNameParse.3 +16 -0
  476. data/vendor/local/share/man/man3/FcNameRegisterConstants.3 +19 -0
  477. data/vendor/local/share/man/man3/FcNameRegisterObjectTypes.3 +19 -0
  478. data/vendor/local/share/man/man3/FcNameUnparse.3 +18 -0
  479. data/vendor/local/share/man/man3/FcNameUnregisterConstants.3 +19 -0
  480. data/vendor/local/share/man/man3/FcNameUnregisterObjectTypes.3 +17 -0
  481. data/vendor/local/share/man/man3/FcObjectSetAdd.3 +18 -0
  482. data/vendor/local/share/man/man3/FcObjectSetBuild.3 +26 -0
  483. data/vendor/local/share/man/man3/FcObjectSetCreate.3 +16 -0
  484. data/vendor/local/share/man/man3/FcObjectSetDestroy.3 +16 -0
  485. data/vendor/local/share/man/man3/FcPatternAdd-Type.3 +49 -0
  486. data/vendor/local/share/man/man3/FcPatternAdd.3 +23 -0
  487. data/vendor/local/share/man/man3/FcPatternAddWeak.3 +20 -0
  488. data/vendor/local/share/man/man3/FcPatternBuild.3 +50 -0
  489. data/vendor/local/share/man/man3/FcPatternCreate.3 +16 -0
  490. data/vendor/local/share/man/man3/FcPatternDel.3 +18 -0
  491. data/vendor/local/share/man/man3/FcPatternDestroy.3 +17 -0
  492. data/vendor/local/share/man/man3/FcPatternDuplicate.3 +18 -0
  493. data/vendor/local/share/man/man3/FcPatternEqual.3 +17 -0
  494. data/vendor/local/share/man/man3/FcPatternEqualSubset.3 +19 -0
  495. data/vendor/local/share/man/man3/FcPatternFilter.3 +20 -0
  496. data/vendor/local/share/man/man3/FcPatternFormat.3 +205 -0
  497. data/vendor/local/share/man/man3/FcPatternGet-Type.3 +56 -0
  498. data/vendor/local/share/man/man3/FcPatternGet.3 +22 -0
  499. data/vendor/local/share/man/man3/FcPatternHash.3 +17 -0
  500. data/vendor/local/share/man/man3/FcPatternPrint.3 +18 -0
  501. data/vendor/local/share/man/man3/FcPatternReference.3 +17 -0
  502. data/vendor/local/share/man/man3/FcPatternRemove.3 +19 -0
  503. data/vendor/local/share/man/man3/FcStrBasename.3 +18 -0
  504. data/vendor/local/share/man/man3/FcStrCmp.3 +18 -0
  505. data/vendor/local/share/man/man3/FcStrCmpIgnoreCase.3 +19 -0
  506. data/vendor/local/share/man/man3/FcStrCopy.3 +18 -0
  507. data/vendor/local/share/man/man3/FcStrCopyFilename.3 +23 -0
  508. data/vendor/local/share/man/man3/FcStrDirname.3 +18 -0
  509. data/vendor/local/share/man/man3/FcStrDowncase.3 +17 -0
  510. data/vendor/local/share/man/man3/FcStrFree.3 +17 -0
  511. data/vendor/local/share/man/man3/FcStrListCreate.3 +16 -0
  512. data/vendor/local/share/man/man3/FcStrListDone.3 +16 -0
  513. data/vendor/local/share/man/man3/FcStrListNext.3 +16 -0
  514. data/vendor/local/share/man/man3/FcStrPlus.3 +19 -0
  515. data/vendor/local/share/man/man3/FcStrSetAdd.3 +17 -0
  516. data/vendor/local/share/man/man3/FcStrSetAddFilename.3 +19 -0
  517. data/vendor/local/share/man/man3/FcStrSetCreate.3 +16 -0
  518. data/vendor/local/share/man/man3/FcStrSetDel.3 +18 -0
  519. data/vendor/local/share/man/man3/FcStrSetDestroy.3 +16 -0
  520. data/vendor/local/share/man/man3/FcStrSetEqual.3 +19 -0
  521. data/vendor/local/share/man/man3/FcStrSetMember.3 +18 -0
  522. data/vendor/local/share/man/man3/FcStrStr.3 +20 -0
  523. data/vendor/local/share/man/man3/FcStrStrIgnoreCase.3 +20 -0
  524. data/vendor/local/share/man/man3/FcToLower.3 +17 -0
  525. data/vendor/local/share/man/man3/FcUcs4ToUtf8.3 +19 -0
  526. data/vendor/local/share/man/man3/FcUtf16Len.3 +27 -0
  527. data/vendor/local/share/man/man3/FcUtf16ToUcs4.3 +23 -0
  528. data/vendor/local/share/man/man3/FcUtf8Len.3 +24 -0
  529. data/vendor/local/share/man/man3/FcUtf8ToUcs4.3 +21 -0
  530. data/vendor/local/share/man/man3/FcValueDestroy.3 +17 -0
  531. data/vendor/local/share/man/man3/FcValueEqual.3 +19 -0
  532. data/vendor/local/share/man/man3/FcValuePrint.3 +18 -0
  533. data/vendor/local/share/man/man3/FcValueSave.3 +17 -0
  534. data/vendor/local/share/man/man3/libpng.3 +4455 -0
  535. data/vendor/local/share/man/man3/libpngpf.3 +808 -0
  536. data/vendor/local/share/man/man5/fonts-conf.5 +644 -0
  537. data/vendor/local/share/man/man5/png.5 +74 -0
  538. data/vendor/local/src/tml/packaging/{cairo_1.10.0-1_win32.log → cairo_1.10.2-1_win32.log} +242 -235
  539. data/vendor/local/src/tml/packaging/{cairo_1.10.0-1_win32.sh → cairo_1.10.2-1_win32.sh} +11 -3
  540. data/vendor/local/src/tml/packaging/expat_2.0.1-1_win32.log +188 -0
  541. data/vendor/local/src/tml/packaging/expat_2.0.1-1_win32.sh +68 -0
  542. data/vendor/local/src/tml/packaging/fontconfig_2.8.0-2_win32.log +999 -0
  543. data/vendor/local/src/tml/packaging/fontconfig_2.8.0-2_win32.sh +79 -0
  544. data/vendor/local/src/tml/packaging/freetype_2.4.2-1_win32.log +364 -0
  545. data/vendor/local/src/tml/packaging/freetype_2.4.2-1_win32.sh +93 -0
  546. data/vendor/local/src/tml/packaging/libpng_1.4.3-1_win32.log +272 -0
  547. data/vendor/local/src/tml/packaging/libpng_1.4.3-1_win32.sh +71 -0
  548. data/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.log +42 -0
  549. data/vendor/local/src/tml/packaging/zlib_1.2.5-2_win32.sh +189 -0
  550. metadata +586 -122
  551. data/extconf.rb +0 -45
  552. data/misc/update-colors.rb +0 -143
  553. data/samples/agg/README +0 -4
  554. data/tmp/i386-mingw32/cairo/1.8.7/fake.rb +0 -6
  555. data/tmp/i386-mingw32/cairo/1.8.7/mkmf.rb +0 -1836
  556. data/tmp/i386-mingw32/cairo/1.8.7/rbconfig.rb +0 -183
  557. data/tmp/i386-mingw32/cairo/1.9.2/fake.rb +0 -6
  558. data/tmp/i386-mingw32/cairo/1.9.2/mkmf.rb +0 -2079
  559. data/tmp/i386-mingw32/cairo/1.9.2/rbconfig.rb +0 -226
  560. data/vendor/local/manifest/cairo_1.10.0-1_win32.mft +0 -5
@@ -1,183 +0,0 @@
1
-
2
- # This file was created by mkconfig.rb when ruby was built. Any
3
- # changes made to this file will be lost the next time ruby is built.
4
-
5
- module Config
6
- RUBY_VERSION == "1.8.7" or
7
- raise "ruby lib version (1.8.7) doesn't match executable version (#{RUBY_VERSION})"
8
-
9
- TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mingw32")
10
- DESTDIR = '' unless defined? DESTDIR
11
- CONFIG = {}
12
- CONFIG["DESTDIR"] = DESTDIR
13
- CONFIG["INSTALL"] = '/usr/bin/install -c'
14
- CONFIG["EXEEXT"] = ".exe"
15
- CONFIG["prefix"] = (TOPDIR || DESTDIR + "/home/kou/.rake-compiler/ruby/ruby-1.8.7-p302")
16
- CONFIG["ruby_install_name"] = "ruby"
17
- CONFIG["RUBY_INSTALL_NAME"] = "ruby"
18
- CONFIG["RUBY_SO_NAME"] = "msvcrt-ruby18"
19
- CONFIG["MANTYPE"] = "doc"
20
- CONFIG["NROFF"] = "/usr/bin/nroff"
21
- CONFIG["configure_args"] = " '--target=i386-mingw32' '--host=i586-mingw32msvc' '--build=i686-linux' '--enable-shared' '--disable-install-doc' '--without-tk' '--without-tcl' '--prefix=/home/kou/.rake-compiler/ruby/ruby-1.8.7-p302' 'build_alias=i686-linux' 'host_alias=i586-mingw32msvc' 'target_alias=i386-mingw32'"
22
- CONFIG["vendordir"] = "$(libdir)/ruby/vendor_ruby"
23
- CONFIG["sitedir"] = "$(libdir)/ruby/site_ruby"
24
- CONFIG["sitearch"] = "i386-msvcrt"
25
- CONFIG["arch"] = "i386-mingw32"
26
- CONFIG["MAKEFILES"] = "Makefile GNUmakefile"
27
- CONFIG["EXPORT_PREFIX"] = ""
28
- CONFIG["COMMON_HEADERS"] = "windows.h winsock.h"
29
- CONFIG["COMMON_MACROS"] = ""
30
- CONFIG["COMMON_LIBS"] = "m"
31
- CONFIG["MAINLIBS"] = ""
32
- CONFIG["ENABLE_SHARED"] = "yes"
33
- CONFIG["DLDLIBS"] = ""
34
- CONFIG["SOLIBS"] = "$(LIBS)"
35
- CONFIG["LIBRUBYARG_SHARED"] = "-l$(RUBY_SO_NAME)"
36
- CONFIG["LIBRUBYARG_STATIC"] = "-l$(RUBY_SO_NAME)-static"
37
- CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_SHARED)"
38
- CONFIG["LIBRUBY"] = "lib$(LIBRUBY_SO).a"
39
- CONFIG["LIBRUBY_ALIASES"] = ""
40
- CONFIG["LIBRUBY_SO"] = "$(RUBY_SO_NAME).dll"
41
- CONFIG["LIBRUBY_A"] = "lib$(RUBY_SO_NAME)-static.a"
42
- CONFIG["RUBYW_INSTALL_NAME"] = "rubyw"
43
- CONFIG["rubyw_install_name"] = "rubyw"
44
- CONFIG["LIBRUBY_DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBRUBY)"
45
- CONFIG["LIBRUBY_LDSHARED"] = "i586-mingw32msvc-gcc -shared -s"
46
- CONFIG["debugflags"] = ""
47
- CONFIG["optflags"] = ""
48
- CONFIG["cflags"] = "$(optflags) $(debugflags)"
49
- CONFIG["cppflags"] = ""
50
- CONFIG["RDOCTARGET"] = ""
51
- CONFIG["ARCHFILE"] = ""
52
- CONFIG["EXTOUT"] = ".ext"
53
- CONFIG["PREP"] = "fake.rb"
54
- CONFIG["setup"] = "Setup"
55
- CONFIG["EXTSTATIC"] = ""
56
- CONFIG["STRIP"] = "strip"
57
- CONFIG["TRY_LINK"] = ""
58
- CONFIG["LIBPATHENV"] = ""
59
- CONFIG["RPATHFLAG"] = ""
60
- CONFIG["LIBPATHFLAG"] = " -L%s"
61
- CONFIG["LINK_SO"] = ""
62
- CONFIG["LIBEXT"] = "a"
63
- CONFIG["DLEXT2"] = "dll"
64
- CONFIG["DLEXT"] = "so"
65
- CONFIG["LDSHARED"] = "i586-mingw32msvc-gcc -shared -s"
66
- CONFIG["CCDLFLAGS"] = ""
67
- CONFIG["STATIC"] = ""
68
- CONFIG["ARCH_FLAG"] = ""
69
- CONFIG["DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all"
70
- CONFIG["ALLOCA"] = ""
71
- CONFIG["MAKEDIRS"] = "mkdir -p"
72
- CONFIG["CP"] = "cp"
73
- CONFIG["RM"] = "rm -f"
74
- CONFIG["INSTALL_DATA"] = "$(INSTALL) -m 644"
75
- CONFIG["INSTALL_SCRIPT"] = "$(INSTALL)"
76
- CONFIG["INSTALL_PROGRAM"] = "$(INSTALL)"
77
- CONFIG["SET_MAKE"] = ""
78
- CONFIG["LN_S"] = "ln -s"
79
- CONFIG["OBJDUMP"] = "i586-mingw32msvc-objdump"
80
- CONFIG["DLLWRAP"] = "i586-mingw32msvc-dllwrap"
81
- CONFIG["WINDRES"] = "i586-mingw32msvc-windres"
82
- CONFIG["NM"] = "i586-mingw32msvc-nm"
83
- CONFIG["ASFLAGS"] = ""
84
- CONFIG["AS"] = "i586-mingw32msvc-as"
85
- CONFIG["AR"] = "i586-mingw32msvc-ar"
86
- CONFIG["RANLIB"] = "i586-mingw32msvc-ranlib"
87
- CONFIG["YFLAGS"] = ""
88
- CONFIG["YACC"] = "bison -y"
89
- CONFIG["OUTFLAG"] = "-o "
90
- CONFIG["CPPOUTFILE"] = "-o conftest.i"
91
- CONFIG["GNU_LD"] = "yes"
92
- CONFIG["EGREP"] = "/bin/grep -E"
93
- CONFIG["GREP"] = "/bin/grep"
94
- CONFIG["CPP"] = "i586-mingw32msvc-gcc -E"
95
- CONFIG["OBJEXT"] = "o"
96
- CONFIG["CPPFLAGS"] = " $(DEFS) $(cppflags)"
97
- CONFIG["LDFLAGS"] = "-L. "
98
- CONFIG["CFLAGS"] = "-g -O2 $(cflags)"
99
- CONFIG["CC"] = "i586-mingw32msvc-gcc"
100
- CONFIG["target_os"] = "mingw32"
101
- CONFIG["target_vendor"] = "pc"
102
- CONFIG["target_cpu"] = "i386"
103
- CONFIG["target"] = "i386-pc-mingw32"
104
- CONFIG["host_os"] = "mingw32msvc"
105
- CONFIG["host_vendor"] = "pc"
106
- CONFIG["host_cpu"] = "i586"
107
- CONFIG["host"] = "i586-pc-mingw32msvc"
108
- CONFIG["build_os"] = "linux"
109
- CONFIG["build_vendor"] = "pc"
110
- CONFIG["build_cpu"] = "i686"
111
- CONFIG["build"] = "i686-pc-linux"
112
- CONFIG["TEENY"] = "7"
113
- CONFIG["MINOR"] = "8"
114
- CONFIG["MAJOR"] = "1"
115
- CONFIG["target_alias"] = "i386-mingw32"
116
- CONFIG["host_alias"] = "i586-mingw32msvc"
117
- CONFIG["build_alias"] = "i686-linux"
118
- CONFIG["LIBS"] = "-lshell32 -lwsock32 "
119
- CONFIG["ECHO_T"] = ""
120
- CONFIG["ECHO_N"] = "-n"
121
- CONFIG["ECHO_C"] = ""
122
- CONFIG["DEFS"] = ""
123
- CONFIG["mandir"] = "$(datarootdir)/man"
124
- CONFIG["localedir"] = "$(datarootdir)/locale"
125
- CONFIG["libdir"] = "$(exec_prefix)/lib"
126
- CONFIG["psdir"] = "$(docdir)"
127
- CONFIG["pdfdir"] = "$(docdir)"
128
- CONFIG["dvidir"] = "$(docdir)"
129
- CONFIG["htmldir"] = "$(docdir)"
130
- CONFIG["infodir"] = "$(datarootdir)/info"
131
- CONFIG["docdir"] = "$(datarootdir)/doc/$(PACKAGE)"
132
- CONFIG["oldincludedir"] = "/usr/include"
133
- CONFIG["includedir"] = "$(prefix)/include"
134
- CONFIG["localstatedir"] = "$(prefix)/var"
135
- CONFIG["sharedstatedir"] = "$(prefix)/com"
136
- CONFIG["sysconfdir"] = "$(prefix)/etc"
137
- CONFIG["datadir"] = "$(datarootdir)"
138
- CONFIG["datarootdir"] = "$(prefix)/share"
139
- CONFIG["libexecdir"] = "$(exec_prefix)/libexec"
140
- CONFIG["sbindir"] = "$(exec_prefix)/sbin"
141
- CONFIG["bindir"] = "$(exec_prefix)/bin"
142
- CONFIG["exec_prefix"] = "$(prefix)"
143
- CONFIG["PACKAGE_URL"] = ""
144
- CONFIG["PACKAGE_BUGREPORT"] = ""
145
- CONFIG["PACKAGE_STRING"] = ""
146
- CONFIG["PACKAGE_VERSION"] = ""
147
- CONFIG["PACKAGE_TARNAME"] = ""
148
- CONFIG["PACKAGE_NAME"] = ""
149
- CONFIG["PATH_SEPARATOR"] = ":"
150
- CONFIG["SHELL"] = "/bin/bash"
151
- CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
152
- CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
153
- CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
154
- CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
155
- CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
156
- CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
157
- CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
158
- CONFIG["topdir"] = File.dirname(__FILE__)
159
- MAKEFILE_CONFIG = {}
160
- CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
161
- def Config::expand(val, config = CONFIG)
162
- val.gsub!(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) do |var|
163
- if !(v = $1 || $2)
164
- '$'
165
- elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]]
166
- pat, sub = $1, $2
167
- config[v] = false
168
- Config::expand(key, config)
169
- config[v] = key
170
- key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
171
- key
172
- else
173
- var
174
- end
175
- end
176
- val
177
- end
178
- CONFIG.each_value do |val|
179
- Config::expand(val)
180
- end
181
- end
182
- RbConfig = Config # compatibility for ruby-1.9
183
- CROSS_COMPILING = nil unless defined? CROSS_COMPILING
@@ -1,6 +0,0 @@
1
- class Object
2
- remove_const :RUBY_PLATFORM
3
- remove_const :RUBY_VERSION
4
- RUBY_PLATFORM = "i386-mingw32"
5
- RUBY_VERSION = "1.9.2"
6
- end
@@ -1,2079 +0,0 @@
1
- # -*- indent-tabs-mode: t -*-
2
- # module to create Makefile for extension modules
3
- # invoke like: ruby -r mkmf extconf.rb
4
-
5
- require 'rbconfig'
6
- require 'fileutils'
7
- require 'shellwords'
8
-
9
- CONFIG = RbConfig::MAKEFILE_CONFIG
10
- ORIG_LIBPATH = ENV['LIB']
11
-
12
- CXX_EXT = %w[cc cxx cpp]
13
- if File::FNM_SYSCASE.zero?
14
- CXX_EXT.concat(%w[C])
15
- end
16
- SRC_EXT = %w[c m].concat(CXX_EXT)
17
- $static = nil
18
- $config_h = '$(arch_hdrdir)/ruby/config.h'
19
- $default_static = $static
20
-
21
- unless defined? $configure_args
22
- $configure_args = {}
23
- args = CONFIG["configure_args"]
24
- if ENV["CONFIGURE_ARGS"]
25
- args << " " << ENV["CONFIGURE_ARGS"]
26
- end
27
- for arg in Shellwords::shellwords(args)
28
- arg, val = arg.split('=', 2)
29
- next unless arg
30
- arg.tr!('_', '-')
31
- if arg.sub!(/^(?!--)/, '--')
32
- val or next
33
- arg.downcase!
34
- end
35
- next if /^--(?:top|topsrc|src|cur)dir$/ =~ arg
36
- $configure_args[arg] = val || true
37
- end
38
- for arg in ARGV
39
- arg, val = arg.split('=', 2)
40
- next unless arg
41
- arg.tr!('_', '-')
42
- if arg.sub!(/^(?!--)/, '--')
43
- val or next
44
- arg.downcase!
45
- end
46
- $configure_args[arg] = val || true
47
- end
48
- end
49
-
50
- $libdir = CONFIG["libdir"]
51
- $rubylibdir = CONFIG["rubylibdir"]
52
- $archdir = CONFIG["archdir"]
53
- $sitedir = CONFIG["sitedir"]
54
- $sitelibdir = CONFIG["sitelibdir"]
55
- $sitearchdir = CONFIG["sitearchdir"]
56
- $vendordir = CONFIG["vendordir"]
57
- $vendorlibdir = CONFIG["vendorlibdir"]
58
- $vendorarchdir = CONFIG["vendorarchdir"]
59
-
60
- $mswin = /mswin/ =~ RUBY_PLATFORM
61
- $bccwin = /bccwin/ =~ RUBY_PLATFORM
62
- $mingw = /mingw/ =~ RUBY_PLATFORM
63
- $cygwin = /cygwin/ =~ RUBY_PLATFORM
64
- $netbsd = /netbsd/ =~ RUBY_PLATFORM
65
- $os2 = /os2/ =~ RUBY_PLATFORM
66
- $beos = /beos/ =~ RUBY_PLATFORM
67
- $haiku = /haiku/ =~ RUBY_PLATFORM
68
- $solaris = /solaris/ =~ RUBY_PLATFORM
69
- $universal = /universal/ =~ RUBY_PLATFORM
70
- $dest_prefix_pattern = (File::PATH_SEPARATOR == ';' ? /\A([[:alpha:]]:)?/ : /\A/)
71
-
72
- # :stopdoc:
73
-
74
- def config_string(key, config = CONFIG)
75
- s = config[key] and !s.empty? and block_given? ? yield(s) : s
76
- end
77
-
78
- def dir_re(dir)
79
- Regexp.new('\$(?:\('+dir+'\)|\{'+dir+'\})(?:\$(?:\(target_prefix\)|\{target_prefix\}))?')
80
- end
81
-
82
- def relative_from(path, base)
83
- dir = File.join(path, "")
84
- if File.expand_path(dir) == File.expand_path(dir, base)
85
- path
86
- else
87
- File.join(base, path)
88
- end
89
- end
90
-
91
- INSTALL_DIRS = [
92
- [dir_re('commondir'), "$(RUBYCOMMONDIR)"],
93
- [dir_re('sitedir'), "$(RUBYCOMMONDIR)"],
94
- [dir_re('vendordir'), "$(RUBYCOMMONDIR)"],
95
- [dir_re('rubylibdir'), "$(RUBYLIBDIR)"],
96
- [dir_re('archdir'), "$(RUBYARCHDIR)"],
97
- [dir_re('sitelibdir'), "$(RUBYLIBDIR)"],
98
- [dir_re('vendorlibdir'), "$(RUBYLIBDIR)"],
99
- [dir_re('sitearchdir'), "$(RUBYARCHDIR)"],
100
- [dir_re('vendorarchdir'), "$(RUBYARCHDIR)"],
101
- [dir_re('rubyhdrdir'), "$(RUBYHDRDIR)"],
102
- [dir_re('sitehdrdir'), "$(SITEHDRDIR)"],
103
- [dir_re('vendorhdrdir'), "$(VENDORHDRDIR)"],
104
- [dir_re('bindir'), "$(BINDIR)"],
105
- ]
106
-
107
- def install_dirs(target_prefix = nil)
108
- if $extout
109
- dirs = [
110
- ['BINDIR', '$(extout)/bin'],
111
- ['RUBYCOMMONDIR', '$(extout)/common'],
112
- ['RUBYLIBDIR', '$(RUBYCOMMONDIR)$(target_prefix)'],
113
- ['RUBYARCHDIR', '$(extout)/$(arch)$(target_prefix)'],
114
- ['HDRDIR', '$(extout)/include/ruby$(target_prefix)'],
115
- ['ARCHHDRDIR', '$(extout)/include/$(arch)/ruby$(target_prefix)'],
116
- ['extout', "#$extout"],
117
- ['extout_prefix', "#$extout_prefix"],
118
- ]
119
- elsif $extmk
120
- dirs = [
121
- ['BINDIR', '$(bindir)'],
122
- ['RUBYCOMMONDIR', '$(rubylibdir)'],
123
- ['RUBYLIBDIR', '$(rubylibdir)$(target_prefix)'],
124
- ['RUBYARCHDIR', '$(archdir)$(target_prefix)'],
125
- ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'],
126
- ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
127
- ]
128
- elsif $configure_args.has_key?('--vendor')
129
- dirs = [
130
- ['BINDIR', '$(bindir)'],
131
- ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'],
132
- ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'],
133
- ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'],
134
- ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'],
135
- ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
136
- ]
137
- else
138
- dirs = [
139
- ['BINDIR', '$(bindir)'],
140
- ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'],
141
- ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'],
142
- ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'],
143
- ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'],
144
- ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'],
145
- ]
146
- end
147
- dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")]
148
- dirs
149
- end
150
-
151
- def map_dir(dir, map = nil)
152
- map ||= INSTALL_DIRS
153
- map.inject(dir) {|d, (orig, new)| d.gsub(orig, new)}
154
- end
155
-
156
- topdir = File.dirname(libdir = File.dirname(__FILE__))
157
- extdir = File.expand_path("ext", topdir)
158
- path = File.expand_path($0)
159
- $extmk = path[0, topdir.size+1] == topdir+"/"
160
- $extmk &&= %r"\A(?:ext|enc|tool|test(?:/.+))\z" =~ File.dirname(path[topdir.size+1..-1])
161
- $extmk &&= true
162
- if not $extmk and File.exist?(($hdrdir = RbConfig::CONFIG["rubyhdrdir"]) + "/ruby/ruby.h")
163
- $topdir = $hdrdir
164
- $top_srcdir = $hdrdir
165
- $arch_hdrdir = $hdrdir + "/$(arch)"
166
- elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include") + "/ruby.h")
167
- $topdir ||= RbConfig::CONFIG["topdir"]
168
- $arch_hdrdir = "$(extout)/include/$(arch)"
169
- else
170
- abort "mkmf.rb can't find header files for ruby at #{$hdrdir}/ruby.h"
171
- end
172
-
173
- OUTFLAG = CONFIG['OUTFLAG']
174
- COUTFLAG = CONFIG['COUTFLAG']
175
- CPPOUTFILE = CONFIG['CPPOUTFILE']
176
-
177
- CONFTEST_C = "conftest.c".freeze
178
-
179
- class String
180
- # Wraps a string in escaped quotes if it contains whitespace.
181
- def quote
182
- /\s/ =~ self ? "\"#{self}\"" : "#{self}"
183
- end
184
-
185
- # Generates a string used as cpp macro name.
186
- def tr_cpp
187
- strip.upcase.tr_s("^A-Z0-9_", "_")
188
- end
189
- end
190
- class Array
191
- # Wraps all strings in escaped quotes if they contain whitespace.
192
- def quote
193
- map {|s| s.quote}
194
- end
195
- end
196
-
197
- def rm_f(*files)
198
- opt = (Hash === files.last ? [files.pop] : [])
199
- FileUtils.rm_f(Dir[*files.flatten], *opt)
200
- end
201
-
202
- def rm_rf(*files)
203
- opt = (Hash === files.last ? [files.pop] : [])
204
- FileUtils.rm_rf(Dir[*files.flatten], *opt)
205
- end
206
-
207
- # Returns time stamp of the +target+ file if it exists and is newer
208
- # than or equal to all of +times+.
209
- def modified?(target, times)
210
- (t = File.mtime(target)) rescue return nil
211
- Array === times or times = [times]
212
- t if times.all? {|n| n <= t}
213
- end
214
-
215
- def merge_libs(*libs)
216
- libs.inject([]) do |x, y|
217
- xy = x & y
218
- xn = yn = 0
219
- y = y.inject([]) {|ary, e| ary.last == e ? ary : ary << e}
220
- y.each_with_index do |v, yi|
221
- if xy.include?(v)
222
- xi = [x.index(v), xn].max()
223
- x[xi, 1] = y[yn..yi]
224
- xn, yn = xi + (yi - yn + 1), yi + 1
225
- end
226
- end
227
- x.concat(y[yn..-1] || [])
228
- end
229
- end
230
-
231
- # This is a custom logging module. It generates an mkmf.log file when you
232
- # run your extconf.rb script. This can be useful for debugging unexpected
233
- # failures.
234
- #
235
- # This module and its associated methods are meant for internal use only.
236
- #
237
- module Logging
238
- @log = nil
239
- @logfile = 'mkmf.log'
240
- @orgerr = $stderr.dup
241
- @orgout = $stdout.dup
242
- @postpone = 0
243
- @quiet = $extmk
244
-
245
- def self::log_open
246
- @log ||= File::open(@logfile, 'wb')
247
- @log.sync = true
248
- end
249
-
250
- def self::open
251
- log_open
252
- $stderr.reopen(@log)
253
- $stdout.reopen(@log)
254
- yield
255
- ensure
256
- $stderr.reopen(@orgerr)
257
- $stdout.reopen(@orgout)
258
- end
259
-
260
- def self::message(*s)
261
- log_open
262
- @log.printf(*s)
263
- end
264
-
265
- def self::logfile file
266
- @logfile = file
267
- if @log and not @log.closed?
268
- @log.flush
269
- @log.close
270
- @log = nil
271
- end
272
- end
273
-
274
- def self::postpone
275
- tmplog = "mkmftmp#{@postpone += 1}.log"
276
- open do
277
- log, *save = @log, @logfile, @orgout, @orgerr
278
- @log, @logfile, @orgout, @orgerr = nil, tmplog, log, log
279
- begin
280
- log.print(open {yield})
281
- ensure
282
- @log.close
283
- File::open(tmplog) {|t| FileUtils.copy_stream(t, log)}
284
- @log, @logfile, @orgout, @orgerr = log, *save
285
- @postpone -= 1
286
- rm_f tmplog
287
- end
288
- end
289
- end
290
-
291
- class << self
292
- attr_accessor :quiet
293
- end
294
- end
295
-
296
- def xsystem command
297
- varpat = /\$\((\w+)\)|\$\{(\w+)\}/
298
- if varpat =~ command
299
- vars = Hash.new {|h, k| h[k] = ''; ENV[k]}
300
- command = command.dup
301
- nil while command.gsub!(varpat) {vars[$1||$2]}
302
- end
303
- Logging::open do
304
- puts command.quote
305
- system(command)
306
- end
307
- end
308
-
309
- def xpopen command, *mode, &block
310
- Logging::open do
311
- case mode[0]
312
- when nil, /^r/
313
- puts "#{command} |"
314
- else
315
- puts "| #{command}"
316
- end
317
- IO.popen(command, *mode, &block)
318
- end
319
- end
320
-
321
- def log_src(src)
322
- src = src.split(/^/)
323
- fmt = "%#{src.size.to_s.size}d: %s"
324
- Logging::message <<"EOM"
325
- checked program was:
326
- /* begin */
327
- EOM
328
- src.each_with_index {|line, no| Logging::message fmt, no+1, line}
329
- Logging::message <<"EOM"
330
- /* end */
331
-
332
- EOM
333
- end
334
-
335
- def create_tmpsrc(src)
336
- src = "#{COMMON_HEADERS}\n#{src}"
337
- src = yield(src) if block_given?
338
- src.gsub!(/[ \t]+$/, '')
339
- src.gsub!(/\A\n+|^\n+$/, '')
340
- src.sub!(/[^\n]\z/, "\\&\n")
341
- count = 0
342
- begin
343
- open(CONFTEST_C, "wb") do |cfile|
344
- cfile.print src
345
- end
346
- rescue Errno::EACCES
347
- if (count += 1) < 5
348
- sleep 0.2
349
- retry
350
- end
351
- end
352
- src
353
- end
354
-
355
- def have_devel?
356
- unless defined? $have_devel
357
- $have_devel = true
358
- $have_devel = try_link(MAIN_DOES_NOTHING)
359
- end
360
- $have_devel
361
- end
362
-
363
- def try_do(src, command, &b)
364
- unless have_devel?
365
- raise <<MSG
366
- The complier failed to generate an executable file.
367
- You have to install development tools first.
368
- MSG
369
- end
370
- begin
371
- src = create_tmpsrc(src, &b)
372
- xsystem(command)
373
- ensure
374
- log_src(src)
375
- rm_rf 'conftest.dSYM'
376
- end
377
- end
378
-
379
- def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
380
- conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote,
381
- 'src' => "#{CONFTEST_C}",
382
- 'arch_hdrdir' => "#$arch_hdrdir",
383
- 'top_srcdir' => $top_srcdir.quote,
384
- 'INCFLAGS' => "#$INCFLAGS",
385
- 'CPPFLAGS' => "#$CPPFLAGS",
386
- 'CFLAGS' => "#$CFLAGS",
387
- 'ARCH_FLAG' => "#$ARCH_FLAG",
388
- 'LDFLAGS' => "#$LDFLAGS #{ldflags}",
389
- 'LIBPATH' => libpathflag(libpath),
390
- 'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
391
- 'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS")
392
- RbConfig::expand(TRY_LINK.dup, conf)
393
- end
394
-
395
- def cc_command(opt="")
396
- conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote,
397
- 'arch_hdrdir' => "#$arch_hdrdir",
398
- 'top_srcdir' => $top_srcdir.quote)
399
- RbConfig::expand("$(CC) #$INCFLAGS #$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_C}",
400
- conf)
401
- end
402
-
403
- def cpp_command(outfile, opt="")
404
- conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote,
405
- 'arch_hdrdir' => "#$arch_hdrdir",
406
- 'top_srcdir' => $top_srcdir.quote)
407
- RbConfig::expand("$(CPP) #$INCFLAGS #$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C} #{outfile}",
408
- conf)
409
- end
410
-
411
- def libpathflag(libpath=$DEFLIBPATH|$LIBPATH)
412
- libpath.map{|x|
413
- case x
414
- when "$(topdir)", /\A\./
415
- LIBPATHFLAG
416
- else
417
- LIBPATHFLAG+RPATHFLAG
418
- end % x.quote
419
- }.join
420
- end
421
-
422
- def try_link0(src, opt="", &b)
423
- cmd = link_command("", opt)
424
- if $universal
425
- require 'tmpdir'
426
- Dir.mktmpdir("mkmf_", oldtmpdir = ENV["TMPDIR"]) do |tmpdir|
427
- begin
428
- ENV["TMPDIR"] = tmpdir
429
- try_do(src, cmd, &b)
430
- ensure
431
- ENV["TMPDIR"] = oldtmpdir
432
- end
433
- end
434
- else
435
- try_do(src, cmd, &b)
436
- end
437
- end
438
-
439
- def try_link(src, opt="", &b)
440
- try_link0(src, opt, &b)
441
- ensure
442
- rm_f "conftest*", "c0x32*"
443
- end
444
-
445
- def try_compile(src, opt="", &b)
446
- try_do(src, cc_command(opt), &b)
447
- ensure
448
- rm_f "conftest*"
449
- end
450
-
451
- def try_cpp(src, opt="", &b)
452
- try_do(src, cpp_command(CPPOUTFILE, opt), &b)
453
- ensure
454
- rm_f "conftest*"
455
- end
456
-
457
- class Object
458
- alias_method :try_header, (config_string('try_header') || :try_cpp)
459
- end
460
-
461
- def cpp_include(header)
462
- if header
463
- header = [header] unless header.kind_of? Array
464
- header.map {|h| String === h ? "#include <#{h}>\n" : h}.join
465
- else
466
- ""
467
- end
468
- end
469
-
470
- def with_cppflags(flags)
471
- cppflags = $CPPFLAGS
472
- $CPPFLAGS = flags
473
- ret = yield
474
- ensure
475
- $CPPFLAGS = cppflags unless ret
476
- end
477
-
478
- def with_cflags(flags)
479
- cflags = $CFLAGS
480
- $CFLAGS = flags
481
- ret = yield
482
- ensure
483
- $CFLAGS = cflags unless ret
484
- end
485
-
486
- def with_ldflags(flags)
487
- ldflags = $LDFLAGS
488
- $LDFLAGS = flags
489
- ret = yield
490
- ensure
491
- $LDFLAGS = ldflags unless ret
492
- end
493
-
494
- def try_static_assert(expr, headers = nil, opt = "", &b)
495
- headers = cpp_include(headers)
496
- try_compile(<<SRC, opt, &b)
497
- #{headers}
498
- /*top*/
499
- int conftest_const[(#{expr}) ? 1 : -1];
500
- SRC
501
- end
502
-
503
- def try_constant(const, headers = nil, opt = "", &b)
504
- includes = cpp_include(headers)
505
- if CROSS_COMPILING
506
- if try_static_assert("#{const} > 0", headers, opt)
507
- # positive constant
508
- elsif try_static_assert("#{const} < 0", headers, opt)
509
- neg = true
510
- const = "-(#{const})"
511
- elsif try_static_assert("#{const} == 0", headers, opt)
512
- return 0
513
- else
514
- # not a constant
515
- return nil
516
- end
517
- upper = 1
518
- lower = 0
519
- until try_static_assert("#{const} <= #{upper}", headers, opt)
520
- lower = upper
521
- upper <<= 1
522
- end
523
- return nil unless lower
524
- while upper > lower + 1
525
- mid = (upper + lower) / 2
526
- if try_static_assert("#{const} > #{mid}", headers, opt)
527
- lower = mid
528
- else
529
- upper = mid
530
- end
531
- end
532
- upper = -upper if neg
533
- return upper
534
- else
535
- src = %{#{includes}
536
- #include <stdio.h>
537
- /*top*/
538
- int conftest_const = (int)(#{const});
539
- int main() {printf("%d\\n", conftest_const); return 0;}
540
- }
541
- if try_link0(src, opt, &b)
542
- xpopen("./conftest") do |f|
543
- return Integer(f.gets)
544
- end
545
- end
546
- end
547
- nil
548
- end
549
-
550
- def try_func(func, libs, headers = nil, &b)
551
- headers = cpp_include(headers)
552
- try_link(<<"SRC", libs, &b) or
553
- #{headers}
554
- /*top*/
555
- #{MAIN_DOES_NOTHING}
556
- int t() { void ((*volatile p)()); p = (void ((*)()))#{func}; return 0; }
557
- SRC
558
- try_link(<<"SRC", libs, &b)
559
- #{headers}
560
- /*top*/
561
- #{MAIN_DOES_NOTHING}
562
- int t() { #{func}(); return 0; }
563
- SRC
564
- end
565
-
566
- def try_var(var, headers = nil, &b)
567
- headers = cpp_include(headers)
568
- try_compile(<<"SRC", &b)
569
- #{headers}
570
- /*top*/
571
- #{MAIN_DOES_NOTHING}
572
- int t() { const volatile void *volatile p; p = &(&#{var})[0]; return 0; }
573
- SRC
574
- end
575
-
576
- def egrep_cpp(pat, src, opt = "", &b)
577
- src = create_tmpsrc(src, &b)
578
- xpopen(cpp_command('', opt)) do |f|
579
- if Regexp === pat
580
- puts(" ruby -ne 'print if #{pat.inspect}'")
581
- f.grep(pat) {|l|
582
- puts "#{f.lineno}: #{l}"
583
- return true
584
- }
585
- false
586
- else
587
- puts(" egrep '#{pat}'")
588
- begin
589
- stdin = $stdin.dup
590
- $stdin.reopen(f)
591
- system("egrep", pat)
592
- ensure
593
- $stdin.reopen(stdin)
594
- end
595
- end
596
- end
597
- ensure
598
- rm_f "conftest*"
599
- log_src(src)
600
- end
601
-
602
- # This is used internally by the have_macro? method.
603
- def macro_defined?(macro, src, opt = "", &b)
604
- src = src.sub(/[^\n]\z/, "\\&\n")
605
- try_compile(src + <<"SRC", opt, &b)
606
- /*top*/
607
- #ifndef #{macro}
608
- # error
609
- >>>>>> #{macro} undefined <<<<<<
610
- #endif
611
- SRC
612
- end
613
-
614
- def try_run(src, opt = "", &b)
615
- if try_link0(src, opt, &b)
616
- xsystem("./conftest")
617
- else
618
- nil
619
- end
620
- ensure
621
- rm_f "conftest*"
622
- end
623
-
624
- def install_files(mfile, ifiles, map = nil, srcprefix = nil)
625
- ifiles or return
626
- ifiles.empty? and return
627
- srcprefix ||= "$(srcdir)/#{srcprefix}".chomp('/')
628
- RbConfig::expand(srcdir = srcprefix.dup)
629
- dirs = []
630
- path = Hash.new {|h, i| h[i] = dirs.push([i])[-1]}
631
- ifiles.each do |files, dir, prefix|
632
- dir = map_dir(dir, map)
633
- prefix &&= %r|\A#{Regexp.quote(prefix)}/?|
634
- if /\A\.\// =~ files
635
- # install files which are in current working directory.
636
- files = files[2..-1]
637
- len = nil
638
- else
639
- # install files which are under the $(srcdir).
640
- files = File.join(srcdir, files)
641
- len = srcdir.size
642
- end
643
- f = nil
644
- Dir.glob(files) do |fx|
645
- f = fx
646
- f[0..len] = "" if len
647
- case File.basename(f)
648
- when *$NONINSTALLFILES
649
- next
650
- end
651
- d = File.dirname(f)
652
- d.sub!(prefix, "") if prefix
653
- d = (d.empty? || d == ".") ? dir : File.join(dir, d)
654
- f = File.join(srcprefix, f) if len
655
- path[d] << f
656
- end
657
- unless len or f
658
- d = File.dirname(files)
659
- d.sub!(prefix, "") if prefix
660
- d = (d.empty? || d == ".") ? dir : File.join(dir, d)
661
- path[d] << files
662
- end
663
- end
664
- dirs
665
- end
666
-
667
- def install_rb(mfile, dest, srcdir = nil)
668
- install_files(mfile, [["lib/**/*.rb", dest, "lib"]], nil, srcdir)
669
- end
670
-
671
- def append_library(libs, lib) # :no-doc:
672
- format(LIBARG, lib) + " " + libs
673
- end
674
-
675
- def message(*s)
676
- unless Logging.quiet and not $VERBOSE
677
- printf(*s)
678
- $stdout.flush
679
- end
680
- end
681
-
682
- # This emits a string to stdout that allows users to see the results of the
683
- # various have* and find* methods as they are tested.
684
- #
685
- # Internal use only.
686
- #
687
- def checking_for(m, fmt = nil)
688
- f = caller[0][/in `([^<].*)'$/, 1] and f << ": " #` for vim #'
689
- m = "checking #{/\Acheck/ =~ f ? '' : 'for '}#{m}... "
690
- message "%s", m
691
- a = r = nil
692
- Logging::postpone do
693
- r = yield
694
- a = (fmt ? fmt % r : r ? "yes" : "no") << "\n"
695
- "#{f}#{m}-------------------- #{a}\n"
696
- end
697
- message(a)
698
- Logging::message "--------------------\n\n"
699
- r
700
- end
701
-
702
- def checking_message(target, place = nil, opt = nil)
703
- [["in", place], ["with", opt]].inject("#{target}") do |msg, (pre, noun)|
704
- if noun
705
- [[:to_str], [:join, ","], [:to_s]].each do |meth, *args|
706
- if noun.respond_to?(meth)
707
- break noun = noun.send(meth, *args)
708
- end
709
- end
710
- msg << " #{pre} #{noun}" unless noun.empty?
711
- end
712
- msg
713
- end
714
- end
715
-
716
- # :startdoc:
717
-
718
- # Returns whether or not +macro+ is defined either in the common header
719
- # files or within any +headers+ you provide.
720
- #
721
- # Any options you pass to +opt+ are passed along to the compiler.
722
- #
723
- def have_macro(macro, headers = nil, opt = "", &b)
724
- checking_for checking_message(macro, headers, opt) do
725
- macro_defined?(macro, cpp_include(headers), opt, &b)
726
- end
727
- end
728
-
729
- # Returns whether or not the given entry point +func+ can be found within
730
- # +lib+. If +func+ is nil, the 'main()' entry point is used by default.
731
- # If found, it adds the library to list of libraries to be used when linking
732
- # your extension.
733
- #
734
- # If +headers+ are provided, it will include those header files as the
735
- # header files it looks in when searching for +func+.
736
- #
737
- # The real name of the library to be linked can be altered by
738
- # '--with-FOOlib' configuration option.
739
- #
740
- def have_library(lib, func = nil, headers = nil, &b)
741
- func = "main" if !func or func.empty?
742
- lib = with_config(lib+'lib', lib)
743
- checking_for checking_message("#{func}()", LIBARG%lib) do
744
- if COMMON_LIBS.include?(lib)
745
- true
746
- else
747
- libs = append_library($libs, lib)
748
- if try_func(func, libs, headers, &b)
749
- $libs = libs
750
- true
751
- else
752
- false
753
- end
754
- end
755
- end
756
- end
757
-
758
- # Returns whether or not the entry point +func+ can be found within the library
759
- # +lib+ in one of the +paths+ specified, where +paths+ is an array of strings.
760
- # If +func+ is nil , then the main() function is used as the entry point.
761
- #
762
- # If +lib+ is found, then the path it was found on is added to the list of
763
- # library paths searched and linked against.
764
- #
765
- def find_library(lib, func, *paths, &b)
766
- func = "main" if !func or func.empty?
767
- lib = with_config(lib+'lib', lib)
768
- paths = paths.collect {|path| path.split(File::PATH_SEPARATOR)}.flatten
769
- checking_for "#{func}() in #{LIBARG%lib}" do
770
- libpath = $LIBPATH
771
- libs = append_library($libs, lib)
772
- begin
773
- until r = try_func(func, libs, &b) or paths.empty?
774
- $LIBPATH = libpath | [paths.shift]
775
- end
776
- if r
777
- $libs = libs
778
- libpath = nil
779
- end
780
- ensure
781
- $LIBPATH = libpath if libpath
782
- end
783
- r
784
- end
785
- end
786
-
787
- # Returns whether or not the function +func+ can be found in the common
788
- # header files, or within any +headers+ that you provide. If found, a
789
- # macro is passed as a preprocessor constant to the compiler using the
790
- # function name, in uppercase, prepended with 'HAVE_'.
791
- #
792
- # For example, if have_func('foo') returned true, then the HAVE_FOO
793
- # preprocessor macro would be passed to the compiler.
794
- #
795
- def have_func(func, headers = nil, &b)
796
- checking_for checking_message("#{func}()", headers) do
797
- if try_func(func, $libs, headers, &b)
798
- $defs.push(format("-DHAVE_%s", func.tr_cpp))
799
- true
800
- else
801
- false
802
- end
803
- end
804
- end
805
-
806
- # Returns whether or not the variable +var+ can be found in the common
807
- # header files, or within any +headers+ that you provide. If found, a
808
- # macro is passed as a preprocessor constant to the compiler using the
809
- # variable name, in uppercase, prepended with 'HAVE_'.
810
- #
811
- # For example, if have_var('foo') returned true, then the HAVE_FOO
812
- # preprocessor macro would be passed to the compiler.
813
- #
814
- def have_var(var, headers = nil, &b)
815
- checking_for checking_message(var, headers) do
816
- if try_var(var, headers, &b)
817
- $defs.push(format("-DHAVE_%s", var.tr_cpp))
818
- true
819
- else
820
- false
821
- end
822
- end
823
- end
824
-
825
- # Returns whether or not the given +header+ file can be found on your system.
826
- # If found, a macro is passed as a preprocessor constant to the compiler using
827
- # the header file name, in uppercase, prepended with 'HAVE_'.
828
- #
829
- # For example, if have_header('foo.h') returned true, then the HAVE_FOO_H
830
- # preprocessor macro would be passed to the compiler.
831
- #
832
- def have_header(header, preheaders = nil, &b)
833
- checking_for header do
834
- if try_header(cpp_include(preheaders)+cpp_include(header), &b)
835
- $defs.push(format("-DHAVE_%s", header.tr_cpp))
836
- true
837
- else
838
- false
839
- end
840
- end
841
- end
842
-
843
- # Instructs mkmf to search for the given +header+ in any of the +paths+
844
- # provided, and returns whether or not it was found in those paths.
845
- #
846
- # If the header is found then the path it was found on is added to the list
847
- # of included directories that are sent to the compiler (via the -I switch).
848
- #
849
- def find_header(header, *paths)
850
- message = checking_message(header, paths)
851
- header = cpp_include(header)
852
- checking_for message do
853
- if try_header(header)
854
- true
855
- else
856
- found = false
857
- paths.each do |dir|
858
- opt = "-I#{dir}".quote
859
- if try_header(header, opt)
860
- $INCFLAGS << " " << opt
861
- found = true
862
- break
863
- end
864
- end
865
- found
866
- end
867
- end
868
- end
869
-
870
- # Returns whether or not the struct of type +type+ contains +member+. If
871
- # it does not, or the struct type can't be found, then false is returned. You
872
- # may optionally specify additional +headers+ in which to look for the struct
873
- # (in addition to the common header files).
874
- #
875
- # If found, a macro is passed as a preprocessor constant to the compiler using
876
- # the type name and the member name, in uppercase, prepended with 'HAVE_'.
877
- #
878
- # For example, if have_struct_member('struct foo', 'bar') returned true, then the
879
- # HAVE_STRUCT_FOO_BAR preprocessor macro would be passed to the compiler.
880
- #
881
- # HAVE_ST_BAR is also defined for backward compatibility.
882
- #
883
- def have_struct_member(type, member, headers = nil, &b)
884
- checking_for checking_message("#{type}.#{member}", headers) do
885
- if try_compile(<<"SRC", &b)
886
- #{cpp_include(headers)}
887
- /*top*/
888
- #{MAIN_DOES_NOTHING}
889
- int s = (char *)&((#{type}*)0)->#{member} - (char *)0;
890
- SRC
891
- $defs.push(format("-DHAVE_%s_%s", type.tr_cpp, member.tr_cpp))
892
- $defs.push(format("-DHAVE_ST_%s", member.tr_cpp)) # backward compatibility
893
- true
894
- else
895
- false
896
- end
897
- end
898
- end
899
-
900
- def try_type(type, headers = nil, opt = "", &b)
901
- if try_compile(<<"SRC", opt, &b)
902
- #{cpp_include(headers)}
903
- /*top*/
904
- typedef #{type} conftest_type;
905
- int conftestval[sizeof(conftest_type)?1:-1];
906
- SRC
907
- $defs.push(format("-DHAVE_TYPE_%s", type.tr_cpp))
908
- true
909
- else
910
- false
911
- end
912
- end
913
-
914
- # Returns whether or not the static type +type+ is defined. You may
915
- # optionally pass additional +headers+ to check against in addition to the
916
- # common header files.
917
- #
918
- # You may also pass additional flags to +opt+ which are then passed along to
919
- # the compiler.
920
- #
921
- # If found, a macro is passed as a preprocessor constant to the compiler using
922
- # the type name, in uppercase, prepended with 'HAVE_TYPE_'.
923
- #
924
- # For example, if have_type('foo') returned true, then the HAVE_TYPE_FOO
925
- # preprocessor macro would be passed to the compiler.
926
- #
927
- def have_type(type, headers = nil, opt = "", &b)
928
- checking_for checking_message(type, headers, opt) do
929
- try_type(type, headers, opt, &b)
930
- end
931
- end
932
-
933
- # Returns where the static type +type+ is defined.
934
- #
935
- # You may also pass additional flags to +opt+ which are then passed along to
936
- # the compiler.
937
- #
938
- # See also +have_type+.
939
- #
940
- def find_type(type, opt, *headers, &b)
941
- opt ||= ""
942
- fmt = "not found"
943
- def fmt.%(x)
944
- x ? x.respond_to?(:join) ? x.join(",") : x : self
945
- end
946
- checking_for checking_message(type, nil, opt), fmt do
947
- headers.find do |h|
948
- try_type(type, h, opt, &b)
949
- end
950
- end
951
- end
952
-
953
- def try_const(const, headers = nil, opt = "", &b)
954
- const, type = *const
955
- if try_compile(<<"SRC", opt, &b)
956
- #{cpp_include(headers)}
957
- /*top*/
958
- typedef #{type || 'int'} conftest_type;
959
- conftest_type conftestval = #{type ? '' : '(int)'}#{const};
960
- SRC
961
- $defs.push(format("-DHAVE_CONST_%s", const.tr_cpp))
962
- true
963
- else
964
- false
965
- end
966
- end
967
-
968
- # Returns whether or not the constant +const+ is defined. You may
969
- # optionally pass the +type+ of +const+ as <code>[const, type]</code>,
970
- # like as:
971
- #
972
- # have_const(%w[PTHREAD_MUTEX_INITIALIZER pthread_mutex_t], "pthread.h")
973
- #
974
- # You may also pass additional +headers+ to check against in addition
975
- # to the common header files, and additional flags to +opt+ which are
976
- # then passed along to the compiler.
977
- #
978
- # If found, a macro is passed as a preprocessor constant to the compiler using
979
- # the type name, in uppercase, prepended with 'HAVE_CONST_'.
980
- #
981
- # For example, if have_const('foo') returned true, then the HAVE_CONST_FOO
982
- # preprocessor macro would be passed to the compiler.
983
- #
984
- def have_const(const, headers = nil, opt = "", &b)
985
- checking_for checking_message([*const].compact.join(' '), headers, opt) do
986
- try_const(const, headers, opt, &b)
987
- end
988
- end
989
-
990
- STRING_OR_FAILED_FORMAT = "%s"
991
- # :stopdoc:
992
- def STRING_OR_FAILED_FORMAT.%(x)
993
- x ? super : "failed"
994
- end
995
- # :startdoc:
996
-
997
- # Returns the size of the given +type+. You may optionally specify additional
998
- # +headers+ to search in for the +type+.
999
- #
1000
- # If found, a macro is passed as a preprocessor constant to the compiler using
1001
- # the type name, in uppercase, prepended with 'SIZEOF_', followed by the type
1002
- # name, followed by '=X' where 'X' is the actual size.
1003
- #
1004
- # For example, if check_sizeof('mystruct') returned 12, then the
1005
- # SIZEOF_MYSTRUCT=12 preprocessor macro would be passed to the compiler.
1006
- #
1007
- def check_sizeof(type, headers = nil, opts = "", &b)
1008
- typename, member = type.split('.', 2)
1009
- prelude = cpp_include(headers).split(/$/)
1010
- prelude << "typedef #{typename} rbcv_typedef_;\n"
1011
- prelude << "static rbcv_typedef_ *rbcv_ptr_;\n"
1012
- prelude = [prelude]
1013
- expr = "sizeof((*rbcv_ptr_)#{"." << member if member})"
1014
- fmt = STRING_OR_FAILED_FORMAT
1015
- checking_for checking_message("size of #{type}", headers), fmt do
1016
- if UNIVERSAL_INTS.include?(type)
1017
- type
1018
- elsif size = UNIVERSAL_INTS.find {|t|
1019
- try_static_assert("#{expr} == sizeof(#{t})", prelude, opts, &b)
1020
- }
1021
- $defs.push(format("-DSIZEOF_%s=SIZEOF_%s", type.tr_cpp, size.tr_cpp))
1022
- size
1023
- elsif size = try_constant(expr, prelude, opts, &b)
1024
- $defs.push(format("-DSIZEOF_%s=%s", type.tr_cpp, size))
1025
- size
1026
- end
1027
- end
1028
- end
1029
-
1030
- # Returns the signedness of the given +type+. You may optionally
1031
- # specify additional +headers+ to search in for the +type+.
1032
- #
1033
- # If the +type+ is found and is a numeric type, a macro is passed as a
1034
- # preprocessor constant to the compiler using the +type+ name, in
1035
- # uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+
1036
- # name, followed by '=X' where 'X' is positive integer if the +type+ is
1037
- # unsigned, or negative integer if the +type+ is signed.
1038
- #
1039
- # For example, if size_t is defined as unsigned, then
1040
- # check_signedness('size_t') would returned +1 and the
1041
- # SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
1042
- # compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
1043
- # done.
1044
- #
1045
- def check_signedness(type, headers = nil)
1046
- signed = nil
1047
- checking_for("signedness of #{type}", STRING_OR_FAILED_FORMAT) do
1048
- if try_static_assert("(#{type})-1 < 0")
1049
- signed = -1
1050
- elsif try_static_assert("(#{type})-1 > 0")
1051
- signed = +1
1052
- else
1053
- next nil
1054
- end
1055
- $defs.push("-DSIGNEDNESS_OF_%s=%+d" % [type.tr_cpp, signed])
1056
- signed < 0 ? "signed" : "unsigned"
1057
- end
1058
- signed
1059
- end
1060
-
1061
- # :stopdoc:
1062
-
1063
- # Used internally by the what_type? method to determine if +type+ is a scalar
1064
- # pointer.
1065
- def scalar_ptr_type?(type, member = nil, headers = nil, &b)
1066
- try_compile(<<"SRC", &b) # pointer
1067
- #{cpp_include(headers)}
1068
- /*top*/
1069
- volatile #{type} conftestval;
1070
- #{MAIN_DOES_NOTHING}
1071
- int t() {return (int)(1-*(conftestval#{member ? ".#{member}" : ""}));}
1072
- SRC
1073
- end
1074
-
1075
- # Used internally by the what_type? method to determine if +type+ is a scalar
1076
- # pointer.
1077
- def scalar_type?(type, member = nil, headers = nil, &b)
1078
- try_compile(<<"SRC", &b) # pointer
1079
- #{cpp_include(headers)}
1080
- /*top*/
1081
- volatile #{type} conftestval;
1082
- #{MAIN_DOES_NOTHING}
1083
- int t() {return (int)(1-(conftestval#{member ? ".#{member}" : ""}));}
1084
- SRC
1085
- end
1086
-
1087
- # Used internally by the what_type? method to check if _typeof_ GCC
1088
- # extension is available.
1089
- def have_typeof?
1090
- return $typeof if defined?($typeof)
1091
- $typeof = %w[__typeof__ typeof].find do |t|
1092
- try_compile(<<SRC)
1093
- int rbcv_foo;
1094
- #{t}(rbcv_foo) rbcv_bar;
1095
- SRC
1096
- end
1097
- end
1098
-
1099
- def what_type?(type, member = nil, headers = nil, &b)
1100
- m = "#{type}"
1101
- var = val = "*rbcv_var_"
1102
- func = "rbcv_func_(void)"
1103
- if member
1104
- m << "." << member
1105
- else
1106
- type, member = type.split('.', 2)
1107
- end
1108
- if member
1109
- val = "(#{var}).#{member}"
1110
- end
1111
- prelude = [cpp_include(headers).split(/^/)]
1112
- prelude << ["typedef #{type} rbcv_typedef_;\n",
1113
- "extern rbcv_typedef_ *#{func};\n",
1114
- "static rbcv_typedef_ #{var};\n",
1115
- ]
1116
- type = "rbcv_typedef_"
1117
- fmt = member && !(typeof = have_typeof?) ? "seems %s" : "%s"
1118
- if typeof
1119
- var = "*rbcv_member_"
1120
- func = "rbcv_mem_func_(void)"
1121
- member = nil
1122
- type = "rbcv_mem_typedef_"
1123
- prelude[-1] << "typedef #{typeof}(#{val}) #{type};\n"
1124
- prelude[-1] << "extern #{type} *#{func};\n"
1125
- prelude[-1] << "static #{type} #{var};\n"
1126
- val = var
1127
- end
1128
- def fmt.%(x)
1129
- x ? super : "unknown"
1130
- end
1131
- checking_for checking_message(m, headers), fmt do
1132
- if scalar_ptr_type?(type, member, prelude, &b)
1133
- if try_static_assert("sizeof(*#{var}) == 1", prelude)
1134
- return "string"
1135
- end
1136
- ptr = "*"
1137
- elsif scalar_type?(type, member, prelude, &b)
1138
- unless member and !typeof or try_static_assert("(#{type})-1 < 0", prelude)
1139
- unsigned = "unsigned"
1140
- end
1141
- ptr = ""
1142
- else
1143
- next
1144
- end
1145
- type = UNIVERSAL_INTS.find do |t|
1146
- pre = prelude
1147
- unless member
1148
- pre += [["static #{unsigned} #{t} #{ptr}#{var};\n",
1149
- "extern #{unsigned} #{t} #{ptr}*#{func};\n"]]
1150
- end
1151
- try_static_assert("sizeof(#{ptr}#{val}) == sizeof(#{unsigned} #{t})", pre)
1152
- end
1153
- type or next
1154
- [unsigned, type, ptr].join(" ").strip
1155
- end
1156
- end
1157
-
1158
- # This method is used internally by the find_executable method.
1159
- #
1160
- # Internal use only.
1161
- #
1162
- def find_executable0(bin, path = nil)
1163
- exts = config_string('EXECUTABLE_EXTS') {|s| s.split} || config_string('EXEEXT') {|s| [s]}
1164
- if File.expand_path(bin) == bin
1165
- return bin if File.executable?(bin)
1166
- if exts
1167
- exts.each {|ext| File.executable?(file = bin + ext) and return file}
1168
- end
1169
- return nil
1170
- end
1171
- if path ||= ENV['PATH']
1172
- path = path.split(File::PATH_SEPARATOR)
1173
- else
1174
- path = %w[/usr/local/bin /usr/ucb /usr/bin /bin]
1175
- end
1176
- file = nil
1177
- path.each do |dir|
1178
- return file if File.executable?(file = File.join(dir, bin))
1179
- if exts
1180
- exts.each {|ext| File.executable?(ext = file + ext) and return ext}
1181
- end
1182
- end
1183
- nil
1184
- end
1185
-
1186
- # :startdoc:
1187
-
1188
- # Searches for the executable +bin+ on +path+. The default path is your
1189
- # PATH environment variable. If that isn't defined, it will resort to
1190
- # searching /usr/local/bin, /usr/ucb, /usr/bin and /bin.
1191
- #
1192
- # If found, it will return the full path, including the executable name,
1193
- # of where it was found.
1194
- #
1195
- # Note that this method does not actually affect the generated Makefile.
1196
- #
1197
- def find_executable(bin, path = nil)
1198
- checking_for checking_message(bin, path) do
1199
- find_executable0(bin, path)
1200
- end
1201
- end
1202
-
1203
- # :stopdoc:
1204
-
1205
- def arg_config(config, default=nil, &block)
1206
- $arg_config << [config, default]
1207
- defaults = []
1208
- if default
1209
- defaults << default
1210
- elsif !block
1211
- defaults << nil
1212
- end
1213
- $configure_args.fetch(config.tr('_', '-'), *defaults, &block)
1214
- end
1215
-
1216
- # :startdoc:
1217
-
1218
- # Tests for the presence of a --with-<tt>config</tt> or --without-<tt>config</tt>
1219
- # option. Returns true if the with option is given, false if the without
1220
- # option is given, and the default value otherwise.
1221
- #
1222
- # This can be useful for adding custom definitions, such as debug information.
1223
- #
1224
- # Example:
1225
- #
1226
- # if with_config("debug")
1227
- # $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
1228
- # end
1229
- #
1230
- def with_config(config, default=nil)
1231
- config = config.sub(/^--with[-_]/, '')
1232
- val = arg_config("--with-"+config) do
1233
- if arg_config("--without-"+config)
1234
- false
1235
- elsif block_given?
1236
- yield(config, default)
1237
- else
1238
- break default
1239
- end
1240
- end
1241
- case val
1242
- when "yes"
1243
- true
1244
- when "no"
1245
- false
1246
- else
1247
- val
1248
- end
1249
- end
1250
-
1251
- # Tests for the presence of an --enable-<tt>config</tt> or
1252
- # --disable-<tt>config</tt> option. Returns true if the enable option is given,
1253
- # false if the disable option is given, and the default value otherwise.
1254
- #
1255
- # This can be useful for adding custom definitions, such as debug information.
1256
- #
1257
- # Example:
1258
- #
1259
- # if enable_config("debug")
1260
- # $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
1261
- # end
1262
- #
1263
- def enable_config(config, default=nil)
1264
- if arg_config("--enable-"+config)
1265
- true
1266
- elsif arg_config("--disable-"+config)
1267
- false
1268
- elsif block_given?
1269
- yield(config, default)
1270
- else
1271
- return default
1272
- end
1273
- end
1274
-
1275
- # Generates a header file consisting of the various macro definitions generated
1276
- # by other methods such as have_func and have_header. These are then wrapped in
1277
- # a custom #ifndef based on the +header+ file name, which defaults to
1278
- # 'extconf.h'.
1279
- #
1280
- # For example:
1281
- #
1282
- # # extconf.rb
1283
- # require 'mkmf'
1284
- # have_func('realpath')
1285
- # have_header('sys/utime.h')
1286
- # create_header
1287
- # create_makefile('foo')
1288
- #
1289
- # The above script would generate the following extconf.h file:
1290
- #
1291
- # #ifndef EXTCONF_H
1292
- # #define EXTCONF_H
1293
- # #define HAVE_REALPATH 1
1294
- # #define HAVE_SYS_UTIME_H 1
1295
- # #endif
1296
- #
1297
- # Given that the create_header method generates a file based on definitions
1298
- # set earlier in your extconf.rb file, you will probably want to make this
1299
- # one of the last methods you call in your script.
1300
- #
1301
- def create_header(header = "extconf.h")
1302
- message "creating %s\n", header
1303
- sym = header.tr_cpp
1304
- hdr = ["#ifndef #{sym}\n#define #{sym}\n"]
1305
- for line in $defs
1306
- case line
1307
- when /^-D([^=]+)(?:=(.*))?/
1308
- hdr << "#define #$1 #{$2 ? Shellwords.shellwords($2)[0].gsub(/(?=\t+)/, "\\\n") : 1}\n"
1309
- when /^-U(.*)/
1310
- hdr << "#undef #$1\n"
1311
- end
1312
- end
1313
- hdr << "#endif\n"
1314
- hdr = hdr.join
1315
- unless (IO.read(header) == hdr rescue false)
1316
- open(header, "wb") do |hfile|
1317
- hfile.write(hdr)
1318
- end
1319
- end
1320
- $extconf_h = header
1321
- end
1322
-
1323
- # Sets a +target+ name that the user can then use to configure various 'with'
1324
- # options with on the command line by using that name. For example, if the
1325
- # target is set to "foo", then the user could use the --with-foo-dir command
1326
- # line option.
1327
- #
1328
- # You may pass along additional 'include' or 'lib' defaults via the +idefault+
1329
- # and +ldefault+ parameters, respectively.
1330
- #
1331
- # Note that dir_config only adds to the list of places to search for libraries
1332
- # and include files. It does not link the libraries into your application.
1333
- #
1334
- def dir_config(target, idefault=nil, ldefault=nil)
1335
- if dir = with_config(target + "-dir", (idefault unless ldefault))
1336
- defaults = Array === dir ? dir : dir.split(File::PATH_SEPARATOR)
1337
- idefault = ldefault = nil
1338
- end
1339
-
1340
- idir = with_config(target + "-include", idefault)
1341
- $arg_config.last[1] ||= "${#{target}-dir}/include"
1342
- ldir = with_config(target + "-lib", ldefault)
1343
- $arg_config.last[1] ||= "${#{target}-dir}/lib"
1344
-
1345
- idirs = idir ? Array === idir ? idir.dup : idir.split(File::PATH_SEPARATOR) : []
1346
- if defaults
1347
- idirs.concat(defaults.collect {|d| d + "/include"})
1348
- idir = ([idir] + idirs).compact.join(File::PATH_SEPARATOR)
1349
- end
1350
- unless idirs.empty?
1351
- idirs.collect! {|d| "-I" + d}
1352
- idirs -= Shellwords.shellwords($CPPFLAGS)
1353
- unless idirs.empty?
1354
- $CPPFLAGS = (idirs.quote << $CPPFLAGS).join(" ")
1355
- end
1356
- end
1357
-
1358
- ldirs = ldir ? Array === ldir ? ldir.dup : ldir.split(File::PATH_SEPARATOR) : []
1359
- if defaults
1360
- ldirs.concat(defaults.collect {|d| d + "/lib"})
1361
- ldir = ([ldir] + ldirs).compact.join(File::PATH_SEPARATOR)
1362
- end
1363
- $LIBPATH = ldirs | $LIBPATH
1364
-
1365
- [idir, ldir]
1366
- end
1367
-
1368
- # :stopdoc:
1369
-
1370
- # Handles meta information about installed libraries. Uses your platform's
1371
- # pkg-config program if it has one.
1372
- def pkg_config(pkg)
1373
- if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
1374
- # iff package specific config command is given
1375
- get = proc {|opt| `#{pkgconfig} --#{opt}`.chomp}
1376
- elsif ($PKGCONFIG ||=
1377
- (pkgconfig = with_config("pkg-config", ("pkg-config" unless CROSS_COMPILING))) &&
1378
- find_executable0(pkgconfig) && pkgconfig) and
1379
- system("#{$PKGCONFIG} --exists #{pkg}")
1380
- # default to pkg-config command
1381
- get = proc {|opt| `#{$PKGCONFIG} --#{opt} #{pkg}`.chomp}
1382
- elsif find_executable0(pkgconfig = "#{pkg}-config")
1383
- # default to package specific config command, as a last resort.
1384
- get = proc {|opt| `#{pkgconfig} --#{opt}`.chomp}
1385
- end
1386
- if get
1387
- cflags = get['cflags']
1388
- ldflags = get['libs']
1389
- libs = get['libs-only-l']
1390
- ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ")
1391
- $CFLAGS += " " << cflags
1392
- $LDFLAGS += " " << ldflags
1393
- $libs += " " << libs
1394
- Logging::message "package configuration for %s\n", pkg
1395
- Logging::message "cflags: %s\nldflags: %s\nlibs: %s\n\n",
1396
- cflags, ldflags, libs
1397
- [cflags, ldflags, libs]
1398
- else
1399
- Logging::message "package configuration for %s is not found\n", pkg
1400
- nil
1401
- end
1402
- end
1403
-
1404
- def with_destdir(dir)
1405
- dir = dir.sub($dest_prefix_pattern, '')
1406
- /\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir
1407
- end
1408
-
1409
- # Converts forward slashes to backslashes. Aimed at MS Windows.
1410
- #
1411
- # Internal use only.
1412
- #
1413
- def winsep(s)
1414
- s.tr('/', '\\')
1415
- end
1416
-
1417
- # Converts native path to format acceptable in Makefile
1418
- #
1419
- # Internal use only.
1420
- #
1421
- if !CROSS_COMPILING
1422
- case CONFIG['build_os']
1423
- when 'mingw32'
1424
- def mkintpath(path)
1425
- # mingw uses make from msys and it needs special care
1426
- # converts from C:\some\path to /C/some/path
1427
- path = path.dup
1428
- path.tr!('\\', '/')
1429
- path.sub!(/\A([A-Za-z]):(?=\/)/, '/\1')
1430
- path
1431
- end
1432
- end
1433
- end
1434
- unless defined?(mkintpath)
1435
- def mkintpath(path)
1436
- path
1437
- end
1438
- end
1439
-
1440
- def configuration(srcdir)
1441
- mk = []
1442
- vpath = $VPATH.dup
1443
- if !CROSS_COMPILING
1444
- case CONFIG['build_os']
1445
- when 'cygwin'
1446
- if CONFIG['target_os'] != 'cygwin'
1447
- vpath = vpath.map {|p| p.sub(/.*/, '$(shell cygpath -u \&)')}
1448
- end
1449
- end
1450
- end
1451
- CONFIG["hdrdir"] ||= $hdrdir
1452
- mk << %{
1453
- SHELL = /bin/sh
1454
-
1455
- #### Start of system configuration section. ####
1456
- #{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk}
1457
- srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2])}.quote}
1458
- topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).quote}
1459
- hdrdir = #{mkintpath(CONFIG["hdrdir"]).quote}
1460
- arch_hdrdir = #{$arch_hdrdir}
1461
- VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])}
1462
- }
1463
- if $extmk
1464
- mk << "RUBYLIB = -\nRUBYOPT = -r$(top_srcdir)/ext/purelib.rb\n"
1465
- end
1466
- if destdir = CONFIG["prefix"][$dest_prefix_pattern, 1]
1467
- mk << "\nDESTDIR = #{destdir}\n"
1468
- end
1469
- CONFIG.each do |key, var|
1470
- next unless /prefix$/ =~ key
1471
- mk << "#{key} = #{with_destdir(var)}\n"
1472
- end
1473
- CONFIG.each do |key, var|
1474
- next if /^abs_/ =~ key
1475
- next if /^(?:src|top|hdr)dir$/ =~ key
1476
- next unless /dir$/ =~ key
1477
- mk << "#{key} = #{with_destdir(var)}\n"
1478
- end
1479
- if !$extmk and !$configure_args.has_key?('--ruby') and
1480
- sep = config_string('BUILD_FILE_SEPARATOR')
1481
- sep = ":/=#{sep}"
1482
- else
1483
- sep = ""
1484
- end
1485
- possible_command = (proc {|s| s if /top_srcdir/ !~ s} unless $extmk)
1486
- extconf_h = $extconf_h ? "-DRUBY_EXTCONF_H=\\\"$(RUBY_EXTCONF_H)\\\" " : $defs.join(" ") << " "
1487
- mk << %{
1488
- CC = #{CONFIG['CC']}
1489
- CXX = #{CONFIG['CXX']}
1490
- LIBRUBY = #{CONFIG['LIBRUBY']}
1491
- LIBRUBY_A = #{CONFIG['LIBRUBY_A']}
1492
- LIBRUBYARG_SHARED = #$LIBRUBYARG_SHARED
1493
- LIBRUBYARG_STATIC = #$LIBRUBYARG_STATIC
1494
- OUTFLAG = #{OUTFLAG}
1495
- COUTFLAG = #{COUTFLAG}
1496
-
1497
- RUBY_EXTCONF_H = #{$extconf_h}
1498
- cflags = #{CONFIG['cflags']}
1499
- optflags = #{CONFIG['optflags']}
1500
- debugflags = #{CONFIG['debugflags']}
1501
- warnflags = #{CONFIG['warnflags']}
1502
- CFLAGS = #{$static ? '' : CONFIG['CCDLFLAGS']} #$CFLAGS #$ARCH_FLAG
1503
- INCFLAGS = -I. #$INCFLAGS
1504
- DEFS = #{CONFIG['DEFS']}
1505
- CPPFLAGS = #{extconf_h}#{$CPPFLAGS}
1506
- CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']}
1507
- ldflags = #{$LDFLAGS}
1508
- dldflags = #{$DLDFLAGS}
1509
- ARCH_FLAG = #{$ARCH_FLAG}
1510
- DLDFLAGS = $(ldflags) $(dldflags)
1511
- LDSHARED = #{CONFIG['LDSHARED']}
1512
- LDSHAREDXX = #{config_string('LDSHAREDXX') || '$(LDSHARED)'}
1513
- AR = #{CONFIG['AR']}
1514
- EXEEXT = #{CONFIG['EXEEXT']}
1515
-
1516
- RUBY_BASE_NAME = #{CONFIG['RUBY_BASE_NAME']}
1517
- RUBY_INSTALL_NAME = #{CONFIG['RUBY_INSTALL_NAME']}
1518
- RUBY_SO_NAME = #{CONFIG['RUBY_SO_NAME']}
1519
- arch = #{CONFIG['arch']}
1520
- sitearch = #{CONFIG['sitearch']}
1521
- ruby_version = #{RbConfig::CONFIG['ruby_version']}
1522
- ruby = #{$ruby}
1523
- RUBY = $(ruby#{sep})
1524
- RM = #{config_string('RM', &possible_command) || '$(RUBY) -run -e rm -- -f'}
1525
- RM_RF = #{'$(RUBY) -run -e rm -- -rf'}
1526
- RMDIRS = #{config_string('RMDIRS', &possible_command) || '$(RUBY) -run -e rmdir -- -p'}
1527
- MAKEDIRS = #{config_string('MAKEDIRS', &possible_command) || '@$(RUBY) -run -e mkdir -- -p'}
1528
- INSTALL = #{config_string('INSTALL', &possible_command) || '@$(RUBY) -run -e install -- -vp'}
1529
- INSTALL_PROG = #{config_string('INSTALL_PROG') || '$(INSTALL) -m 0755'}
1530
- INSTALL_DATA = #{config_string('INSTALL_DATA') || '$(INSTALL) -m 0644'}
1531
- COPY = #{config_string('CP', &possible_command) || '@$(RUBY) -run -e cp -- -v'}
1532
-
1533
- #### End of system configuration section. ####
1534
-
1535
- preload = #{defined?($preload) && $preload ? $preload.join(' ') : ''}
1536
- }
1537
- if $nmake == ?b
1538
- mk.each do |x|
1539
- x.gsub!(/^(MAKEDIRS|INSTALL_(?:PROG|DATA))+\s*=.*\n/) do
1540
- "!ifndef " + $1 + "\n" +
1541
- $& +
1542
- "!endif\n"
1543
- end
1544
- end
1545
- end
1546
- mk
1547
- end
1548
- # :startdoc:
1549
-
1550
- def dummy_makefile(srcdir)
1551
- configuration(srcdir) << <<RULES << CLEANINGS
1552
- CLEANFILES = #{$cleanfiles.join(' ')}
1553
- DISTCLEANFILES = #{$distcleanfiles.join(' ')}
1554
-
1555
- all install static install-so install-rb: Makefile
1556
- .PHONY: all install static install-so install-rb
1557
- .PHONY: clean clean-so clean-rb
1558
-
1559
- RULES
1560
- end
1561
-
1562
- def depend_rules(depend)
1563
- suffixes = []
1564
- depout = []
1565
- cont = implicit = nil
1566
- impconv = proc do
1567
- COMPILE_RULES.each {|rule| depout << (rule % implicit[0]) << implicit[1]}
1568
- implicit = nil
1569
- end
1570
- ruleconv = proc do |line|
1571
- if implicit
1572
- if /\A\t/ =~ line
1573
- implicit[1] << line
1574
- next
1575
- else
1576
- impconv[]
1577
- end
1578
- end
1579
- if m = /\A\.(\w+)\.(\w+)(?:\s*:)/.match(line)
1580
- suffixes << m[1] << m[2]
1581
- implicit = [[m[1], m[2]], [m.post_match]]
1582
- next
1583
- elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line
1584
- line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\/\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2}
1585
- end
1586
- depout << line
1587
- end
1588
- depend.each_line do |line|
1589
- line.gsub!(/\.o\b/, ".#{$OBJEXT}")
1590
- line.gsub!(/\$\((?:hdr|top)dir\)\/config.h/, $config_h)
1591
- line.gsub!(%r"\$\(hdrdir\)/(?!ruby(?![^:;/\s]))(?=[-\w]+\.h)", '\&ruby/')
1592
- if $nmake && /\A\s*\$\(RM|COPY\)/ =~ line
1593
- line.gsub!(%r"[-\w\./]{2,}"){$&.tr("/", "\\")}
1594
- line.gsub!(/(\$\((?!RM|COPY)[^:)]+)(?=\))/, '\1:/=\\')
1595
- end
1596
- if /(?:^|[^\\])(?:\\\\)*\\$/ =~ line
1597
- (cont ||= []) << line
1598
- next
1599
- elsif cont
1600
- line = (cont << line).join
1601
- cont = nil
1602
- end
1603
- ruleconv.call(line)
1604
- end
1605
- if cont
1606
- ruleconv.call(cont.join)
1607
- elsif implicit
1608
- impconv.call
1609
- end
1610
- unless suffixes.empty?
1611
- depout.unshift(".SUFFIXES: ." + suffixes.uniq.join(" .") + "\n\n")
1612
- end
1613
- depout.unshift("$(OBJS): $(RUBY_EXTCONF_H)\n\n") if $extconf_h
1614
- depout.flatten!
1615
- depout
1616
- end
1617
-
1618
- # Generates the Makefile for your extension, passing along any options and
1619
- # preprocessor constants that you may have generated through other methods.
1620
- #
1621
- # The +target+ name should correspond the name of the global function name
1622
- # defined within your C extension, minus the 'Init_'. For example, if your
1623
- # C extension is defined as 'Init_foo', then your target would simply be 'foo'.
1624
- #
1625
- # If any '/' characters are present in the target name, only the last name
1626
- # is interpreted as the target name, and the rest are considered toplevel
1627
- # directory names, and the generated Makefile will be altered accordingly to
1628
- # follow that directory structure.
1629
- #
1630
- # For example, if you pass 'test/foo' as a target name, your extension will
1631
- # be installed under the 'test' directory. This means that in order to
1632
- # load the file within a Ruby program later, that directory structure will
1633
- # have to be followed, e.g. "require 'test/foo'".
1634
- #
1635
- # The +srcprefix+ should be used when your source files are not in the same
1636
- # directory as your build script. This will not only eliminate the need for
1637
- # you to manually copy the source files into the same directory as your build
1638
- # script, but it also sets the proper +target_prefix+ in the generated
1639
- # Makefile.
1640
- #
1641
- # Setting the +target_prefix+ will, in turn, install the generated binary in
1642
- # a directory under your RbConfig::CONFIG['sitearchdir'] that mimics your local
1643
- # filesystem when you run 'make install'.
1644
- #
1645
- # For example, given the following file tree:
1646
- #
1647
- # ext/
1648
- # extconf.rb
1649
- # test/
1650
- # foo.c
1651
- #
1652
- # And given the following code:
1653
- #
1654
- # create_makefile('test/foo', 'test')
1655
- #
1656
- # That will set the +target_prefix+ in the generated Makefile to 'test'. That,
1657
- # in turn, will create the following file tree when installed via the
1658
- # 'make install' command:
1659
- #
1660
- # /path/to/ruby/sitearchdir/test/foo.so
1661
- #
1662
- # It is recommended that you use this approach to generate your makefiles,
1663
- # instead of copying files around manually, because some third party
1664
- # libraries may depend on the +target_prefix+ being set properly.
1665
- #
1666
- # The +srcprefix+ argument can be used to override the default source
1667
- # directory, i.e. the current directory . It is included as part of the VPATH
1668
- # and added to the list of INCFLAGS.
1669
- #
1670
- def create_makefile(target, srcprefix = nil)
1671
- $target = target
1672
- libpath = $DEFLIBPATH|$LIBPATH
1673
- message "creating Makefile\n"
1674
- rm_f "conftest*"
1675
- if CONFIG["DLEXT"] == $OBJEXT
1676
- for lib in libs = $libs.split
1677
- lib.sub!(/-l(.*)/, %%"lib\\1.#{$LIBEXT}"%)
1678
- end
1679
- $defs.push(format("-DEXTLIB='%s'", libs.join(",")))
1680
- end
1681
-
1682
- if target.include?('/')
1683
- target_prefix, target = File.split(target)
1684
- target_prefix[0,0] = '/'
1685
- else
1686
- target_prefix = ""
1687
- end
1688
-
1689
- srcprefix ||= "$(srcdir)/#{srcprefix}".chomp('/')
1690
- RbConfig.expand(srcdir = srcprefix.dup)
1691
-
1692
- ext = ".#{$OBJEXT}"
1693
- if not $objs
1694
- srcs = $srcs || Dir[File.join(srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
1695
- objs = srcs.inject(Hash.new {[]}) {|h, f| h[File.basename(f, ".*") << ext] <<= f; h}
1696
- $objs = objs.keys
1697
- unless objs.delete_if {|b, f| f.size == 1}.empty?
1698
- dups = objs.sort.map {|b, f|
1699
- "#{b[/.*\./]}{#{f.collect {|n| n[/([^.]+)\z/]}.join(',')}}"
1700
- }
1701
- abort "source files duplication - #{dups.join(", ")}"
1702
- end
1703
- else
1704
- $objs.collect! {|o| File.basename(o, ".*") << ext} unless $OBJEXT == "o"
1705
- srcs = $srcs || $objs.collect {|o| o.chomp(ext) << ".c"}
1706
- end
1707
- $srcs = srcs
1708
-
1709
- target = nil if $objs.empty?
1710
-
1711
- if target and EXPORT_PREFIX
1712
- if File.exist?(File.join(srcdir, target + '.def'))
1713
- deffile = "$(srcdir)/$(TARGET).def"
1714
- unless EXPORT_PREFIX.empty?
1715
- makedef = %{-pe "$_.sub!(/^(?=\\w)/,'#{EXPORT_PREFIX}') unless 1../^EXPORTS$/i"}
1716
- end
1717
- else
1718
- makedef = %{-e "puts 'EXPORTS', '#{EXPORT_PREFIX}Init_$(TARGET)'"}
1719
- end
1720
- if makedef
1721
- $cleanfiles << '$(DEFFILE)'
1722
- origdef = deffile
1723
- deffile = "$(TARGET)-$(arch).def"
1724
- end
1725
- end
1726
- origdef ||= ''
1727
-
1728
- if $extout and $INSTALLFILES
1729
- $cleanfiles.concat($INSTALLFILES.collect {|files, dir|File.join(dir, files.sub(/\A\.\//, ''))})
1730
- $distcleandirs.concat($INSTALLFILES.collect {|files, dir| dir})
1731
- end
1732
-
1733
- if $extmk and not $extconf_h
1734
- create_header
1735
- end
1736
-
1737
- libpath = libpathflag(libpath)
1738
-
1739
- dllib = target ? "$(TARGET).#{CONFIG['DLEXT']}" : ""
1740
- staticlib = target ? "$(TARGET).#$LIBEXT" : ""
1741
- mfile = open("Makefile", "wb")
1742
- conf = configuration(srcprefix)
1743
- conf = yield(conf) if block_given?
1744
- mfile.puts(conf)
1745
- mfile.print "
1746
- libpath = #{($DEFLIBPATH|$LIBPATH).join(" ")}
1747
- LIBPATH = #{libpath}
1748
- DEFFILE = #{deffile}
1749
-
1750
- CLEANFILES = #{$cleanfiles.join(' ')}
1751
- DISTCLEANFILES = #{$distcleanfiles.join(' ')}
1752
- DISTCLEANDIRS = #{$distcleandirs.join(' ')}
1753
-
1754
- extout = #{$extout && $extout.quote}
1755
- extout_prefix = #{$extout_prefix}
1756
- target_prefix = #{target_prefix}
1757
- LOCAL_LIBS = #{$LOCAL_LIBS}
1758
- LIBS = #{$LIBRUBYARG} #{$libs} #{$LIBS}
1759
- SRCS = #{srcs.collect(&File.method(:basename)).join(' ')}
1760
- OBJS = #{$objs.join(" ")}
1761
- TARGET = #{target}
1762
- DLLIB = #{dllib}
1763
- EXTSTATIC = #{$static || ""}
1764
- STATIC_LIB = #{staticlib unless $static.nil?}
1765
- #{!$extout && defined?($installed_list) ? "INSTALLED_LIST = #{$installed_list}\n" : ""}
1766
- " #"
1767
- # TODO: fixme
1768
- install_dirs.each {|d| mfile.print("%-14s= %s\n" % d) if /^[[:upper:]]/ =~ d[0]}
1769
- n = ($extout ? '$(RUBYARCHDIR)/' : '') + '$(TARGET)'
1770
- mfile.print "
1771
- TARGET_SO = #{($extout ? '$(RUBYARCHDIR)/' : '')}$(DLLIB)
1772
- CLEANLIBS = #{n}.#{CONFIG['DLEXT']} #{config_string('cleanlibs') {|t| t.gsub(/\$\*/) {n}}}
1773
- CLEANOBJS = *.#{$OBJEXT} #{config_string('cleanobjs') {|t| t.gsub(/\$\*/, "$(TARGET)#{deffile ? '-$(arch)': ''}")} if target} *.bak
1774
-
1775
- all: #{$extout ? "install" : target ? "$(DLLIB)" : "Makefile"}
1776
- static: $(STATIC_LIB)#{$extout ? " install-rb" : ""}
1777
- .PHONY: all install static install-so install-rb
1778
- .PHONY: clean clean-so clean-rb
1779
- "
1780
- mfile.print CLEANINGS
1781
- fsep = config_string('BUILD_FILE_SEPARATOR') {|s| s unless s == "/"}
1782
- if fsep
1783
- sep = ":/=#{fsep}"
1784
- fseprepl = proc {|s|
1785
- s = s.gsub("/", fsep)
1786
- s = s.gsub(/(\$\(\w+)(\))/) {$1+sep+$2}
1787
- s = s.gsub(/(\$\{\w+)(\})/) {$1+sep+$2}
1788
- }
1789
- else
1790
- fseprepl = proc {|s| s}
1791
- sep = ""
1792
- end
1793
- dirs = []
1794
- mfile.print "install: install-so install-rb\n\n"
1795
- sodir = (dir = "$(RUBYARCHDIR)").dup
1796
- mfile.print("install-so: ")
1797
- if target
1798
- f = "$(DLLIB)"
1799
- dest = "#{dir}/#{f}"
1800
- mfile.puts dir, "install-so: #{dest}"
1801
- if $extout
1802
- mfile.print "clean-so::\n"
1803
- mfile.print "\t@-$(RM) #{fseprepl[dest]}\n"
1804
- mfile.print "\t@-$(RMDIRS) #{fseprepl[dir]}\n"
1805
- else
1806
- mfile.print "#{dest}: #{f}\n\t@-$(MAKEDIRS) $(@D#{sep})\n"
1807
- mfile.print "\t$(INSTALL_PROG) #{fseprepl[f]} $(@D#{sep})\n"
1808
- if defined?($installed_list)
1809
- mfile.print "\t@echo #{dir}/#{File.basename(f)}>>$(INSTALLED_LIST)\n"
1810
- end
1811
- end
1812
- else
1813
- mfile.puts "Makefile"
1814
- end
1815
- mfile.print("install-rb: pre-install-rb install-rb-default\n")
1816
- mfile.print("install-rb-default: pre-install-rb-default\n")
1817
- mfile.print("pre-install-rb: Makefile\n")
1818
- mfile.print("pre-install-rb-default: Makefile\n")
1819
- for sfx, i in [["-default", [["lib/**/*.rb", "$(RUBYLIBDIR)", "lib"]]], ["", $INSTALLFILES]]
1820
- files = install_files(mfile, i, nil, srcprefix) or next
1821
- for dir, *files in files
1822
- unless dirs.include?(dir)
1823
- dirs << dir
1824
- mfile.print "pre-install-rb#{sfx}: #{dir}\n"
1825
- end
1826
- for f in files
1827
- dest = "#{dir}/#{File.basename(f)}"
1828
- mfile.print("install-rb#{sfx}: #{dest}\n")
1829
- mfile.print("#{dest}: #{f}\n\t@-$(MAKEDIRS) $(@D#{sep})\n")
1830
- mfile.print("\t$(#{$extout ? 'COPY' : 'INSTALL_DATA'}) #{f} $(@D#{sep})\n")
1831
- if defined?($installed_list) and !$extout
1832
- mfile.print("\t@echo #{dest}>>$(INSTALLED_LIST)\n")
1833
- end
1834
- if $extout
1835
- mfile.print("clean-rb#{sfx}::\n")
1836
- mfile.print("\t@-$(RM) #{fseprepl[dest]}\n")
1837
- end
1838
- end
1839
- end
1840
- if $extout
1841
- dirs.uniq!
1842
- unless dirs.empty?
1843
- mfile.print("clean-rb#{sfx}::\n")
1844
- for dir in dirs.sort_by {|d| -d.count('/')}
1845
- mfile.print("\t@-$(RMDIRS) #{fseprepl[dir]}\n")
1846
- end
1847
- end
1848
- end
1849
- end
1850
- dirs.unshift(sodir) if target and !dirs.include?(sodir)
1851
- dirs.each {|d| mfile.print "#{d}:\n\t$(MAKEDIRS) $@\n"}
1852
-
1853
- mfile.print <<-SITEINSTALL
1854
-
1855
- site-install: site-install-so site-install-rb
1856
- site-install-so: install-so
1857
- site-install-rb: install-rb
1858
-
1859
- SITEINSTALL
1860
-
1861
- return unless target
1862
-
1863
- mfile.puts SRC_EXT.collect {|e| ".path.#{e} = $(VPATH)"} if $nmake == ?b
1864
- mfile.print ".SUFFIXES: .#{SRC_EXT.join(' .')} .#{$OBJEXT}\n"
1865
- mfile.print "\n"
1866
-
1867
- CXX_EXT.each do |e|
1868
- COMPILE_RULES.each do |rule|
1869
- mfile.printf(rule, e, $OBJEXT)
1870
- mfile.printf("\n\t%s\n\n", COMPILE_CXX)
1871
- end
1872
- end
1873
- %w[c].each do |e|
1874
- COMPILE_RULES.each do |rule|
1875
- mfile.printf(rule, e, $OBJEXT)
1876
- mfile.printf("\n\t%s\n\n", COMPILE_C)
1877
- end
1878
- end
1879
-
1880
- mfile.print "$(RUBYARCHDIR)/" if $extout
1881
- mfile.print "$(DLLIB): "
1882
- mfile.print "$(DEFFILE) " if makedef
1883
- mfile.print "$(OBJS) Makefile\n"
1884
- mfile.print "\t@-$(RM) $(@#{sep})\n"
1885
- mfile.print "\t@-$(MAKEDIRS) $(@D)\n" if $extout
1886
- link_so = LINK_SO.gsub(/^/, "\t")
1887
- if srcs.any?(&%r"\.(?:#{CXX_EXT.join('|')})\z".method(:===))
1888
- link_so = link_so.sub(/\bLDSHARED\b/, '\&XX')
1889
- end
1890
- mfile.print link_so, "\n\n"
1891
- unless $static.nil?
1892
- mfile.print "$(STATIC_LIB): $(OBJS)\n\t@-$(RM) $(@#{sep})\n\t"
1893
- mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)"
1894
- config_string('RANLIB') do |ranlib|
1895
- mfile.print "\n\t@-#{ranlib} $(DLLIB) 2> /dev/null || true"
1896
- end
1897
- end
1898
- mfile.print "\n\n"
1899
- if makedef
1900
- mfile.print "$(DEFFILE): #{origdef}\n"
1901
- mfile.print "\t$(RUBY) #{makedef} #{origdef} > $@\n\n"
1902
- end
1903
-
1904
- depend = File.join(srcdir, "depend")
1905
- if File.exist?(depend)
1906
- mfile.print("###\n", *depend_rules(File.read(depend)))
1907
- else
1908
- headers = %w[$(hdrdir)/ruby.h $(hdrdir)/ruby/defines.h]
1909
- if RULE_SUBST
1910
- headers.each {|h| h.sub!(/.*/, &RULE_SUBST.method(:%))}
1911
- end
1912
- headers << $config_h
1913
- headers << '$(RUBY_EXTCONF_H)' if $extconf_h
1914
- mfile.print "$(OBJS): ", headers.join(' '), "\n"
1915
- end
1916
-
1917
- $makefile_created = true
1918
- ensure
1919
- mfile.close if mfile
1920
- end
1921
-
1922
- # :stopdoc:
1923
-
1924
- def init_mkmf(config = CONFIG)
1925
- $makefile_created = false
1926
- $arg_config = []
1927
- $enable_shared = config['ENABLE_SHARED'] == 'yes'
1928
- $defs = []
1929
- $extconf_h = nil
1930
- $CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup
1931
- $ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup
1932
- $CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup
1933
- $LDFLAGS = with_config("ldflags", arg_config("LDFLAGS", config["LDFLAGS"])).dup
1934
- $INCFLAGS = "-I$(arch_hdrdir)"
1935
- $INCFLAGS << " -I$(hdrdir)/ruby/backward" unless $extmk
1936
- $INCFLAGS << " -I$(hdrdir) -I$(srcdir)"
1937
- $DLDFLAGS = with_config("dldflags", arg_config("DLDFLAGS", config["DLDFLAGS"])).dup
1938
- $LIBEXT = config['LIBEXT'].dup
1939
- $OBJEXT = config["OBJEXT"].dup
1940
- $LIBS = "#{config['LIBS']} #{config['DLDLIBS']}"
1941
- $LIBRUBYARG = ""
1942
- $LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC']
1943
- $LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED']
1944
- $DEFLIBPATH = [$extmk ? "$(topdir)" : "$(libdir)"]
1945
- $DEFLIBPATH.unshift(".")
1946
- $LIBPATH = []
1947
- $INSTALLFILES = []
1948
- $NONINSTALLFILES = [/~\z/, /\A#.*#\z/, /\A\.#/, /\.bak\z/i, /\.orig\z/, /\.rej\z/, /\.l[ao]\z/, /\.o\z/]
1949
- $VPATH = %w[$(srcdir) $(arch_hdrdir)/ruby $(hdrdir)/ruby]
1950
-
1951
- $objs = nil
1952
- $srcs = nil
1953
- $libs = ""
1954
- if $enable_shared or RbConfig.expand(config["LIBRUBY"].dup) != RbConfig.expand(config["LIBRUBY_A"].dup)
1955
- $LIBRUBYARG = config['LIBRUBYARG']
1956
- end
1957
-
1958
- $LOCAL_LIBS = ""
1959
-
1960
- $cleanfiles = config_string('CLEANFILES') {|s| Shellwords.shellwords(s)} || []
1961
- $cleanfiles << "mkmf.log"
1962
- $distcleanfiles = config_string('DISTCLEANFILES') {|s| Shellwords.shellwords(s)} || []
1963
- $distcleandirs = config_string('DISTCLEANDIRS') {|s| Shellwords.shellwords(s)} || []
1964
-
1965
- $extout ||= nil
1966
- $extout_prefix ||= nil
1967
-
1968
- $arg_config.clear
1969
- dir_config("opt")
1970
- end
1971
-
1972
- FailedMessage = <<MESSAGE
1973
- Could not create Makefile due to some reason, probably lack of
1974
- necessary libraries and/or headers. Check the mkmf.log file for more
1975
- details. You may need configuration options.
1976
-
1977
- Provided configuration options:
1978
- MESSAGE
1979
-
1980
- # Returns whether or not the Makefile was successfully generated. If not,
1981
- # the script will abort with an error message.
1982
- #
1983
- # Internal use only.
1984
- #
1985
- def mkmf_failed(path)
1986
- unless $makefile_created or File.exist?("Makefile")
1987
- opts = $arg_config.collect {|t, n| "\t#{t}#{n ? "=#{n}" : ""}\n"}
1988
- abort "*** #{path} failed ***\n" + FailedMessage + opts.join
1989
- end
1990
- end
1991
-
1992
- # :startdoc:
1993
-
1994
- init_mkmf
1995
-
1996
- $make = with_config("make-prog", ENV["MAKE"] || "make")
1997
- make, = Shellwords.shellwords($make)
1998
- $nmake = nil
1999
- case
2000
- when $mswin
2001
- $nmake = ?m if /nmake/i =~ make
2002
- when $bccwin
2003
- $nmake = ?b if /Borland/i =~ `#{make} -h`
2004
- end
2005
-
2006
- RbConfig::CONFIG["srcdir"] = CONFIG["srcdir"] =
2007
- $srcdir = arg_config("--srcdir", File.dirname($0))
2008
- $configure_args["--topsrcdir"] ||= $srcdir
2009
- if $curdir = arg_config("--curdir")
2010
- RbConfig.expand(curdir = $curdir.dup)
2011
- else
2012
- curdir = $curdir = "."
2013
- end
2014
- unless File.expand_path(RbConfig::CONFIG["topdir"]) == File.expand_path(curdir)
2015
- CONFIG["topdir"] = $curdir
2016
- RbConfig::CONFIG["topdir"] = curdir
2017
- end
2018
- $configure_args["--topdir"] ||= $curdir
2019
- $ruby = arg_config("--ruby", File.join(RbConfig::CONFIG["bindir"], CONFIG["ruby_install_name"]))
2020
-
2021
- split = Shellwords.method(:shellwords).to_proc
2022
-
2023
- EXPORT_PREFIX = config_string('EXPORT_PREFIX') {|s| s.strip}
2024
-
2025
- hdr = ['#include "ruby.h"' "\n"]
2026
- config_string('COMMON_MACROS') do |s|
2027
- Shellwords.shellwords(s).each do |w|
2028
- hdr << "#define " + w.split(/=/, 2).join(" ")
2029
- end
2030
- end
2031
- config_string('COMMON_HEADERS') do |s|
2032
- Shellwords.shellwords(s).each {|w| hdr << "#include <#{w}>"}
2033
- end
2034
- COMMON_HEADERS = hdr.join("\n")
2035
- COMMON_LIBS = config_string('COMMON_LIBS', &split) || []
2036
-
2037
- COMPILE_RULES = config_string('COMPILE_RULES', &split) || %w[.%s.%s:]
2038
- RULE_SUBST = config_string('RULE_SUBST')
2039
- COMPILE_C = config_string('COMPILE_C') || '$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<'
2040
- COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<'
2041
- TRY_LINK = config_string('TRY_LINK') ||
2042
- "$(CC) #{OUTFLAG}conftest $(INCFLAGS) $(CPPFLAGS) " \
2043
- "$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"
2044
- LINK_SO = config_string('LINK_SO') ||
2045
- if CONFIG["DLEXT"] == $OBJEXT
2046
- "ld $(DLDFLAGS) -r -o $@ $(OBJS)\n"
2047
- else
2048
- "$(LDSHARED) #{OUTFLAG}$@ $(OBJS) " \
2049
- "$(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)"
2050
- end
2051
- LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L"%s"'
2052
- RPATHFLAG = config_string('RPATHFLAG') || ''
2053
- LIBARG = config_string('LIBARG') || '-l%s'
2054
- MAIN_DOES_NOTHING = config_string('MAIN_DOES_NOTHING') || 'int main() {return 0;}'
2055
- UNIVERSAL_INTS = config_string('UNIVERSAL_INTS') {|s| Shellwords.shellwords(s)} ||
2056
- %w[int short long long\ long]
2057
-
2058
- sep = config_string('BUILD_FILE_SEPARATOR') {|s| ":/=#{s}" if s != "/"} || ""
2059
- CLEANINGS = "
2060
- clean-rb-default::
2061
- clean-rb::
2062
- clean-so::
2063
- clean: clean-so clean-rb-default clean-rb
2064
- \t\t@-$(RM) $(CLEANLIBS#{sep}) $(CLEANOBJS#{sep}) $(CLEANFILES#{sep})
2065
-
2066
- distclean-rb-default::
2067
- distclean-rb::
2068
- distclean-so::
2069
- distclean: clean distclean-so distclean-rb-default distclean-rb
2070
- \t\t@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
2071
- \t\t@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES#{sep})
2072
- \t\t@-$(RMDIRS) $(DISTCLEANDIRS#{sep})
2073
-
2074
- realclean: distclean
2075
- "
2076
-
2077
- if not $extmk and /\A(extconf|makefile).rb\z/ =~ File.basename($0)
2078
- END {mkmf_failed($0)}
2079
- end