Ticket #6982: py-mysql.diff

File py-mysql.diff, 1.3 KB (added by tonytung@…, 19 years ago)

patches setup.py if py-mysql is paired with mysql5, so that it calls mysql_config5

  • Portfile

    diff -u -r -N py-mysql.orig/Portfile py-mysql/Portfile
    old new  
    1616distname                        MySQL-python-${version}
    1717checksums                       md5 b0eb974cc3c917276e015275e1ec996f
    1818
    19 depends_lib-append      port:mysql4
     19depends_lib-append      port:mysql5
     20patchfiles              patch-setup.py
     21
     22variant use_mysql4      {
     23        depends_lib-delete      port:mysql5
     24        depends_lib-append      port:mysql4
     25        patchfiles-delete       patch-setup.py
     26}
    2027
    2128variant use_mysql3      {
    22         depends_lib-delete      port:mysql4
     29        depends_lib-delete      port:mysql5
    2330        depends_lib-append      port:mysql
     31        patchfiles-delete       patch-setup.py
    2432}
  • files/patch-setup.py

    diff -u -r -N py-mysql.orig/files/patch-setup.py py-mysql/files/patch-setup.py
    old new  
     1--- setup.py.orig       2006-01-31 12:21:41.000000000 -0800
     2+++ setup.py    2006-01-31 12:15:18.000000000 -0800
     3@@ -62,7 +62,7 @@
     4     
     5     def config(what):
     6         from os import popen
     7-        return popen("mysql_config --%s" % what).read().strip().split()
     8+        return popen("mysql_config5 --%s" % what).read().strip().split()
     9 
     10     include_dirs = [ i[2:] for i in config('include') ]
     11