Ticket #32518: patch-subport-py-mysql.diff

File patch-subport-py-mysql.diff, 5.0 KB (added by pixilla (Bradley Giesbrecht), 12 years ago)
  • python/py-mysql/files/patch-site.cfg.diff

     
     1--- a/site.cfg  2011-12-12 12:05:40.000000000 -0800
     2+++ b/site.cfg  2011-12-12 12:14:01.000000000 -0800
     3@@ -10,7 +10,7 @@
     4 # The path to mysql_config.
     5 # Only use this if mysql_config is not on your PATH, or you have some weird
     6 # setup that requires it.
     7-#mysql_config = /usr/local/bin/mysql_config
     8+mysql_config = @PREFIX@/bin/mysql_config@MYSQL_SUFFIX@
     9 
     10 # The Windows registry key for MySQL.
     11 # This has to be set for Windows builds to work.
  • python/py-mysql/files/patch-_mysql.c.diff

     
    1 --- _mysql.c.orig       2007-02-27 18:35:56.000000000 -0800
    2 +++ _mysql.c    2007-11-25 21:54:09.000000000 -0800
    3 @@ -34,9 +34,6 @@
    4  #else
    5  #include "my_config.h"
    6  #endif
    7 -#ifndef uint
    8 -#define uint unsigned int
    9 -#endif
    10  #include "mysql.h"
    11  #include "mysqld_error.h"
    12  #include "errmsg.h"
    13 @@ -481,8 +478,8 @@
    14  #endif
    15         char *host = NULL, *user = NULL, *passwd = NULL,
    16                 *db = NULL, *unix_socket = NULL;
    17 -       uint port = MYSQL_PORT;
    18 -       uint client_flag = 0;
    19 +       unsigned int port = MYSQL_PORT;
    20 +       unsigned int client_flag = 0;
    21         static char *kwlist[] = { "host", "user", "passwd", "db", "port",
    22                                   "unix_socket", "conv",
    23                                   "connect_timeout", "compress",
  • python/py-mysql/files/patch-setup_posix.py.diff

     
    1 --- setup_posix.py.orig 2007-05-06 12:30:17.000000000 -0700
    2 +++ setup_posix.py      2007-05-06 12:31:30.000000000 -0700
    3 @@ -23,7 +23,7 @@
    4          if ret/256 > 1:
    5              raise EnvironmentError, "%s not found" % mysql_config.path
    6      return data
    7 -mysql_config.path = "mysql_config"
    8 +mysql_config.path = "mysql_config5"
    9  
    10  def get_config():
    11      import os, sys
  • python/py-mysql/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
    3 PortSystem 1.0
    4 PortGroup python24 1.0
     4PortSystem          1.0
     5PortGroup           python 1.0
    56
    67name                            py-mysql
    7 version                         1.2.2
     8version             1.2.3
    89categories                      python devel databases
    9 maintainers                     wilcoxd.com:rwilcox
    1010description                     Python interface to mysql
    1111long_description        A package containing a Python module that allows you to \
    12                                         connect to MySQL databases
    13 platforms                       darwin
     12                    connect to MySQL databases
    1413homepage                        http://sourceforge.net/projects/mysql-python/
    1514master_sites            sourceforge:mysql-python
     15platforms                       darwin
     16license             GPL
     17maintainers                     wilcoxd.com:rwilcox openmaintainer
     18
    1619distname                        MySQL-python-${version}
    17 checksums                       md5 532268f02870bea18c1d465e88afff30
    18 patchfiles                      patch-_mysql.c.diff
    1920
    20 depends_lib-append      port:py24-distribute
     21checksums           rmd160  e394e7bf08127068795aeebfbaea7dc3b2127c86 \
     22                    sha256  7de66fbbf923634e7c965aeaefa74642ba75ae20ee1cefcefc3009595b7a7e6e
    2123
     24patch.pre_args      -p1
     25patchfiles          patch-site.cfg.diff
     26
     27python.versions     24 25 26 27
     28python.default_version 27
     29
     30pre-fetch {
     31    if {![variant_isset mysql4] && ![variant_isset mysql5]} {
     32        return -code error "you must select either mysql4 or mysql5"
     33    }
     34}
     35
     36if {$subport != $name} {
     37    depends_lib-append  port:py${python.version}-distribute
     38    post-patch {
     39    reinplace "s|@PREFIX@|${prefix}|g" \
     40        ${worksrcpath}/site.cfg
     41    reinplace "s|@MYSQL_SUFFIX@|${mysql_suffix}|g" \
     42        ${worksrcpath}/site.cfg
     43    }
     44    post-destroot {
     45        xinstall -m 755 -d ${destroot}${prefix}/share/doc/${subport}
     46        xinstall -m 644 -W ${worksrcpath} \
     47            HISTORY README \
     48            ${destroot}${prefix}/share/doc/${subport}
     49    }
     50    livecheck.type      none
     51}
     52
    2253variant mysql4 conflicts mysql5 description {Build with MySQL 4} {
    23         depends_lib-append      port:mysql4
     54depends_lib-append      port:mysql4
    2455}
    2556
    2657variant mysql5 conflicts mysql4 description {Build with MySQL 5} {
    27         patchfiles-append       patch-setup_posix.py.diff
    28         depends_lib-append      path:bin/mysql_config5:mysql5
     58depends_lib-append      path:bin/mysql_config5:mysql5
    2959}
    3060
     61set mysql_suffix    {}
    3162if {![variant_isset mysql4]} {
    32         default_variants +mysql5
     63set mysql_suffix 5
     64default_variants +mysql5
    3365}
    34 
    35 pre-fetch {
    36         if {![variant_isset mysql4] && ![variant_isset mysql5]} {
    37                 return -code error "you must select either mysql4 or mysql5"
    38         }
    39 }