| @@ -1,163 +1,163 @@ | | | @@ -1,163 +1,163 @@ |
1 | # $NetBSD: rails.mk,v 1.127 2022/06/07 15:05:21 taca Exp $ | | 1 | # $NetBSD: rails.mk,v 1.128 2022/06/07 15:12:58 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: 52 60 61 70 | | 12 | # Possible values: 52 60 61 70 |
13 | # Default: 52 | | 13 | # Default: 52 |
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: 52 60 61 70 | | 30 | # Possible values: 52 60 61 70 |
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: 52 60 61 70 | | 44 | # Possible values: 52 60 61 70 |
45 | # | | 45 | # |
46 | | | 46 | |
47 | # | | 47 | # |
48 | # current Ruby on Rails versions. | | 48 | # current Ruby on Rails versions. |
49 | # | | 49 | # |
50 | RUBY_RAILS52_VERSION?= 5.2.8 | | 50 | RUBY_RAILS52_VERSION?= 5.2.8 |
51 | RUBY_RAILS60_VERSION?= 6.0.5 | | 51 | RUBY_RAILS60_VERSION?= 6.0.5 |
52 | RUBY_RAILS61_VERSION?= 6.1.6 | | 52 | RUBY_RAILS61_VERSION?= 6.1.6 |
53 | RUBY_RAILS70_VERSION?= 7.0.2.4 | | 53 | RUBY_RAILS70_VERSION?= 7.0.3 |
54 | | | 54 | |
55 | RUBY_RAILS_ACCEPTED?= # empty | | 55 | RUBY_RAILS_ACCEPTED?= # empty |
56 | RUBY_RAILS_DEFAULT?= 52 | | 56 | RUBY_RAILS_DEFAULT?= 52 |
57 | | | 57 | |
58 | RUBY_RAILS_STRICT_DEP?= no | | 58 | RUBY_RAILS_STRICT_DEP?= no |
59 | | | 59 | |
60 | RUBY_RAILS_SUPPORTED= 52 60 61 70 | | 60 | RUBY_RAILS_SUPPORTED= 52 60 61 70 |
61 | | | 61 | |
62 | .if empty(RUBY_RAILS_SUPPORTED:M${RUBY_RAILS_DEFAULT}) | | 62 | .if empty(RUBY_RAILS_SUPPORTED:M${RUBY_RAILS_DEFAULT}) |
63 | . error Unsupported RUBY_RAILS_DEFAULT: ${RUBY_RAILS_DEFAULT} | | 63 | . error Unsupported RUBY_RAILS_DEFAULT: ${RUBY_RAILS_DEFAULT} |
64 | .endif | | 64 | .endif |
65 | | | 65 | |
66 | .if empty(RUBY_RAILS_ACCEPTED) | | 66 | .if empty(RUBY_RAILS_ACCEPTED) |
67 | RUBY_RAILS_ACCEPTED= ${RUBY_RAILS_SUPPORTED} | | 67 | RUBY_RAILS_ACCEPTED= ${RUBY_RAILS_SUPPORTED} |
68 | .endif | | 68 | .endif |
69 | | | 69 | |
70 | .if defined(RUBY_RAILS_REQD) | | 70 | .if defined(RUBY_RAILS_REQD) |
71 | . if empty(RUBY_RAILS_ACCEPTED:M${RUBY_RAILS_REQD}) | | 71 | . if empty(RUBY_RAILS_ACCEPTED:M${RUBY_RAILS_REQD}) |
72 | . error Unsupported RUBY_RAILS_REQD: ${RUBY_RAILS_REQD} | | 72 | . error Unsupported RUBY_RAILS_REQD: ${RUBY_RAILS_REQD} |
73 | . endif | | 73 | . endif |
74 | . for rr in ${RUBY_RAILS_ACCEPTED} | | 74 | . for rr in ${RUBY_RAILS_ACCEPTED} |
75 | . if ${rr} == ${RUBY_RAILS_REQD} | | 75 | . if ${rr} == ${RUBY_RAILS_REQD} |
76 | RUBY_RAILS= ${rr} | | 76 | RUBY_RAILS= ${rr} |
77 | . endif | | 77 | . endif |
78 | . endfor | | 78 | . endfor |
79 | .endif | | 79 | .endif |
80 | | | 80 | |
81 | .if !defined(RUBY_RAILS) | | 81 | .if !defined(RUBY_RAILS) |
82 | . for rr in ${RUBY_RAILS_ACCEPTED} | | 82 | . for rr in ${RUBY_RAILS_ACCEPTED} |
83 | . if ${rr} == ${RUBY_RAILS_DEFAULT} | | 83 | . if ${rr} == ${RUBY_RAILS_DEFAULT} |
84 | RUBY_RAILS= ${rr} | | 84 | RUBY_RAILS= ${rr} |
85 | . else | | 85 | . else |
86 | RUBY_RAILS?= ${rr} | | 86 | RUBY_RAILS?= ${rr} |
87 | . endif | | 87 | . endif |
88 | . endfor | | 88 | . endfor |
89 | .endif | | 89 | .endif |
90 | | | 90 | |
91 | RUBY_RAILS_REQD?= ${RUBY_RAILS} | | 91 | RUBY_RAILS_REQD?= ${RUBY_RAILS} |
92 | | | 92 | |
93 | .if ${RUBY_RAILS} == "70" | | 93 | .if ${RUBY_RAILS} == "70" |
94 | RAILS_VERSION:= ${RUBY_RAILS70_VERSION} | | 94 | RAILS_VERSION:= ${RUBY_RAILS70_VERSION} |
95 | .elif ${RUBY_RAILS} == "61" | | 95 | .elif ${RUBY_RAILS} == "61" |
96 | RAILS_VERSION:= ${RUBY_RAILS61_VERSION} | | 96 | RAILS_VERSION:= ${RUBY_RAILS61_VERSION} |
97 | .elif ${RUBY_RAILS} == "60" | | 97 | .elif ${RUBY_RAILS} == "60" |
98 | RAILS_VERSION:= ${RUBY_RAILS60_VERSION} | | 98 | RAILS_VERSION:= ${RUBY_RAILS60_VERSION} |
99 | .elif ${RUBY_RAILS} == "52" | | 99 | .elif ${RUBY_RAILS} == "52" |
100 | RAILS_VERSION:= ${RUBY_RAILS52_VERSION} | | 100 | RAILS_VERSION:= ${RUBY_RAILS52_VERSION} |
101 | .endif | | 101 | .endif |
102 | | | 102 | |
103 | # | | 103 | # |
104 | # Components of Ruby's version. | | 104 | # Components of Ruby's version. |
105 | # | | 105 | # |
106 | _RAILS_MAJOR= ${RAILS_VERSION:C/([0-9]+)\..*/\1/} | | 106 | _RAILS_MAJOR= ${RAILS_VERSION:C/([0-9]+)\..*/\1/} |
107 | _RAILS_MINOR= ${RAILS_VERSION:C/([0-9]+)\.([0-9]+)\..*/\2/} | | 107 | _RAILS_MINOR= ${RAILS_VERSION:C/([0-9]+)\.([0-9]+)\..*/\2/} |
108 | _RAILS_TEENY= ${RAILS_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+).*/\3/} | | 108 | _RAILS_TEENY= ${RAILS_VERSION:C/([0-9]+)\.([0-9]+)\.([0-9]+).*/\3/} |
109 | | | 109 | |
110 | # | | 110 | # |
111 | # If RUBY_RAILS_STRICT_DEP is defined, match exact current Ruby on Rails | | 111 | # If RUBY_RAILS_STRICT_DEP is defined, match exact current Ruby on Rails |
112 | # version. Otherwise allow greater minor version. | | 112 | # version. Otherwise allow greater minor version. |
113 | # | | 113 | # |
114 | | | 114 | |
115 | .if !empty(RUBY_RAILS_STRICT_DEP:M[yY][eE][sS]) | | 115 | .if !empty(RUBY_RAILS_STRICT_DEP:M[yY][eE][sS]) |
116 | _RAILS_NEXT!= ${EXPR} ${_RAILS_TEENY} + 1 | | 116 | _RAILS_NEXT!= ${EXPR} ${_RAILS_TEENY} + 1 |
117 | _RAILS_DEP= \ | | 117 | _RAILS_DEP= \ |
118 | ${RUBY_RAILS}>=${RAILS_VERSION}<${_RAILS_MAJOR}.${_RAILS_MINOR}.${_RAILS_NEXT} | | 118 | ${RUBY_RAILS}>=${RAILS_VERSION}<${_RAILS_MAJOR}.${_RAILS_MINOR}.${_RAILS_NEXT} |
119 | .else | | 119 | .else |
120 | _RAILS_NEXT!= ${EXPR} ${_RAILS_MINOR} + 1 | | 120 | _RAILS_NEXT!= ${EXPR} ${_RAILS_MINOR} + 1 |
121 | _RAILS_DEP= ${RUBY_RAILS}>=${RAILS_VERSION}<${_RAILS_MAJOR}.${_RAILS_NEXT} | | 121 | _RAILS_DEP= ${RUBY_RAILS}>=${RAILS_VERSION}<${_RAILS_MAJOR}.${_RAILS_NEXT} |
122 | .endif | | 122 | .endif |
123 | | | 123 | |
124 | # | | 124 | # |
125 | MAKE_ENV+= RUBY_RAILS_DEFAULT=${RUBY_RAILS} \ | | 125 | MAKE_ENV+= RUBY_RAILS_DEFAULT=${RUBY_RAILS} \ |
126 | RUBY_RAILS_ACCEPTED=${RUBY_RAILS} | | 126 | RUBY_RAILS_ACCEPTED=${RUBY_RAILS} |
127 | # | | 127 | # |
128 | MULTI+= RUBY_RAILS_DEFAULT=${RUBY_RAILS} \ | | 128 | MULTI+= RUBY_RAILS_DEFAULT=${RUBY_RAILS} \ |
129 | RUBY_RAILS_ACCEPTED=${RUBY_RAILS} | | 129 | RUBY_RAILS_ACCEPTED=${RUBY_RAILS} |
130 | | | 130 | |
131 | PLIST_SUBST+= RUBY_RAILS=${RUBY_RAILS} | | 131 | PLIST_SUBST+= RUBY_RAILS=${RUBY_RAILS} |
132 | FILES_SUBST+= RUBY_RAILS=${RUBY_RAILS} | | 132 | FILES_SUBST+= RUBY_RAILS=${RUBY_RAILS} |
133 | | | 133 | |
134 | RUBY_ACTIVESUPPORT_DEPENDS= \ | | 134 | RUBY_ACTIVESUPPORT_DEPENDS= \ |
135 | ${RUBY_PKGPREFIX}-activesupport${_RAILS_DEP}:../../devel/ruby-activesupport${RUBY_RAILS} | | 135 | ${RUBY_PKGPREFIX}-activesupport${_RAILS_DEP}:../../devel/ruby-activesupport${RUBY_RAILS} |
136 | RUBY_ACTIVEMODEL_DEPENDS= \ | | 136 | RUBY_ACTIVEMODEL_DEPENDS= \ |
137 | ${RUBY_PKGPREFIX}-activemodel${_RAILS_DEP}:../../devel/ruby-activemodel${RUBY_RAILS} | | 137 | ${RUBY_PKGPREFIX}-activemodel${_RAILS_DEP}:../../devel/ruby-activemodel${RUBY_RAILS} |
138 | RUBY_ACTIONPACK_DEPENDS= \ | | 138 | RUBY_ACTIONPACK_DEPENDS= \ |
139 | ${RUBY_PKGPREFIX}-actionpack${_RAILS_DEP}:../../www/ruby-actionpack${RUBY_RAILS} | | 139 | ${RUBY_PKGPREFIX}-actionpack${_RAILS_DEP}:../../www/ruby-actionpack${RUBY_RAILS} |
140 | RUBY_ACTIVERECORD_DEPENDS= \ | | 140 | RUBY_ACTIVERECORD_DEPENDS= \ |
141 | ${RUBY_PKGPREFIX}-activerecord${_RAILS_DEP}:../../databases/ruby-activerecord${RUBY_RAILS} | | 141 | ${RUBY_PKGPREFIX}-activerecord${_RAILS_DEP}:../../databases/ruby-activerecord${RUBY_RAILS} |
142 | RUBY_ACTIONMAILER_DEPENDS= \ | | 142 | RUBY_ACTIONMAILER_DEPENDS= \ |
143 | ${RUBY_PKGPREFIX}-actionmailer${_RAILS_DEP}:../../mail/ruby-actionmailer${RUBY_RAILS} | | 143 | ${RUBY_PKGPREFIX}-actionmailer${_RAILS_DEP}:../../mail/ruby-actionmailer${RUBY_RAILS} |
144 | RUBY_RAILTIES_DEPENDS= \ | | 144 | RUBY_RAILTIES_DEPENDS= \ |
145 | ${RUBY_PKGPREFIX}-railties${_RAILS_DEP}:../../devel/ruby-railties${RUBY_RAILS} | | 145 | ${RUBY_PKGPREFIX}-railties${_RAILS_DEP}:../../devel/ruby-railties${RUBY_RAILS} |
146 | RUBY_RAILS_DEPENDS= \ | | 146 | RUBY_RAILS_DEPENDS= \ |
147 | ${RUBY_PKGPREFIX}-rails${_RAILS_DEP}:../../www/ruby-rails${RUBY_RAILS} | | 147 | ${RUBY_PKGPREFIX}-rails${_RAILS_DEP}:../../www/ruby-rails${RUBY_RAILS} |
148 | RUBY_ACTIONVIEW_DEPENDS= \ | | 148 | RUBY_ACTIONVIEW_DEPENDS= \ |
149 | ${RUBY_PKGPREFIX}-actionview${_RAILS_DEP}:../../www/ruby-actionview${RUBY_RAILS} | | 149 | ${RUBY_PKGPREFIX}-actionview${_RAILS_DEP}:../../www/ruby-actionview${RUBY_RAILS} |
150 | RUBY_ACTIVEJOB_DEPENDS= \ | | 150 | RUBY_ACTIVEJOB_DEPENDS= \ |
151 | ${RUBY_PKGPREFIX}-activejob${_RAILS_DEP}:../../devel/ruby-activejob${RUBY_RAILS} | | 151 | ${RUBY_PKGPREFIX}-activejob${_RAILS_DEP}:../../devel/ruby-activejob${RUBY_RAILS} |
152 | RUBY_ACTIONCABLE_DEPENDS= \ | | 152 | RUBY_ACTIONCABLE_DEPENDS= \ |
153 | ${RUBY_PKGPREFIX}-actioncable${_RAILS_DEP}:../../www/ruby-actioncable${RUBY_RAILS} | | 153 | ${RUBY_PKGPREFIX}-actioncable${_RAILS_DEP}:../../www/ruby-actioncable${RUBY_RAILS} |
154 | RUBY_ACTIVESTORAGE_DEPENDS= \ | | 154 | RUBY_ACTIVESTORAGE_DEPENDS= \ |
155 | ${RUBY_PKGPREFIX}-activestorage${_RAILS_DEP}:../../devel/ruby-activestorage${RUBY_RAILS} | | 155 | ${RUBY_PKGPREFIX}-activestorage${_RAILS_DEP}:../../devel/ruby-activestorage${RUBY_RAILS} |
156 | .if ${RUBY_RAILS} >= 60 | | 156 | .if ${RUBY_RAILS} >= 60 |
157 | RUBY_ACTIONMAILBOX_DEPENDS= \ | | 157 | RUBY_ACTIONMAILBOX_DEPENDS= \ |
158 | ${RUBY_PKGPREFIX}-actionmailbox${_RAILS_DEP}:../../mail/ruby-actionmailbox${RUBY_RAILS} | | 158 | ${RUBY_PKGPREFIX}-actionmailbox${_RAILS_DEP}:../../mail/ruby-actionmailbox${RUBY_RAILS} |
159 | RUBY_ACTIONTEXT_DEPENDS= \ | | 159 | RUBY_ACTIONTEXT_DEPENDS= \ |
160 | ${RUBY_PKGPREFIX}-actiontext${_RAILS_DEP}:../../textproc/ruby-actiontext${RUBY_RAILS} | | 160 | ${RUBY_PKGPREFIX}-actiontext${_RAILS_DEP}:../../textproc/ruby-actiontext${RUBY_RAILS} |
161 | .endif | | 161 | .endif |
162 | | | 162 | |
163 | .endif | | 163 | .endif |