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