[58274] trunk/dports/python/py-mysql

ryandesign at macports.org ryandesign at macports.org
Thu Sep 24 20:39:40 PDT 2009


Revision: 58274
          http://trac.macports.org/changeset/58274
Author:   ryandesign at macports.org
Date:     2009-09-24 20:39:39 -0700 (Thu, 24 Sep 2009)
Log Message:
-----------
py-mysql: bring over changes from py25-mysql:

 * rename patchfiles with .diff extension
 * depend on py-setuptools
 * remove mysql3 variant (see #20700)
 * add mysql5 variant and make it the default
 * give the variants descriptions
 * ensure mysql4 or mysql5 variant is selected

Closes #14339 (maintainer timeout)

Modified Paths:
--------------
    trunk/dports/python/py-mysql/Portfile

Added Paths:
-----------
    trunk/dports/python/py-mysql/files/patch-_mysql.c.diff
    trunk/dports/python/py-mysql/files/patch-setup_posix.py.diff

Removed Paths:
-------------
    trunk/dports/python/py-mysql/files/patch-_mysql.c
    trunk/dports/python/py-mysql/files/patch-setup_posix.py

Modified: trunk/dports/python/py-mysql/Portfile
===================================================================
--- trunk/dports/python/py-mysql/Portfile	2009-09-25 03:33:40 UTC (rev 58273)
+++ trunk/dports/python/py-mysql/Portfile	2009-09-25 03:39:39 UTC (rev 58274)
@@ -15,18 +15,25 @@
 master_sites		sourceforge:mysql-python
 distname			MySQL-python-${version}
 checksums			md5 532268f02870bea18c1d465e88afff30
-patchfiles		patch-setup_posix.py patch-_mysql.c
+patchfiles			patch-_mysql.c.diff
 
-depends_lib-append	path:bin/mysql_config5:mysql5
+depends_lib-append	port:py-setuptools
 
-variant mysql3 conflicts mysql4	{
-	patchfiles-delete	patch-setup_posix.py
-	depends_lib-delete	path:bin/mysql_config5:mysql5
-	depends_lib-append	port:mysql
+variant mysql4 conflicts mysql5 description {Build with MySQL 4} {
+	depends_lib-append	port:mysql4
 }
 
-variant mysql4 conflicts mysql3	{
-	patchfiles-delete       patch-setup_posix.py
-	depends_lib-delete	path:bin/mysql_config5:mysql5
-	depends_lib-append	port:mysql4
+variant mysql5 conflicts mysql4 description {Build with MySQL 5} {
+	patchfiles-append	patch-setup_posix.py.diff
+	depends_lib-append	path:bin/mysql_config5:mysql5
 }
+
+if {![variant_isset mysql4]} {
+	default_variants +mysql5
+}
+
+pre-fetch {
+	if {![variant_isset mysql4] && ![variant_isset mysql5]} {
+		return -code error "you must select either mysql4 or mysql5"
+	}
+}

Deleted: trunk/dports/python/py-mysql/files/patch-_mysql.c
===================================================================
--- trunk/dports/python/py-mysql/files/patch-_mysql.c	2009-09-25 03:33:40 UTC (rev 58273)
+++ trunk/dports/python/py-mysql/files/patch-_mysql.c	2009-09-25 03:39:39 UTC (rev 58274)
@@ -1,23 +0,0 @@
---- _mysql.c.orig	2007-02-27 18:35:56.000000000 -0800
-+++ _mysql.c	2007-11-25 21:54:09.000000000 -0800
-@@ -34,9 +34,6 @@
- #else
- #include "my_config.h"
- #endif
--#ifndef uint
--#define uint unsigned int
--#endif
- #include "mysql.h"
- #include "mysqld_error.h"
- #include "errmsg.h"
-@@ -481,8 +478,8 @@
- #endif
- 	char *host = NULL, *user = NULL, *passwd = NULL,
- 		*db = NULL, *unix_socket = NULL;
--	uint port = MYSQL_PORT;
--	uint client_flag = 0;
-+	unsigned int port = MYSQL_PORT;
-+	unsigned int client_flag = 0;
- 	static char *kwlist[] = { "host", "user", "passwd", "db", "port",
- 				  "unix_socket", "conv",
- 				  "connect_timeout", "compress",

Copied: trunk/dports/python/py-mysql/files/patch-_mysql.c.diff (from rev 58260, trunk/dports/python/py-mysql/files/patch-_mysql.c)
===================================================================
--- trunk/dports/python/py-mysql/files/patch-_mysql.c.diff	                        (rev 0)
+++ trunk/dports/python/py-mysql/files/patch-_mysql.c.diff	2009-09-25 03:39:39 UTC (rev 58274)
@@ -0,0 +1,23 @@
+--- _mysql.c.orig	2007-02-27 18:35:56.000000000 -0800
++++ _mysql.c	2007-11-25 21:54:09.000000000 -0800
+@@ -34,9 +34,6 @@
+ #else
+ #include "my_config.h"
+ #endif
+-#ifndef uint
+-#define uint unsigned int
+-#endif
+ #include "mysql.h"
+ #include "mysqld_error.h"
+ #include "errmsg.h"
+@@ -481,8 +478,8 @@
+ #endif
+ 	char *host = NULL, *user = NULL, *passwd = NULL,
+ 		*db = NULL, *unix_socket = NULL;
+-	uint port = MYSQL_PORT;
+-	uint client_flag = 0;
++	unsigned int port = MYSQL_PORT;
++	unsigned int client_flag = 0;
+ 	static char *kwlist[] = { "host", "user", "passwd", "db", "port",
+ 				  "unix_socket", "conv",
+ 				  "connect_timeout", "compress",

Deleted: trunk/dports/python/py-mysql/files/patch-setup_posix.py
===================================================================
--- trunk/dports/python/py-mysql/files/patch-setup_posix.py	2009-09-25 03:33:40 UTC (rev 58273)
+++ trunk/dports/python/py-mysql/files/patch-setup_posix.py	2009-09-25 03:39:39 UTC (rev 58274)
@@ -1,11 +0,0 @@
---- setup_posix.py.orig	2007-05-06 12:30:17.000000000 -0700
-+++ setup_posix.py	2007-05-06 12:31:30.000000000 -0700
-@@ -23,7 +23,7 @@
-         if ret/256 > 1:
-             raise EnvironmentError, "%s not found" % mysql_config.path
-     return data
--mysql_config.path = "mysql_config"
-+mysql_config.path = "mysql_config5"
- 
- def get_config():
-     import os, sys

Copied: trunk/dports/python/py-mysql/files/patch-setup_posix.py.diff (from rev 58260, trunk/dports/python/py-mysql/files/patch-setup_posix.py)
===================================================================
--- trunk/dports/python/py-mysql/files/patch-setup_posix.py.diff	                        (rev 0)
+++ trunk/dports/python/py-mysql/files/patch-setup_posix.py.diff	2009-09-25 03:39:39 UTC (rev 58274)
@@ -0,0 +1,11 @@
+--- setup_posix.py.orig	2007-05-06 12:30:17.000000000 -0700
++++ setup_posix.py	2007-05-06 12:31:30.000000000 -0700
+@@ -23,7 +23,7 @@
+         if ret/256 > 1:
+             raise EnvironmentError, "%s not found" % mysql_config.path
+     return data
+-mysql_config.path = "mysql_config"
++mysql_config.path = "mysql_config5"
+ 
+ def get_config():
+     import os, sys
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090924/043d0d6a/attachment.html>


More information about the macports-changes mailing list