Sun Nov 24 14:05:08 2013 UTC ()
Correct versions of json as bundled with Ruby.


(taca)
diff -r1.2 -r1.3 pkgsrc/lang/ruby/json.mk

cvs diff -r1.2 -r1.3 pkgsrc/lang/ruby/Attic/json.mk (expand / switch to unified diff)

--- pkgsrc/lang/ruby/Attic/json.mk 2011/12/14 13:13:18 1.2
+++ pkgsrc/lang/ruby/Attic/json.mk 2013/11/24 14:05:08 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: json.mk,v 1.2 2011/12/14 13:13:18 taca Exp $ 1# $NetBSD: json.mk,v 1.3 2013/11/24 14:05:08 taca Exp $
2 2
3# This file handles appropriate dependency to ruby-json pacakge. 3# This file handles appropriate dependency to ruby-json pacakge.
4# 4#
5 5
6# === Package-settable variables === 6# === Package-settable variables ===
7# 7#
8# RUBY_JSON_REQD 8# RUBY_JSON_REQD
9# Specify required version of ruby-json. 9# Specify required version of ruby-json.
10# 10#
11# Default: (empty) 11# Default: (empty)
12# 12#
13# RUBY_JSON_TYPE 13# RUBY_JSON_TYPE
14# Specify depending packages: ruby-json, ruby-json-pure or both. 14# Specify depending packages: ruby-json, ruby-json-pure or both.
@@ -18,31 +18,35 @@ @@ -18,31 +18,35 @@
18# 18#
19 19
20.if !defined(_RUBY_JSON_MK) 20.if !defined(_RUBY_JSON_MK)
21_RUBY_JSON_MK= # defined 21_RUBY_JSON_MK= # defined
22 22
23RUBY_JSON_TYPE?= json 23RUBY_JSON_TYPE?= json
24 24
25.if empty(RUBY_JSON_REQD) 25.if empty(RUBY_JSON_REQD)
26WARNINGS+= "[lang/ruby/json.mk] No needs to include ../../lang/ruby/json.mk" 26WARNINGS+= "[lang/ruby/json.mk] No needs to include ../../lang/ruby/json.mk"
27.else # !empty(RUBY_JSON_REQD) 27.else # !empty(RUBY_JSON_REQD)
28 28
29.include "../../lang/ruby/rubyversion.mk" 29.include "../../lang/ruby/rubyversion.mk"
30 30
31. if ${RUBY_VER} != "193" 31. if ${RUBY_VER} == "18"
32_RUBY_JSON_REQD= true 32_RUBY_JSON_REQD= true
33. else 33. else
34 34
35RUBY_JSON_VERSION= 1.5.4 35. if ${RUBY_VER} == "193"
 36RUBY_JSON_VERSION= 1.5.5
 37. elif ${RUBY_VER} == "200"
 38RUBY_JSON_VERSION= 1.7.7
 39. endif
