1 |
commit: 014ae7e4478dbcd1e9694098c5c37bc915f21297 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 22 09:40:58 2018 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 22 20:08:42 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=014ae7e4 |
7 |
|
8 |
dev-qt/qtsql: Extend the MariaDB define check |
9 |
|
10 |
See also: https://mail.kde.org/pipermail/distributions/2018-February/000265.html |
11 |
See also: https://codereview.qt-project.org/#/c/206850/ |
12 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
13 |
|
14 |
dev-qt/qtsql/files/qtsql-5.9.4-mariadb-10.2.patch | 35 +++++++++++++ |
15 |
dev-qt/qtsql/qtsql-5.9.4-r1.ebuild | 62 +++++++++++++++++++++++ |
16 |
2 files changed, 97 insertions(+) |
17 |
|
18 |
diff --git a/dev-qt/qtsql/files/qtsql-5.9.4-mariadb-10.2.patch b/dev-qt/qtsql/files/qtsql-5.9.4-mariadb-10.2.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..bfd0c903bc3 |
21 |
--- /dev/null |
22 |
+++ b/dev-qt/qtsql/files/qtsql-5.9.4-mariadb-10.2.patch |
23 |
@@ -0,0 +1,35 @@ |
24 |
+From 64588c9bae92ef79f9ca5e87653ffb0962691d0d Mon Sep 17 00:00:00 2001 |
25 |
+From: Andy Shaw <andy.shaw@××.io> |
26 |
+Date: Wed, 27 Sep 2017 09:23:10 +0200 |
27 |
+Subject: [PATCH] Extend the MariaDB define check to cover the later versions |
28 |
+ too |
29 |
+ |
30 |
+Change-Id: Ide89b4e07feb116bf152cbf3f5630d313e8ba0f1 |
31 |
+--- |
32 |
+ src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 4 ++-- |
33 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
34 |
+ |
35 |
+diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp |
36 |
+index 6e428fb..b2d3e85 100644 |
37 |
+--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp |
38 |
++++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp |
39 |
+@@ -1159,14 +1159,14 @@ static void qLibraryInit() |
40 |
+ # endif // MYSQL_VERSION_ID |
41 |
+ #endif // Q_NO_MYSQL_EMBEDDED |
42 |
+ |
43 |
+-#ifdef MARIADB_BASE_VERSION |
44 |
++#if defined(MARIADB_BASE_VERSION) || defined(MARIADB_VERSION_ID) |
45 |
+ qAddPostRoutine(mysql_server_end); |
46 |
+ #endif |
47 |
+ } |
48 |
+ |
49 |
+ static void qLibraryEnd() |
50 |
+ { |
51 |
+-#if !defined(MARIADB_BASE_VERSION) |
52 |
++#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) |
53 |
+ # if !defined(Q_NO_MYSQL_EMBEDDED) |
54 |
+ # if MYSQL_VERSION_ID > 40000 |
55 |
+ # if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003 |
56 |
+-- |
57 |
+2.7.4 |
58 |
+ |
59 |
|
60 |
diff --git a/dev-qt/qtsql/qtsql-5.9.4-r1.ebuild b/dev-qt/qtsql/qtsql-5.9.4-r1.ebuild |
61 |
new file mode 100644 |
62 |
index 00000000000..5d33391afb6 |
63 |
--- /dev/null |
64 |
+++ b/dev-qt/qtsql/qtsql-5.9.4-r1.ebuild |
65 |
@@ -0,0 +1,62 @@ |
66 |
+# Copyright 1999-2018 Gentoo Foundation |
67 |
+# Distributed under the terms of the GNU General Public License v2 |
68 |
+ |
69 |
+EAPI=6 |
70 |
+QT5_MODULE="qtbase" |
71 |
+inherit qt5-build |
72 |
+ |
73 |
+DESCRIPTION="SQL abstraction library for the Qt5 tooolkit" |
74 |
+ |
75 |
+if [[ ${QT5_BUILD_TYPE} == release ]]; then |
76 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" |
77 |
+fi |
78 |
+ |
79 |
+IUSE="freetds mysql oci8 odbc postgres +sqlite" |
80 |
+ |
81 |
+REQUIRED_USE=" |
82 |
+ || ( freetds mysql oci8 odbc postgres sqlite ) |
83 |
+" |
84 |
+ |
85 |
+DEPEND=" |
86 |
+ ~dev-qt/qtcore-${PV} |
87 |
+ freetds? ( dev-db/freetds ) |
88 |
+ mysql? ( virtual/libmysqlclient:= ) |
89 |
+ oci8? ( dev-db/oracle-instantclient-basic ) |
90 |
+ odbc? ( || ( dev-db/unixODBC dev-db/libiodbc ) ) |
91 |
+ postgres? ( dev-db/postgresql:* ) |
92 |
+ sqlite? ( >=dev-db/sqlite-3.8.10.2:3 ) |
93 |
+" |
94 |
+RDEPEND="${DEPEND}" |
95 |
+ |
96 |
+PATCHES=( |
97 |
+ "${FILESDIR}/${P}-mariadb-10.2.patch" |
98 |
+ # See also: https://codereview.qt-project.org/#/c/206850/ |
99 |
+) |
100 |
+ |
101 |
+QT5_TARGET_SUBDIRS=( |
102 |
+ src/sql |
103 |
+ src/plugins/sqldrivers |
104 |
+) |
105 |
+ |
106 |
+QT5_GENTOO_PRIVATE_CONFIG=( |
107 |
+ :sql |
108 |
+) |
109 |
+ |
110 |
+src_configure() { |
111 |
+ local myconf=( |
112 |
+ $(qt_use freetds sql-tds plugin) |
113 |
+ $(qt_use mysql sql-mysql plugin) |
114 |
+ $(qt_use oci8 sql-oci plugin) |
115 |
+ $(qt_use odbc sql-odbc plugin) |
116 |
+ $(qt_use postgres sql-psql plugin) |
117 |
+ $(qt_use sqlite sql-sqlite plugin) |
118 |
+ $(usex sqlite -system-sqlite '') |
119 |
+ ) |
120 |
+ |
121 |
+ use mysql && myconf+=("-I${EPREFIX}/usr/include/mysql" "-L${EPREFIX}/usr/$(get_libdir)/mysql") |
122 |
+ use oci8 && myconf+=("-I${ORACLE_HOME}/include" "-L${ORACLE_HOME}/$(get_libdir)") |
123 |
+ use odbc && myconf+=("-I${EPREFIX}/usr/include/iodbc") |
124 |
+ use postgres && myconf+=("-I${EPREFIX}/usr/include/postgresql/pgsql") |
125 |
+ |
126 |
+ qt5-build_src_configure |
127 |
+} |