[84842] trunk/dports/databases

Ryan Schmidt ryandesign at macports.org
Mon Oct 3 14:38:53 PDT 2011


On Oct 3, 2011, at 08:48, titus at macports.org wrote:

> Revision: 84842
>          http://trac.macports.org/changeset/84842
> Author:   titus at macports.org
> Date:     2011-10-03 06:48:48 -0700 (Mon, 03 Oct 2011)
> Log Message:
> -----------
> added port soci-devel
> ticket:28939

> Added: trunk/dports/databases/soci-devel/Portfile

> +variant mysql4 conflicts mysql5 description {Build MySQL 4 backend} {
> +    depends_lib-append          port:mysql4
> +    configure.args-delete       -DWITH_MYSQL=OFF
> +    configure.args-append       -DMYSQL_INCLUDE_DIR=/opt/local/include/mysql
> +    configure.args-append       -DMYSQL_LIBRARY=/opt/local/lib/mysql/libmysqlclient_r.dylib
> +}
> +
> +variant mysql5 conflicts mysql4 description {Build MySQL 5 backend} {
> +    depends_lib-append          port:mysql5
> +    configure.args-delete       -DWITH_MYSQL=OFF
> +    configure.args-append       -DMYSQL_INCLUDE_DIR=/opt/local/include/mysql5/mysql
> +    configure.args-append       -DMYSQL_LIBRARY=/opt/local/lib/mysql5/mysql/libmysqlclient_r.dylib
> +}

Don't hardcode /opt/local; use ${prefix}.


> +# on darwin 11 offer built in postgres
> +platform darwin 11 {
> +    variant system_postgresql conflicts postgresql84 postgresql90 \
> +            description {Build SOCI PostgreSQL backend, using OSX system libraries} {
> +        configure.args-delete       -DWITH_POSTGRESQL=OFF
> +        configure.args-append       -DPG_CONFIG=/usr/bin/pg_config
> +        configure.args-append       -DPOSTGRESQL_INCLUDE_DIR=/usr/include
> +        configure.args-append       -DPOSTGRESQL_LIBRARIES=/usr/lib/libpq.dylib
> +    }
> +}

I'm slightly wary of this, but I suppose it's possible users might use the PostgreSQL database server in OSX and want to integrate with it, so I guess this is ok.


> +variant sqlite3 conflicts system_sqlite3 description {Build SQLite 3 backend, using MacPorts sqlite3 port} {
> +    depends_lib-append          port:sqlite3
> +    configure.args-delete       -DWITH_SQLITE3=OFF
> +}
> +
> +platform darwin {
> +    variant system_sqlite3 conflicts sqlite3 \
> +            description {Build SOCI Sqlite3 backend, using OSX system libraries} {
> +        configure.args-delete       -DWITH_SQLITE3=OFF
> +        configure.args-append       -DSQLITE3_INCLUDE_DIR=/usr/include
> +        configure.args-append       -DSQLITE3_LIBRARY=/usr/lib/libsqlite3.dylib
> +    }
> +}

With SQLite on the other hand there isn't a database server. It's just a set of libraries. As such I see no reason to allow the user to use the almost certainly older version OSX provides. Just let the user use the version in MacPorts as per our usual policy of using only MacPorts libraries.



More information about the macports-dev mailing list