source: trunk/dports/python/py-psycopg2/Portfile

Last change on this file was 154243, checked in by vince@…, 11 months ago

py-psycopg2: add postgresql96 option

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
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: Portfile 154243 2016-10-25 09:37:49Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6
7name                py-psycopg2
8version             2.6.2
9# only port:trac requires py26-psyocopg2
10python.versions     26 27 34 35
11python.default_version  27
12categories-append   databases
13maintainers         snc openmaintainer
14license             LGPL-3+
15platforms           darwin freebsd
16
17description         A python DBAPI-2.0-compliant database adapter for postgresql
18
19long_description    Psycopg2 is a postgresql database adapter for python. \
20                    It's fully compliant to python's DBAPI-2.0. psycopg is \
21                    designed for heavily multi-threaded applications \
22                    featuring connection pooling.
23
24homepage            http://initd.org/psycopg/
25
26set branch          [join [lrange [split ${version} .] 0 1] -]
27master_sites        http://www.psycopg.org/psycopg/tarballs/PSYCOPG-${branch}/
28distname            psycopg2-${version}
29
30checksums           md5     4a392949ba31a378a18ed3e775a4693f \
31                    rmd160  f9b73dd247d2caa97f08b8730798d9f6f4ae9dd1 \
32                    sha256  70490e12ed9c5c818ecd85d185d363335cc8a8cbf7212e3c185431c79ff8c05c
33
34if {${name} ne ${subport}} {
35    depends_lib-append  path:lib/libssl.dylib:openssl
36
37    patchfiles      patch-setup.cfg.diff
38
39    post-patch {
40
41        if {[variant_isset postgresql91]} {
42            reinplace \
43                s|@PG_CONFIG@|${prefix}/lib/postgresql91/bin/pg_config|g \
44                ${worksrcpath}/setup.cfg
45        }
46
47        if {[variant_isset postgresql92]} {
48            reinplace \
49                s|@PG_CONFIG@|${prefix}/lib/postgresql92/bin/pg_config|g \
50                ${worksrcpath}/setup.cfg
51        }
52
53        if {[variant_isset postgresql93]} {
54            reinplace \
55                s|@PG_CONFIG@|${prefix}/lib/postgresql93/bin/pg_config|g \
56                ${worksrcpath}/setup.cfg
57        }
58
59        if {[variant_isset postgresql94]} {
60            reinplace \
61                s|@PG_CONFIG@|${prefix}/lib/postgresql94/bin/pg_config|g \
62                ${worksrcpath}/setup.cfg
63        }
64
65        if {[variant_isset postgresql95]} {
66            reinplace \
67                s|@PG_CONFIG@|${prefix}/lib/postgresql95/bin/pg_config|g \
68                ${worksrcpath}/setup.cfg
69        }
70
71        if {[variant_isset postgresql96]} {
72            reinplace \
73                s|@PG_CONFIG@|${prefix}/lib/postgresql96/bin/pg_config|g \
74                ${worksrcpath}/setup.cfg
75        }
76    }
77
78    variant postgresql91 conflicts postgresql92 postgresql93 postgresql94 postgresql95 postgresql96 description "Build using postgresql v9.1" {
79        depends_lib-append  port:postgresql91
80    }
81
82    variant postgresql92 conflicts postgresql91 postgresql93 postgresql94 postgresql95 postgresql96 description "Build using postgresql v9.2" {
83        depends_lib-append  port:postgresql92
84    }
85
86    variant postgresql93 conflicts postgresql91 postgresql92 postgresql94 postgresql95 postgresql96 description "Build using postgresql v9.3" {
87        depends_lib-append  port:postgresql93
88    }
89
90    variant postgresql94 conflicts postgresql91 postgresql92 postgresql93 postgresql95 postgresql96 description "Build using postgresql v9.4" {
91        depends_lib-append  port:postgresql94
92    }
93
94    variant postgresql95 conflicts postgresql91 postgresql92 postgresql93 postgresql94 postgresql96 description "Build using postgresql v9.5" {
95        depends_lib-append  port:postgresql95
96    }
97
98    variant postgresql96 conflicts postgresql91 postgresql92 postgresql93 postgresql94 postgresql95 description "Build using postgresql v9.5" {
99        depends_lib-append  port:postgresql96
100    }
101
102    if {![variant_isset postgresql91] && ![variant_isset postgresql92] && ![variant_isset postgresql93] && ![variant_isset postgresql94] && ![variant_isset postgresql95] && ![variant_isset postgresql96]} {
103        default_variants    +postgresql95
104    }
105
106    livecheck.type      none
107} else {
108    livecheck.url       ${master_sites}
109    livecheck.regex     psycopg2-(\\d+(\\.\\d+)+)${extract.suffix}
110}
Note: See TracBrowser for help on using the repository browser.