Files
haikuports/dev-db/kdb/patches/kdb-3.2.0.patchset

166 lines
5.4 KiB
Plaintext

From cc34c817d9960271a00c70179035097c7448664e Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Mon, 19 Feb 2024 13:43:10 +0100
Subject: python3 changes
Silence deprecated warnings
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 940acba..c035b16 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,6 +44,10 @@ get_git_revision_and_branch()
add_unfinished_features_option()
add_pc_file(${PROJECT_NAME})
+if(HAIKU)
+ add_definitions(-Wno-deprecated-copy -Wno-deprecated-declarations)
+endif()
+
add_subdirectory(src)
add_subdirectory(tools)
diff --git a/tools/sdc.py b/tools/sdc.py
index 70f386e..0a69a94 100755
--- a/tools/sdc.py
+++ b/tools/sdc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
#
--
2.42.1
From 137afd14448cbf4b0769d425b72e130666551cab Mon Sep 17 00:00:00 2001
From: Pino Toscano <pino@kde.org>
Date: Tue, 29 Oct 2019 07:52:32 +0100
Subject: [PATCH] PgSQL driver: fix build with PostgreSQL 12+
diff --git a/src/drivers/postgresql/PostgresqlTypes.cpp b/src/drivers/postgresql/PostgresqlTypes.cpp
index ea576d6..0697129 100644
--- a/src/drivers/postgresql/PostgresqlTypes.cpp
+++ b/src/drivers/postgresql/PostgresqlTypes.cpp
@@ -36,6 +36,7 @@
#endif
#include <libpq-fe.h>
#include <catalog/pg_type.h> // needed for BOOLOID, etc.
+#include <pg_config.h> // needed for PG_VERSION_NUM
#ifdef _MSC_VER
#pragma warning( pop )
@@ -70,8 +71,10 @@ void PostgresqlDriver::initPgsqlToKDbMap()
//! @todo POLYGONOID geometric polygon '(pt1,...)'
m_pgsqlToKDbTypes.insert(FLOAT4OID, KDbField::Double);
m_pgsqlToKDbTypes.insert(FLOAT8OID, KDbField::Double);
+#if PG_VERSION_NUM < 120000
m_pgsqlToKDbTypes.insert(ABSTIMEOID, KDbField::Date);
m_pgsqlToKDbTypes.insert(RELTIMEOID, KDbField::Date);
+#endif
//! @todo TINTERVALOID (abstime,abstime), time interval
//! @todo CIRCLEOID geometric circle '(center,radius)'
//! @todo CASHOID monetary amounts, $d,ddd.cc
--
2.42.1
From 85e408bfe1b73fe46f71ae1ceb532291ace63d3d 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
diff --git a/src/KDb.cpp b/src/KDb.cpp
index 5c3b601..ee92c2e 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.42.1
From 6c83fd949c2d30aa7c2c759162e7067288677321 Mon Sep 17 00:00:00 2001
From: Bhushan Shah <bhush94@gmail.com>
Date: Sun, 13 Dec 2020 19:16:30 +0530
Subject: [PATCH] include KDEInstallDirs as first thing
Otherwise ECMGeneratePriFile won't get correct paths and will install
pri file in wrong place and things wanting to use kdb with qmake won't
work.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c035b16..14f61ed 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,12 +11,12 @@ kdb_add_tests(OFF)
kdb_add_examples(OFF)
# ECM
+include(KDEInstallDirs)
include(ECMGeneratePriFile)
include(ECMInstallIcons)
include(ECMOptionalAddSubdirectory)
include(ECMPoQmTools)
include(ECMSetupVersion)
-include(KDEInstallDirs)
include(KDECMakeSettings NO_POLICY_SCOPE)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
--
2.42.1