Ticket #18586: Portfile

File Portfile, 1.8 KB (added by dbraband@…, 16 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem 1.0
5PortGroup python26 1.0
6
7name            py26-psycopg2
8version         2.0.8
9revision        0
10categories      python databases
11maintainers     nomaintainer
12platforms       darwin freebsd
13description     A python DBAPI-2.0 ompliant database adapter for postgresql
14long_description    Psycopg2 is a postgresql database adapter for python. \
15                    It's fully compliant to pythons DBAPI-2.0. psycopg is \
16                    designed for heavily multi-threaded applications \
17                    featuring connection pooling.
18
19homepage        http://www.initd.org/software/initd/psycopg/
20master_sites    http://initd.org/pub/software/psycopg/ \
21                http://initd.org/pub/software/psycopg/PSYCOPG-2-0/
22distname        psycopg2-${version}
23checksums       md5 2c31827878d436b0c89e777989ff55af \
24                sha1 13d2be67e0d487266d770484f59ea5446f8d6ec5 \
25                rmd160 98ccf8f77b0f46d45e2510498924160fb5339eac
26
27depends_lib-append  port:openssl
28
29patchfiles      patch-setup.cfg
30
31
32variant postgresql82 description "Build using postgresql v8.2" {
33    depends_lib-append  port:postgresql82
34   
35    post-patch {
36        reinplace \
37            s|@PG_CONFIG@|${prefix}/lib/postgresql82/bin/pg_config|g \
38            ${worksrcpath}/setup.cfg
39    }
40}
41
42variant postgresql83 description "Build using postgresql v8.3" {
43    depends_lib-append  port:postgresql83
44   
45    post-patch {
46        reinplace \
47            s|@PG_CONFIG@|${prefix}/lib/postgresql83/bin/pg_config|g \
48            ${worksrcpath}/setup.cfg
49    }
50}
51
52pre-patch {
53    if {![variant_isset postgresql83] && ![variant_isset postgresql82]} {
54        return -code error \
55            "You have to choose either +postgresql82 or +postgresql83"
56    }
57}
58