mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
kdb, revbump, switch python version, add patches from upstream for newer Qt5 (#10123)
This commit is contained in:
@@ -12,10 +12,11 @@ handling layer for Kexi and similar complex apps."
|
||||
HOMEPAGE="https://community.kde.org/KDb"
|
||||
COPYRIGHT="2010-2021 KDE Organisation"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
SOURCE_URI="https://github.com/KDE/kdb/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="c651d240c641b5cdd882a99c5ec6345387d0a4e05f8ca1d59f4daaf08c3f7141"
|
||||
SOURCE_DIR="kdb-$portVersion"
|
||||
PATCHES="kdb-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
@@ -68,41 +69,39 @@ BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:python2
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python3
|
||||
cmd:qdbuscpp2xml$secondaryArchSuffix >= 5
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
cmake .. $cmakeDirArgs \
|
||||
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs \
|
||||
-DPYTHON_EXECUTABLE=/system/bin/python3 \
|
||||
-DKDE_INSTALL_PLUGINDIR=$addOnsDir/Qt5 \
|
||||
-DKDE_INSTALL_QTPLUGINDIR=$addOnsDir/Qt5 \
|
||||
-DECM_MKSPECS_INSTALL_DIR=$dataDir/Qt5/mkspecs \
|
||||
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake
|
||||
make $jobArgs
|
||||
-DECM_DIR=/system/data/cmake/Modules/ECM/cmake \
|
||||
-Wno-dev
|
||||
make -Cbuild $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
make -Cbuild install
|
||||
|
||||
prepareInstalledDevelLib \
|
||||
libKDb3
|
||||
fixPkgconfig
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libKDb3
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$dataDir \
|
||||
$libDir/cmake \
|
||||
$developDir
|
||||
$libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build
|
||||
make test
|
||||
make -Cbuild test
|
||||
}
|
||||
|
||||
165
dev-db/kdb/patches/kdb-3.2.0.patchset
Normal file
165
dev-db/kdb/patches/kdb-3.2.0.patchset
Normal file
@@ -0,0 +1,165 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user