[87157] trunk/dports/devel/pficommon

Ryan Schmidt ryandesign at macports.org
Sat Nov 12 09:04:04 PST 2011


On Nov 12, 2011, at 09:28, hum at macports.org wrote:

> Revision: 87157
>          http://trac.macports.org/changeset/87157
> Author:   hum at macports.org
> Date:     2011-11-12 07:27:57 -0800 (Sat, 12 Nov 2011)
> Log Message:
> -----------
> pficommon: add variants; divide --disable-database into --disable-mysql and --disable-postgresql; fix to compile with databases.
> 
> Modified Paths:
> --------------
>    trunk/dports/devel/pficommon/Portfile
> 
> Added Paths:
> -----------
>    trunk/dports/devel/pficommon/files/
>    trunk/dports/devel/pficommon/files/patch-wscript.diff
> 
> Modified: trunk/dports/devel/pficommon/Portfile
> ===================================================================
> --- trunk/dports/devel/pficommon/Portfile	2011-11-12 14:11:11 UTC (rev 87156)
> +++ trunk/dports/devel/pficommon/Portfile	2011-11-12 15:27:57 UTC (rev 87157)
> @@ -5,6 +5,7 @@
> 
> name                pficommon
> version             1.3.1
> +revision            1
> categories          devel
> platforms           darwin
> maintainers         hum openmaintainer
> @@ -18,16 +19,44 @@
> git.url             https://github.com/pfi/pficommon.git
> git.branch          3858e20dc7
> 
> +patchfiles          patch-wscript.diff
> +
> # msgpack for jubatus.
> -depends_lib         port:msgpack
> -# optional: fcgi mysql postgresql Magick++ gtest
> +default_variants    +mprpc
> 
> configure.cmd       ./waf configure
> configure.universal_args
> -configure.args-append     --disable-database \
> +configure.args-append     --disable-mysql \
> +                          --disable-postgresql \
> +                          --disable-mprpc \
>                           --disable-fcgi \
>                           --disable-magickpp 
> 
> +variant mysql description {Enable mysql} {
> +    depends_lib-append    lib:mysql_config:mysql5
> +    configure.args-delete --disable-mysql
> +}
> +
> +variant postgresql description {Enable postgresql} {
> +    depends_lib-append    lib:libpq:postgresql91
> +    configure.args-delete --disable-postgresql
> +}

You should use path:- or port:-style dependencies. lib:- and bin:-style dependencies would allow dependencies installed by the user outside of MacPorts to satisfy them, which we don't want.

You also probably need to tell the configure script how to find these versions of MySQL and PostgreSQL since they're both installed in nonstandard locations.


> +variant fcgi description {Enable fcgi} {
> +    depends_lib-append    port:fcgi
> +    configure.args-replace s|--disable-fcgi|--with-fcgi=${prefix}|
> +}
> +
> +variant mprpc description {Enable mprpc} {
> +    depends_lib-append    port:msgpack
> +    configure.args-delete --disable-mprpc
> +}
> +
> +variant magickpp description {Enable magick++} {
> +    depends_lib-append    port:imagemagick
> +    configure.args-delete --disable-magickpp
> +}

The port is called ImageMagick, not imagemagick.





More information about the macports-dev mailing list