Ticket #19425: Portfile.5

File Portfile.5, 1.8 KB (added by mtalexander (Mike Alexander), 15 years ago)

libdbi-drivers Portfile that works for mysql and postgresql

Line 
1# $Id$
2
3PortSystem          1.0
4
5name                libdbi-drivers
6version             0.8.3-1
7categories          databases devel
8maintainers         umich.edu:mta
9description         Drivers for libdbi
10long_description    $description
11homepage            http://libdbi.sourceforge.net/
12platforms           darwin
13master_sites        sourceforge
14
15checksums           md5     4de79b323162a5a7652b65b608eca6cd \
16                    sha1    599fbab115419e8fc88b3b31a38031584ee213b5 \
17                    rmd160  e0aa9e67f6560fb44018b1d35d90d4ac21b48597
18
19depends_lib         port:libdbi
20
21configure.args      --with-dbi-incdir=${prefix}/include --with-dbi-libdir=${prefix}/lib \
22                    --disable-docs
23
24if {![variant_isset mysql5] && ![variant_isset postgresql83] &&
25        ![variant_isset sqlite2] && ![variant_isset sqlite3]} {
26        default_variants     +sqlite3
27}
28
29variant mysql5   description "Include drivers for MySQL" {
30        configure.args-append --with-mysql --with-mysql-incdir=${prefix}/include/mysql5 \
31                --with-mysql-libdir=${prefix}/lib/mysql5/mysql
32        depends_lib-append   port:mysql5
33}
34
35variant postgresql83 description "Include drivers for PostgreSQL" {
36        configure.args-append --with-pgsql --with-pgsql-incdir=${prefix}/include/postgresql83 \
37                --with-pgsql-libdir=${prefix}/lib/postgresql83
38        depends_lib-append   port:postgresql83
39}
40
41variant sqlite2 description "Include drivers for SQLite" {
42        configure.args-append --with-sqlite --with-sqlite-dir=${prefix}
43        depends_lib-append   port:sqlite2
44}
45
46variant sqlite3 description "Include drivers for SQLite3" {
47        configure.args-append --with-sqlite3 --with-sqlite3-dir=${prefix}
48        depends_lib-append   port:sqlite3
49}
50
51variant docs description "Build the documentation" {
52        configure.args-delete --disable-docs
53        depends_build-append port:openjade
54}
55
56variant debug description "Build debug version" {
57        build.target debug
58}