# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 name psqlODBC version 09.03.0400 categories databases platforms darwin maintainers panulla.com:macports license LGPL-2 description Official ODBC driver for the PostgreSQL database. long_description \ psqlODBC allows ODBC-compliant applications to connect to \ PostgreSQL database servers. homepage http://psqlODBC.projects.postgresql.org master_sites postgresql:odbc/versions/src/ distname psqlodbc-${version} checksums rmd160 1434b39efe70b9930ba5e3e0e1819a8811844187 \ sha256 de77dfa89dba0a159afc57b2e312ca6e9075dd92b761c7cc700c0450ba02b56b depends_lib port:libtool variant iodbc conflicts unixodbc description {Use iODBC} { depends_lib-append port:libiodbc configure.args-append --with-iodbc=${prefix} } variant unixodbc conflicts iodbc description {Use unixODBC} { depends_lib-append port:unixODBC configure.args-append --with-unixodbc=${prefix} } if {![variant_isset iodbc]} { default_variants +unixodbc } set pgsql_suffixes {82 83 84 90 91 92 93} set pgsql_ports {} foreach s ${pgsql_suffixes} { lappend pgsql_ports postgresql${s} } foreach s ${pgsql_suffixes} { set p postgresql${s} set v [string index ${s} 0].[string index ${s} 1] set i [lsearch -exact ${pgsql_ports} ${p}] set c [lreplace ${pgsql_ports} ${i} ${i}] eval [subst { variant ${p} description "Build with PostgreSQL ${v}" conflicts ${c} { depends_lib-append port:${p} configure.args-append --with-libpq=${prefix}/lib/${p}/bin/pg_config } }] } proc has_pgsql_variant {} { global pgsql_ports foreach p ${pgsql_ports} { if {[variant_isset ${p}]} { return 1 } } return 0 } if {![has_pgsql_variant]} { set p [lindex ${pgsql_ports} end] default_variants +${p} if {![has_pgsql_variant]} { error "One of the following variants must be set: [join ${pgsql_ports}]" } }