485 | | <para>Variants are used to specify actions that lie outside the core |
| 485 | <para>MacPorts has a "build everything" approach to ensure the user |
| 486 | gets any functionality they might have been expecting. Sometimes |
| 487 | this includes deciding which version of mysql to use if the user |
| 488 | has not specified a preference.</para> |
| 489 | |
| 490 | <programlisting>variant mysql4 conflicts mysql5 description {Build with MySQL 4 support} { |
| 491 | depends_lib-append port:mysql4 |
| 492 | configure.args --with-mysql=${prefix} |
| 493 | } |
| 494 | |
| 495 | variant mysql5 conflicts mysql4 description {Build with MySQL 5 support} { |
| 496 | depends_lib-append path:bin/mysql_config5:mysql5 |
| 497 | configure.args --with-mysql-lib=${prefix}/lib/mysql5/mysql \ |
| 498 | --with-mysql-include=${prefix}/include/mysql5/mysql |
| 499 | } |
| 500 | |
| 501 | if {![variant_isset mysql4]} { |
| 502 | default_variants +mysql5 |
| 503 | } |
| 504 | |
| 505 | </programlisting> |
| 506 | |
| 507 | <para>Variants are also used to deselect actions that lie outside the core |