Ticket #11914: rb-dbi_variants.diff

File rb-dbi_variants.diff, 1.2 KB (added by boeyms@…, 17 years ago)
  • ruby/rb-dbi/Portfile

     
    1616
    1717worksrcdir              ${ruby.filename}
    1818
    19 configure.args-append   --with=dbi
     19# The conjuring with the dbi_conf_args variable to set configure.args is to cope
     20# with the fact that setup.rb accepts a single "--with=<feature>,<feature>,..."
     21# argument, with the last one overriding the rest.  We must therefore append to
     22# the end of the string to get the desired variants, and for niceness we might
     23# as well delete the obsoleted "--with" argument.
    2024
     25set dbi_conf_args               --with=dbi
     26configure.args-append   ${dbi_conf_args}
     27
     28variant dbd_mysql {
     29        depends_lib-append      port:rb-mysql
     30        configure.args-delete   ${dbi_conf_args}
     31        append dbi_conf_args    ,dbd_mysql
     32        configure.args-append   ${dbi_conf_args}
     33}
     34
     35variant dbd_odbc {
     36        depends_lib-append      port:rb-odbc
     37        configure.args-delete   ${dbi_conf_args}
     38        append dbi_conf_args    ,dbd_odbc
     39        configure.args-append   ${dbi_conf_args}
     40}
     41
     42variant dbd_pg {
     43        depends_lib-append      port:rb-postgres
     44        configure.args-delete   ${dbi_conf_args}
     45        append dbi_conf_args    ,dbd_pg
     46        configure.args-append   ${dbi_conf_args}
     47}