[89464] trunk/dports/databases/libgda5/Portfile
Ryan Schmidt
ryandesign at macports.org
Mon Jan 30 10:32:00 PST 2012
On Jan 30, 2012, at 11:43, jwa at macports.org wrote:
> Revision: 89464
> http://trac.macports.org/changeset/89464
> Author: jwa at macports.org
> Date: 2012-01-30 09:43:21 -0800 (Mon, 30 Jan 2012)
> Log Message:
> -----------
> restore the old variants for legacy purposes, not to break old installs
Well, no... the old variants should not themselves do anything anymore. Instead they should just be stubs that automatically switch the user over to the new variant names.
For variants whose names have just changed, this is easy. Here is an example:
variant with_mysql5 requires mysql5 description {Legacy compatibility variant} {}
For variants whose meaning has inverted along with the name change, you have to do more work, for example:
variant without_bdb conflicts bdb description {Legacy compatibility variant} {}
if {[variant_isset without_bdb]} {
default_variants -bdb
} else {
default_variants +bdb
}
> Modified Paths:
> --------------
> trunk/dports/databases/libgda5/Portfile
>
> Modified: trunk/dports/databases/libgda5/Portfile
> ===================================================================
> --- trunk/dports/databases/libgda5/Portfile 2012-01-30 15:37:10 UTC (rev 89463)
> +++ trunk/dports/databases/libgda5/Portfile 2012-01-30 17:43:21 UTC (rev 89464)
> @@ -125,10 +125,55 @@
> }
> }
>
> +#
> +# the following are legacy variants to be removed after a few update cycles
> +
> +variant with_mysql5 \
> + description {support for current MySQL 5.x} {
> + depends_lib-append path:bin/mysql_config5:mysql5
> + configure.env-append \
> + MYSQL_CONFIG=${prefix}/lib/mysql5/bin/mysql_config
> + configure.args-delete --without-mysql
> + configure.args-append --with-mysql=${prefix}/lib/mysql5
> + configure.cppflags-append "-I${prefix}/include/mysql5/mysql"
> +}
> +
> +variant with_postgresql83 conflicts with_postgresql84 with_postgresql90 \
> + description {support for PostgreSQL 8.3.x} {
> + configure.cppflags-append "-I${prefix}/include/postgresql83"
> + depends_lib-append port:postgresql83
> + configure.args-delete --without-postgres
> + configure.args-append --with-postgres=${prefix}/lib/postgresql83
> +}
> +
> +variant with_postgresql84 conflicts with_postgresql83 with_postgresql90 \
> + description {support for PostgreSQL 8.4.x} {
> + configure.cppflags-append "-I${prefix}/include/postgresql84"
> + depends_lib-append port:postgresql84
> + configure.args-delete --without-postgres
> + configure.args-append --with-postgres=${prefix}/lib/postgresql84
> +}
> +
> +variant with_postgresql90 conflicts with_postgresql83 with_postgresql84 \
> + description {support for PostgreSQL 9.0.x} {
> + configure.cppflags-append "-I${prefix}/include/postgresql90"
> + depends_lib-append port:postgresql90
> + configure.args-delete --without-postgres
> + configure.args-append --with-postgres=${prefix}/lib/postgresql90
> +}
> +
> +variant without_bdb \
> + description {remove support for Berkeley DB} {
> + configure.args-delete --with-bdb=${prefix}
> + configure.args-append --without-bdb
> +}
> +
> post-activate {
> system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
> }
>
> +notes "The with_ and without_ variants are deprecated"
More information about the macports-dev
mailing list