This commit is contained in:
Rmys
2021-06-17 09:08:07 +03:00
committed by GitHub
parent 4e97c126ca
commit d48a14c187
5 changed files with 173 additions and 0 deletions
@@ -0,0 +1,52 @@
From 259684d4768f64fe4f0773442cce83dec089720a Mon Sep 17 00:00:00 2001
From: "Friedrich W. H. Kossebau" <kossebau@kde.org>
Date: Mon, 18 Jan 2021 16:37:20 +0100
Subject: [PATCH] Use non-deprecated KDEInstaUse non-deprecated KDEInstallDirs
variables
GIT_SILENT
---
src/CMakeLists.txt | 2 +-
src/drivers/CMakeLists.txt | 2 +-
src/drivers/sqlite/dump/CMakeLists.txt | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 78c91e8c..4a392b63 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -250,7 +250,7 @@ if(BUILD_TEST_COVERAGE)
endif()
# Create a Config.cmake and a ConfigVersion.cmake file and install them
-set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/${KDB_BASE_NAME}")
+set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/${KDB_BASE_NAME}")
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX KDB
diff --git a/src/drivers/CMakeLists.txt b/src/drivers/CMakeLists.txt
index 6fd7f14d..fb2005cc 100644
--- a/src/drivers/CMakeLists.txt
+++ b/src/drivers/CMakeLists.txt
@@ -5,7 +5,7 @@ endif()
#TODO add_definitions(-DKDE_DEFAULT_DEBUG_AREA=44001)
-set(KDB_PLUGIN_INSTALL_DIR ${PLUGIN_INSTALL_DIR}/${KDB_BASE_NAME_LOWER})
+set(KDB_PLUGIN_INSTALL_DIR ${KDE_INSTALL_PLUGINDIR}/${KDB_BASE_NAME_LOWER})
# -----------------------
macro(build_and_install_kdb_driver _name _srcs _extra_libs)
diff --git a/src/drivers/sqlite/dump/CMakeLists.txt b/src/drivers/sqlite/dump/CMakeLists.txt
index cfffb5c6..27093ccb 100644
--- a/src/drivers/sqlite/dump/CMakeLists.txt
+++ b/src/drivers/sqlite/dump/CMakeLists.txt
@@ -15,4 +15,4 @@ if(WIN32)
PROPERTIES LINK_FLAGS "/SUBSYSTEM:CONSOLE")
endif()
-install(TARGETS ${KDB_SQLITE_DUMP_TOOL} ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS ${KDB_SQLITE_DUMP_TOOL} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
--
2.31.1
@@ -0,0 +1,24 @@
From 6bba3130f8968abb2e904bda1e8b59f83dd43bdc Mon Sep 17 00:00:00 2001
From: Pino Toscano <pino@kde.org>
Date: Sat, 25 May 2019 06:59:44 +0200
Subject: cmake: find PostgreSQL 12
---
cmake/modules/FindPostgreSQL.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/modules/FindPostgreSQL.cmake b/cmake/modules/FindPostgreSQL.cmake
index 8ec30db..74e6f6b 100644
--- a/cmake/modules/FindPostgreSQL.cmake
+++ b/cmake/modules/FindPostgreSQL.cmake
@@ -86,7 +86,7 @@ set(PostgreSQL_LIBRARY_DIR_MESSAGE "Set the PostgreSQL_LIBRARY_DIR cmake cache e
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")
set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
- "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")
+ "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")
# Define additional search paths for root directories.
foreach (suffix ${PostgreSQL_KNOWN_VERSIONS} )
--
cgit v1.1
@@ -0,0 +1,25 @@
From fb5dafb01ffba27b5868eaeb99816f3e8c1cf91c Mon Sep 17 00:00:00 2001
From: Pino Toscano <pino@kde.org>
Date: Fri, 22 May 2020 18:59:11 +0200
Subject: [PATCH] cmake: find PostgreSQL 13
---
cmake/modules/FindPostgreSQL.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmake/modules/FindPostgreSQL.cmake b/cmake/modules/FindPostgreSQL.cmake
index 74e6f6b4..90db33ba 100644
--- a/cmake/modules/FindPostgreSQL.cmake
+++ b/cmake/modules/FindPostgreSQL.cmake
@@ -86,7 +86,7 @@ set(PostgreSQL_LIBRARY_DIR_MESSAGE "Set the PostgreSQL_LIBRARY_DIR cmake cache e
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")
set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
- "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")
+ "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")
# Define additional search paths for root directories.
foreach (suffix ${PostgreSQL_KNOWN_VERSIONS} )
--
2.31.1
@@ -0,0 +1,68 @@
From 3a31ad05fcc7682bf3b65143af99fdb9b2e1e248 Mon Sep 17 00:00:00 2001
From: Nicolas Fella <nicolas.fella@gmx.de>
Date: Mon, 16 Nov 2020 16:41:27 +0100
Subject: [PATCH] Fix build with newer Qt
(cherry picked from commit b36d74f13a1421437a725fb74502c993c359392a)
---
src/KDb.cpp | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/KDb.cpp b/src/KDb.cpp
index 5c3b601f..ee92c2ee 100644
--- a/src/KDb.cpp
+++ b/src/KDb.cpp
@@ -1635,33 +1635,33 @@ QString KDb::escapeBLOB(const QByteArray& array, BLOBEscapingType type)
for (int i = 0; i < size; i++) {
const unsigned char val = array[i];
if (val < 32 || val >= 127 || val == 39 || val == 92) {
- str[new_length++] = '\\';
- str[new_length++] = '\\';
- str[new_length++] = '0' + val / 64;
- str[new_length++] = '0' + (val % 64) / 8;
- str[new_length++] = '0' + val % 8;
+ str[new_length++] = QLatin1Char('\\');
+ str[new_length++] = QLatin1Char('\\');
+ str[new_length++] = QChar::fromLatin1('0' + val / 64);
+ str[new_length++] = QChar::fromLatin1('0' + (val % 64) / 8);
+ str[new_length++] = QChar::fromLatin1('0' + val % 8);
} else {
- str[new_length++] = val;
+ str[new_length++] = QChar::fromLatin1(val);
}
}
} else {
for (int i = 0; i < size; i++) {
const unsigned char val = array[i];
- str[new_length++] = intToHexDigit(val / 16);
- str[new_length++] = intToHexDigit(val % 16);
+ str[new_length++] = QChar::fromLatin1(intToHexDigit(val / 16));
+ str[new_length++] = QChar::fromLatin1(intToHexDigit(val % 16));
}
}
if (type == BLOBEscapingType::XHex || type == BLOBEscapingType::Octal) {
- str[new_length++] = '\'';
+ str[new_length++] = QLatin1Char('\'');
} else if (type == BLOBEscapingType::ByteaHex) {
- str[new_length++] = '\'';
- str[new_length++] = ':';
- str[new_length++] = ':';
- str[new_length++] = 'b';
- str[new_length++] = 'y';
- str[new_length++] = 't';
- str[new_length++] = 'e';
- str[new_length++] = 'a';
+ str[new_length++] = QLatin1Char('\'');
+ str[new_length++] = QLatin1Char(':');
+ str[new_length++] = QLatin1Char(':');
+ str[new_length++] = QLatin1Char('b');
+ str[new_length++] = QLatin1Char('y');
+ str[new_length++] = QLatin1Char('t');
+ str[new_length++] = QLatin1Char('e');
+ str[new_length++] = QLatin1Char('a');
}
return str;
}
--
2.31.1
+4
View File
@@ -27,6 +27,10 @@
</BuildDependencies>
<Patches>
<Patch level="1">kdb-3.2.0-build-w-pg12.patch</Patch>
<Patch level="1">kdb-3.2.0-cmake-pg12.patch</Patch>
<Patch level="1">kdb-3.2.0-cmake-pg13.patch</Patch>
<Patch level="1">kdb-3.2.0-qt-5.15.patch</Patch>
<Patch level="1">kdb-3.2.0-KDEInstallDirs.patch</Patch>
</Patches>
</Source>