postgres dependency variables
Darren Weber
dweber at macports.org
Mon May 11 15:23:35 PDT 2009
Can you see any significant problems with this code to find the current
postgre config (for a vtk-devel variant):
variant pgsql description {build the PostgreSQL driver for vtkSQLDatabase} {
set pgconf [exec pg_config]
set includeIdx [lsearch -regex ${pgconf} "^INCLUDEDIR"]
set includePath [lindex ${pgconf} [expr ${includeIdx} + 2]]
set libIdx [lsearch -regex $pgconf "^LIBDIR"]
set libPath [lindex $pgconf [expr $libIdx + 2]]
set libFile [exec find ${libPath} -name "libpq.dylib"]
depends_lib-append \
port:libpqxx
configure.args-append \
-DVTK_USE_POSTGRES:BOOL=ON \
-DPOSTGRES_INCLUDE_DIRECTORIES:PATH=${includePath} \
-DPOSTGRES_LIBRARIES:FILEPATH=${libFile}
#// A URL for a PostgreSQL server of the form
#// psql://[[username[:password]@]hostname[:port]]/[dbname]
#VTK_PSQL_TEST_URL:STRING=
}
Do you think this will work for any version of postgres? Should the variant
be version specific to a port of postgres, like postgres83 and then specify
a full path to pg_config for that port?
Thanks, Darren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20090511/66e03e01/attachment.html>
More information about the macports-dev
mailing list