| 187 | subport swig-ruby { |
| 188 | |
| 189 | revision 1 |
| 190 | |
| 191 | variant ruby186 conflicts ruby187 ruby19 ruby20 ruby21 ruby22 ruby23 description {build using Ruby 1.8.6} { |
| 192 | depends_lib-delete port:ruby |
| 193 | depends_lib-append port:ruby186 |
| 194 | configure.args-delete --with-ruby=${prefix}/bin/ruby1.8 |
| 195 | configure.args-append --with-ruby=${prefix}/bin/ruby |
| 196 | } |
| 197 | |
| 198 | variant ruby187 conflicts ruby186 ruby19 ruby20 ruby21 ruby22 ruby23 description {build using Ruby 1.8.7} {} |
| 199 | |
| 200 | variant ruby19 conflicts ruby186 ruby187 ruby20 ruby21 ruby22 ruby23 description {build using Ruby 1.9} { |
| 201 | depends_lib-delete port:ruby |
| 202 | depends_lib-append port:ruby19 |
| 203 | configure.args-delete --with-ruby=${prefix}/bin/ruby1.8 |
| 204 | configure.args-append --with-ruby=${prefix}/bin/ruby1.9 |
| 205 | } |
| 206 | |
| 207 | variant ruby20 conflicts ruby186 ruby187 ruby19 ruby21 ruby22 ruby23 description {build using Ruby 2.0} { |
| 208 | depends_lib-delete port:ruby |
| 209 | depends_lib-append port:ruby20 |
| 210 | configure.args-delete --with-ruby=${prefix}/bin/ruby1.8 |
| 211 | configure.args-append --with-ruby=${prefix}/bin/ruby2.0 |
| 212 | } |
| 213 | |
| 214 | variant ruby21 conflicts ruby186 ruby187 ruby19 ruby20 ruby22 ruby23 description {build using Ruby 2.1} { |
| 215 | depends_lib-delete port:ruby |
| 216 | depends_lib-append port:ruby21 |
| 217 | configure.args-delete --with-ruby=${prefix}/bin/ruby1.8 |
| 218 | configure.args-append --with-ruby=${prefix}/bin/ruby2.1 |
| 219 | } |
| 220 | |
| 221 | variant ruby22 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby23 description {build using Ruby 2.2} { |
| 222 | depends_lib-delete port:ruby |
| 223 | depends_lib-append port:ruby22 |
| 224 | configure.args-delete --with-ruby=${prefix}/bin/ruby1.8 |
| 225 | configure.args-append --with-ruby=${prefix}/bin/ruby2.2 |
| 226 | } |
| 227 | |
| 228 | variant ruby23 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby22 description {build using Ruby 2.3} { |
| 229 | depends_lib-delete port:ruby |
| 230 | depends_lib-append port:ruby23 |
| 231 | configure.args-delete --with-ruby=${prefix}/bin/ruby1.8 |
| 232 | configure.args-append --with-ruby=${prefix}/bin/ruby2.3 |
| 233 | } |
| 234 | |
| 235 | if {![variant_isset ruby186] && ![variant_isset ruby187] && |
| 236 | ![variant_isset ruby19] && ![variant_isset ruby20] && |
| 237 | ![variant_isset ruby21] && ![variant_isset ruby22] && |
| 238 | ![variant_isset ruby23]} { |
| 239 | default_variants +ruby187 |
| 240 | } |
| 241 | if {![variant_isset ruby186] && ![variant_isset ruby187] && |
| 242 | ![variant_isset ruby19] && ![variant_isset ruby20] && |
| 243 | ![variant_isset ruby21] && ![variant_isset ruby22] && |
| 244 | ![variant_isset ruby23]} { |
| 245 | ui_error "\n\nA +rubyXY variant must be selected; the variant '-ruby187' cannot be used alone.\n" |
| 246 | return -code error "Invalid variant selection" |
| 247 | } |
| 248 | } |
| 249 | |