1 |
commit: 9b9dbe1352ec5865dd13d2bc4727dc4c4e9a80f1 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 20 11:23:34 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 20 12:58:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b9dbe13 |
7 |
|
8 |
dev-db/kdb: Build with Qt 5.15+, find postgresql-13 |
9 |
|
10 |
Use non-deprecated KDEInstallDirs vars. |
11 |
|
12 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
13 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
14 |
|
15 |
dev-db/kdb/files/kdb-3.2.0-KDEInstallDirs.patch | 52 +++++++++++++++++++ |
16 |
dev-db/kdb/files/kdb-3.2.0-cmake-pg13.patch | 25 +++++++++ |
17 |
dev-db/kdb/files/kdb-3.2.0-qt-5.15.patch | 68 +++++++++++++++++++++++++ |
18 |
dev-db/kdb/kdb-3.2.0-r1.ebuild | 68 +++++++++++++++++++++++++ |
19 |
4 files changed, 213 insertions(+) |
20 |
|
21 |
diff --git a/dev-db/kdb/files/kdb-3.2.0-KDEInstallDirs.patch b/dev-db/kdb/files/kdb-3.2.0-KDEInstallDirs.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..c0b8cb8c200 |
24 |
--- /dev/null |
25 |
+++ b/dev-db/kdb/files/kdb-3.2.0-KDEInstallDirs.patch |
26 |
@@ -0,0 +1,52 @@ |
27 |
+From 259684d4768f64fe4f0773442cce83dec089720a Mon Sep 17 00:00:00 2001 |
28 |
+From: "Friedrich W. H. Kossebau" <kossebau@×××.org> |
29 |
+Date: Mon, 18 Jan 2021 16:37:20 +0100 |
30 |
+Subject: [PATCH] Use non-deprecated KDEInstaUse non-deprecated KDEInstallDirs |
31 |
+ variables |
32 |
+ |
33 |
+GIT_SILENT |
34 |
+--- |
35 |
+ src/CMakeLists.txt | 2 +- |
36 |
+ src/drivers/CMakeLists.txt | 2 +- |
37 |
+ src/drivers/sqlite/dump/CMakeLists.txt | 2 +- |
38 |
+ 3 files changed, 3 insertions(+), 3 deletions(-) |
39 |
+ |
40 |
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
41 |
+index 78c91e8c..4a392b63 100644 |
42 |
+--- a/src/CMakeLists.txt |
43 |
++++ b/src/CMakeLists.txt |
44 |
+@@ -250,7 +250,7 @@ if(BUILD_TEST_COVERAGE) |
45 |
+ endif() |
46 |
+ |
47 |
+ # Create a Config.cmake and a ConfigVersion.cmake file and install them |
48 |
+-set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/${KDB_BASE_NAME}") |
49 |
++set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/${KDB_BASE_NAME}") |
50 |
+ |
51 |
+ ecm_setup_version(${PROJECT_VERSION} |
52 |
+ VARIABLE_PREFIX KDB |
53 |
+diff --git a/src/drivers/CMakeLists.txt b/src/drivers/CMakeLists.txt |
54 |
+index 6fd7f14d..fb2005cc 100644 |
55 |
+--- a/src/drivers/CMakeLists.txt |
56 |
++++ b/src/drivers/CMakeLists.txt |
57 |
+@@ -5,7 +5,7 @@ endif() |
58 |
+ |
59 |
+ #TODO add_definitions(-DKDE_DEFAULT_DEBUG_AREA=44001) |
60 |
+ |
61 |
+-set(KDB_PLUGIN_INSTALL_DIR ${PLUGIN_INSTALL_DIR}/${KDB_BASE_NAME_LOWER}) |
62 |
++set(KDB_PLUGIN_INSTALL_DIR ${KDE_INSTALL_PLUGINDIR}/${KDB_BASE_NAME_LOWER}) |
63 |
+ |
64 |
+ # ----------------------- |
65 |
+ macro(build_and_install_kdb_driver _name _srcs _extra_libs) |
66 |
+diff --git a/src/drivers/sqlite/dump/CMakeLists.txt b/src/drivers/sqlite/dump/CMakeLists.txt |
67 |
+index cfffb5c6..27093ccb 100644 |
68 |
+--- a/src/drivers/sqlite/dump/CMakeLists.txt |
69 |
++++ b/src/drivers/sqlite/dump/CMakeLists.txt |
70 |
+@@ -15,4 +15,4 @@ if(WIN32) |
71 |
+ PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE") |
72 |
+ endif() |
73 |
+ |
74 |
+-install(TARGETS ${KDB_SQLITE_DUMP_TOOL} ${INSTALL_TARGETS_DEFAULT_ARGS}) |
75 |
++install(TARGETS ${KDB_SQLITE_DUMP_TOOL} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) |
76 |
+-- |
77 |
+2.31.1 |
78 |
+ |
79 |
|
80 |
diff --git a/dev-db/kdb/files/kdb-3.2.0-cmake-pg13.patch b/dev-db/kdb/files/kdb-3.2.0-cmake-pg13.patch |
81 |
new file mode 100644 |
82 |
index 00000000000..83785533fa8 |
83 |
--- /dev/null |
84 |
+++ b/dev-db/kdb/files/kdb-3.2.0-cmake-pg13.patch |
85 |
@@ -0,0 +1,25 @@ |
86 |
+From fb5dafb01ffba27b5868eaeb99816f3e8c1cf91c Mon Sep 17 00:00:00 2001 |
87 |
+From: Pino Toscano <pino@×××.org> |
88 |
+Date: Fri, 22 May 2020 18:59:11 +0200 |
89 |
+Subject: [PATCH] cmake: find PostgreSQL 13 |
90 |
+ |
91 |
+--- |
92 |
+ cmake/modules/FindPostgreSQL.cmake | 2 +- |
93 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
94 |
+ |
95 |
+diff --git a/cmake/modules/FindPostgreSQL.cmake b/cmake/modules/FindPostgreSQL.cmake |
96 |
+index 74e6f6b4..90db33ba 100644 |
97 |
+--- a/cmake/modules/FindPostgreSQL.cmake |
98 |
++++ b/cmake/modules/FindPostgreSQL.cmake |
99 |
+@@ -86,7 +86,7 @@ set(PostgreSQL_LIBRARY_DIR_MESSAGE "Set the PostgreSQL_LIBRARY_DIR cmake cache e |
100 |
+ 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") |
101 |
+ |
102 |
+ set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS} |
103 |
+- "12" "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") |
104 |
++ "13" "12" "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") |
105 |
+ |
106 |
+ # Define additional search paths for root directories. |
107 |
+ foreach (suffix ${PostgreSQL_KNOWN_VERSIONS} ) |
108 |
+-- |
109 |
+2.31.1 |
110 |
+ |
111 |
|
112 |
diff --git a/dev-db/kdb/files/kdb-3.2.0-qt-5.15.patch b/dev-db/kdb/files/kdb-3.2.0-qt-5.15.patch |
113 |
new file mode 100644 |
114 |
index 00000000000..e4a2a2d1146 |
115 |
--- /dev/null |
116 |
+++ b/dev-db/kdb/files/kdb-3.2.0-qt-5.15.patch |
117 |
@@ -0,0 +1,68 @@ |
118 |
+From 3a31ad05fcc7682bf3b65143af99fdb9b2e1e248 Mon Sep 17 00:00:00 2001 |
119 |
+From: Nicolas Fella <nicolas.fella@×××.de> |
120 |
+Date: Mon, 16 Nov 2020 16:41:27 +0100 |
121 |
+Subject: [PATCH] Fix build with newer Qt |
122 |
+ |
123 |
+(cherry picked from commit b36d74f13a1421437a725fb74502c993c359392a) |
124 |
+--- |
125 |
+ src/KDb.cpp | 34 +++++++++++++++++----------------- |
126 |
+ 1 file changed, 17 insertions(+), 17 deletions(-) |
127 |
+ |
128 |
+diff --git a/src/KDb.cpp b/src/KDb.cpp |
129 |
+index 5c3b601f..ee92c2ee 100644 |
130 |
+--- a/src/KDb.cpp |
131 |
++++ b/src/KDb.cpp |
132 |
+@@ -1635,33 +1635,33 @@ QString KDb::escapeBLOB(const QByteArray& array, BLOBEscapingType type) |
133 |
+ for (int i = 0; i < size; i++) { |
134 |
+ const unsigned char val = array[i]; |
135 |
+ if (val < 32 || val >= 127 || val == 39 || val == 92) { |
136 |
+- str[new_length++] = '\\'; |
137 |
+- str[new_length++] = '\\'; |
138 |
+- str[new_length++] = '0' + val / 64; |
139 |
+- str[new_length++] = '0' + (val % 64) / 8; |
140 |
+- str[new_length++] = '0' + val % 8; |
141 |
++ str[new_length++] = QLatin1Char('\\'); |
142 |
++ str[new_length++] = QLatin1Char('\\'); |
143 |
++ str[new_length++] = QChar::fromLatin1('0' + val / 64); |
144 |
++ str[new_length++] = QChar::fromLatin1('0' + (val % 64) / 8); |
145 |
++ str[new_length++] = QChar::fromLatin1('0' + val % 8); |
146 |
+ } else { |
147 |
+- str[new_length++] = val; |
148 |
++ str[new_length++] = QChar::fromLatin1(val); |
149 |
+ } |
150 |
+ } |
151 |
+ } else { |
152 |
+ for (int i = 0; i < size; i++) { |
153 |
+ const unsigned char val = array[i]; |
154 |
+- str[new_length++] = intToHexDigit(val / 16); |
155 |
+- str[new_length++] = intToHexDigit(val % 16); |
156 |
++ str[new_length++] = QChar::fromLatin1(intToHexDigit(val / 16)); |
157 |
++ str[new_length++] = QChar::fromLatin1(intToHexDigit(val % 16)); |
158 |
+ } |
159 |
+ } |
160 |
+ if (type == BLOBEscapingType::XHex || type == BLOBEscapingType::Octal) { |
161 |
+- str[new_length++] = '\''; |
162 |
++ str[new_length++] = QLatin1Char('\''); |
163 |
+ } else if (type == BLOBEscapingType::ByteaHex) { |
164 |
+- str[new_length++] = '\''; |
165 |
+- str[new_length++] = ':'; |
166 |
+- str[new_length++] = ':'; |
167 |
+- str[new_length++] = 'b'; |
168 |
+- str[new_length++] = 'y'; |
169 |
+- str[new_length++] = 't'; |
170 |
+- str[new_length++] = 'e'; |
171 |
+- str[new_length++] = 'a'; |
172 |
++ str[new_length++] = QLatin1Char('\''); |
173 |
++ str[new_length++] = QLatin1Char(':'); |
174 |
++ str[new_length++] = QLatin1Char(':'); |
175 |
++ str[new_length++] = QLatin1Char('b'); |
176 |
++ str[new_length++] = QLatin1Char('y'); |
177 |
++ str[new_length++] = QLatin1Char('t'); |
178 |
++ str[new_length++] = QLatin1Char('e'); |
179 |
++ str[new_length++] = QLatin1Char('a'); |
180 |
+ } |
181 |
+ return str; |
182 |
+ } |
183 |
+-- |
184 |
+2.31.1 |
185 |
+ |
186 |
|
187 |
diff --git a/dev-db/kdb/kdb-3.2.0-r1.ebuild b/dev-db/kdb/kdb-3.2.0-r1.ebuild |
188 |
new file mode 100644 |
189 |
index 00000000000..8adc6d348e0 |
190 |
--- /dev/null |
191 |
+++ b/dev-db/kdb/kdb-3.2.0-r1.ebuild |
192 |
@@ -0,0 +1,68 @@ |
193 |
+# Copyright 1999-2021 Gentoo Authors |
194 |
+# Distributed under the terms of the GNU General Public License v2 |
195 |
+ |
196 |
+EAPI=7 |
197 |
+ |
198 |
+ECM_QTHELP="true" |
199 |
+ECM_TEST="true" |
200 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
201 |
+KFMIN=5.60.0 |
202 |
+QTMIN=5.12.3 |
203 |
+inherit ecm kde.org python-any-r1 |
204 |
+ |
205 |
+DESCRIPTION="Database connectivity and creation framework for various vendors" |
206 |
+HOMEPAGE="https://community.kde.org/KDb" |
207 |
+ |
208 |
+if [[ ${KDE_BUILD_TYPE} = release ]]; then |
209 |
+ SRC_URI="mirror://kde/stable/${PN}/src/${P}.tar.xz" |
210 |
+ KEYWORDS="~amd64 ~x86" |
211 |
+fi |
212 |
+ |
213 |
+LICENSE="LGPL-2+" |
214 |
+SLOT="5/4" |
215 |
+IUSE="debug mysql postgres sqlite" |
216 |
+ |
217 |
+BDEPEND="${PYTHON_DEPS} |
218 |
+ dev-qt/linguist-tools:5 |
219 |
+" |
220 |
+DEPEND=" |
221 |
+ dev-libs/icu:= |
222 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
223 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
224 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
225 |
+ >=dev-qt/qtxml-${QTMIN}:5 |
226 |
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5 |
227 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
228 |
+ postgres? ( |
229 |
+ >=dev-qt/qtnetwork-${QTMIN}:5 |
230 |
+ dev-db/postgresql:* |
231 |
+ ) |
232 |
+ sqlite? ( dev-db/sqlite:3 ) |
233 |
+" |
234 |
+RDEPEND="${DEPEND}" |
235 |
+ |
236 |
+PATCHES=( |
237 |
+ # 3.2 branch |
238 |
+ "${FILESDIR}"/${P}-cmake-pg12.patch |
239 |
+ "${FILESDIR}"/${P}-build-w-pg12.patch |
240 |
+ "${FILESDIR}"/${P}-cmake-pg13.patch |
241 |
+ "${FILESDIR}"/${P}-qt-5.15.patch |
242 |
+ # master |
243 |
+ "${FILESDIR}"/${P}-KDEInstallDirs.patch |
244 |
+) |
245 |
+ |
246 |
+pkg_setup() { |
247 |
+ python-any-r1_pkg_setup |
248 |
+ ecm_pkg_setup |
249 |
+} |
250 |
+ |
251 |
+src_configure() { |
252 |
+ local mycmakeargs=( |
253 |
+ -DKDB_DEBUG_GUI=$(usex debug) |
254 |
+ $(cmake_use_find_package mysql MySQL) |
255 |
+ $(cmake_use_find_package postgres PostgreSQL) |
256 |
+ $(cmake_use_find_package sqlite Sqlite) |
257 |
+ ) |
258 |
+ |
259 |
+ ecm_src_configure |
260 |
+} |