port variants & conflicts

Ryan Schmidt ryandesign at macports.org
Sun Apr 29 13:37:40 PDT 2012


On Apr 29, 2012, at 14:48, Bjarne D Mathiesen wrote:

> I've seen two different methods of describing variants

You're referring to the conflicts, I take it.


> dovecot2:
> variant mysql5 description {Enable MySQL 5.1 support} {
>    conflicts mysql55 mariadb percona
> 
>    depends_lib-append          port:mysql5
>    configure.env-append
> MYSQL_CONFIG=${prefix}/lib/mysql5/bin/mysql_config
>    configure.args-append       --with-mysql
> }

This states that when the mysql variant is selected, the dovecot2 port conflicts with the mysql55, mariadb and percona ports. This is unusual; usually, entire ports conflict with other entire ports (for example, the whois port conflicts with the bahamut, expect and ripe-whois ports); port-level conflicts are not usually defined in a variant. In some case sit may be justified to do so. But here, the conflicts line could probably be removed, since it's actually the mysql5 port, on which the variant already depends, which has the conflict with those other versions and forks of mysql, so it should be left up to those ports to declare the conflicts with one another.


> postfix:
> variant mysql5 conflicts mysql55 description "add mysql support via
> mysql5.1" {
>    depends_lib-append path:lib/mysql5/bin/mysql_config:mysql5
>    lappend CCARGS  -DHAS_MYSQL "-I${prefix}/include/mysql5/mysql"
>    lappend AUXLIBS "-L${prefix}/lib/mysql5/mysql" -lmysqlclient -lz -lm
> }

This states that the mysql5 variant of the postfix port conflicts with the mysql55 variant of the postfix port. This is the normal way to declare which variants within a single port conflict with one another.





More information about the macports-dev mailing list