| @@ -1,72 +1,73 @@ | | | @@ -1,72 +1,73 @@ |
1 | # $NetBSD: rails.mk,v 1.108 2021/12/19 05:22:30 taca Exp $ | | 1 | # $NetBSD: rails.mk,v 1.109 2021/12/19 05:42:50 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 | | 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 | | 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 | | 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.6 | | 50 | RUBY_RAILS52_VERSION?= 5.2.6 |
51 | RUBY_RAILS60_VERSION?= 6.0.4.4 | | 51 | RUBY_RAILS60_VERSION?= 6.0.4.4 |
52 | RUBY_RAILS61_VERSION?= 6.1.4.4 | | 52 | RUBY_RAILS61_VERSION?= 6.1.4.4 |
| | | 53 | RUBY_RAILS70_VERSION?= 7.0.0 |
53 | | | 54 | |
54 | RUBY_RAILS_ACCEPTED?= # defined | | 55 | RUBY_RAILS_ACCEPTED?= # defined |
55 | RUBY_RAILS_DEFAULT?= 52 | | 56 | RUBY_RAILS_DEFAULT?= 52 |
56 | | | 57 | |
57 | RUBY_RAILS_STRICT_DEP?= no | | 58 | RUBY_RAILS_STRICT_DEP?= no |
58 | | | 59 | |
59 | RUBY_RAILS_SUPPORTED= 52 60 61 | | 60 | RUBY_RAILS_SUPPORTED= 52 60 61 70 |
60 | | | 61 | |
61 | .if empty(RUBY_RAILS_SUPPORTED:M${RUBY_RAILS_DEFAULT}) | | 62 | .if empty(RUBY_RAILS_SUPPORTED:M${RUBY_RAILS_DEFAULT}) |
62 | . error Unsupported RUBY_RAILS_DEFAULT: ${RUBY_RAILS_DEFAULT} | | 63 | . error Unsupported RUBY_RAILS_DEFAULT: ${RUBY_RAILS_DEFAULT} |
63 | .endif | | 64 | .endif |
64 | | | 65 | |
65 | .if empty(RUBY_RAILS_ACCEPTED) | | 66 | .if empty(RUBY_RAILS_ACCEPTED) |
66 | RUBY_RAILS_ACCEPTED= ${RUBY_RAILS_SUPPORTED} | | 67 | RUBY_RAILS_ACCEPTED= ${RUBY_RAILS_SUPPORTED} |
67 | .endif | | 68 | .endif |
68 | | | 69 | |
69 | .if defined(RUBY_RAILS_REQD) | | 70 | .if defined(RUBY_RAILS_REQD) |
70 | . if empty(RUBY_RAILS_ACCEPTED:M${RUBY_RAILS_REQD}) | | 71 | . if empty(RUBY_RAILS_ACCEPTED:M${RUBY_RAILS_REQD}) |
71 | . error Unsupported RUBY_RAILS_REQD: ${RUBY_RAILS_REQD} | | 72 | . error Unsupported RUBY_RAILS_REQD: ${RUBY_RAILS_REQD} |
72 | . endif | | 73 | . endif |
| @@ -79,27 +80,29 @@ RUBY_RAILS= ${rr} | | | @@ -79,27 +80,29 @@ RUBY_RAILS= ${rr} |
79 | | | 80 | |
80 | .if !defined(RUBY_RAILS) | | 81 | .if !defined(RUBY_RAILS) |
81 | . for rr in ${RUBY_RAILS_ACCEPTED} | | 82 | . for rr in ${RUBY_RAILS_ACCEPTED} |
82 | . if ${rr} == ${RUBY_RAILS_DEFAULT} | | 83 | . if ${rr} == ${RUBY_RAILS_DEFAULT} |
83 | RUBY_RAILS= ${rr} | | 84 | RUBY_RAILS= ${rr} |
84 | . else | | 85 | . else |
85 | RUBY_RAILS?= ${rr} | | 86 | RUBY_RAILS?= ${rr} |
86 | . endif | | 87 | . endif |
87 | . endfor | | 88 | . endfor |
88 | .endif | | 89 | .endif |
89 | | | 90 | |
90 | RUBY_RAILS?= ${RUBY_RAILS_SUPPORTED} | | 91 | RUBY_RAILS?= ${RUBY_RAILS_SUPPORTED} |
91 | | | 92 | |
92 | .if ${RUBY_RAILS} == "61" | | 93 | .if ${RUBY_RAILS} == "70" |
| | | 94 | RAILS_VERSION:= ${RUBY_RAILS70_VERSION} |
| | | 95 | .elif ${RUBY_RAILS} == "61" |
93 | RAILS_VERSION:= ${RUBY_RAILS61_VERSION} | | 96 | RAILS_VERSION:= ${RUBY_RAILS61_VERSION} |
94 | .elif ${RUBY_RAILS} == "60" | | 97 | .elif ${RUBY_RAILS} == "60" |
95 | RAILS_VERSION:= ${RUBY_RAILS60_VERSION} | | 98 | RAILS_VERSION:= ${RUBY_RAILS60_VERSION} |
96 | .elif ${RUBY_RAILS} == "52" | | 99 | .elif ${RUBY_RAILS} == "52" |
97 | RAILS_VERSION:= ${RUBY_RAILS52_VERSION} | | 100 | RAILS_VERSION:= ${RUBY_RAILS52_VERSION} |
98 | .endif | | 101 | .endif |
99 | | | 102 | |
100 | # | | 103 | # |
101 | # Components of Ruby's version. | | 104 | # Components of Ruby's version. |
102 | # | | 105 | # |
103 | _RAILS_MAJOR= ${RAILS_VERSION:C/([0-9]+)\..*/\1/} | | 106 | _RAILS_MAJOR= ${RAILS_VERSION:C/([0-9]+)\..*/\1/} |
104 | _RAILS_MINOR= ${RAILS_VERSION:C/([0-9]+)\.([0-9]+)\..*/\2/} | | 107 | _RAILS_MINOR= ${RAILS_VERSION:C/([0-9]+)\.([0-9]+)\..*/\2/} |
105 | _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/} |