source: trunk/dports/databases/psqlODBC/Portfile

Last change on this file was 127862, checked in by ryandesign@…, 3 years ago

psqlODBC: update to 09.03.0400 and add postgresql93 variant (#45767; maintainer)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1# -*- 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
2# $Id: Portfile 127862 2014-11-05 18:27:29Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                psqlODBC
7version             09.03.0400
8categories          databases
9platforms           darwin
10maintainers         panulla.com:macports
11license             LGPL-2
12
13description         Official ODBC driver for the PostgreSQL database.
14
15long_description \
16    psqlODBC allows ODBC-compliant applications to connect to \
17    PostgreSQL database servers.
18
19homepage            http://psqlODBC.projects.postgresql.org
20master_sites        postgresql:odbc/versions/src/
21
22distname            psqlodbc-${version}
23
24checksums           rmd160  1434b39efe70b9930ba5e3e0e1819a8811844187 \
25                    sha256  de77dfa89dba0a159afc57b2e312ca6e9075dd92b761c7cc700c0450ba02b56b
26
27depends_lib         port:libtool
28
29variant iodbc conflicts unixodbc description {Use iODBC} {
30    depends_lib-append          port:libiodbc
31    configure.args-append       --with-iodbc=${prefix}
32}
33
34variant unixodbc conflicts iodbc description {Use unixODBC} {
35    depends_lib-append          port:unixODBC
36    configure.args-append       --with-unixodbc=${prefix}
37}
38
39if {![variant_isset iodbc]} {
40    default_variants +unixodbc
41}
42
43set pgsql_suffixes {82 83 84 90 91 92 93}
44
45set pgsql_ports {}
46foreach s ${pgsql_suffixes} {
47    lappend pgsql_ports postgresql${s}
48}
49
50foreach s ${pgsql_suffixes} {
51    set p postgresql${s}
52    set v [string index ${s} 0].[string index ${s} 1]
53    set i [lsearch -exact ${pgsql_ports} ${p}]
54    set c [lreplace ${pgsql_ports} ${i} ${i}]
55    eval [subst {
56        variant ${p} description "Build with PostgreSQL ${v}" conflicts ${c} {
57            depends_lib-append  port:${p}
58
59            configure.args-append   --with-libpq=${prefix}/lib/${p}/bin/pg_config
60        }
61    }]
62}
63
64proc has_pgsql_variant {} {
65    global pgsql_ports
66    foreach p ${pgsql_ports} {
67        if {[variant_isset ${p}]} {
68            return 1
69        }
70    }
71    return 0
72}
73
74if {![has_pgsql_variant]} {
75    set p [lindex ${pgsql_ports} end]
76    default_variants +${p}
77
78    if {![has_pgsql_variant]} {
79        error "One of the following variants must be set: [join ${pgsql_ports}]"
80    }
81}
82
Note: See TracBrowser for help on using the repository browser.