| @@ -1,73 +1,72 @@ | | | @@ -1,73 +1,72 @@ |
1 | # $NetBSD: rails.mk,v 1.71 2019/03/03 15:26:29 taca Exp $ | | 1 | # $NetBSD: rails.mk,v 1.72 2019/03/03 16:19:16 taca Exp $ |
2 | | | 2 | |
3 | .if !defined(_RUBY_RAILS_MK) | | 3 | .if !defined(_RUBY_RAILS_MK) |
4 | _RUBY_RAILS_MK= # defined | | 4 | _RUBY_RAILS_MK= # defined |
5 | | | 5 | |
6 | # | | 6 | # |
7 | # === User-settable variables === | | 7 | # === User-settable variables === |
8 | # | | 8 | # |
9 | # RUBY_RAILS_DEFAULT | | 9 | # RUBY_RAILS_DEFAULT |
10 | # Select default Ruby on Rails version. | | 10 | # Select default Ruby on Rails version. |
11 | # | | 11 | # |
12 | # Possible values: 32 42 51 52 | | 12 | # Possible values: 42 51 52 |
13 | # Default: 42 | | 13 | # Default: 42 |
14 | # | | 14 | # |
15 | # | | 15 | # |
16 | # === Infrastructure variables === | | 16 | # === Infrastructure variables === |
17 | # | | 17 | # |
18 | # RUBY_RAILS_REQD | | 18 | # RUBY_RAILS_REQD |
19 | # Ruby Rails version to use. This variable should not be set in | | 19 | # Ruby Rails version to use. This variable should not be set in |
20 | # packages. | | 20 | # packages. |
21 | # | | 21 | # |
22 | # Possible values: ${RUBY_RAILS_ACCEPTED} | | 22 | # Possible values: ${RUBY_RAILS_ACCEPTED} |
23 | # Default: ${RUBY_RAILS_DEFAULT} | | 23 | # Default: ${RUBY_RAILS_DEFAULT} |
24 | # | | 24 | # |
25 | # === Package-settable variables === | | 25 | # === Package-settable variables === |
26 | # | | 26 | # |
27 | # RUBY_RAILS_ACCEPTED | | 27 | # RUBY_RAILS_ACCEPTED |
28 | # The Ruby on Rails versions that are acceptable for the package. | | 28 | # The Ruby on Rails versions that are acceptable for the package. |
29 | # | | 29 | # |
30 | # Possible values: 32 42 51 52 | | 30 | # Possible values: 42 51 52 |
31 | # Default: (empty) | | 31 | # Default: (empty) |
32 | # | | 32 | # |
33 | # RUBY_RAILS_STRICT_DEP | | 33 | # RUBY_RAILS_STRICT_DEP |
34 | # Strict dependency to Ruby on Rails component packages. | | 34 | # Strict dependency to Ruby on Rails component packages. |
35 | # | | 35 | # |
36 | # Possible value: yes no | | 36 | # Possible value: yes no |
37 | # Default: no | | 37 | # Default: no |
38 | # | | 38 | # |
39 | # === Defined variables === | | 39 | # === Defined variables === |
40 | # | | 40 | # |
41 | # RUBY_RAILS | | 41 | # RUBY_RAILS |
42 | # Selected Ruby on Rails version. | | 42 | # Selected Ruby on Rails version. |
43 | # | | 43 | # |
44 | # Possible values: 32 42 51 52 | | 44 | # Possible values: 42 51 52 |
45 | # | | 45 | # |
46 | | | 46 | |
47 | # | | 47 | # |
48 | # current Ruby on Rails versions. | | 48 | # current Ruby on Rails versions. |
49 | # | | 49 | # |
50 | RUBY_RAILS32_VERSION?= 3.2.22.5 | | | |
51 | RUBY_RAILS42_VERSION?= 4.2.11 | | 50 | RUBY_RAILS42_VERSION?= 4.2.11 |
52 | RUBY_RAILS51_VERSION?= 5.1.6.1 | | 51 | RUBY_RAILS51_VERSION?= 5.1.6.1 |
53 | RUBY_RAILS52_VERSION?= 5.2.2 | | 52 | RUBY_RAILS52_VERSION?= 5.2.2 |
54 | | | 53 | |
55 | RUBY_RAILS_ACCEPTED?= # defined | | 54 | RUBY_RAILS_ACCEPTED?= # defined |
56 | RUBY_RAILS_DEFAULT?= 42 | | 55 | RUBY_RAILS_DEFAULT?= 42 |
57 | | | 56 | |
58 | RUBY_RAILS_STRICT_DEP?= no | | 57 | RUBY_RAILS_STRICT_DEP?= no |
59 | | | 58 | |
60 | RUBY_RAILS_SUPPORTED= 42 51 52 32 | | 59 | RUBY_RAILS_SUPPORTED= 42 51 52 |
61 | | | 60 | |
62 | .if empty(RUBY_RAILS_SUPPORTED:M${RUBY_RAILS_DEFAULT}) | | 61 | .if empty(RUBY_RAILS_SUPPORTED:M${RUBY_RAILS_DEFAULT}) |
63 | .error Unsupported RUBY_RAILS_DEFAULT: ${RUBY_RAILS_DEFAULT} | | 62 | .error Unsupported RUBY_RAILS_DEFAULT: ${RUBY_RAILS_DEFAULT} |
64 | .endif | | 63 | .endif |
65 | | | 64 | |
66 | .if empty(RUBY_RAILS_ACCEPTED) | | 65 | .if empty(RUBY_RAILS_ACCEPTED) |
67 | RUBY_RAILS_ACCEPTED= ${RUBY_RAILS_SUPPORTED} | | 66 | RUBY_RAILS_ACCEPTED= ${RUBY_RAILS_SUPPORTED} |
68 | .endif | | 67 | .endif |
69 | | | 68 | |
70 | .if defined(RUBY_RAILS_REQD) | | 69 | .if defined(RUBY_RAILS_REQD) |
71 | . if empty(RUBY_RAILS_ACCEPTED:M${RUBY_RAILS_REQD}) | | 70 | . if empty(RUBY_RAILS_ACCEPTED:M${RUBY_RAILS_REQD}) |
72 | . error Unsupported RUBY_RAILS_REQD: ${RUBY_RAILS_REQD} | | 71 | . error Unsupported RUBY_RAILS_REQD: ${RUBY_RAILS_REQD} |
73 | . endif | | 72 | . endif |
| @@ -86,28 +85,26 @@ RUBY_RAILS= ${rr} | | | @@ -86,28 +85,26 @@ RUBY_RAILS= ${rr} |
86 | RUBY_RAILS?= ${rr} | | 85 | RUBY_RAILS?= ${rr} |
87 | . endif | | 86 | . endif |
88 | . endfor | | 87 | . endfor |
89 | .endif | | 88 | .endif |
90 | | | 89 | |
91 | RUBY_RAILS?= ${RUBY_RAILS_SUPPORTED} | | 90 | RUBY_RAILS?= ${RUBY_RAILS_SUPPORTED} |
92 | | | 91 | |
93 | .if ${RUBY_RAILS} == "52" | | 92 | .if ${RUBY_RAILS} == "52" |
94 | RAILS_VERSION:= ${RUBY_RAILS52_VERSION} | | 93 | RAILS_VERSION:= ${RUBY_RAILS52_VERSION} |
95 | .elif ${RUBY_RAILS} == "51" | | 94 | .elif ${RUBY_RAILS} == "51" |
96 | RAILS_VERSION:= ${RUBY_RAILS51_VERSION} | | 95 | RAILS_VERSION:= ${RUBY_RAILS51_VERSION} |
97 | .elif ${RUBY_RAILS} == "42" | | 96 | .elif ${RUBY_RAILS} == "42" |
98 | RAILS_VERSION:= ${RUBY_RAILS42_VERSION} | | 97 | RAILS_VERSION:= ${RUBY_RAILS42_VERSION} |
99 | .else | | | |
100 | RAILS_VERSION:= ${RUBY_RAILS32_VERSION} | | | |
101 | .endif | | 98 | .endif |
102 | | | 99 | |
103 | # | | 100 | # |
104 | # Components of Ruby's version. | | 101 | # Components of Ruby's version. |
105 | # | | 102 | # |
106 | _RAILS_MAJOR= ${RAILS_VERSION:C/([0-9]+)\..*/\1/} | | 103 | _RAILS_MAJOR= ${RAILS_VERSION:C/([0-9]+)\..*/\1/} |
107 | _RAILS_MINOR= ${RAILS_VERSION:C/([0-9]+)\.([0-9]+)\..*/\2/} | | 104 | _RAILS_MINOR= ${RAILS_VERSION:C/([0-9]+)\.([0-9]+)\..*/\2/} |
108 | _RAILS_TEENY= ${RAILS_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+).*/\3/} | | 105 | _RAILS_TEENY= ${RAILS_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+).*/\3/} |
109 | | | 106 | |
110 | # | | 107 | # |
111 | # If RUBY_RAILS_STRICT_DEP is defined, match exact current Ruby no Rails | | 108 | # If RUBY_RAILS_STRICT_DEP is defined, match exact current Ruby no Rails |
112 | # version. | | 109 | # version. |
113 | # Otherwise allow greater minor version. | | 110 | # Otherwise allow greater minor version. |
| @@ -134,32 +131,27 @@ RUBY_ACTIVEMODEL_DEPENDS= \ | | | @@ -134,32 +131,27 @@ RUBY_ACTIVEMODEL_DEPENDS= \ |
134 | ${RUBY_PKGPREFIX}-activemodel${_RAILS_DEP}:../../devel/ruby-activemodel${RUBY_RAILS} | | 131 | ${RUBY_PKGPREFIX}-activemodel${_RAILS_DEP}:../../devel/ruby-activemodel${RUBY_RAILS} |
135 | .if ${RUBY_RAILS} >= 51 | | 132 | .if ${RUBY_RAILS} >= 51 |
136 | RUBY_ACTIONPACK_DEPENDS= \ | | 133 | RUBY_ACTIONPACK_DEPENDS= \ |
137 | ${RUBY_PKGPREFIX}-actionpack${_RAILS_DEP}:../../www/ruby-actionpack${RUBY_RAILS} | | 134 | ${RUBY_PKGPREFIX}-actionpack${_RAILS_DEP}:../../www/ruby-actionpack${RUBY_RAILS} |
138 | .endif | | 135 | .endif |
139 | RUBY_ACTIVERECORD_DEPENDS= \ | | 136 | RUBY_ACTIVERECORD_DEPENDS= \ |
140 | ${RUBY_PKGPREFIX}-activerecord${_RAILS_DEP}:../../databases/ruby-activerecord${RUBY_RAILS} | | 137 | ${RUBY_PKGPREFIX}-activerecord${_RAILS_DEP}:../../databases/ruby-activerecord${RUBY_RAILS} |
141 | RUBY_ACTIONMAILER_DEPENDS= \ | | 138 | RUBY_ACTIONMAILER_DEPENDS= \ |
142 | ${RUBY_PKGPREFIX}-actionmailer${_RAILS_DEP}:../../mail/ruby-actionmailer${RUBY_RAILS} | | 139 | ${RUBY_PKGPREFIX}-actionmailer${_RAILS_DEP}:../../mail/ruby-actionmailer${RUBY_RAILS} |
143 | RUBY_RAILTIES_DEPENDS= \ | | 140 | RUBY_RAILTIES_DEPENDS= \ |
144 | ${RUBY_PKGPREFIX}-railties${_RAILS_DEP}:../../devel/ruby-railties${RUBY_RAILS} | | 141 | ${RUBY_PKGPREFIX}-railties${_RAILS_DEP}:../../devel/ruby-railties${RUBY_RAILS} |
145 | RUBY_RAILS_DEPENDS= \ | | 142 | RUBY_RAILS_DEPENDS= \ |
146 | ${RUBY_PKGPREFIX}-rails${_RAILS_DEP}:../../www/ruby-rails${RUBY_RAILS} | | 143 | ${RUBY_PKGPREFIX}-rails${_RAILS_DEP}:../../www/ruby-rails${RUBY_RAILS} |
147 | | | | |
148 | .if ${RUBY_RAILS} < 42 | | | |
149 | RUBY_ACTIVERESOURCE_DEPENDS= \ | | | |
150 | ${RUBY_PKGPREFIX}-activeresource${_RAILS_DEP}:../../www/ruby-activeresource${RUBY_RAILS} | | | |
151 | .elif ${RUBY_RAILS} >= 42 | | | |
152 | RUBY_ACTIONVIEW_DEPENDS= \ | | 144 | RUBY_ACTIONVIEW_DEPENDS= \ |
153 | ${RUBY_PKGPREFIX}-actionview${_RAILS_DEP}:../../www/ruby-actionview${RUBY_RAILS} | | 145 | ${RUBY_PKGPREFIX}-actionview${_RAILS_DEP}:../../www/ruby-actionview${RUBY_RAILS} |
154 | RUBY_ACTIVEJOB_DEPENDS= \ | | 146 | RUBY_ACTIVEJOB_DEPENDS= \ |
155 | ${RUBY_PKGPREFIX}-activejob${_RAILS_DEP}:../../devel/ruby-activejob${RUBY_RAILS} | | 147 | ${RUBY_PKGPREFIX}-activejob${_RAILS_DEP}:../../devel/ruby-activejob${RUBY_RAILS} |
156 | .endif | | | |
157 | .if ${RUBY_RAILS} >= 51 | | 148 | .if ${RUBY_RAILS} >= 51 |
158 | RUBY_ACTIONCABLE_DEPENDS= \ | | 149 | RUBY_ACTIONCABLE_DEPENDS= \ |
159 | ${RUBY_PKGPREFIX}-actioncable${_RAILS_DEP}:../../www/ruby-actioncable${RUBY_RAILS} | | 150 | ${RUBY_PKGPREFIX}-actioncable${_RAILS_DEP}:../../www/ruby-actioncable${RUBY_RAILS} |
160 | .endif | | 151 | .endif |
161 | .if ${RUBY_RAILS} >= 51 | | 152 | .if ${RUBY_RAILS} >= 51 |
162 | RUBY_ACTIVESTORAGE_DEPENDS= \ | | 153 | RUBY_ACTIVESTORAGE_DEPENDS= \ |
163 | ${RUBY_PKGPREFIX}-activestorage${_RAILS_DEP}:../../devel/ruby-activestorage${RUBY_RAILS} | | 154 | ${RUBY_PKGPREFIX}-activestorage${_RAILS_DEP}:../../devel/ruby-activestorage${RUBY_RAILS} |
164 | .endif | | 155 | .endif |
| | | 156 | |
165 | .endif | | 157 | .endif |