Ticket #21993: py24-psycopg2-2.0.13.diff

File py24-psycopg2-2.0.13.diff, 3.4 KB (added by Themanwithoutaplan, 15 years ago)

Patch for Python 2.4

  • Users/charlieclark/temp/MacPorts/py-psycopg2/Portfile

     
     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
    12# $Id$
    23
    34PortSystem 1.0
     
    34PortGroup python24 1.0
    45
    5 name                    py-psycopg2
    6 version                 2.0.5.1
    7 categories              python databases
    8 maintainers             landonf
    9 platforms               darwin freebsd
    10 description             A python DBAPI-2.0 ompliant database adapter for postgresql
    11 long_description        Psycopg2 is a postgresql database adapter for python. \
    12                         It's fully compliant to pythons DBAPI-2.0. psycopg is \
    13                         designed for heavily multi-threaded applications \
    14                         featuring connection pooling.
     6name            py-psycopg2
     7version         2.0.13
     8categories      python databases
     9maintainers     openmaintainer
     10platforms       darwin freebsd
     11description     A python DBAPI-2.0 ompliant database adapter for postgresql
     12long_description    Psycopg2 is a postgresql database adapter for python. \
     13            It's fully compliant to pythons DBAPI-2.0. psycopg is \
     14            designed for heavily multi-threaded applications \
     15            featuring connection pooling.
    1516
    16 homepage                http://www.initd.org/software/initd/psycopg/
    17 master_sites            http://initd.org/pub/software/psycopg/ \
    18                         http://initd.org/pub/software/psycopg/PSYCOPG-2-0/
    19 distname                psycopg2-${version}
    20 checksums               md5 052e4b97dab47708fdcdc36ffb25af66
     17homepage        http://initd.org/
     18master_sites    http://initd.org/pub/software/psycopg/ \
     19           
     20distname        psycopg2-${version}
     21checksums       md5     f520260595f4fcf035d26cfd57a75f19 \
     22                sha1    859725d0c830dc3590cb5666c8465bd29ab167cc \
     23                rmd160  6099f593ea1f05b78b6f2c3c4106b86cbcab7386
    2124
    22 depends_lib             port:postgresql81 \
    23                         port:python24 \
    24                         port:openssl
     25depends_lib     port:python24 \
     26                port:openssl
    2527
    26 patchfiles              patch-setup.cfg
     28patchfiles      patch-setup.cfg
    2729
    28 post-patch              {
    29         reinplace \
    30                 s|@PG_CONFIG@|${prefix}/lib/postgresql81/bin/pg_config|g \
    31                 ${worksrcpath}/setup.cfg
     30if {![variant_isset postgresql82] && ![variant_isset postgresql83] && ![variant_isset postgresql84]} {
     31    default_variants    +postgresql84
    3232}
     33
     34variant postgresql82 conflicts postgresql83 postgresql84 description "Build using postgresql v8.2" {
     35    depends_lib-append  port:postgresql82
     36
     37    post-patch {
     38        reinplace \
     39            s|@PG_CONFIG@|${prefix}/lib/postgresql82/bin/pg_config|g \
     40            ${worksrcpath}/setup.cfg
     41    }
     42}
     43
     44variant postgresql83 conflicts postgresql82 postgresql84 description "Build using postgresql v8.3" {
     45    depends_lib-append port:postgresql83
     46
     47    post-patch {
     48        reinplace \
     49            s|@PG_CONFIG@|${prefix}/lib/postgresql83/bin/pg_config|g \
     50            ${worksrcpath}/setup.cfg
     51    }
     52}
     53
     54variant postgresql84 conflicts postgresql82 postgresql83 description "Build using postgresql v8.4" {
     55    depends_lib-append port:postgresql84
     56
     57    post-patch {
     58        reinplace \
     59            s|@PG_CONFIG@|${prefix}/lib/postgresql84/bin/pg_config|g \
     60            ${worksrcpath}/setup.cfg
     61    }
     62}
     63
     64livecheck.url       ${master_sites}
     65livecheck.regex     "psycopg2-(\\d+\\.\\d+(\\.\\d+)?)"