From 2481137949e81ed12a6b4359a6b57550ed73b049 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Fri, 7 Nov 2014 21:30:50 +0100 Subject: development/MySQL-python: Patch to build with newer mysqls. Signed-off-by: Matteo Bernardini --- development/MySQL-python/MySQL-python.SlackBuild | 6 ++-- .../MySQL-python/no_distribute_download.patch | 12 -------- ...ySQL-python-1.2.4-include-my_config-first.patch | 33 ++++++++++++++++++++++ .../patches/no_distribute_download.patch | 12 ++++++++ 4 files changed, 49 insertions(+), 14 deletions(-) delete mode 100644 development/MySQL-python/no_distribute_download.patch create mode 100644 development/MySQL-python/patches/MySQL-python-1.2.4-include-my_config-first.patch create mode 100644 development/MySQL-python/patches/no_distribute_download.patch (limited to 'development') diff --git a/development/MySQL-python/MySQL-python.SlackBuild b/development/MySQL-python/MySQL-python.SlackBuild index 7c68cb94ca41..36c14cbac164 100644 --- a/development/MySQL-python/MySQL-python.SlackBuild +++ b/development/MySQL-python/MySQL-python.SlackBuild @@ -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 diff --git a/development/MySQL-python/no_distribute_download.patch b/development/MySQL-python/no_distribute_download.patch deleted file mode 100644 index 2a948023738b..000000000000 --- a/development/MySQL-python/no_distribute_download.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur MySQL-python-1.2.4.orig/setup.py MySQL-python-1.2.4/setup.py ---- MySQL-python-1.2.4.orig/setup.py 2012-10-08 13:46:54.000000000 +0200 -+++ MySQL-python-1.2.4/setup.py 2013-12-06 20:34:36.214964072 +0100 -@@ -3,8 +3,6 @@ - import os - import sys - --from distribute_setup import use_setuptools --use_setuptools() - from setuptools import setup, Extension - - if not hasattr(sys, "hexversion") or sys.hexversion < 0x02040000: diff --git a/development/MySQL-python/patches/MySQL-python-1.2.4-include-my_config-first.patch b/development/MySQL-python/patches/MySQL-python-1.2.4-include-my_config-first.patch new file mode 100644 index 000000000000..81d2041f4745 --- /dev/null +++ b/development/MySQL-python/patches/MySQL-python-1.2.4-include-my_config-first.patch @@ -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 ++#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 +-#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) diff --git a/development/MySQL-python/patches/no_distribute_download.patch b/development/MySQL-python/patches/no_distribute_download.patch new file mode 100644 index 000000000000..2a948023738b --- /dev/null +++ b/development/MySQL-python/patches/no_distribute_download.patch @@ -0,0 +1,12 @@ +diff -Naur MySQL-python-1.2.4.orig/setup.py MySQL-python-1.2.4/setup.py +--- MySQL-python-1.2.4.orig/setup.py 2012-10-08 13:46:54.000000000 +0200 ++++ MySQL-python-1.2.4/setup.py 2013-12-06 20:34:36.214964072 +0100 +@@ -3,8 +3,6 @@ + import os + import sys + +-from distribute_setup import use_setuptools +-use_setuptools() + from setuptools import setup, Extension + + if not hasattr(sys, "hexversion") or sys.hexversion < 0x02040000: -- cgit v1.2.3