development/MySQL-python: Patch to build with newer mysqls.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2014-11-07 21:30:50 +01:00 committed by Willy Sudiarto Raharjo
parent cbc962b135
commit 2481137949
3 changed files with 37 additions and 2 deletions

View file

@ -7,7 +7,7 @@
PRGNAM=MySQL-python
VERSION=1.2.4
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -53,7 +53,9 @@ find -L . \
-exec chmod 644 {} \;
# Avoid downloading distribute
patch -p1 < $CWD/no_distribute_download.patch
patch -p1 < $CWD/patches/no_distribute_download.patch
# Include my_config.h first
patch -p1 < $CWD/patches/MySQL-python-1.2.4-include-my_config-first.patch
python setup.py install --root=$PKG

View file

@ -0,0 +1,33 @@
diff -Naur MySQL-python-1.2.4.orig/_mysql.c MySQL-python-1.2.4/_mysql.c
--- MySQL-python-1.2.4.orig/_mysql.c 2013-01-01 17:18:48.000000000 +0100
+++ MySQL-python-1.2.4/_mysql.c 2014-11-07 20:25:20.483927425 +0100
@@ -26,6 +26,14 @@
PERFORMANCE OF THIS SOFTWARE.
*/
+#if defined(MS_WINDOWS)
+#include <config-win.h>
+#else
+#include "my_config.h"
+#endif
+#include "mysql.h"
+#include "mysqld_error.h"
+#include "errmsg.h"
#include "Python.h"
#if PY_MAJOR_VERSION >= 3
#define IS_PY3K
@@ -38,14 +46,6 @@
#endif
#include "pymemcompat.h"
#include "structmember.h"
-#if defined(MS_WINDOWS)
-#include <config-win.h>
-#else
-#include "my_config.h"
-#endif
-#include "mysql.h"
-#include "mysqld_error.h"
-#include "errmsg.h"
#if PY_VERSION_HEX < 0x02020000
# define MyTuple_Resize(t,n,d) _PyTuple_Resize(t, n, d)