@port-labs/jq-node-bindings 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/binding.gyp +3 -3
  2. package/configure +8 -6
  3. package/deps/jq/.travis.yml +184 -35
  4. package/deps/jq/AUTHORS +31 -30
  5. package/deps/jq/COPYING +2 -2
  6. package/deps/jq/KEYS +8 -0
  7. package/deps/jq/Makefile.am +85 -70
  8. package/deps/jq/NEWS +5 -4
  9. package/deps/jq/README.md +18 -9
  10. package/deps/jq/appveyor.yml +53 -0
  11. package/deps/jq/compile-ios.sh +5 -5
  12. package/deps/jq/config/m4/check-math-func.m4 +7 -2
  13. package/deps/jq/configure.ac +130 -68
  14. package/deps/jq/docs/Rakefile +14 -135
  15. package/deps/jq/docs/Rakefile.manual +49 -0
  16. package/deps/jq/docs/Rakefile.website +76 -0
  17. package/deps/jq/docs/content/2.download/default.yml +115 -39
  18. package/deps/jq/docs/content/3.manual/manual.yml +641 -231
  19. package/deps/jq/docs/content/3.manual/v1.3/manual.yml +130 -130
  20. package/deps/jq/docs/content/3.manual/v1.4/manual.yml +160 -160
  21. package/deps/jq/docs/content/3.manual/v1.5/manual.yml +2878 -0
  22. package/deps/jq/docs/content/3.manual/v1.6/manual.yml +3287 -0
  23. package/deps/jq/docs/content/index/index.yml +28 -6
  24. package/deps/jq/docs/public/.htaccess +2 -2
  25. package/deps/jq/docs/public/css/base.scss +141 -59
  26. package/deps/jq/docs/public/js/manual-search.js +52 -0
  27. package/deps/jq/docs/site.yml +1 -10
  28. package/deps/jq/docs/templates/default.liquid +10 -10
  29. package/deps/jq/docs/templates/index.liquid +45 -32
  30. package/deps/jq/docs/templates/manual.liquid +67 -90
  31. package/deps/jq/docs/templates/shared/_footer.liquid +10 -5
  32. package/deps/jq/docs/templates/shared/_head.liquid +17 -12
  33. package/deps/jq/docs/templates/shared/_navbar.liquid +27 -0
  34. package/deps/jq/jq.1.prebuilt +523 -139
  35. package/deps/jq/modules/oniguruma/AUTHORS +1 -0
  36. package/deps/jq/modules/oniguruma/CMakeLists.txt +86 -0
  37. package/deps/jq/modules/oniguruma/COPYING +28 -0
  38. package/deps/jq/modules/oniguruma/ChangeLog +0 -0
  39. package/deps/jq/modules/oniguruma/HISTORY +2138 -0
  40. package/deps/jq/modules/oniguruma/Makefile.am +33 -0
  41. package/deps/jq/modules/oniguruma/NEWS +0 -0
  42. package/deps/jq/modules/oniguruma/README +189 -0
  43. package/deps/jq/modules/oniguruma/README.ja +195 -0
  44. package/deps/jq/modules/oniguruma/README.md +203 -0
  45. package/deps/jq/modules/oniguruma/cmake/dist.cmake +321 -0
  46. package/deps/jq/modules/oniguruma/compile +348 -0
  47. package/deps/jq/modules/oniguruma/config.guess +1754 -0
  48. package/deps/jq/modules/oniguruma/config.sub +1890 -0
  49. package/deps/jq/modules/oniguruma/configure.ac +87 -0
  50. package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +31 -0
  51. package/deps/jq/modules/oniguruma/depcomp +791 -0
  52. package/deps/jq/modules/oniguruma/dist.info +10 -0
  53. package/deps/jq/modules/oniguruma/doc/API +660 -0
  54. package/deps/jq/modules/oniguruma/doc/API.ja +667 -0
  55. package/deps/jq/modules/oniguruma/doc/FAQ +12 -0
  56. package/deps/jq/modules/oniguruma/doc/FAQ.ja +22 -0
  57. package/deps/jq/modules/oniguruma/doc/RE +436 -0
  58. package/deps/jq/modules/oniguruma/doc/RE.ja +448 -0
  59. package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +698 -0
  60. package/deps/jq/modules/oniguruma/index.html +181 -0
  61. package/deps/jq/modules/oniguruma/index_ja.html +184 -0
  62. package/deps/jq/modules/oniguruma/install-sh +541 -0
  63. package/deps/jq/modules/oniguruma/m4/.whatever +0 -0
  64. package/deps/jq/modules/oniguruma/make_win32.bat +3 -0
  65. package/deps/jq/modules/oniguruma/make_win64.bat +3 -0
  66. package/deps/jq/modules/oniguruma/missing +215 -0
  67. package/deps/jq/modules/oniguruma/onig-config.in +78 -0
  68. package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +13 -0
  69. package/deps/jq/modules/oniguruma/oniguruma.pc.in +14 -0
  70. package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +28 -0
  71. package/deps/jq/modules/oniguruma/sample/Makefile.am +34 -0
  72. package/deps/jq/modules/oniguruma/sample/bug_fix.c +131 -0
  73. package/deps/jq/modules/oniguruma/sample/crnl.c +127 -0
  74. package/deps/jq/modules/oniguruma/sample/encode.c +308 -0
  75. package/deps/jq/modules/oniguruma/sample/listcap.c +110 -0
  76. package/deps/jq/modules/oniguruma/sample/names.c +75 -0
  77. package/deps/jq/modules/oniguruma/sample/posix.c +96 -0
  78. package/deps/jq/modules/oniguruma/sample/scan.c +88 -0
  79. package/deps/jq/modules/oniguruma/sample/simple.c +59 -0
  80. package/deps/jq/modules/oniguruma/sample/sql.c +76 -0
  81. package/deps/jq/modules/oniguruma/sample/syntax.c +76 -0
  82. package/deps/jq/modules/oniguruma/sample/user_property.c +87 -0
  83. package/deps/jq/modules/oniguruma/src/Makefile.am +58 -0
  84. package/deps/jq/modules/oniguruma/src/Makefile.windows +183 -0
  85. package/deps/jq/modules/oniguruma/src/ascii.c +61 -0
  86. package/deps/jq/modules/oniguruma/src/big5.c +190 -0
  87. package/deps/jq/modules/oniguruma/src/config.h.cmake.in +71 -0
  88. package/deps/jq/modules/oniguruma/src/config.h.win32 +84 -0
  89. package/deps/jq/modules/oniguruma/src/config.h.win64 +84 -0
  90. package/deps/jq/modules/oniguruma/src/cp1251.c +203 -0
  91. package/deps/jq/modules/oniguruma/src/euc_jp.c +310 -0
  92. package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +158 -0
  93. package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +27 -0
  94. package/deps/jq/modules/oniguruma/src/euc_kr.c +188 -0
  95. package/deps/jq/modules/oniguruma/src/euc_tw.c +171 -0
  96. package/deps/jq/modules/oniguruma/src/gb18030.c +538 -0
  97. package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +67 -0
  98. package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +55 -0
  99. package/deps/jq/modules/oniguruma/src/iso8859_1.c +275 -0
  100. package/deps/jq/modules/oniguruma/src/iso8859_10.c +242 -0
  101. package/deps/jq/modules/oniguruma/src/iso8859_11.c +99 -0
  102. package/deps/jq/modules/oniguruma/src/iso8859_13.c +231 -0
  103. package/deps/jq/modules/oniguruma/src/iso8859_14.c +244 -0
  104. package/deps/jq/modules/oniguruma/src/iso8859_15.c +238 -0
  105. package/deps/jq/modules/oniguruma/src/iso8859_16.c +240 -0
  106. package/deps/jq/modules/oniguruma/src/iso8859_2.c +238 -0
  107. package/deps/jq/modules/oniguruma/src/iso8859_3.c +238 -0
  108. package/deps/jq/modules/oniguruma/src/iso8859_4.c +240 -0
  109. package/deps/jq/modules/oniguruma/src/iso8859_5.c +229 -0
  110. package/deps/jq/modules/oniguruma/src/iso8859_6.c +99 -0
  111. package/deps/jq/modules/oniguruma/src/iso8859_7.c +225 -0
  112. package/deps/jq/modules/oniguruma/src/iso8859_8.c +99 -0
  113. package/deps/jq/modules/oniguruma/src/iso8859_9.c +231 -0
  114. package/deps/jq/modules/oniguruma/src/koi8.c +253 -0
  115. package/deps/jq/modules/oniguruma/src/koi8_r.c +215 -0
  116. package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +22 -0
  117. package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +306 -0
  118. package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +18 -0
  119. package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +545 -0
  120. package/deps/jq/modules/oniguruma/src/mktable.c +1184 -0
  121. package/deps/jq/modules/oniguruma/src/onig_init.c +45 -0
  122. package/deps/jq/modules/oniguruma/src/oniggnu.h +85 -0
  123. package/deps/jq/modules/oniguruma/src/onigposix.h +169 -0
  124. package/deps/jq/modules/oniguruma/src/oniguruma.h +841 -0
  125. package/deps/jq/modules/oniguruma/src/regcomp.c +6300 -0
  126. package/deps/jq/modules/oniguruma/src/regenc.c +917 -0
  127. package/deps/jq/modules/oniguruma/src/regenc.h +243 -0
  128. package/deps/jq/modules/oniguruma/src/regerror.c +393 -0
  129. package/deps/jq/modules/oniguruma/src/regexec.c +3856 -0
  130. package/deps/jq/modules/oniguruma/src/regext.c +202 -0
  131. package/deps/jq/modules/oniguruma/src/reggnu.c +147 -0
  132. package/deps/jq/modules/oniguruma/src/regint.h +779 -0
  133. package/deps/jq/modules/oniguruma/src/regparse.c +5403 -0
  134. package/deps/jq/modules/oniguruma/src/regparse.h +351 -0
  135. package/deps/jq/modules/oniguruma/src/regposerr.c +105 -0
  136. package/deps/jq/modules/oniguruma/src/regposix.c +306 -0
  137. package/deps/jq/modules/oniguruma/src/regsyntax.c +315 -0
  138. package/deps/jq/modules/oniguruma/src/regtrav.c +76 -0
  139. package/deps/jq/modules/oniguruma/src/regversion.c +57 -0
  140. package/deps/jq/modules/oniguruma/src/sjis.c +341 -0
  141. package/deps/jq/modules/oniguruma/src/sjis_prop.c +158 -0
  142. package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +27 -0
  143. package/deps/jq/modules/oniguruma/src/st.c +589 -0
  144. package/deps/jq/modules/oniguruma/src/st.h +68 -0
  145. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +2250 -0
  146. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +203 -0
  147. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +113 -0
  148. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +1225 -0
  149. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +24742 -0
  150. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +4846 -0
  151. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +2571 -0
  152. package/deps/jq/modules/oniguruma/src/unicode.c +664 -0
  153. package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +2548 -0
  154. package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +203 -0
  155. package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +113 -0
  156. package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1366 -0
  157. package/deps/jq/modules/oniguruma/src/unicode_property_data.c +25306 -0
  158. package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +4940 -0
  159. package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +2854 -0
  160. package/deps/jq/modules/oniguruma/src/utf16_be.c +235 -0
  161. package/deps/jq/modules/oniguruma/src/utf16_le.c +245 -0
  162. package/deps/jq/modules/oniguruma/src/utf32_be.c +194 -0
  163. package/deps/jq/modules/oniguruma/src/utf32_le.c +194 -0
  164. package/deps/jq/modules/oniguruma/src/utf8.c +335 -0
  165. package/deps/jq/modules/oniguruma/test/Makefile.am +28 -0
  166. package/deps/jq/modules/oniguruma/test/testc.c +874 -0
  167. package/deps/jq/modules/oniguruma/test/testu.c +916 -0
  168. package/deps/jq/modules/oniguruma/test-driver +153 -0
  169. package/deps/jq/modules/oniguruma/windows/testc.c +869 -0
  170. package/deps/jq/scripts/crosscompile +2 -1
  171. package/deps/jq/scripts/gen_utf8_tables.py +2 -3
  172. package/deps/jq/scripts/update-website +29 -0
  173. package/deps/jq/scripts/version +7 -2
  174. package/deps/jq/sig/jq-release.key +41 -0
  175. package/deps/jq/sig/v1.3/jq-linux-x86.asc +17 -0
  176. package/deps/jq/sig/v1.3/jq-linux-x86_64.asc +17 -0
  177. package/deps/jq/sig/v1.3/jq-osx-x86.asc +17 -0
  178. package/deps/jq/sig/v1.3/jq-osx-x86_64.asc +17 -0
  179. package/deps/jq/sig/v1.3/jq-win32.exe.asc +17 -0
  180. package/deps/jq/sig/v1.3/jq-win64.exe.asc +17 -0
  181. package/deps/jq/sig/v1.3/sha256sum.txt +6 -0
  182. package/deps/jq/sig/v1.4/jq-linux-x86.asc +17 -0
  183. package/deps/jq/sig/v1.4/jq-linux-x86_64.asc +17 -0
  184. package/deps/jq/sig/v1.4/jq-osx-x86.asc +17 -0
  185. package/deps/jq/sig/v1.4/jq-osx-x86_64.asc +17 -0
  186. package/deps/jq/sig/v1.4/jq-solaris11-32.asc +17 -0
  187. package/deps/jq/sig/v1.4/jq-solaris11-64.asc +17 -0
  188. package/deps/jq/sig/v1.4/jq-win32.exe.asc +17 -0
  189. package/deps/jq/sig/v1.4/jq-win64.exe.asc +17 -0
  190. package/deps/jq/sig/v1.4/sha256sum.txt +8 -0
  191. package/deps/jq/sig/v1.5/jq-linux32-no-oniguruma.asc +17 -0
  192. package/deps/jq/sig/v1.5/jq-linux32.asc +17 -0
  193. package/deps/jq/sig/v1.5/jq-linux64.asc +17 -0
  194. package/deps/jq/sig/v1.5/jq-osx-amd64.asc +17 -0
  195. package/deps/jq/sig/v1.5/jq-win32.exe.asc +17 -0
  196. package/deps/jq/sig/v1.5/jq-win64.exe.asc +17 -0
  197. package/deps/jq/sig/v1.5/sha256sum.txt +5 -0
  198. package/deps/jq/sig/v1.5rc1/jq-linux-x86_64-static.asc +17 -0
  199. package/deps/jq/sig/v1.5rc1/jq-win32.exe.asc +17 -0
  200. package/deps/jq/sig/v1.5rc1/jq-win64.exe.asc +17 -0
  201. package/deps/jq/sig/v1.5rc1/sha256sum.txt +3 -0
  202. package/deps/jq/sig/v1.5rc2/jq-linux-x86.asc +17 -0
  203. package/deps/jq/sig/v1.5rc2/jq-linux-x86_64.asc +17 -0
  204. package/deps/jq/sig/v1.5rc2/jq-osx-x86_64.asc +17 -0
  205. package/deps/jq/sig/v1.5rc2/jq-win32.exe.asc +17 -0
  206. package/deps/jq/sig/v1.5rc2/jq-win64.exe.asc +17 -0
  207. package/deps/jq/sig/v1.5rc2/sha256sum.txt +5 -0
  208. package/deps/jq/sig/v1.6/jq-linux32.asc +16 -0
  209. package/deps/jq/sig/v1.6/jq-linux64.asc +16 -0
  210. package/deps/jq/sig/v1.6/jq-osx-amd64.asc +16 -0
  211. package/deps/jq/sig/v1.6/jq-win32.exe.asc +16 -0
  212. package/deps/jq/sig/v1.6/jq-win64.exe.asc +16 -0
  213. package/deps/jq/sig/v1.6/sha256sum.txt +5 -0
  214. package/deps/jq/{builtin.c → src/builtin.c} +449 -344
  215. package/deps/jq/{builtin.h → src/builtin.h} +0 -0
  216. package/deps/jq/src/builtin.jq +311 -0
  217. package/deps/jq/{bytecode.c → src/bytecode.c} +0 -0
  218. package/deps/jq/{bytecode.h → src/bytecode.h} +0 -0
  219. package/deps/jq/{compile.c → src/compile.c} +213 -37
  220. package/deps/jq/{compile.h → src/compile.h} +7 -2
  221. package/deps/jq/{exec_stack.h → src/exec_stack.h} +0 -0
  222. package/deps/jq/{execute.c → src/execute.c} +127 -24
  223. package/deps/jq/{inject_errors.c → src/inject_errors.c} +0 -0
  224. package/deps/jq/{jq.h → src/jq.h} +13 -2
  225. package/deps/jq/{jq_parser.h → src/jq_parser.h} +0 -0
  226. package/deps/jq/{jq_test.c → src/jq_test.c} +1 -1
  227. package/deps/jq/{jv.c → src/jv.c} +24 -5
  228. package/deps/jq/{jv.h → src/jv.h} +46 -11
  229. package/deps/jq/{jv_alloc.c → src/jv_alloc.c} +0 -0
  230. package/deps/jq/{jv_alloc.h → src/jv_alloc.h} +0 -0
  231. package/deps/jq/{jv_aux.c → src/jv_aux.c} +38 -14
  232. package/deps/jq/{jv_dtoa.c → src/jv_dtoa.c} +4 -5
  233. package/deps/jq/{jv_dtoa.h → src/jv_dtoa.h} +0 -0
  234. package/deps/jq/src/jv_file.c +81 -0
  235. package/deps/jq/{jv_parse.c → src/jv_parse.c} +8 -2
  236. package/deps/jq/{jv_print.c → src/jv_print.c} +80 -27
  237. package/deps/jq/{jv_unicode.c → src/jv_unicode.c} +28 -4
  238. package/deps/jq/{jv_unicode.h → src/jv_unicode.h} +1 -0
  239. package/deps/jq/{jv_utf8_tables.h → src/jv_utf8_tables.h} +0 -0
  240. package/deps/jq/{lexer.c → src/lexer.c} +317 -292
  241. package/deps/jq/{lexer.h → src/lexer.h} +16 -12
  242. package/deps/jq/{lexer.l → src/lexer.l} +5 -4
  243. package/deps/jq/src/libm.h +291 -0
  244. package/deps/jq/{linker.c → src/linker.c} +5 -3
  245. package/deps/jq/{linker.h → src/linker.h} +0 -0
  246. package/deps/jq/{locfile.c → src/locfile.c} +1 -1
  247. package/deps/jq/{locfile.h → src/locfile.h} +0 -0
  248. package/deps/jq/{main.c → src/main.c} +202 -100
  249. package/deps/jq/{opcode_list.h → src/opcode_list.h} +4 -0
  250. package/deps/jq/{parser.c → src/parser.c} +1149 -1069
  251. package/deps/jq/{parser.h → src/parser.h} +28 -24
  252. package/deps/jq/{parser.y → src/parser.y} +108 -52
  253. package/deps/jq/{util.c → src/util.c} +12 -9
  254. package/deps/jq/{util.h → src/util.h} +0 -0
  255. package/deps/jq/tests/base64.test +35 -0
  256. package/deps/jq/tests/base64test +5 -0
  257. package/deps/jq/tests/jq-f-test.sh +4 -0
  258. package/deps/jq/tests/jq.test +305 -21
  259. package/deps/jq/tests/jqtest +1 -1
  260. package/deps/jq/tests/mantest +1 -1
  261. package/deps/jq/tests/onig.test +13 -0
  262. package/deps/jq/tests/onigtest +1 -1
  263. package/deps/jq/tests/optional.test +20 -0
  264. package/deps/jq/tests/optionaltest +5 -0
  265. package/deps/jq/tests/setup +7 -1
  266. package/deps/jq/tests/shtest +133 -29
  267. package/deps/jq/tests/utf8-truncate.jq +3 -0
  268. package/deps/jq/tests/utf8test +10 -0
  269. package/lib/index.js +7 -1
  270. package/package.json +3 -3
  271. package/test/santiy.test.js +24 -0
  272. package/deps/jq/docs/default_manpage.md +0 -22
  273. package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.css +0 -1058
  274. package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.min.css +0 -9
  275. package/deps/jq/docs/public/bootstrap/css/bootstrap.css +0 -5224
  276. package/deps/jq/docs/public/bootstrap/css/bootstrap.min.css +0 -9
  277. package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings-white.png +0 -0
  278. package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings.png +0 -0
  279. package/deps/jq/docs/public/bootstrap/js/bootstrap.js +0 -2027
  280. package/deps/jq/docs/public/bootstrap/js/bootstrap.min.js +0 -6
  281. package/deps/jq/docs/templates/shared/_header.liquid +0 -26
  282. package/deps/jq/jq.1.default +0 -39
  283. package/deps/jq/jv_file.c +0 -49
  284. package/deps/jq/libm.h +0 -160
  285. package/deps/jq/setup.sh +0 -33
  286. package/reports/jest-port-api.xml +0 -35
