mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
dev-db/kdb: EAPI-8, python3.10, GCC-12, backport "3.2.1" fixes
Find PG-14 and -15 too. Closes: https://bugs.gentoo.org/845627 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST kdb-3.2.0-patches.tar.xz 7448 BLAKE2B 924a3ac0db2fedfa6d757dcb96fefc48540d5bee7dd2e1239e0e7eca9765393e3b72b13365a66a8e336a655aa4c8978e800f3baa86b704e85134d0c7281b90d7 SHA512 4fe59f33059dcfe19a26bed93615ce152f321f040daa57a2e6747a397aebbc896cd6c964cd2cb1350762552173ff146e4e51b864aa098ec5ae77e0dd6c6d9a2f
|
||||
DIST kdb-3.2.0.tar.xz 650180 BLAKE2B 306152b37c2ecc670d26a2df2ae8acb950505ecb37c4994f4debd1b80c8b2ee94252658fe28b59255d9ad0d350375171f3b43dc9e94949417c3aa9ed167134fe SHA512 7df22f2c5b6e20ae3de71cb6c76b234d2f1f33b2abcdffa85be313c63d067a40a85ed102b6256207315db08ced5d69f8bc40afdf84a188463713a6b2ffdb2df7
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
From 40cdaea4d7824cc1b0d26e6ad2dcb61fa2077911 Mon Sep 17 00:00:00 2001
|
||||
From: Pino Toscano <pino@kde.org>
|
||||
Date: Tue, 29 Oct 2019 07:52:32 +0100
|
||||
Subject: PgSQL driver: fix build with PostgreSQL 12+
|
||||
|
||||
ABSTIMEOID and RELTIMEOID were removed, as their data types were dropped.
|
||||
---
|
||||
src/drivers/postgresql/PostgresqlTypes.cpp | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
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
|
||||
--
|
||||
cgit v1.1
|
||||
@@ -1,68 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
@@ -14,7 +14,8 @@ DESCRIPTION="Database connectivity and creation framework for various vendors"
|
||||
HOMEPAGE="https://community.kde.org/KDb"
|
||||
|
||||
if [[ ${KDE_BUILD_TYPE} = release ]]; then
|
||||
SRC_URI="mirror://kde/stable/${PN}/src/${P}.tar.xz"
|
||||
SRC_URI="mirror://kde/stable/${PN}/src/${P}.tar.xz
|
||||
https://dev.gentoo.org/~asturm/distfiles/${P}-patches.tar.xz"
|
||||
KEYWORDS="amd64 x86"
|
||||
fi
|
||||
|
||||
@@ -44,11 +45,11 @@ RDEPEND="${DEPEND}"
|
||||
PATCHES=(
|
||||
# 3.2 branch
|
||||
"${FILESDIR}"/${P}-cmake-pg12.patch
|
||||
"${FILESDIR}"/${P}-build-w-pg12.patch
|
||||
"${WORKDIR}"/${P}-patches/${P}-build-w-pg12.patch
|
||||
"${FILESDIR}"/${P}-cmake-pg13.patch
|
||||
"${FILESDIR}"/${P}-qt-5.15.patch
|
||||
"${WORKDIR}"/${P}-patches/${P}-qt-5.15.patch
|
||||
# master
|
||||
"${FILESDIR}"/${P}-KDEInstallDirs.patch
|
||||
"${WORKDIR}"/${P}-patches/${P}-KDEInstallDirs.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
|
||||
70
dev-db/kdb/kdb-3.2.0-r2.ebuild
Normal file
70
dev-db/kdb/kdb-3.2.0-r2.ebuild
Normal file
@@ -0,0 +1,70 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
ECM_QTHELP="true"
|
||||
ECM_TEST="true"
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
KFMIN=5.82.0
|
||||
QTMIN=5.15.2
|
||||
inherit ecm kde.org python-any-r1
|
||||
|
||||
DESCRIPTION="Database connectivity and creation framework for various vendors"
|
||||
HOMEPAGE="https://community.kde.org/KDb"
|
||||
|
||||
if [[ ${KDE_BUILD_TYPE} = release ]]; then
|
||||
SRC_URI="mirror://kde/stable/${PN}/src/${P}.tar.xz
|
||||
https://dev.gentoo.org/~asturm/distfiles/${P}-patches.tar.xz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
LICENSE="LGPL-2+"
|
||||
SLOT="5/4"
|
||||
IUSE="debug mysql postgres sqlite"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/icu:=
|
||||
>=dev-qt/qtgui-${QTMIN}:5
|
||||
>=dev-qt/qtnetwork-${QTMIN}:5
|
||||
>=dev-qt/qtwidgets-${QTMIN}:5
|
||||
>=dev-qt/qtxml-${QTMIN}:5
|
||||
>=kde-frameworks/kcoreaddons-${KFMIN}:5
|
||||
mysql? ( dev-db/mysql-connector-c:= )
|
||||
postgres? (
|
||||
dev-db/postgresql:*
|
||||
>=dev-qt/qtnetwork-${QTMIN}:5
|
||||
)
|
||||
sqlite? ( dev-db/sqlite:3 )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="${PYTHON_DEPS}
|
||||
dev-qt/linguist-tools:5
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
# 3.2 branch
|
||||
"${WORKDIR}"/${P}-patches/${P}-build-w-pg12.patch
|
||||
"${WORKDIR}"/${P}-patches/${P}-qt-5.15.patch
|
||||
"${WORKDIR}"/${P}-patches/${P}-cmake-pg15.patch
|
||||
"${WORKDIR}"/${P}-patches/${P}-Q_REQUIRED_RESULT-placing.patch
|
||||
"${WORKDIR}"/${P}-patches/${P}-gcc12.patch
|
||||
# master
|
||||
"${WORKDIR}"/${P}-patches/${P}-KDEInstallDirs.patch
|
||||
)
|
||||
|
||||
pkg_setup() {
|
||||
python-any-r1_pkg_setup
|
||||
ecm_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DKDB_DEBUG_GUI=$(usex debug)
|
||||
$(cmake_use_find_package mysql MySQL)
|
||||
$(cmake_use_find_package postgres PostgreSQL)
|
||||
$(cmake_use_find_package sqlite Sqlite)
|
||||
)
|
||||
|
||||
ecm_src_configure
|
||||
}
|
||||
Reference in New Issue
Block a user