[38660] trunk/dports/sysutils/bacula/Portfile

Ryan Schmidt ryandesign at macports.org
Sun Jul 27 22:44:34 PDT 2008


On Jul 27, 2008, at 19:53, macsforever2000 at macports.org wrote:

> Revision: 38660
>           http://trac.macosforge.org/projects/macports/changeset/38660
> Author:   macsforever2000 at macports.org
> Date:     2008-07-27 17:53:24 -0700 (Sun, 27 Jul 2008)
> Log Message:
> -----------
> Updated to version 2.4.1. Fixed so that it compiles filed and  
> others now. Fixed datarootdir. Added macsforever2000 as maintainer.  
> Added variants for client_only, mysql4, mysql5, postgresql83,  
> sqlite2, sqlite3. Thanks to blb for help with compile issues.
>
> Modified Paths:
> --------------
>     trunk/dports/sysutils/bacula/Portfile


> +variant client_only conflicts mysql4 mysql5 postgresql83 sqlite2  
> sqlite3 description "Install bacula client (bacula-fd) only" {
> +    configure.args-append --enable-client-only
> +}
> +
> +variant mysql4 conflicts client-only mysql5 postgresql83 sqlite2  
> sqlite3 description "Install bacula client and server with mysql 4  
> backend" {

You should replace occurrences of "client-only" in the "conflicts"  
section with "client_only" to match the variant name.

> +  depends_lib-append    port:mysql4
> +  configure.args-append --with-mysql=${prefix}
> +  configure.args-delete --without-mysql
> +}
> +
> +variant mysql5 conflicts client-only mysql4 postgresql83 sqlite2  
> sqlite3 description "Install bacula client and server with mysql 5  
> backend" {
> +  depends_lib-append    port:mysql5
> +  configure.args-append --with-mysql=${prefix}
> +  configure.args-delete --without-mysql
> +}
> +
> +variant postgresql83 conflicts mysql4 mysql5 sqlite2 sqlite3  
> client-only description "Install bacula client and server with  
> postgresql 8.3 backend" {
> +  depends_lib-append    port:postgresql83
> +  configure.args-append --with-postgresql=${prefix}
> +  configure.args-delete --without-postgresql
> +}
> +
> +variant sqlite2 conflicts client-only sqlite3 mysql4 mysql5  
> postgresql83 description "Install bacula client and server with  
> sqlite 2 backend" {
> +  depends_lib-append    port:sqlite2
> +  configure.args-append --with-sqlite=${prefix}
> +  configure.args-delete --without-sqlite
> +}
> +
> +variant sqlite3 conflicts client-only sqlite2 mysql4 mysql5  
> postgresql83 description "Install bacula client and server with  
> sqlite 3 backend" {
> +  depends_lib-append    port:sqlite3
> +  configure.args-append --with-sqlite3=${prefix}
> +  configure.args-delete --without-sqlite3
> +}
> +
> +default_variants        +client_only

You should only make client_only the default variant if the user has  
not already selected a conflicting variant. So do:

if {![variant_isset mysql4] && ![variant_isset mysql5] && ! 
[variant_isset postgresql83] && ![variant_isset sqlite2] && ! 
[variant_isset sqlite3]} {
	default_variants +client_only
}

See e.g. the pdftk and minivmac ports.



More information about the macports-dev mailing list