package/binding.gyp CHANGED
@@ -8,15 +8,15 @@
8
8
  "include_dirs": [
9
9
  "<!(node -e \"require('nan')\")",
10
10
  "<(module_root_dir)/",
11
- "deps/jq"
11
+ "deps/jq/src"
12
12
  ],
13
13
  'conditions': [
14
14
  [
15
15
  'OS=="linux"',
16
16
  {
17
17
  "libraries": [
18
- "../build/deps/libjq.so.1",
19
18
  "-Wl,-rpath='$$ORIGIN/../deps'",
19
+ "../build/deps/libjq.so.1",
20
20
  ],
21
21
  'cflags_cc': [
22
22
  '-std=c++17'
@@ -43,7 +43,7 @@
43
43
  '-std=c++17'
44
44
  ],
45
45
  "include_dirs": [
46
- "deps/jq"
46
+ "deps/jq/src"
47
47
  ]
48
48
  }
49
49
  ]
package/configure CHANGED
@@ -11,16 +11,18 @@ echo $scriptdir
11
11
  autoreconf -fi
12
12
  CPPFLAGS=-D_REENTRANT ./configure \
13
13
  --disable-maintainer-mode \
14
+ --with-oniguruma=builtin \
14
15
  --libdir="${scriptdir}/build/deps" \
15
16
  --prefix="${scriptdir}/build/deps" $*
16
17
  make -j8
17
- make install-libLTLIBRARIES install-includeHEADERS
18
18
 
19
- # cp modules/oniguruma/src/.libs/libonig.a ${scriptdir}/build/deps/libonig.a
20
- # cp modules/oniguruma/src/.libs/libonig.la ${scriptdir}/build/deps/libonig.la
21
- # cp modules/oniguruma/src/.libs/libonig.lai ${scriptdir}/build/deps/libonig.lai
22
- # cp modules/oniguruma/src/.libs/libonig.4.dylib ${scriptdir}/build/deps/libonig.4.dylib
23
- # cp modules/oniguruma/src/.libs/libonig.dylib ${scriptdir}/build/deps/libonig.dylib
19
+ cp modules/oniguruma/src/.libs/libonig.a ${scriptdir}/build/deps/libonig.a
20
+ cp modules/oniguruma/src/.libs/libonig.la ${scriptdir}/build/deps/libonig.la
21
+ cp modules/oniguruma/src/.libs/libonig.lai ${scriptdir}/build/deps/libonig.lai
22
+ cp modules/oniguruma/src/.libs/libonig.4.dylib ${scriptdir}/build/deps/libonig.4.dylib
23
+ cp modules/oniguruma/src/.libs/libonig.dylib ${scriptdir}/build/deps/libonig.dylib
24
+
25
+ make install-libLTLIBRARIES install-includeHEADERS
24
26
 
25
27
  echo "finished building jq"
26
28
  popd &> /dev/null
@@ -2,52 +2,201 @@ sudo: false
2
2
 
3
3
  language: c
4
4
 
5
- compiler:
6
- - gcc
7
- - clang
5
+ stages:
6
+ - name: test
8
7
 
9
- matrix:
8
+ - name: build
9
+ # Don't run build stage for pull requests to save time and resources.
10
+ if: type != pull_request
11
+
12
+
13
+ jobs:
10
14
  include:
11
- - compiler: gcc
12
- env: COVERAGE="--disable-valgrind --enable-gcov"
15
+ # Build with gcc and run tests on Ubuntu.
16
+ - &test-ubuntu
17
+ stage: test
18
+ os: linux
19
+ compiler: gcc
20
+
21
+ addons:
22
+ apt:
23
+ packages:
24
+ - valgrind
25
+ - bison
26
+ - automake
27
+
28
+ before_install:
29
+ - uname -s
30
+ - rvm install ruby-1.9.3-p551
31
+ - rvm use 1.9.3
32
+ - rm src/{lexer,parser}.{c,h}
33
+ - sed -i.bak '/^AM_INIT_AUTOMAKE(\[-Wno-portability 1\.14\])$/s/14/11/' modules/oniguruma/configure.ac
34
+
35
+ install:
36
+ - bundle install --gemfile=docs/Gemfile
37
+ - wget http://ftp.debian.org/debian/pool/main/b/bison/bison_3.0.2.dfsg-2_amd64.deb
38
+ - ar p bison_3.0.2.dfsg-2_amd64.deb data.tar.xz | tar xJ
39
+ - if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi
40
+
41
+ before_script:
42
+ # If this is OS X we'll get bison from brew, else we'll get bison
43
+ # from the .deb unpacked above in the install section.
44
+ - PATH=/usr/local/opt/bison/bin:$PWD/usr/bin:$PATH
45
+ - echo SHELL=$SHELL
46
+ - echo PATH=$PATH
47
+ - which bison
48
+ - bison --version
49
+ - autoreconf -if
50
+ - ./configure --with-oniguruma=builtin YACC="$(which bison) -y" $COVERAGE
51
+
52
+ script:
53
+ # When using the bison from Debian we need to tell that bison where
54
+ # to find its data. Yay non-relocatable code. Not.
55
+ - echo PATH=$PATH
56
+ - which bison
57
+ - make BISON_PKGDATADIR=$PWD/usr/share/bison src/parser.c || make src/parser.c
58
+ # Make dist!
59
+ #
60
+ # Make it first to fail the build early, before we test with
61
+ # valgrind.
62
+ - make dist
63
+ # Build and test the dist (without valgrind)
64
+ - |
65
+ (
66
+ tar xvf jq-`scripts/version`.tar.gz &&
67
+ cd jq-`scripts/version` &&
68
+ pwd &&
69
+ ./configure --disable-valgrind --with-oniguruma=builtin YACC="$(which bison) -y" $COVERAGE &&
70
+ make BISON_PKGDATADIR=$PWD/usr/share/bison src/parser.c || make src/parser.c &&
71
+ make -j4 &&
72
+ make check -j4 || true
73
+ )
74
+ # Build and test the HEAD
75
+ - make -j4
76
+ - make check -j4
77
+
78
+ after_failure:
79
+ - cat test-suite.log
80
+ - cat tests/*.log
81
+
82
+
83
+ # Build with clang and run tests on Ubuntu.
84
+ - <<: *test-ubuntu
85
+ compiler: clang
86
+
87
+
88
+ # Build with gcc and run tests with gcov on Ubuntu.
89
+ - <<: *test-ubuntu
90
+ env: COVERAGE="--disable-valgrind --enable-gcov"
91
+
92
+ after_script:
93
+ - rm -rf src/.libs # don't care about coverage for libjq
94
+ - coveralls --gcov-options '\-lp'
95
+ -e src/lexer.c -e src/parser.c -e src/jv_dtoa.c
96
+
13
97
 
14
- addons:
15
- apt:
16
- packages:
17
- - libonig-dev
18
- - valgrind
98
+ # Build with gcc and run tests on macOS.
99
+ - &test-osx
100
+ <<: *test-ubuntu
101
+ os: osx
19
102
 
20
- before_install:
21
- - rm lexer.h lexer.c parser.h parser.c
103
+ before_install:
104
+ - uname -s
105
+ - brew update
106
+ - brew install flex bison
107
+ - rvm install ruby-1.9.3-p551
108
+ - rvm use 1.9.3
109
+ - gem install bundler
110
+ - rm src/{lexer,parser}.{c,h}
111
+ - sed -i.bak '/^AM_INIT_AUTOMAKE(\[-Wno-portability 1\.14\])$/s/14/11/' modules/oniguruma/configure.ac
22
112
 
23
- install:
24
- - bundle install --gemfile=docs/Gemfile
113
+ install:
114
+ - bundle install --gemfile=docs/Gemfile
115
+ - if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi
25
116
 
26
- - wget http://ftp.debian.org/debian/pool/main/b/bison/bison_3.0.2.dfsg-2_amd64.deb
27
- - ar p bison_3.0.2.dfsg-2_amd64.deb data.tar.xz | tar xJ
28
117
 
29
- - if [ -n "$COVERAGE" ]; then pip install --user cpp-coveralls; fi
118
+ # Build with clang and run tests on macOS.
119
+ - <<: *test-osx
120
+ compiler: clang
30
121
 
31
- before_script:
32
- - autoreconf -i
33
- - ./configure
34
- YACC="usr/bin/bison -y"
35
- $COVERAGE
36
122
 
37
- script:
38
- - make -j4 BISON_PKGDATADIR=$(pwd)/usr/share/bison
39
- - make check -j4
123
+ # Build with gcc and run tests on Alpine Linux v3.7 (inside chroot).
124
+ # Note: Alpine uses musl libc.
125
+ - &test-alpine
126
+ stage: test
127
+ os: linux
128
+ language: minimal
129
+ compiler: gcc
130
+ sudo: true
40
131
 
41
- after_script:
42
- - |
43
- if [ -n "$COVERAGE" ]; then
44
- rm -rf .libs usr # don't care about coverage for libjq and bison
45
- coveralls -e lexer.c -e parser.c -e jv_dtoa.c --gcov-options '\-lp'
46
- fi
132
+ before_install:
133
+ - "wget 'https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/v0.7.0/alpine-chroot-install' \
134
+ && echo '090d323d887ef3a2fd4e752428553f22a52b87bb alpine-chroot-install' | sha1sum -c || travis_terminate 1"
135
+ - alpine() { /alpine/enter-chroot -u "$USER" "$@"; }
136
+
137
+ install:
138
+ - sudo sh alpine-chroot-install -b v3.7 -a "$ARCH"
139
+ -p 'build-base automake autoconf bison libtool oniguruma-dev'
140
+
141
+ before_script:
142
+ - autoreconf -if
143
+
144
+ script:
145
+ - alpine ./configure --disable-docs
146
+ - alpine make
147
+ - alpine make check
148
+
149
+
150
+ # Build release binary statically linked with musl libc on Alpine Linux
151
+ # (inside chroot). If building a tagged commit, then deploy release
152
+ # tarball to GitHub Releases.
153
+ - &build-alpine
154
+ <<: *test-alpine
155
+ stage: build
156
+ env: ARCH=x86_64
157
+
158
+ script:
159
+ - alpine ./configure --disable-docs --enable-all-static
160
+ CFLAGS='-Os -static -no-pie' CXXFLAGS='-Os -static -no-pie'
161
+ - alpine make
162
+ - alpine strip jq
163
+
164
+ - jq -V
165
+ - ls -lah jq
166
+ - file jq
167
+ # Ensure that the built executable is really statically linked.
168
+ - file jq | grep -Fw 'statically linked'
169
+
170
+ before_deploy:
171
+ - PKGNAME="jq-$TRAVIS_TAG-$ARCH-linux"
172
+ - mkdir $PKGNAME && mv jq $PKGNAME/
173
+ - tar -czf $PKGNAME.tar.gz $PKGNAME/
174
+ - sha256sum $PKGNAME.tar.gz > $PKGNAME.tar.gz.sha256
175
+
176
+ deploy:
177
+ provider: releases
178
+ api_key:
179
+ secure: # TODO: put encrypted GitHub token here!
180
+ file: jq-$TRAVIS_TAG-*.tar.gz*
181
+ file_glob: true
182
+ skip_cleanup: true
183
+ on:
184
+ tags: true
185
+
186
+ # Build binaries for other architectures using QEMU user-mode emulation.
187
+ - <<: *build-alpine
188
+ env: ARCH=x86
189
+
190
+ - <<: *build-alpine
191
+ env: ARCH=aarch64
192
+
193
+ - <<: *build-alpine
194
+ env: ARCH=armhf
195
+
196
+ - <<: *build-alpine
197
+ env: ARCH=ppc64le
47
198
 
48
- after_failure:
49
- - cat test-suite.log
50
- - cat tests/*.log
51
199
 
52
200
  notifications:
53
201
  email: false
202
+
package/deps/jq/AUTHORS CHANGED
@@ -4,63 +4,63 @@ Stephen Dolan <mu@netsoc.tcd.ie>
4
4
  Maintained by:
5
5
  Nicolas Williams <nico@cryptonector.com>
6
6
  William Langford <wlangfor@gmail.com>
7
- David Tolnay <dtolnay@gmail.com>
8
7
 
9
8
  Contributions by:
10
- Andrew Rodland <andrew@cleverdomain.org> - bug fixes
11
- Ankur <ankz.kothari@gmail.com> - bug fixes
12
- Anthony Shortland <anthony.shortland@me.com> - rpmbuild target
13
- Brendan Macmillan <melbourne.research@gmail.com> - bug fixes, load library from ~/.jq
14
- David R. MacIver <david@drmaciver.com> - bug fixes
15
- David Tolnay <dtolnay@gmail.com> - destructuring, build improvements
16
- Filippo Giunchedi <fgiunchedi@gmail.com> - bug fixes
17
- Filippo Valsorda <filippo.valsorda@gmail.com> - recursive object merge (`*`)
18
- Jack Pearkes <jackpearkes@gmail.com> - update tutorial
19
- Jingwen Owen Ou <jingweno@gmail.com> - jqplay.org and link to it
20
- Joe Littlejohn <joe.littlejohn@nokia.com> - bug fixes
21
- Juan Guerrero <juan.guerrero.lozano@gmail.com> - bug fixes
22
- Kenny Shen <kenny.shen@zalora.com> - doc fixes
23
- Lee Thompson <stagr.lee@gmail.com> - autoconf stuff
24
- Markus Lanthaler <mark_lanthaler@gmx.net> - doc fixes
25
- Michael Daines <michael@mdaines.com> - add sqrt; doc fixes
26
- Mike McCabe <mccabe@archive.org> - math (libm) functions
27
- Nicolas Pouillard <nicolas.pouillard@gmail.com> - add tests
28
- Nicolas Williams <nico@cryptonector.com> - library-fication, autoconf stuff, exception handling, various
29
- Peter van Dijk <peter@7bits.nl> - doc fixes
30
- Philipp Hagemeister <phihag@phihag.de> - doc fixes
31
- polyester <paul@cleanclothes.org> - automake version update
32
- Rémy Léone <remy.leone@gmail.com> - add .travis.yml
33
- Ryoichi KATO <ryo1kato@gmail.com> - doc fixes
34
- Santiago Lapresta <santiago.lapresta@gmail.com> - join, arrays, all, any, other filters
35
- pkoppstein <pkoppstein@gmail.com> - various builtins, improvements
36
- 13ren <melbourne.research@gmail.com>
37
9
  Aaron Peschel <apeschel@zendesk.com>
38
10
  Adam Lindberg <hello@alind.io>
39
11
  Alex Chamberlain <alex@alexchamberlain.co.uk>
40
12
  Andrew O'Brien <obrien.andrew@gmail.com> - docs build
13
+ Andrew Rodland <andrew@cleverdomain.org> - bug fixes
14
+ Ankur <ankz.kothari@gmail.com> - bug fixes
15
+ Anthony Shortland <anthony.shortland@me.com> - rpmbuild target
41
16
  Assaf Gordon <assafgordon@gmail.com> - error handling
17
+ Brendan Macmillan <melbourne.research@gmail.com> - bug fixes, load library from ~/.jq
42
18
  cdnbacon <mike@busbud.com>
43
19
  Charles Merriam <charles.merriam@gmail.com>
44
20
  Colin von Heuring <colin@janrain.com>
45
21
  Damian Gryski <damian@gryski.com>
22
+ David Fetter <david@fetter.org> - added --rawfile
46
23
  David Haguenauer <ml@kurokatta.org>
24
+ David R. MacIver <david@drmaciver.com> - bug fixes
25
+ David Tolnay <dtolnay@gmail.com> - destructuring, build improvements
47
26
  Doug Luce <doug@github.con.com> - build
48
27
  Eiichi Sato <sato.eiichi@gmail.com>
28
+ Eric Bréchemier <eric@egull.co> - bug fix
29
+ Filippo Giunchedi <fgiunchedi@gmail.com> - bug fixes
30
+ Filippo Valsorda <filippo.valsorda@gmail.com> - recursive object merge (`*`)
49
31
  Hanfei Shen <qqshfox@gmail.com>
50
- Ian Miell <ian.miell@gmail.com>
51
32
  i <isomorphisms@sdf.org>
33
+ Ian Miell <ian.miell@gmail.com>
34
+ Jack Pearkes <jackpearkes@gmail.com> - update tutorial
52
35
  James Andariese <james.andariese@locationlabs.com> - Dockerfile
36
+ Jingwen Owen Ou <jingweno@gmail.com> - jqplay.org and link to it
53
37
  jkleint <jkleint@gmail.com>
38
+ Joe Littlejohn <joe.littlejohn@nokia.com> - bug fixes
54
39
  Joel Purra <code+github@joelpurra.com>
40
+ Juan Guerrero <juan.guerrero.lozano@gmail.com> - bug fixes
41
+ Kenny Shen <kenny.shen@zalora.com> - doc fixes
55
42
  Kim De Mey <kim.demey@gmail.com> - build
56
43
  Kim Toms <kim.toms@bplglobal.net>
57
44
  LCD 47 <lcd047@gmail.com>
58
- Lee Thompson <thompson@dtosolutions.com> - rpm
45
+ Lee Thompson <stagr.lee@gmail.com> - autoconf stuff, rpm
59
46
  Marc Abramowitz <marc@marc-abramowitz.com>
60
47
  Marc Bruggmann <marcbr@spotify.com>
48
+ Markus Lanthaler <mark_lanthaler@gmx.net> - doc fixes
61
49
  Maxime Biais <maxime.biais@gmail.com> - build
50
+ Michael Daines <michael@mdaines.com> - add sqrt; doc fixes
62
51
  Mike Fletcher <john.m.fletcher@bankofamerica.com>
52
+ Mike McCabe <mccabe@archive.org> - math (libm) functions
53
+ Nicolas Pouillard <nicolas.pouillard@gmail.com> - add tests
54
+ Nicolas Williams <nico@cryptonector.com> - library-fication, autoconf stuff, exception handling, various
55
+ Peter van Dijk <peter@7bits.nl> - doc fixes
56
+ Philipp Hagemeister <phihag@phihag.de> - doc fixes
57
+ pkoppstein <pkoppstein@gmail.com> - various builtins, improvements
58
+ polyester <paul@cleanclothes.org> - automake version update
59
+ Ryoichi KATO <ryo1kato@gmail.com> - doc fixes
60
+ Rémy Léone <remy.leone@gmail.com> - add .travis.yml
61
+ Santiago Lapresta <santiago.lapresta@gmail.com> - join, arrays, all, any, other filters
63
62
  Sebastian Freundt <freundt@ga-group.nl> - build
63
+ Shaun Guth <shaun.guth@gmail.com> - base64d
64
64
  Shay Elkin <shay@everything.me>
65
65
  Simon Elsbrock <simon@iodev.org> - Debian
66
66
  Stefan Seemayer <stefan@seemayer.de>
@@ -71,3 +71,4 @@ Steven Penny <svnpenn@gmail.com> - Windows bug fixes
71
71
  tal@whatexit.org <tal@whatexit.org>
72
72
  Travis Gockel <travis@gockelhut.com>
73
73
  Zhiming Wang <zmwangx@gmail.com>
74
+ 13ren <melbourne.research@gmail.com>
package/deps/jq/COPYING CHANGED
@@ -30,9 +30,9 @@ license, which can be found at:
30
30
  The documentation website includes a copy of Twitter's Boostrap and
31
31
  relies on Bonsai, Liquid templates and various other projects, look
32
32
  them up for detailed licensing conditions.
33
-
34
33
 
35
-
34
+
35
+
36
36
  jq incorporates David M. Gay's dtoa.c and g_fmt.c, which bear the
37
37
  following notices:
38
38
 
package/deps/jq/KEYS ADDED
@@ -0,0 +1,8 @@
1
+ pub 4096R/71523402 2015-10-11
2
+ Key fingerprint = 4FD7 01D6 FA9B 3D2D F5AC 935D AF19 040C 7152 3402
3
+ uid jq Release Signing Key <jq@stedolan.github.io>
4
+
5
+ pub 2048R/D15684DB 2015-10-12 [expires: 2017-10-11]
6
+ Key fingerprint = 7F6C 7BD3 0412 AFD5 8C1A 5007 EB26 A4F8 D156 84DB
7
+ uid Nicolas Williams <nico@cryptonector.com>
8
+ sub 2048R/9C9CCD6A 2015-10-12 [expires: 2017-10-11]
@@ -1,18 +1,22 @@
1
1
 
2
2
  ### C source files to be built and distributed.
3
3
 
4
- LIBJQ_INCS = jq_parser.h builtin.h bytecode.h compile.h exec_stack.h \
5
- libm.h jv_alloc.h jv_dtoa.h jv_unicode.h locfile.h \
6
- opcode_list.h parser.y jv_utf8_tables.h lexer.l util.h linker.h
7
-
8
- LIBJQ_SRC = locfile.c bytecode.c compile.c execute.c builtin.c jv.c \
9
- jv_parse.c jv_print.c jv_dtoa.c jv_unicode.c jv_aux.c jv_file.c \
10
- jv_alloc.c jq_test.c util.c linker.c ${LIBJQ_INCS}
4
+ LIBJQ_INCS = src/builtin.h src/bytecode.h src/compile.h \
5
+ src/exec_stack.h src/jq_parser.h src/jv_alloc.h src/jv_dtoa.h \
6
+ src/jv_unicode.h src/jv_utf8_tables.h src/lexer.l src/libm.h \
7
+ src/linker.h src/locfile.h src/opcode_list.h src/parser.y \
8
+ src/util.h
9
+
10
+ LIBJQ_SRC = src/builtin.c src/bytecode.c src/compile.c src/execute.c \
11
+ src/jq_test.c src/jv.c src/jv_alloc.c src/jv_aux.c \
12
+ src/jv_dtoa.c src/jv_file.c src/jv_parse.c src/jv_print.c \
13
+ src/jv_unicode.c src/linker.c src/locfile.c src/util.c \
14
+ ${LIBJQ_INCS}
11
15
 
12
16
  ### C build options
13
17
 
14
- AM_CFLAGS = -Wextra -Wall -Wno-missing-field-initializers \
15
- -Wno-unused-parameter -Wno-unused-function
18
+ AM_CFLAGS = -Wextra -Wall -Wno-missing-field-initializers \
19
+ -Wno-unused-parameter -Wno-unused-function
16
20
 
17
21
  ACLOCAL_AMFLAGS = -I config/m4
18
22
 
@@ -21,12 +25,13 @@ ACLOCAL_AMFLAGS = -I config/m4
21
25
  # While there is some autoconf macro support for lex/flex, it doesn't support
22
26
  # header file creation so we'll use good old make
23
27
  if MAINTAINER_MODE
24
- BUILT_SOURCES = lexer.h lexer.c parser.h parser.c version.h
25
- lexer.c: lexer.l
26
- $(AM_V_LEX) flex -o lexer.c --header-file=lexer.h $<
27
- lexer.h: lexer.c
28
+ BUILT_SOURCES = src/lexer.h src/lexer.c src/parser.h src/parser.c \
29
+ src/builtin.inc src/version.h
30
+ src/lexer.c: src/lexer.l
31
+ $(AM_V_LEX) flex -o src/lexer.c --header-file=src/lexer.h $<
32
+ src/lexer.h: src/lexer.c
28
33
  else
29
- BUILT_SOURCES =
34
+ BUILT_SOURCES = src/builtin.inc src/version.h
30
35
  .y.c:
31
36
  $(AM_V_YACC) echo "NOT building parser.c!"
32
37
  .l.c:
@@ -43,17 +48,30 @@ AM_YFLAGS = --warnings=all -d
43
48
  lib_LTLIBRARIES = libjq.la
44
49
  libjq_la_SOURCES = ${LIBJQ_SRC}
45
50
  libjq_la_LIBADD = -lm
46
- libjq_la_LDFLAGS = -export-symbols-regex '^j[qv]_' -version-info 1:4:0
51
+ libjq_la_LDFLAGS = $(onig_LDFLAGS) -export-symbols-regex '^j[qv]_' -version-info 1:4:0
52
+
53
+ if WIN32
54
+ libjq_la_LIBADD += -lshlwapi
55
+ endif
47
56
 
48
- include_HEADERS = jv.h jq.h
57
+ include_HEADERS = src/jv.h src/jq.h
58
+
59
+ if ENABLE_UBSAN
60
+ AM_CFLAGS += -fsanitize=undefined
61
+ endif
49
62
 
50
63
  ### Running tests under Valgrind
51
64
 
65
+ if ENABLE_ASAN
66
+ AM_CFLAGS += -fsanitize=address
67
+ NO_VALGRIND = 1
68
+ else
52
69
  if ENABLE_VALGRIND
53
70
  NO_VALGRIND =
54
71
  else
55
72
  NO_VALGRIND = 1
56
73
  endif
74
+ endif
57
75
 
58
76
  ### Code coverage with gcov
59
77
 
@@ -65,7 +83,7 @@ endif
65
83
 
66
84
  if ENABLE_ERROR_INJECTION
67
85
  lib_LTLIBRARIES += libinject_errors.la
68
- libinject_errors_la_SOURCES = inject_errors.c
86
+ libinject_errors_la_SOURCES = src/inject_errors.c
69
87
  libinject_errors_la_LIBADD = -ldl
70
88
  libinject_errors_la_LDFLAGS = -module
71
89
  endif
@@ -77,58 +95,57 @@ endif
77
95
  .FORCE:
78
96
  generate_ver = ver="`{ $(srcdir)/scripts/version || echo '$(VERSION)' ; } | sed 's/.*/\#define JQ_VERSION \"&\"/'`"
79
97
  .remake-version-h: .FORCE
80
- @ $(generate_ver); test "x`cat version.h 2>/dev/null`" = "x$$ver" || touch .remake-version-h
81
- version.h: .remake-version-h
98
+ @ $(generate_ver); test "x`cat src/version.h 2>/dev/null`" = "x$$ver" || touch .remake-version-h
99
+ src/version.h: .remake-version-h
82
100
  $(AM_V_GEN) $(generate_ver); echo "$$ver" > $@
83
- main.c: version.h
101
+ src/main.c: src/version.h
102
+
103
+ src/builtin.inc: src/builtin.jq
104
+ $(AM_V_GEN) sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/\\n"/' $^ > $@
105
+ src/builtin.o: src/builtin.inc
84
106
 
85
107
  bin_PROGRAMS = jq
86
- jq_SOURCES = main.c version.h
108
+ jq_SOURCES = src/main.c src/version.h
87
109
  jq_LDFLAGS = -static-libtool-libs
88
110
  jq_LDADD = libjq.la -lm
89
111
 
112
+ if WIN32
113
+ jq_LDADD += -lshlwapi
114
+ endif
115
+
90
116
  if ENABLE_ALL_STATIC
91
117
  jq_LDFLAGS += -all-static
92
118
  endif
93
119
 
94
120
  ### Tests (make check)
95
121
 
96
- TESTS = tests/mantest tests/jqtest tests/onigtest tests/shtest
122
+ TESTS = tests/optionaltest tests/mantest tests/jqtest tests/onigtest tests/shtest tests/utf8test tests/base64test
97
123
  TESTS_ENVIRONMENT = NO_VALGRIND=$(NO_VALGRIND)
98
124
 
99
125
 
100
126
  ### Building the manpage
101
127
 
102
- # If ENABLE_DOCS is not set, just copy jq.1.default to jq.1
103
- # The real_docs target succeeds (possibly after building jq.1) only if ENABLE_DOCS is set
104
- # Thus, making "dist" depend on "real_docs" ensures that we never build a tarball with
105
- # a stub manpage.
106
-
107
128
  man_MANS = jq.1
108
- .PHONY: real_docs
109
129
  if ENABLE_DOCS
110
130
  jq.1: $(srcdir)/docs/content/3.manual/manual.yml
111
131
  $(AM_V_GEN) ( cd ${abs_srcdir}/docs; '$(BUNDLER)' exec rake manpage ) > $@ || { rm -f $@; false; }
112
132
  jq.1.prebuilt: jq.1
113
133
  $(AM_V_GEN) cp $^ $@ || { rm -f $@; false; }
114
- jq.1.default: $(srcdir)/docs/default_manpage.md
115
- $(AM_V_GEN) ( cd ${abs_srcdir}/docs; '$(BUNDLER)' exec rake manpage_default ) > $@ || { rm -f $@; false; }
116
- real_docs: jq.1 jq.1.prebuilt
117
- @if cmp jq.1 $(srcdir)/jq.1.default > /dev/null; then\
118
- rm -f jq.1; $(MAKE) $(AM_MAKEFLAGS) jq.1;\
119
- fi
120
134
  else
121
135
  jq.1: $(srcdir)/jq.1.prebuilt
122
136
  $(AM_V_GEN) cp $^ $@
123
- real_docs:
124
- @echo "Ruby dependencies not found, cannot build manpage." > /dev/stderr
125
- @echo "Follow the instructions in docs/README.md to install them" > /dev/stderr
126
- @echo "and then rerun ./configure" > /dev/stderr
127
- @echo "A pre-built, possibly out-of-date manpage used." > /dev/stderr
128
- false
129
137
  endif
130
138
 
131
139
 
140
+ ### Build oniguruma
141
+
142
+ if BUILD_ONIGURUMA
143
+ libjq_la_LIBADD += modules/oniguruma/src/.libs/libonig.la
144
+ SUBDIRS = modules/oniguruma
145
+ endif
146
+
147
+ AM_CFLAGS += $(onig_CFLAGS)
148
+
132
149
  ### Packaging
133
150
 
134
151
  docs/site.yml: configure.ac
@@ -138,33 +155,31 @@ docs/site.yml: configure.ac
138
155
  install-binaries: $(BUILT_SOURCES)
139
156
  $(MAKE) $(AM_MAKEFLAGS) install-exec
140
157
 
141
- # Ensure "make dist" fails when we can't build the real manpage
142
- dist-hook: real_docs
143
-
144
- DOC_FILES = docs/content docs/public docs/templates docs/site.yml \
145
- docs/Gemfile docs/Gemfile.lock docs/Rakefile docs/README.md \
146
- docs/default_manpage.md jq.1.default
147
-
148
- # setup is only used by distribution developers, not package developers.
149
- # Still, as a matter of allowing patching, its not a bad idea to distribute
150
- # the developer setup script in the tarball.
151
- EXTRA_DIST = $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) jq.spec \
152
- $(DOC_FILES) scripts/version parser.h parser.c lexer.h \
153
- lexer.c tests/onig.supp tests/torture/input0.json \
154
- tests/modules/.jq tests/modules/a.jq tests/modules/b/b.jq \
155
- tests/modules/c/c.jq tests/modules/c/d.jq \
156
- tests/modules/lib/jq/e/e.jq tests/modules/lib/jq/f.jq \
157
- tests/setup tests/jq.test tests/onig.test \
158
- tests/modules/data.json \
159
- tests/modules/syntaxerror/syntaxerror.jq \
160
- tests/modules/test_bind_order.jq \
161
- tests/modules/test_bind_order0.jq \
162
- tests/modules/test_bind_order1.jq \
163
- tests/modules/test_bind_order2.jq \
164
- jq.1.prebuilt
165
-
166
-
167
- # README.md is expected in Github projects, good stuff in it, so we'll
158
+ DOC_FILES = docs/content docs/public docs/templates docs/site.yml \
159
+ docs/Gemfile docs/Gemfile.lock docs/Rakefile docs/README.md \
160
+ jq.1.prebuilt
161
+
162
+ EXTRA_DIST = $(DOC_FILES) $(man_MANS) $(TESTS) $(TEST_LOG_COMPILER) \
163
+ jq.1.prebuilt jq.spec src/lexer.c src/lexer.h src/parser.c \
164
+ src/parser.h src/version.h src/builtin.jq \
165
+ scripts/version tests/jq.test tests/modules/.jq \
166
+ tests/modules/a.jq tests/modules/b/b.jq tests/modules/c/c.jq \
167
+ tests/modules/c/d.jq tests/modules/data.json \
168
+ tests/modules/lib/jq/e/e.jq tests/modules/lib/jq/f.jq \
169
+ tests/modules/syntaxerror/syntaxerror.jq \
170
+ tests/modules/test_bind_order.jq \
171
+ tests/modules/test_bind_order0.jq \
172
+ tests/modules/test_bind_order1.jq \
173
+ tests/modules/test_bind_order2.jq tests/onig.supp \
174
+ tests/onig.test tests/setup tests/torture/input0.json \
175
+ tests/optional.test tests/optionaltest \
176
+ tests/utf8-truncate.jq tests/utf8test \
177
+ tests/base64.test tests/base64test \
178
+ tests/jq-f-test.sh tests/shtest
179
+
180
+
181
+
182
+ # README.md is expected in Github projects, good stuff in it, so we'll
168
183
  # distribute it and install it with the package in the doc directory.
169
184
  docdir = ${datadir}/doc/${PACKAGE}
170
185
  dist_doc_DATA = README.md COPYING AUTHORS README
@@ -187,12 +202,12 @@ dist-clean-local:
187
202
  clean-local-docs:
188
203
  if ENABLE_DOCS
189
204
  rm -f jq.1
190
- endif
205
+ endif
191
206
 
192
207
  clean-local-gcov:
193
- rm -f *.gcno *.gcda *.gcov
208
+ rm -f src/*.gcno src/*.gcda src/*.gcov
194
209
 
195
210
  clean-local: clean-local-docs clean-local-gcov
196
- rm -f version.h .remake-version-h
211
+ rm -f src/version.h .remake-version-h
197
212
 
198
213
  .PHONY: clean-local-docs clean-local-gcov