diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2021-04-20 13:23:34 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2021-04-20 14:58:44 +0200 |
commit | 9b9dbe1352ec5865dd13d2bc4727dc4c4e9a80f1 (patch) | |
tree | dda43ff675ba669e530d4c58632fac67bbe4203a /dev-db/kdb | |
parent | dev-java/commons-codec: removed unused file (diff) | |
download | gentoo-9b9dbe1352ec5865dd13d2bc4727dc4c4e9a80f1.tar.gz gentoo-9b9dbe1352ec5865dd13d2bc4727dc4c4e9a80f1.tar.bz2 gentoo-9b9dbe1352ec5865dd13d2bc4727dc4c4e9a80f1.zip |
dev-db/kdb: Build with Qt 5.15+, find postgresql-13
Use non-deprecated KDEInstallDirs vars.
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-db/kdb')
-rw-r--r-- | dev-db/kdb/files/kdb-3.2.0-KDEInstallDirs.patch | 52 | ||||
-rw-r--r-- | dev-db/kdb/files/kdb-3.2.0-cmake-pg13.patch | 25 | ||||
-rw-r--r-- | dev-db/kdb/files/kdb-3.2.0-qt-5.15.patch | 68 | ||||
-rw-r--r-- | dev-db/kdb/kdb-3.2.0-r1.ebuild | 68 |
4 files changed, 213 insertions, 0 deletions
diff --git a/dev-db/kdb/files/kdb-3.2.0-KDEInstallDirs.patch b/dev-db/kdb/files/kdb-3.2.0-KDEInstallDirs.patch new file mode 100644 index 000000000000..c0b8cb8c2009 --- /dev/null +++ b/dev-db/kdb/files/kdb-3.2.0-KDEInstallDirs.patch @@ -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 + 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 new file mode 100644 index 000000000000..83785533fa87 --- /dev/null +++ b/dev-db/kdb/files/kdb-3.2.0-cmake-pg13.patch @@ -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 + 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 new file mode 100644 index 000000000000..e4a2a2d11463 --- /dev/null +++ b/dev-db/kdb/files/kdb-3.2.0-qt-5.15.patch @@ -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 + diff --git a/dev-db/kdb/kdb-3.2.0-r1.ebuild b/dev-db/kdb/kdb-3.2.0-r1.ebuild new file mode 100644 index 000000000000..8adc6d348e00 --- /dev/null +++ b/dev-db/kdb/kdb-3.2.0-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ECM_QTHELP="true" +ECM_TEST="true" +PYTHON_COMPAT=( python3_{7,8,9} ) +KFMIN=5.60.0 +QTMIN=5.12.3 +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" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="LGPL-2+" +SLOT="5/4" +IUSE="debug mysql postgres sqlite" + +BDEPEND="${PYTHON_DEPS} + dev-qt/linguist-tools:5 +" +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-qt/qtnetwork-${QTMIN}:5 + dev-db/postgresql:* + ) + sqlite? ( dev-db/sqlite:3 ) +" +RDEPEND="${DEPEND}" + +PATCHES=( + # 3.2 branch + "${FILESDIR}"/${P}-cmake-pg12.patch + "${FILESDIR}"/${P}-build-w-pg12.patch + "${FILESDIR}"/${P}-cmake-pg13.patch + "${FILESDIR}"/${P}-qt-5.15.patch + # master + "${FILESDIR}"/${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 +} |