Ticket #64110: swig-ruby.patch

File swig-ruby.patch, 6.4 KB (added by outis, 3 years ago)

patch to add use of newer ruby versions as variants

  • Portfile

    old new  
    185185}
    186186
    187187subport swig-ruby {
    188188
    189     variant ruby186 conflicts ruby187 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 description {build using Ruby 1.8.6} {
     189    variant ruby186 conflicts ruby187 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 ruby25 ruby26 ruby27 ruby30 description {build using Ruby 1.8.6} {
    190190        depends_lib-delete port:ruby23
    191191        depends_lib-append port:ruby186
    192192        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
    193193        configure.args-append --with-ruby=${prefix}/bin/ruby
    194194    }
    195195
    196     variant ruby187 conflicts ruby186 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 description {build using Ruby 1.8.7} {
     196    variant ruby187 conflicts ruby186 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 ruby25 ruby26 ruby27 ruby30 description {build using Ruby 1.8.7} {
    197197        depends_lib-delete port:ruby23
    198198        depends_lib-append port:ruby
    199199        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
    200200        configure.args-append --with-ruby=${prefix}/bin/ruby1.8
    201201    }
    202202
    203     variant ruby19 conflicts ruby186 ruby187 ruby20 ruby21 ruby22 ruby23 ruby24 description {build using Ruby 1.9} {
     203    variant ruby19 conflicts ruby186 ruby187 ruby20 ruby21 ruby22 ruby23 ruby24 ruby25 ruby26 ruby27 ruby30 description {build using Ruby 1.9} {
    204204        depends_lib-delete port:ruby23
    205205        depends_lib-append port:ruby19
    206206        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
    207207        configure.args-append --with-ruby=${prefix}/bin/ruby1.9
    208208    }
    209209
    210     variant ruby20 conflicts ruby186 ruby187 ruby19 ruby21 ruby22 ruby23 ruby24 description {build using Ruby 2.0} {
     210    variant ruby20 conflicts ruby186 ruby187 ruby19 ruby21 ruby22 ruby23 ruby24 ruby25 ruby26 ruby27 ruby30 description {build using Ruby 2.0} {
    211211        depends_lib-delete port:ruby23
    212212        depends_lib-append port:ruby20
    213213        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
    214214        configure.args-append --with-ruby=${prefix}/bin/ruby2.0
    215215    }
    216216
    217     variant ruby21 conflicts ruby186 ruby187 ruby19 ruby20 ruby22 ruby23 ruby24 description {build using Ruby 2.1} {
     217    variant ruby21 conflicts ruby186 ruby187 ruby19 ruby20 ruby22 ruby23 ruby24 ruby25 ruby26 ruby27 ruby30 description {build using Ruby 2.1} {
    218218        depends_lib-delete port:ruby23
    219219        depends_lib-append port:ruby21
    220220        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
    221221        configure.args-append --with-ruby=${prefix}/bin/ruby2.1
    222222    }
    223223
    224     variant ruby22 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby23 ruby24 description {build using Ruby 2.2} {
     224    variant ruby22 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby23 ruby24 ruby25 ruby26 ruby27 ruby30 description {build using Ruby 2.2} {
    225225        depends_lib-delete port:ruby23
    226226        depends_lib-append port:ruby22
    227227        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
    228228        configure.args-append --with-ruby=${prefix}/bin/ruby2.2
    229229    }
    230230
    231     variant ruby23 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby22 ruby24 description {build using Ruby 2.3} {
     231    variant ruby23 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby22 ruby24 ruby25 ruby26 ruby27 ruby30 description {build using Ruby 2.3} {
    232232#        depends_lib-delete port:ruby
    233233#        depends_lib-append port:ruby23
    234234#        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
    235235#        configure.args-append --with-ruby=${prefix}/bin/ruby2.3
    236236    }
    237237
    238     variant ruby24 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby22 ruby23 description {build using Ruby 2.4} {
     238    variant ruby24 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby22 ruby23 ruby25 ruby26 ruby27 ruby30 description {build using Ruby 2.4} {
    239239        depends_lib-delete port:ruby23
    240240        depends_lib-append port:ruby24
    241241        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
    242242        configure.args-append --with-ruby=${prefix}/bin/ruby2.4
    243243    }
    244244
     245    variant ruby25 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 ruby26 ruby27 ruby30 description {build using Ruby 2.5} {
     246        depends_lib-delete port:ruby23
     247        depends_lib-append port:ruby25
     248        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
     249        configure.args-append --with-ruby=${prefix}/bin/ruby2.5
     250    }
     251
     252    variant ruby26 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24 ruby25 ruby27 ruby30 description {build using Ruby 2.6} {
     253        depends_lib-delete port:ruby23
     254        depends_lib-append port:ruby26
     255        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
     256        configure.args-append --with-ruby=${prefix}/bin/ruby2.6
     257    }
     258
     259    variant ruby27 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24  ruby25 ruby26 ruby30 description {build using Ruby 2.7} {
     260        depends_lib-delete port:ruby23
     261        depends_lib-append port:ruby27
     262        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
     263        configure.args-append --with-ruby=${prefix}/bin/ruby2.7
     264    }
     265
     266    variant ruby30 conflicts ruby186 ruby187 ruby19 ruby20 ruby21 ruby22 ruby23 ruby24  ruby25 ruby26 ruby27 description {build using Ruby 3.0} {
     267        depends_lib-delete port:ruby23
     268        depends_lib-append port:ruby30
     269        configure.args-delete --with-ruby=${prefix}/bin/ruby2.3
     270        configure.args-append --with-ruby=${prefix}/bin/ruby3.0
     271    }
     272
    245273    if {![variant_isset ruby186] && ![variant_isset ruby187] &&
    246274        ![variant_isset ruby19] && ![variant_isset ruby20] &&
    247275        ![variant_isset ruby21] && ![variant_isset ruby22] &&
    248         ![variant_isset ruby23] && ![variant_isset ruby24]} {
     276        ![variant_isset ruby23] && ![variant_isset ruby24] &&
     277        ![variant_isset ruby25] && ![variant_isset ruby26] &&
     278        ![variant_isset ruby27] && ![variant_isset ruby30]} {
    249279        default_variants +ruby23
    250280    }
    251281    if {![variant_isset ruby186] && ![variant_isset ruby187] &&
    252282        ![variant_isset ruby19] && ![variant_isset ruby20] &&
    253283        ![variant_isset ruby21] && ![variant_isset ruby22] &&
    254         ![variant_isset ruby23] && ![variant_isset ruby24]} {
     284        ![variant_isset ruby23] && ![variant_isset ruby24] &&
     285        ![variant_isset ruby25] && ![variant_isset ruby26] &&
     286        ![variant_isset ruby27] && ![variant_isset ruby30]} {
    255287        ui_error "\n\nA +rubyXY variant must be selected; the variant '-ruby23' cannot be used alone.\n"
    256288        return -code error "Invalid variant selection"
    257289    }
    258290}