Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/kdb/files/, dev-db/kdb/
Date: Thu, 04 Oct 2018 21:37:02
Message-Id: 1538689001.3bc81d2a068f2f755a5f2c5b28e839f4e322b125.asturm@gentoo
1 commit: 3bc81d2a068f2f755a5f2c5b28e839f4e322b125
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 4 21:20:11 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 4 21:36:41 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bc81d2a
7
8 dev-db/kdb: USE=mysql DEPENDs on dev-db/mysql-connector-c
9
10 - Switch away from virtual/mysql
11 - Add one runtime fix
12 - Find postgresql-11
13
14 Closes: https://bugs.gentoo.org/665834
15 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
16 Package-Manager: Portage-2.3.50, Repoman-2.3.11
17
18 dev-db/kdb/files/kdb-3.1.0-crashfix.patch | 29 +++++++++++
19 .../kdb/files/kdb-3.1.0-fix-loading-objdata.patch | 27 ++++++++++
20 dev-db/kdb/files/kdb-3.1.0-postgresql-11.patch | 24 +++++++++
21 dev-db/kdb/kdb-3.1.0-r2.ebuild | 57 ++++++++++++++++++++++
22 4 files changed, 137 insertions(+)
23
24 diff --git a/dev-db/kdb/files/kdb-3.1.0-crashfix.patch b/dev-db/kdb/files/kdb-3.1.0-crashfix.patch
25 new file mode 100644
26 index 00000000000..dcc114d4991
27 --- /dev/null
28 +++ b/dev-db/kdb/files/kdb-3.1.0-crashfix.patch
29 @@ -0,0 +1,29 @@
30 +From 386375b6dd9841fdb24a56dcd637be38fcb4c175 Mon Sep 17 00:00:00 2001
31 +From: Jaroslaw Staniek <staniek@×××.org>
32 +Date: Tue, 27 Mar 2018 00:20:34 +0200
33 +Subject: Fix crash in KDbConnection::recordCount(KDbTableSchema)
34 +
35 +FIXED-IN:3.1.1
36 +---
37 + src/KDbConnection.cpp | 6 ++----
38 + 1 file changed, 2 insertions(+), 4 deletions(-)
39 +
40 +diff --git a/src/KDbConnection.cpp b/src/KDbConnection.cpp
41 +index e53bb33..d416d12 100644
42 +--- a/src/KDbConnection.cpp
43 ++++ b/src/KDbConnection.cpp
44 +@@ -3420,10 +3420,8 @@ int KDbConnection::recordCount(const KDbTableSchema& tableSchema)
45 + {
46 + //! @todo does not work with non-SQL data sources
47 + int count = -1; // will be changed only on success of querySingleNumber()
48 +- const tristate result
49 +- = querySingleNumber(KDbEscapedString("SELECT COUNT(*) FROM ")
50 +- + tableSchema.connection()->escapeIdentifier(tableSchema.name()),
51 +- &count);
52 ++ const tristate result = querySingleNumber(
53 ++ KDbEscapedString("SELECT COUNT(*) FROM ") + escapeIdentifier(tableSchema.name()), &count);
54 + if (~result) {
55 + count = 0;
56 + }
57 +--
58 +cgit v0.11.2
59
60 diff --git a/dev-db/kdb/files/kdb-3.1.0-fix-loading-objdata.patch b/dev-db/kdb/files/kdb-3.1.0-fix-loading-objdata.patch
61 new file mode 100644
62 index 00000000000..7bf0100d418
63 --- /dev/null
64 +++ b/dev-db/kdb/files/kdb-3.1.0-fix-loading-objdata.patch
65 @@ -0,0 +1,27 @@
66 +From a00f37b024e1a0888de3266af9acff99e6f21aa2 Mon Sep 17 00:00:00 2001
67 +From: Jaroslaw Staniek <staniek@×××.org>
68 +Date: Tue, 1 May 2018 23:29:06 +0200
69 +Subject: Fix loading object data for given type and ID
70 +
71 +FIXED-IN:3.1.1
72 +
73 +CCBUG:393705
74 +---
75 + src/KDbConnection.cpp | 2 +-
76 + 1 file changed, 1 insertion(+), 1 deletion(-)
77 +
78 +diff --git a/src/KDbConnection.cpp b/src/KDbConnection.cpp
79 +index d416d12..690752d 100644
80 +--- a/src/KDbConnection.cpp
81 ++++ b/src/KDbConnection.cpp
82 +@@ -2188,7 +2188,7 @@ tristate KDbConnection::loadObjectData(int type, int id, KDbObject* object)
83 + }
84 + } else {
85 + if (true != querySingleRecord(KDbEscapedString("SELECT o_id, o_type, o_name, o_caption, o_desc "
86 +- "FROM kexi__objects WHERE o_type=%1 AND o_id=%1")
87 ++ "FROM kexi__objects WHERE o_type=%1 AND o_id=%2")
88 + .arg(d->driver->valueToSql(KDbField::Integer, type))
89 + .arg(d->driver->valueToSql(KDbField::Integer, id)),
90 + &data))
91 +--
92 +cgit v0.11.2
93
94 diff --git a/dev-db/kdb/files/kdb-3.1.0-postgresql-11.patch b/dev-db/kdb/files/kdb-3.1.0-postgresql-11.patch
95 new file mode 100644
96 index 00000000000..050335a3852
97 --- /dev/null
98 +++ b/dev-db/kdb/files/kdb-3.1.0-postgresql-11.patch
99 @@ -0,0 +1,24 @@
100 +From 675d51d86b377992aacdb8253cb7c3b8a80474c0 Mon Sep 17 00:00:00 2001
101 +From: Pino Toscano <pino@×××.org>
102 +Date: Tue, 22 May 2018 18:37:53 +0200
103 +Subject: cmake: find PostgreSQL 11
104 +
105 +---
106 + cmake/modules/FindPostgreSQL.cmake | 2 +-
107 + 1 file changed, 1 insertion(+), 1 deletion(-)
108 +
109 +diff --git a/cmake/modules/FindPostgreSQL.cmake b/cmake/modules/FindPostgreSQL.cmake
110 +index 039c380..56e6e56 100644
111 +--- a/cmake/modules/FindPostgreSQL.cmake
112 ++++ b/cmake/modules/FindPostgreSQL.cmake
113 +@@ -86,7 +86,7 @@ set(PostgreSQL_LIBRARY_DIR_MESSAGE "Set the PostgreSQL_LIBRARY_DIR cmake cache e
114 + set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to where PostgreSQL is found on the machine E.g C:/Program Files/PostgreSQL/8.4")
115 +
116 + set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
117 +- "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
118 ++ "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
119 +
120 + # Define additional search paths for root directories.
121 + foreach (suffix ${PostgreSQL_KNOWN_VERSIONS} )
122 +--
123 +cgit v0.11.2
124
125 diff --git a/dev-db/kdb/kdb-3.1.0-r2.ebuild b/dev-db/kdb/kdb-3.1.0-r2.ebuild
126 new file mode 100644
127 index 00000000000..e39c39e70d8
128 --- /dev/null
129 +++ b/dev-db/kdb/kdb-3.1.0-r2.ebuild
130 @@ -0,0 +1,57 @@
131 +# Copyright 1999-2018 Gentoo Authors
132 +# Distributed under the terms of the GNU General Public License v2
133 +
134 +EAPI=6
135 +
136 +PYTHON_COMPAT=( python2_7 python3_6 )
137 +
138 +inherit kde5 python-any-r1
139 +
140 +DESCRIPTION="Database connectivity and creation framework for various vendors"
141 +[[ ${KDE_BUILD_TYPE} != live ]] && SRC_URI="mirror://kde/stable/${PN}/src/${P}.tar.xz"
142 +
143 +LICENSE="LGPL-2+"
144 +SLOT="5/4"
145 +KEYWORDS="~amd64 ~x86"
146 +IUSE="debug mysql postgres sqlite"
147 +
148 +RDEPEND="
149 + $(add_frameworks_dep kcoreaddons)
150 + $(add_qt_dep qtgui)
151 + $(add_qt_dep qtnetwork)
152 + $(add_qt_dep qtwidgets)
153 + $(add_qt_dep qtxml)
154 + dev-libs/icu:=
155 + mysql? ( dev-db/mysql-connector-c:= )
156 + postgres? (
157 + $(add_qt_dep qtnetwork)
158 + dev-db/postgresql:*
159 + )
160 + sqlite? ( dev-db/sqlite:3 )
161 +"
162 +DEPEND="${RDEPEND}
163 + ${PYTHON_DEPS}
164 + dev-qt/linguist-tools:5
165 +"
166 +
167 +PATCHES=(
168 + "${FILESDIR}/${P}-crashfix.patch"
169 + "${FILESDIR}/${P}-fix-loading-objdata.patch"
170 + "${FILESDIR}/${P}-postgresql-11.patch"
171 +)
172 +
173 +pkg_setup() {
174 + python-any-r1_pkg_setup
175 + kde5_pkg_setup
176 +}
177 +
178 +src_configure() {
179 + local mycmakeargs=(
180 + -DKDB_DEBUG_GUI=$(usex debug)
181 + $(cmake-utils_use_find_package mysql MySQL)
182 + $(cmake-utils_use_find_package postgres PostgreSQL)
183 + $(cmake-utils_use_find_package sqlite Sqlite)
184 + )
185 +
186 + kde5_src_configure
187 +}