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$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name psqlODBC |
---|
7 | version 09.00.0310 |
---|
8 | revision 0 |
---|
9 | categories databases |
---|
10 | platforms darwin |
---|
11 | maintainers panulla.com:macports |
---|
12 | |
---|
13 | description Official ODBC driver for the PostgreSQL database. |
---|
14 | |
---|
15 | long_description \ |
---|
16 | psqlODBC allows ODBC-compliant applications to connect to \ |
---|
17 | PostgreSQL database servers. |
---|
18 | |
---|
19 | homepage http://psqlODBC.projects.postgresql.org |
---|
20 | master_sites postgresql:odbc/versions/src/ |
---|
21 | |
---|
22 | distname psqlodbc-${version} |
---|
23 | |
---|
24 | checksums md5 78144d9ea6c40f0a0a0b92128e6b0e05 \ |
---|
25 | sha1 669d395534423eb5e4d6733d681e6a2ce073bf51 \ |
---|
26 | rmd160 299afefc6cd6256733bc272ea520d0c8b8a64b07 |
---|
27 | |
---|
28 | use_parallel_build yes |
---|
29 | |
---|
30 | variant iodbc conflicts unixodbc description {Use iODBC} { |
---|
31 | depends_lib-append port:libiodbc |
---|
32 | configure.args-append --with-iodbc=${prefix} |
---|
33 | } |
---|
34 | |
---|
35 | variant unixodbc conflicts iodbc description {Use unixODBC} { |
---|
36 | depends_lib-append port:unixODBC |
---|
37 | configure.args-append --with-unixodbc=${prefix} |
---|
38 | } |
---|
39 | |
---|
40 | if {![variant_isset iodbc]} { |
---|
41 | default_variants +unixodbc |
---|
42 | } |
---|
43 | |
---|
44 | set pgsql_suffixes {82 83 84 90 91} |
---|
45 | |
---|
46 | set pgsql_ports {} |
---|
47 | foreach s ${pgsql_suffixes} { |
---|
48 | lappend pgsql_ports postgresql${s} |
---|
49 | } |
---|
50 | |
---|
51 | foreach s ${pgsql_suffixes} { |
---|
52 | set p postgresql${s} |
---|
53 | set v [string index ${s} 0].[string index ${s} 1] |
---|
54 | set i [lsearch -exact ${pgsql_ports} ${p}] |
---|
55 | set c [lreplace ${pgsql_ports} ${i} ${i}] |
---|
56 | eval [subst { |
---|
57 | variant ${p} description "Build with PostgreSQL ${v}" conflicts ${c} { |
---|
58 | depends_lib-append port:${p} |
---|
59 | |
---|
60 | configure.args-append --with-libpq=${prefix}/lib/${p}/bin/pg_config |
---|
61 | } |
---|
62 | }] |
---|
63 | } |
---|
64 | |
---|
65 | proc has_pgsql_variant {} { |
---|
66 | global pgsql_ports |
---|
67 | foreach p ${pgsql_ports} { |
---|
68 | if {[variant_isset ${p}]} { |
---|
69 | return 1 |
---|
70 | } |
---|
71 | } |
---|
72 | return 0 |
---|
73 | } |
---|
74 | |
---|
75 | if {![has_pgsql_variant]} { |
---|
76 | set p [lindex ${pgsql_ports} end] |
---|
77 | default_variants +${p} |
---|
78 | |
---|
79 | if {![has_pgsql_variant]} { |
---|
80 | error "One of the following variants must be set: [join ${pgsql_ports}]" |
---|
81 | } |
---|
82 | } |
---|
83 | |
---|