1 |
commit: 13926f810426bd99d4d580bf6facc29d552e5e6f |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 8 01:23:05 2020 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 8 01:31:32 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13926f81 |
7 |
|
8 |
dev-python/mysql-python: fix building against dev-db/mysql-8+ |
9 |
|
10 |
Closes: https://bugs.gentoo.org/632578 |
11 |
Package-Manager: Portage-2.3.91, Repoman-2.3.20 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
...sql-python-1.2.5-drop-my_config.h-include.patch | 15 +++++++ |
15 |
.../mysql-python/mysql-python-1.2.5-r3.ebuild | 46 ++++++++++++++++++++++ |
16 |
2 files changed, 61 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/mysql-python/files/mysql-python-1.2.5-drop-my_config.h-include.patch b/dev-python/mysql-python/files/mysql-python-1.2.5-drop-my_config.h-include.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..15a22f737a4 |
21 |
--- /dev/null |
22 |
+++ b/dev-python/mysql-python/files/mysql-python-1.2.5-drop-my_config.h-include.patch |
23 |
@@ -0,0 +1,15 @@ |
24 |
+We don't use anything from my_config.h. |
25 |
+ |
26 |
+Bug: https://bugs.gentoo.org/632578 |
27 |
+ |
28 |
+--- a/_mysql.c |
29 |
++++ b/_mysql.c |
30 |
+@@ -40,8 +40,6 @@ PERFORMANCE OF THIS SOFTWARE. |
31 |
+ #include "structmember.h" |
32 |
+ #if defined(MS_WINDOWS) |
33 |
+ #include <config-win.h> |
34 |
+-#else |
35 |
+-#include "my_config.h" |
36 |
+ #endif |
37 |
+ #include "mysql.h" |
38 |
+ #include "mysqld_error.h" |
39 |
|
40 |
diff --git a/dev-python/mysql-python/mysql-python-1.2.5-r3.ebuild b/dev-python/mysql-python/mysql-python-1.2.5-r3.ebuild |
41 |
new file mode 100644 |
42 |
index 00000000000..232df219215 |
43 |
--- /dev/null |
44 |
+++ b/dev-python/mysql-python/mysql-python-1.2.5-r3.ebuild |
45 |
@@ -0,0 +1,46 @@ |
46 |
+# Copyright 1999-2020 Gentoo Authors |
47 |
+# Distributed under the terms of the GNU General Public License v2 |
48 |
+ |
49 |
+EAPI=7 |
50 |
+ |
51 |
+PYTHON_COMPAT=( python2_7 ) |
52 |
+ |
53 |
+inherit distutils-r1 flag-o-matic |
54 |
+ |
55 |
+MY_PN="MySQL-python" |
56 |
+MY_P="${MY_PN}-${PV}" |
57 |
+ |
58 |
+DESCRIPTION="Python interface to MySQL" |
59 |
+HOMEPAGE="https://sourceforge.net/projects/mysql-python/ https://pypi.org/project/MySQL-python/" |
60 |
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip" |
61 |
+ |
62 |
+LICENSE="GPL-2" |
63 |
+SLOT="0" |
64 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
65 |
+IUSE="doc" |
66 |
+ |
67 |
+RDEPEND="dev-db/mysql-connector-c" |
68 |
+DEPEND="${RDEPEND}" |
69 |
+BDEPEND="${RDEPEND} |
70 |
+ app-arch/unzip |
71 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
72 |
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" |
73 |
+ |
74 |
+S="${WORKDIR}/${MY_P}" |
75 |
+ |
76 |
+PATCHES=( "${FILESDIR}"/${PN}-1.2.5-drop-my_config.h-include.patch ) |
77 |
+ |
78 |
+DOCS=( HISTORY README.md doc/{FAQ,MySQLdb}.rst ) |
79 |
+ |
80 |
+python_configure_all() { |
81 |
+ append-flags -fno-strict-aliasing |
82 |
+} |
83 |
+ |
84 |
+python_compile_all() { |
85 |
+ use doc && sphinx-build -b html doc doc/_build/ |
86 |
+} |
87 |
+ |
88 |
+python_install_all() { |
89 |
+ use doc && local HTML_DOCS=( doc/_build/. ) |
90 |
+ distutils-r1_python_install_all |
91 |
+} |