36 40
37_RUBY_JSON_MAJOR= ${RUBY_JSON_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/} 41_RUBY_JSON_MAJOR= ${RUBY_JSON_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
38_RUBY_JSON_MINOR= ${RUBY_JSON_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/} 42_RUBY_JSON_MINOR= ${RUBY_JSON_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
39_RUBY_JSON_TEENY= ${RUBY_JSON_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/} 43_RUBY_JSON_TEENY= ${RUBY_JSON_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/}
40 44
41_RUBY_JSON_REQD_MAJOR= ${RUBY_JSON_REQD:C/^([0-9]+).*/\1/} 45_RUBY_JSON_REQD_MAJOR= ${RUBY_JSON_REQD:C/^([0-9]+).*/\1/}
42_RUBY_JSON_REQD_MINOR= \ 46_RUBY_JSON_REQD_MINOR= \
43 ${RUBY_JSON_REQD:C/^${_RUBY_JSON_REQD_MAJOR}\.?//:C/^([0-9]+).*/\1/} 47 ${RUBY_JSON_REQD:C/^${_RUBY_JSON_REQD_MAJOR}\.?//:C/^([0-9]+).*/\1/}
44. if empty(_RUBY_JSON_REQD_MINOR) 48. if empty(_RUBY_JSON_REQD_MINOR)
45_RUBY_JSON_REQD_MINOR= 0 49_RUBY_JSON_REQD_MINOR= 0
46_RUBY_JSON_REQD_TEENY= 0 50_RUBY_JSON_REQD_TEENY= 0
47. else 51. else
48_RUBY_JSON_REQD_TEENY= \ 52_RUBY_JSON_REQD_TEENY= \
@@ -53,27 +57,27 @@ _RUBY_JSON_REQD_TEENY= 0 @@ -53,27 +57,27 @@ _RUBY_JSON_REQD_TEENY= 0
53. endif 57. endif
54 58
55. if ${_RUBY_JSON_REQD_MAJOR} > ${_RUBY_JSON_MAJOR} 59. if ${_RUBY_JSON_REQD_MAJOR} > ${_RUBY_JSON_MAJOR}
56_RUBY_JSON_REQD= true 60_RUBY_JSON_REQD= true
57. elif ${_RUBY_JSON_REQD_MAJOR} == ${_RUBY_JSON_MAJOR} 61. elif ${_RUBY_JSON_REQD_MAJOR} == ${_RUBY_JSON_MAJOR}
58. if ${_RUBY_JSON_REQD_MINOR} > ${_RUBY_JSON_MINOR} 62. if ${_RUBY_JSON_REQD_MINOR} > ${_RUBY_JSON_MINOR}
59_RUBY_JSON_REQD= true 63_RUBY_JSON_REQD= true
60. elif ${_RUBY_JSON_REQD_MINOR} == ${_RUBY_JSON_MINOR} 64. elif ${_RUBY_JSON_REQD_MINOR} == ${_RUBY_JSON_MINOR}
61. if ${_RUBY_JSON_REQD_TEENY} > ${_RUBY_JSON_TEENY} 65. if ${_RUBY_JSON_REQD_TEENY} > ${_RUBY_JSON_TEENY}
62_RUBY_JSON_REQD= true 66_RUBY_JSON_REQD= true
63. endif 67. endif
64. endif 68. endif
65. endif 69. endif
66. endif # ${RUBY_VER} == "193" 70. endif # ${RUBY_VER} != "18"
67 71
68. if !empty(_RUBY_JSON_REQD) 72. if !empty(_RUBY_JSON_REQD)
69. if ${RUBY_JSON_TYPE} == "json" || ${RUBY_JSON_TYPE} == "both" 73. if ${RUBY_JSON_TYPE} == "json" || ${RUBY_JSON_TYPE} == "both"
70DEPENDS+= ${RUBY_PKGPREFIX}-json>=${RUBY_JSON_REQD}:../../textproc/ruby-json 74DEPENDS+= ${RUBY_PKGPREFIX}-json>=${RUBY_JSON_REQD}:../../textproc/ruby-json
71. endif 75. endif
72. if ${RUBY_JSON_TYPE} == "pure" || ${RUBY_JSON_TYPE} == "both" 76. if ${RUBY_JSON_TYPE} == "pure" || ${RUBY_JSON_TYPE} == "both"
73DEPENDS+= ${RUBY_PKGPREFIX}-json-pure>=${RUBY_JSON_REQD}:../../textproc/ruby-json-pure 77DEPENDS+= ${RUBY_PKGPREFIX}-json-pure>=${RUBY_JSON_REQD}:../../textproc/ruby-json-pure
74. endif 78. endif
75. endif 79. endif
76 80
77.endif # !empty(RUBY_JSON_REQD) 81.endif # !empty(RUBY_JSON_REQD)
78 82
79.endif 83.endif