[114560] trunk/dports/databases/slony1/Portfile

Ryan Schmidt ryandesign at macports.org
Tue Dec 10 18:04:00 PST 2013


On Dec 10, 2013, at 04:06, jwa at macports.org wrote:

> Revision
> 114560
> Author
> jwa at macports.org
> Date
> 2013-12-10 02:06:51 -0800 (Tue, 10 Dec 2013)
> Log Message
> 
> slony1: version bump to 2.2.1, postgresql93 now the default to support the newest PostgreSQL
> Modified Paths
> 
> 	• trunk/dports/databases/slony1/Portfile
> Diff
> 
> Modified: trunk/dports/databases/slony1/Portfile (114559 => 114560)
> 
> --- trunk/dports/databases/slony1/Portfile	2013-12-10 09:56:26 UTC (rev 114559)
> +++ trunk/dports/databases/slony1/Portfile	2013-12-10 10:06:51 UTC (rev 114560)
> 
> @@ -4,7 +4,7 @@
> 
>  PortSystem        1.0
> 
>  
> 
>  name              slony1
> 
> -version           2.1.4
> 
> +version           2.2.1
> 
>  categories        databases
> 
>  platforms         darwin
> 
>  maintainers       gmail.com:wreese jwa
> 
> @@ -12,56 +12,35 @@
> 
>  long_description  Slony-I is a trigger-based master to multiple slaves replication system for PostgreSQL being developed by Jan Wieck.
> 
>  
> 
>  homepage          http://main.slony.info/
> -master_sites      ${homepage}/downloads/2.1/source
> 
> +master_sites      ${homepage}/downloads/2.2/source
> 

Here you could use the branch variable. See https://trac.macports.org/wiki/PortfileRecipes#branch


> -default_variants  +postgresql92
> 
> +depends_lib       port:postgresql93
> 
>  
> 
> -configure.args	  --with-pgconfigdir="${prefix}/lib/postgresql92/bin/" \
> -    --with-pgsharedir="${prefix}/share/postgresql92/" \
> -    --with-pgbindir="${prefix}/lib/postgresql92/bin/" \
> -    --with-pgincludedir="${prefix}/include/postgresql92/" \
> -    --with-pgincludeserverdir="${prefix}/include/postgresql92/server/" \
> -    --with-pglibdir="${prefix}/lib/postgresql92/" \
> -    --with-pgpkglibdir="${prefix}/lib/postgresql92/"
> 
> +configure.args	  --with-pgconfigdir="${prefix}/lib/postgresql93/bin/" \
> +    --with-pgsharedir="${prefix}/share/postgresql93/" \
> +    --with-pgbindir="${prefix}/lib/postgresql93/bin/" \
> +    --with-pgincludedir="${prefix}/include/postgresql93/" \
> +    --with-pgincludeserverdir="${prefix}/include/postgresql93/server/" \
> +    --with-pglibdir="${prefix}/lib/postgresql93/" \
> +    --with-pgpkglibdir="${prefix}/lib/postgresql93/"
> 
>  
> 
>  destroot.args     -B
> 
>  
> 
> -variant postgresql83 conflicts postgresql84 postgresql90 postgresql91 postgresql92 \
> -    description {support for PostgreSQL 8.3 instead of 9.2} {
> -    depends_lib-delete	port:postgresql92
> -    depends_lib-append	port:postgresql83
> -    configure.args-delete	--with-pgconfigdir="${prefix}/lib/postgresql92/bin/"
> -    configure.args-delete	--with-pgsharedir="${prefix}/share/postgresql92/"
> -    configure.args-delete	--with-pgbindir="${prefix}/lib/postgresql92/bin/"
> -    configure.args-delete	--with-pgincludedir="${prefix}/include/postgresql92/"
> -    configure.args-delete	--with-pgincludeserverdir="${prefix}/include/postgresql92/server/"
> -    configure.args-delete	--with-pglibdir="${prefix}/lib/postgresql92/"
> -    configure.args-delete	--with-pgpkglibdir="${prefix}/lib/postgresql92/"
> -
> -    configure.args-append	  --with-pgconfigdir="${prefix}/lib/postgresql83/bin/" \
> -	--with-pgsharedir="${prefix}/share/postgresql83/" \
> -	--with-pgbindir="${prefix}/lib/postgresql83/bin/" \
> -	--with-pgincludedir="${prefix}/include/postgresql83/" \
> -	--with-pgincludeserverdir="${prefix}/include/postgresql83/server/" \
> -	--with-pglibdir="${prefix}/lib/postgresql83/" \
> -	--with-pgpkglibdir="${prefix}/lib/postgresql83/"
> -}
> -
> -variant postgresql84 conflicts postgresql83 postgresql90 postgresql91 postgresql92 \
> -    description {support for PostgreSQL 8.4 instead of 9.2} {
> -    depends_lib-delete	port:postgresql92
> 
> +variant postgresql84 conflicts postgresql90 postgresql91 postgresql92 \
> +    description {support for PostgreSQL 8.4 instead of 9.3} {
> +    depends_lib-delete	port:postgresql93
> 
>      depends_lib-append	port:postgresql84
> 
> -    configure.args-delete	--with-pgconfigdir="${prefix}/lib/postgresql92/bin/"
> -    configure.args-delete	--with-pgsharedir="${prefix}/share/postgresql92/"
> -    configure.args-delete	--with-pgbindir="${prefix}/lib/postgresql92/bin/"
> -    configure.args-delete	--with-pgincludedir="${prefix}/include/postgresql92/"
> -    configure.args-delete	--with-pgincludeserverdir="${prefix}/include/postgresql92/server/"
> -    configure.args-delete	--with-pglibdir="${prefix}/lib/postgresql92/"
> -    configure.args-delete	--with-pgpkglibdir="${prefix}/lib/postgresql92/"
> 
> +    configure.args-delete	--with-pgconfigdir="${prefix}/lib/postgresql93/bin/"
> +    configure.args-delete	--with-pgsharedir="${prefix}/share/postgresql93/"
> +    configure.args-delete	--with-pgbindir="${prefix}/lib/postgresql93/bin/"
> +    configure.args-delete	--with-pgincludedir="${prefix}/include/postgresql93/"
> +    configure.args-delete	--with-pgincludeserverdir="${prefix}/include/postgresql93/server/"
> +    configure.args-delete	--with-pglibdir="${prefix}/lib/postgresql93/"
> +    configure.args-delete	--with-pgpkglibdir="${prefix}/lib/postgresql93/"
> 
>  
> 
>      configure.args-append	  --with-pgconfigdir="${prefix}/lib/postgresql84/bin/" \
> 
>  	--with-pgsharedir="${prefix}/share/postgresql84/" \
> 
> @@ -72,17 +51,17 @@
> 
>  	--with-pgpkglibdir="${prefix}/lib/postgresql84/"
> 
>  }

These postgresql variants would be much less convoluted if you used a variant for each version, instead of a variant for each version except for the default version, like you do now. Then in each variant you would only have to add the appropriate flags and dependencies, instead of also having to remove the default flags and dependencies. It would also meet the goal better: that of letting the user upgrade to a newer database version when they’re ready, rather than forcing the newest version upon them.



More information about the macports-dev mailing list